結果

問題 No.305 鍵(2)
ユーザー kpinkcatkpinkcat
提出日時 2023-11-12 23:45:07
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 769 bytes
コンパイル時間 2,328 ms
コンパイル使用メモリ 208,600 KB
実行使用メモリ 24,000 KB
平均クエリ数 0.85
最終ジャッジ日時 2023-11-12 23:45:14
合計ジャッジ時間 6,295 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
24,000 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>
#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<set>
#include<list>
#include<queue>
#include<math.h>
#include<bitset>
using ll = long long;
using namespace std;

int main()
{
    int q = 10;
    vector<int> v;
    while (q--){
        int ans;
        string s = "";
        for (int i = 0; i < 10; i++) s += to_string(q);
        cout << s << endl;
        cin >> ans >> s;
        for (int i = 0; i < ans; i++) v.push_back(q);
    }
    sort(v.begin(), v.end());
    do{
        int ans;
        string s;
        for (int i = 0; i < 10; i++) cout << v[i];
        cout << endl;
        cin >> ans >> s;
        if (ans == 10) return 0;
    }while (next_permutation(v.begin(), v.end()));
}
0