Submission #110501

# Submission time Handle Problem Language Result Execution time Memory
110501 2019-05-11T04:17:24 Z tjd229 Go, Gopher! (GCJ18Q_gogopher) C++14
30 / 30
97 ms 512 KB
#include <stdio.h>
int mp[1001][1001];
int main() {
	int i, tc, T, A;
	for (scanf("%d",&T), tc = 1; tc <= T; ++tc) {
		int i_=-1, j_=-1;
		for (scanf("%d", &A), i = 2; i_ + j_; i += 3) {
			int dig = 0;
			while (i_+j_ && dig < 9) {
				printf("%d %d\n", i, 2); fflush(stdout);
				scanf("%d%d",&i_,&j_);
				dig += mp[i_][j_] != tc;
				mp[i_][j_] = tc;
			}
		}
	}
	return 0;
}

Compilation message

gogopher.cpp: In function 'int main()':
gogopher.cpp:5:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  for (scanf("%d",&T), tc = 1; tc <= T; ++tc) {
       ~~~~~~~~~~~~~~^~~~~~~~
gogopher.cpp:7:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   for (scanf("%d", &A), i = 2; i_ + j_; i += 3) {
        ~~~~~~~~~~~~~~~^~~~~~~
gogopher.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d",&i_,&j_);
     ~~~~~^~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 18 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 97 ms 512 KB Output is correct