結果
| 問題 |
No.2768 Password Crack
|
| コンテスト | |
| ユーザー |
srjywrdnprkt
|
| 提出日時 | 2023-12-12 20:24:31 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 681 bytes |
| コンパイル時間 | 1,903 ms |
| コンパイル使用メモリ | 193,048 KB |
| 最終ジャッジ日時 | 2025-02-18 10:33:36 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 |
| other | -- * 29 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void query(string &S){
cout << "? " << S << endl;
}
void answer(string &T){
cout << "! " << T << endl;
}
int main(){
int N, M;
cin >> N;
string S=string(N, 'a');
for (int i=0; i<N; i++){
int mi=1e9, mx=0;
char c='.';
for (int j=0; j<25; j++){
S[i] = char('a'+j);
query(S);
cin >> M;
if (M > mx){
mx = M;
c = char('a'+j);
}
mi = min(mi, M);
}
if (mi == mx) c = 'z';
S[i] = c;
}
answer(S);
while(1){
}
return 0;
}
srjywrdnprkt