結果
| 問題 |
No.2768 Password Crack
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-31 22:35:36 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 495 bytes |
| コンパイル時間 | 5,110 ms |
| コンパイル使用メモリ | 274,092 KB |
| 実行使用メモリ | 25,604 KB |
| 平均クエリ数 | 1008.63 |
| 最終ジャッジ日時 | 2024-12-21 00:19:34 |
| 合計ジャッジ時間 | 11,834 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / 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] = T[i] - 1;;
break;
}
pre = n;
}
if (ans[i] == '0') {
ans[i] = 'z';
}
}
cout << "! " << ans << endl;
}