結果

問題 No.305 鍵(2)
ユーザー kpinkcatkpinkcat
提出日時 2023-11-12 23:45:07
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 769 bytes
コンパイル時間 2,277 ms
コンパイル使用メモリ 207,024 KB
実行使用メモリ 24,836 KB
平均クエリ数 0.85
最終ジャッジ日時 2024-09-26 03:07:00
合計ジャッジ時間 5,903 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 TLE * 1 -- * 11
権限があれば一括ダウンロードができます

ソースコード

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