結果

問題 No.305 鍵(2)
ユーザー aaaaaaiuaaaaaaiu
提出日時 2019-08-12 16:54:50
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 590 bytes
コンパイル時間 1,985 ms
コンパイル使用メモリ 200,208 KB
実行使用メモリ 24,036 KB
平均クエリ数 0.85
最終ジャッジ日時 2023-09-23 18:00:52
合計ジャッジ時間 5,620 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
24,036 KB
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int cnt[10]{};
    for (int i=0;i<=9;i++) {
        string s;
        for (int j=0;j<10;j++) s+=i+'0';
        cout<<s<<endl;
        int a;
        string t;
        cin>>a>>t;
        if (a==10) return 0;
        cnt[i]=a;
    }
    string s;
    for (int i=0;i<=9;i++) {
        for (int j=0;j<cnt[i];j++) s+=i+'0';
    }
    do {
        cout<<s<<endl;
        int a;
        string t;
        cin>>a>>t;
        if (a==10) return 0;
    } while (next_permutation(s.begin(),s.end()));
    return 0;
}
0