結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-12 16:54:50 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 590 bytes |
| コンパイル時間 | 2,339 ms |
| コンパイル使用メモリ | 195,924 KB |
| 最終ジャッジ日時 | 2025-01-07 11:45:56 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 TLE * 5 |
ソースコード
#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;
}