結果
問題 | No.305 鍵(2) |
ユーザー | くれちー |
提出日時 | 2017-01-18 00:55:56 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 457 bytes |
コンパイル時間 | 256 ms |
コンパイル使用メモリ | 24,396 KB |
実行使用メモリ | 24,432 KB |
平均クエリ数 | 46.15 |
最終ジャッジ日時 | 2023-09-23 12:39:04 |
合計ジャッジ時間 | 2,530 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 30 ms
23,580 KB |
testcase_01 | WA | - |
testcase_02 | AC | 25 ms
23,292 KB |
testcase_03 | WA | - |
testcase_04 | AC | 26 ms
23,292 KB |
testcase_05 | WA | - |
testcase_06 | AC | 24 ms
23,916 KB |
testcase_07 | AC | 25 ms
23,904 KB |
testcase_08 | WA | - |
testcase_09 | AC | 26 ms
23,448 KB |
testcase_10 | WA | - |
testcase_11 | AC | 24 ms
23,328 KB |
testcase_12 | WA | - |
ソースコード
#include <stdio.h> #include <stdlib.h> #define rep(i, n) for (i = 0; i < n; i++) int try(int *t) { int i, x, s[9]; rep(i, 10) printf("%d", t[i] % 10); printf("\n"); fflush(stdout); scanf("%d %s", &x, s); if (x == 10) exit(0); return x; } int main() { int i, j, r[10]; rep(i, 10) r[i] = rand() % 10; int x = try(r); rep(i, 10) { int t = x; rep(j, 10) { r[i]++; x = try(r); if (x > t) break; if (x < t) { r[i]--; break; } } } }