結果
| 問題 |
No.2768 Password Crack
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-31 23:27:33 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 500 bytes |
| コンパイル時間 | 3,830 ms |
| コンパイル使用メモリ | 274,108 KB |
| 実行使用メモリ | 25,488 KB |
| 平均クエリ数 | 1008.63 |
| 最終ジャッジ日時 | 2024-12-21 01:42:54 |
| 合計ジャッジ時間 | 10,497 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 6 WA * 23 |
ソースコード
#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] = '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;
}