結果

問題 No.2768 Password Crack
ユーザー kaede2020kaede2020
提出日時 2024-06-01 18:37:33
言語 C++23(gcc13)
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 849 bytes
コンパイル時間 6,089 ms
コンパイル使用メモリ 335,196 KB
実行使用メモリ 25,476 KB
平均クエリ数 921.47
最終ジャッジ日時 2024-06-01 18:37:52
合計ジャッジ時間 10,515 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 66 ms
25,220 KB
testcase_05 WA -
testcase_06 AC 64 ms
25,220 KB
testcase_07 AC 31 ms
24,836 KB
testcase_08 AC 35 ms
24,836 KB
testcase_09 AC 65 ms
25,476 KB
testcase_10 AC 69 ms
24,836 KB
testcase_11 AC 67 ms
24,964 KB
testcase_12 AC 69 ms
24,580 KB
testcase_13 AC 70 ms
24,836 KB
testcase_14 AC 84 ms
25,220 KB
testcase_15 AC 61 ms
24,824 KB
testcase_16 AC 65 ms
24,836 KB
testcase_17 AC 65 ms
25,348 KB
testcase_18 AC 65 ms
24,964 KB
testcase_19 AC 46 ms
24,580 KB
testcase_20 AC 42 ms
24,836 KB
testcase_21 AC 63 ms
25,220 KB
testcase_22 AC 57 ms
25,184 KB
testcase_23 AC 33 ms
24,964 KB
testcase_24 AC 44 ms
25,208 KB
testcase_25 AC 65 ms
25,476 KB
testcase_26 AC 43 ms
25,220 KB
testcase_27 AC 58 ms
24,836 KB
testcase_28 AC 35 ms
24,580 KB
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
//using mint = modint998244353;
const int dx[4]={0,1,0,-1};
const int dy[4]={1,0,-1,0};

int n;
int ok[111];
int main(){
    cin>>n;
    string ans="";
    rep(i,n)ans.push_back('z');
    cout<<"? "<<ans<<endl;
    int x;
    cin>>x;
    if(x==0){
        cout<<"! "<<ans<<endl;
        return 0;
    }
    int now=x;
    rep(j,25){
        rep(i,n){  
            if(ok[i])continue;
            string t=ans;
            t[i]=(char)('a'+j);
            cout<<"? "<<t<<endl;
            int x;
            cin>>x;
            if(x-now==1){
                ok[i]=1;
                now=x;
                ans=t;
            }
        }
    }
    cout<<"! "<<ans<<endl;
    return 0;
}
0