結果
| 問題 | No.355 数当てゲーム(2) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-26 17:04:21 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 724 bytes |
| 記録 | |
| コンパイル時間 | 1,400 ms |
| コンパイル使用メモリ | 213,912 KB |
| 実行使用メモリ | 39,344 KB |
| 最終ジャッジ日時 | 2026-06-07 19:53:04 |
| 合計ジャッジ時間 | 8,597 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 51 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int a[4];
while (1) {
a[0]=rand()%10;
a[1]=rand()%10;
a[2]=rand()%10;
a[3]=rand()%10;
if (a[0]!=a[1]&&a[0]!=a[2]&&a[0]!=a[3]&&a[1]!=a[2]&&a[1]!=a[3]&&a[2]!=a[3]) {
cout<<a[0]<<' '<<a[1]<<' '<<a[2]<<' '<<a[3]<<endl;
int x,y;
cin>>x>>y;
if (x==4)
return 0;
if (x+y==4)
break;
}
}
sort(a,a+4);
do {
cout<<a[0]<<' '<<a[1]<<' '<<a[2]<<' '<<a[3]<<endl;
int x,y;
cin>>x>>y;
if (x==4)
break;
} while (next_permutation(a,a+4));
return 0;
}