結果
| 問題 |
No.355 数当てゲーム(2)
|
| コンテスト | |
| ユーザー |
srup٩(๑`н´๑)۶
|
| 提出日時 | 2016-05-25 21:44:01 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 1,083 bytes |
| コンパイル時間 | 784 ms |
| コンパイル使用メモリ | 83,792 KB |
| 実行使用メモリ | 38,976 KB |
| 最終ジャッジ日時 | 2024-07-16 23:46:07 |
| 合計ジャッジ時間 | 7,336 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 51 |
コンパイルメッセージ
main.cpp: In function ‘void find()’:
main.cpp:44:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
44 | scanf("%d %d", &x, &y);
| ~~~~~^~~~~~~~~~~~~~~~~
main.cpp: In function ‘int main()’:
main.cpp:64:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
64 | scanf("%d %d", &x, &y);
| ~~~~~^~~~~~~~~~~~~~~~~
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <bitset>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
typedef long long ll;
typedef pair<int,int> pint;
typedef vector<int> vint;
typedef vector<pint> vpint;
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
int dx[4] = {1, 0, 0, -1};
int dy[4] = {0, 1, -1, 0};
vector<int> vc(4);
void find(void){
sort(all(vc));
do{
rep(i, 4)
//クエリ出力
printf("%d\n", vc[i]);
//応答受けとり
int x, y;
scanf("%d %d", &x, &y);
if (x == 4 && y == 0){
return;
}
}while(next_permutation(all(vc)));
return;
}
int main(void){
int cnt = 0;
rep(i, 10){
rep(j, 4)
printf("i\n");
int x, y;
scanf("%d %d", &x, &y);
if(x == 1 && y == 3){
vc[cnt] = i;
cnt++;
}
}
find();
return 0;
}
srup٩(๑`н´๑)۶