Submission #170838

#TimeUsernameProblemLanguageResultExecution timeMemory
170838Sorting고대 책들 (IOI17_books)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;

int main(){
	system("g++ -std=c++11 -o books books.cpp grader.cpp");
	system("g++ -std=c++11 -o books2 books2.cpp grader.cpp");
	system("g++ -std=c++11 -o generator generator.cpp");

	int i = 0;
	while(true){
		cout << (++i) << endl;

		system("generator > input.txt");
		system("books < input.txt > output.txt");
		system("books2 < input.txt > output2.txt");

		ifstream in("output.txt"), in2("output2.txt");
		string s, s2;

		in >> s;
		in2 >> s2;

		if(s != s2){
			break;
		}
	}
}

Compilation message (stderr)

books.cpp: In function 'int main()':
books.cpp:6:8: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
  system("g++ -std=c++11 -o books books.cpp grader.cpp");
  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
books.cpp:7:8: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
  system("g++ -std=c++11 -o books2 books2.cpp grader.cpp");
  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
books.cpp:8:8: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
  system("g++ -std=c++11 -o generator generator.cpp");
  ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
books.cpp:14:9: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
   system("generator > input.txt");
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
books.cpp:15:9: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
   system("books < input.txt > output.txt");
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
books.cpp:16:9: warning: ignoring return value of 'int system(const char*)', declared with attribute warn_unused_result [-Wunused-result]
   system("books2 < input.txt > output2.txt");
   ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/ccWJV4nX.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cce5XYn0.o:books.cpp:(.text.startup+0x0): first defined here
/tmp/ccWJV4nX.o: In function `main':
grader.cpp:(.text.startup+0x23a): undefined reference to `minimum_walk(std::vector<int, std::allocator<int> >, int)'
collect2: error: ld returned 1 exit status