結果
| 問題 | No.2768 Password Crack |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-31 23:57:03 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 48 ms / 2,000 ms |
| コード長 | 633 bytes |
| 記録 | |
| コンパイル時間 | 1,258 ms |
| コンパイル使用メモリ | 210,592 KB |
| 実行使用メモリ | 30,020 KB |
| 平均クエリ数 | 955.37 |
| 最終ジャッジ日時 | 2026-07-04 20:13:19 |
| 合計ジャッジ時間 | 4,278 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 29 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
constexpr int MOD=998244353;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define replr(i,l,r) for(int i=(l);i<(int)(r);i++)
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin>>N;
string Q(N,'a');
rep(i,N){
cout<<"? "<<Q<<endl;
int base;
cin>>base;
bool f=1;
rep(j,24){
Q[i]+=1;
cout<<"? "<<Q<<endl;
int t;
cin>>t;
if(t<base){
Q[i]-=1;
f=0;
break;
}
if(t>base){
f=0;
break;
}
}
if(f)Q[i]+=1;
}
cout<<"! "<<Q<<endl;
}