結果

問題 No.355 数当てゲーム(2)
ユーザー かにかに
提出日時 2017-04-01 22:54:17
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,219 bytes
コンパイル時間 2,112 ms
コンパイル使用メモリ 168,360 KB
実行使用メモリ 24,552 KB
平均クエリ数 8.87
最終ジャッジ日時 2023-09-23 13:11:14
合計ジャッジ時間 20,358 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 27 ms
23,592 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 WA -
testcase_10 RE -
testcase_11 WA -
testcase_12 WA -
testcase_13 RE -
testcase_14 WA -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 RE -
testcase_22 RE -
testcase_23 WA -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 WA -
testcase_28 RE -
testcase_29 WA -
testcase_30 RE -
testcase_31 WA -
testcase_32 RE -
testcase_33 WA -
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
testcase_40 RE -
testcase_41 RE -
testcase_42 WA -
testcase_43 RE -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 RE -
testcase_48 WA -
testcase_49 WA -
testcase_50 RE -
testcase_51 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
#define _CRT_SECURE_NO_WARNINGS
#define rep(i,n) for(int i = 0;i < n;i++)
#define REP(i,n,k) for(int i = n;i < k;i++)
#define P(p) cout << (p) << endl;
#define sP(p) cout << setprecision(15) << fixed << p << endl;
#define vi vector<int>
#define mp(a,b) make_pair(a,b)
using namespace std;typedef long long ll;typedef unsigned long long ull;int dx[] = { 1, -1 , 0 , 0};int dy[] = { 0,  0,  1, -1};

void solve() {
  int a,x,y,first,last;
  vi v,no;
  cout << 0 << " " << 1 << " " << 2 << " " << 3 << endl;
  cin >> x >> y;
  first = x + y;
  if(x + y != 4){
    REP(i,4,10){
      cout << 0 << " " << 1 << " " << 2 << " " << i << endl;
      cin >> x >> y;
      if(x + y >= first)v.push_back(i);
      else{
	no.push_back(i);
	if(no.size() == 2)break;
      }
    }
  }
  if(v.size() != 4){
    rep(i,4){
      rep(j,v.size()){
	cout << v[j] << " ";
      }
      rep(j,3-v.size()){
	cout << no[j] << " ";
      }
      cout << i << endl;
      cin >> x >> y;
      if(x + y > v.size())v.push_back(i);
    }
  }
  do{
    printf("%d %d %d %d\n",v[0],v[1],v[2],v[3]);
    cin >> x >> y;
    if(x == 4)return;
  }while(next_permutation(v.begin(),v.end()));
}

int main() {
	solve();
	return 0;
}
0