제출 #894008

#제출 시각아이디문제언어결과실행 시간메모리
894008rainboyUntitled (GCJ18Q_gogopher)C11
30 / 30
52 ms344 KiB
#include <stdio.h>

#define N	69

int main() {
	int t;

	scanf("%d", &t);
	while (t--) {
		int x, x_, y_, b;

		scanf("%*d");
		for (x = 2; x <= N; x += 3) {
			b = 0;
			while (b != (1 << 9) - 1) {
				printf("%d 2\n", x), fflush(stdout);
				scanf("%d%d", &x_, &y_);
				if (x_ == 0 && y_ == 0)
					goto out;
				b |= 1 << (x_ - x + 1) * 3 + (y_ - 1);
			}
		}
out:;
	}
	return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

gogopher.c: In function 'main':
gogopher.c:20:32: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
   20 |     b |= 1 << (x_ - x + 1) * 3 + (y_ - 1);
      |               ~~~~~~~~~~~~~~~~~^~~~~~~~~~
gogopher.c:8:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
    8 |  scanf("%d", &t);
      |  ^~~~~~~~~~~~~~~
gogopher.c:12:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |   scanf("%*d");
      |   ^~~~~~~~~~~~
gogopher.c:17:5: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
   17 |     scanf("%d%d", &x_, &y_);
      |     ^~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...