답안 #110497

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
110497 2019-05-11T04:01:58 Z tjd229 Go, Gopher! (GCJ18Q_gogopher) C++14
0 / 30
3 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 dig = 0;
		for (scanf("%d", &A), i = 2; dig < A; i += 3, dig += 9) {
			int valid = 0;
			while (valid < 9) {
				printf("%d %d", i, i); fflush(stdout);
				int i_, j_; scanf("%d%d",&i_,&j_);
				valid += 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; dig < A; i += 3, dig += 9) {
        ~~~~~~~~~~~~~~~^~~~~~~
gogopher.cpp:11:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     int i_, j_; scanf("%d%d",&i_,&j_);
                 ~~~~~^~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 3 ms 512 KB Time limit exceeded (wall clock)
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 2 ms 256 KB Time limit exceeded (wall clock)