Submission #797308

#TimeUsernameProblemLanguageResultExecution timeMemory
797308fatemetmhrRail (IOI14_rail)C++17
Compilation error
0 ms0 KiB
g++ gen.cpp -std=c++2a -O2 -o gen.out
g++ -fsanitize=undefined -std=gnu++17 -O2 -static -o a.out grader.cpp seats.cpp
g++ -fsanitize=undefined -std=gnu++17 -O2 -static -o b.out grader.cpp b.cpp
#g++-13 checker.cpp -std=c++2a -O2 -o checker.out


for (( i = 1; i <= 20000; i++ ))
do

	#echo 1 $i > in.txt
	#echo Running test $i
	./gen.out > in.txt 
	./a.out < in.txt > out1.txt
	./b.out < in.txt > out2.txt
	#./checker.out < in.txt > o1.txt
	
	
	#echo AC > o2.txt
	
	diff -bBq out1.txt out2.txt
	if [ $? == 0 ]
	then
		echo AccepteD on test $i
	else
		echo Wrong on test $i
		#cat o1.txt
		#cat in.txt
		#cat	out1.txt
		#cat out2.txt
		exit
	fi
done

Compilation message (stderr)

rail.cpp:4:2: error: invalid preprocessing directive #g
    4 | #g++-13 checker.cpp -std=c++2a -O2 -o checker.out
      |  ^
rail.cpp:10:3: error: invalid preprocessing directive #echo
   10 |  #echo 1 $i > in.txt
      |   ^~~~
rail.cpp:11:3: error: invalid preprocessing directive #echo
   11 |  #echo Running test $i
      |   ^~~~
rail.cpp:15:3: error: invalid preprocessing directive #.
   15 |  #./checker.out < in.txt > o1.txt
      |   ^
rail.cpp:18:3: error: invalid preprocessing directive #echo
   18 |  #echo AC > o2.txt
      |   ^~~~
rail.cpp:26:4: error: invalid preprocessing directive #cat
   26 |   #cat o1.txt
      |    ^~~
rail.cpp:27:4: error: invalid preprocessing directive #cat
   27 |   #cat in.txt
      |    ^~~
rail.cpp:28:4: error: invalid preprocessing directive #cat
   28 |   #cat out1.txt
      |    ^~~
rail.cpp:29:4: error: invalid preprocessing directive #cat
   29 |   #cat out2.txt
      |    ^~~
rail.cpp:1:1: error: 'g' does not name a type
    1 | g++ gen.cpp -std=c++2a -O2 -o gen.out
      | ^
rail.cpp:7:15: error: 'i' does not name a type
    7 | for (( i = 1; i <= 20000; i++ ))
      |               ^
rail.cpp:7:27: error: 'i' does not name a type
    7 | for (( i = 1; i <= 20000; i++ ))
      |                           ^