結果
| 問題 |
No.355 数当てゲーム(2)
|
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2016-04-01 22:41:39 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,339 bytes |
| コンパイル時間 | 1,155 ms |
| コンパイル使用メモリ | 101,000 KB |
| 実行使用メモリ | 40,876 KB |
| 平均クエリ数 | 42.06 |
| 最終ジャッジ日時 | 2024-07-16 08:54:20 |
| 合計ジャッジ時間 | 11,219 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 TLE * 2 -- * 16 |
ソースコード
#include <iostream>
#include <vector>
#include <cstdio>
#include <sstream>
#include <map>
#include <string>
#include <algorithm>
#include <queue>
#include <cmath>
#include <functional>
#include <set>
#include <ctime>
#include <random>
#include <chrono>
using namespace std;
template<class T> istream& operator >> (istream& is, vector<T>& vec){for(T& val: vec) is >> val; return is;}
template<class T> istream& operator , (istream& is, T& val){ return is >> val;}
template<class T> ostream& operator << (ostream& os, const vector<T>& vec){for(int i=0; i<vec.size(); i++) os << vec[i] << (i==vec.size()-1?"":" "); return os;}
template<class T> ostream& operator , (ostream& os, const T& val){ return os << " " << val;}
template<class T> ostream& operator >> (ostream& os, const T& val){ return os << " " << val;}
int main(){
vector<int> n = {0,1,2,3};
set<int> s;
for(int i=0; i<10; i++){
n = {i, (i+1)%10, (i+2)%10, (i+3)%10};
int a,b;
cout << n << endl;
cin >> a,b;
for(int k=4; k<10; k++){
n[0] = (i+k)%10;
int c,d;
cout << n << endl;
cin >> c,d;
if(a+b > c+d){
s.insert(i);
break;
}
}
}
n = vector<int>(s.begin(), s.end());
do{
cout << n << endl;
int a,b;
cin >> a >> b;
if(a==4 && b==0){
return 0;
}
}while(next_permutation(n.begin(), n.end()));
abort();
return 0;
}
koyumeishi