結果
| 問題 |
No.2502 Optimization in the Dark
|
| コンテスト | |
| ユーザー |
chro_96
|
| 提出日時 | 2023-10-13 22:20:56 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 975 bytes |
| コンパイル時間 | 354 ms |
| コンパイル使用メモリ | 29,056 KB |
| 実行使用メモリ | 25,520 KB |
| 平均クエリ数 | 4.00 |
| 最終ジャッジ日時 | 2024-09-15 18:05:12 |
| 合計ジャッジ時間 | 3,740 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 WA * 12 |
ソースコード
#include <stdio.h>
int main () {
int n = 0;
char s[4] = "";
int res = 0;
int max = 1;
int rem[2] = {};
res = scanf("%d", &n);
printf("? %d %d 2 %d\n", max, 2*n, 2*n);
fflush(stdout);
res = scanf("%s", s);
if (s[0] == 'Y') {
max = 2;
}
printf("? %d %d 3 %d\n", max, 2*n, 2*n);
fflush(stdout);
res = scanf("%s", s);
if (s[0] == 'Y') {
max = 3;
}
if (max == 1) {
rem[0] = 2;
rem[1] = 3;
} else if (max == 2) {
rem[0] = 1;
rem[1] = 3;
} else {
rem[0] = 1;
rem[1] = 2;
}
printf("? %d %d %d %d\n", rem[0], n, rem[1], n);
fflush(stdout);
res = scanf("%s", s);
if (s[0] == 'Y') {
int s = rem[0];
rem[0] = rem[1];
rem[1] = s;
}
printf("!");
for (int i = 0; i < n; i++) {
printf(" %d %d", rem[0], max);
printf(" %d %d", rem[1], max);
}
for (int i = 0; i < n; i++) {
printf(" %d %d", rem[0], rem[1]);
}
printf("\n");
return 0;
}
chro_96