結果
問題 | No.2768 Password Crack |
ユーザー |
|
提出日時 | 2024-05-31 23:35:26 |
言語 | C++23(gcc13) (gcc 13.2.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 506 bytes |
コンパイル時間 | 3,390 ms |
コンパイル使用メモリ | 274,484 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 1008.63 |
最終ジャッジ日時 | 2024-06-01 00:09:34 |
合計ジャッジ時間 | 9,331 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 28 ms
25,196 KB |
testcase_01 | AC | 24 ms
24,836 KB |
testcase_02 | AC | 97 ms
24,964 KB |
testcase_03 | AC | 30 ms
24,836 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | AC | 65 ms
24,580 KB |
testcase_07 | AC | 36 ms
24,836 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 67 ms
24,452 KB |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { int N; cin >> N; string ans = string(N, '0'); for (int i = 0; i < N; i++) { string T = string(N, 'a'); int pre = -10; for (int j = 0; j < 25; j++) { T[i] = char('a' + j); cout << "? " << T << endl; int n; cin >> n; if (n < pre) { ans[i] = char(T[i] - 1); break; } pre = n; } if (ans[i] == '0') { ans[i] = 'z'; } } cout << "! " << ans << endl; }