結果

問題 No.355 数当てゲーム(2)
ユーザー しらっ亭しらっ亭
提出日時 2016-04-04 05:17:08
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 1,236 bytes
コンパイル時間 1,181 ms
コンパイル使用メモリ 150,980 KB
実行使用メモリ 24,504 KB
平均クエリ数 141.04
最終ジャッジ日時 2023-09-23 10:15:06
合計ジャッジ時間 12,059 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FORR(x,arr) for(auto&& x:arr)
#define FOR(i,a,b) for (int i = (a); i < (b); i++)
#define RFOR(i,a,b) for (int i = (b)-1; i >= (a); i--)
#define REP(i,n) for (int i = 0; i < (n); i++)
#define RREP(i,n) for (int i = (n)-1; i >= 0; i--)
#define ALL(x) (x).begin(), (x).end()
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define RITR(x,c) for(__typeof(c.rbegin()) x=c.rbegin();x!=c.rend();x++)
#define BIT(n) (1LL<<(n))
#define SZ(x) ((int)(x).size())
typedef long long ll;
// -------------------------------------

void Main() {
  vector<int> vi;
  int x, y;
  REP(i, 10) REP(j, i) REP(k, j) REP(l, k) {
    cout << i << ' ' << j << ' ' << k << ' ' << l << endl;
    cin >> x >> y;
    if (x == 4) return;
    else if (x+y == 4) {
      vi.push_back(i);
      vi.push_back(j);
      vi.push_back(k);
      vi.push_back(l);
      i=j=k=l=10;
    }
  }

  sort(ALL(vi));
  do {
    cout << vi[0] << ' ' << vi[1] << ' ' << vi[2] << ' ' << vi[3] << endl;
    cin >> x >> y;
    if (x == 4) return;
  } while(next_permutation(ALL(vi)));
}
int main() { cin.tie(0); ios::sync_with_stdio(false); Main(); return 0; }
0