結果

問題 No.1149 色塗りゲーム
ユーザー fastmathfastmath
提出日時 2020-08-12 19:44:11
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 1,369 bytes
コンパイル時間 1,272 ms
コンパイル使用メモリ 165,976 KB
実行使用メモリ 24,384 KB
平均クエリ数 17.40
最終ジャッジ日時 2023-09-24 05:31:21
合計ジャッジ時間 8,322 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
24,000 KB
testcase_01 AC 33 ms
24,000 KB
testcase_02 AC 34 ms
23,616 KB
testcase_03 AC 33 ms
23,820 KB
testcase_04 RE -
testcase_05 AC 33 ms
23,988 KB
testcase_06 AC 35 ms
23,352 KB
testcase_07 AC 33 ms
23,328 KB
testcase_08 RE -
testcase_09 AC 34 ms
23,340 KB
testcase_10 AC 34 ms
23,424 KB
testcase_11 AC 37 ms
24,144 KB
testcase_12 AC 33 ms
23,316 KB
testcase_13 AC 35 ms
23,328 KB
testcase_14 AC 34 ms
23,628 KB
testcase_15 AC 38 ms
23,664 KB
testcase_16 AC 39 ms
24,132 KB
testcase_17 AC 38 ms
24,348 KB
testcase_18 AC 35 ms
23,412 KB
testcase_19 AC 39 ms
24,348 KB
testcase_20 AC 40 ms
23,484 KB
testcase_21 AC 37 ms
24,204 KB
testcase_22 AC 36 ms
24,384 KB
testcase_23 AC 36 ms
23,328 KB
testcase_24 AC 37 ms
23,316 KB
testcase_25 RE -
testcase_26 AC 42 ms
24,000 KB
testcase_27 AC 39 ms
23,748 KB
testcase_28 AC 37 ms
23,388 KB
testcase_29 RE -
testcase_30 RE -
testcase_31 AC 68 ms
23,532 KB
testcase_32 AC 79 ms
23,916 KB
testcase_33 AC 78 ms
23,592 KB
testcase_34 RE -
testcase_35 AC 74 ms
23,616 KB
testcase_36 RE -
testcase_37 AC 80 ms
23,820 KB
testcase_38 RE -
testcase_39 AC 80 ms
23,328 KB
testcase_40 RE -
testcase_41 AC 81 ms
24,324 KB
testcase_42 RE -
testcase_43 AC 86 ms
23,376 KB
testcase_44 RE -
testcase_45 AC 91 ms
23,376 KB
testcase_46 AC 87 ms
23,652 KB
testcase_47 AC 88 ms
23,772 KB
testcase_48 RE -
testcase_49 AC 96 ms
23,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair <int, int>
#define app push_back
#define all(a) a.begin(), a.end()
#define bp __builtin_popcountll
#define ll long long
#define mp make_pair
#define f first
#define s second
#define Time (double)clock()/CLOCKS_PER_SEC
#define debug(x) std::cout << #x << ": " << x << '\n';
signed main() {
    int n;
    cin >> n;
    if (n % 2 == 0) {
        cout << 2 << ' ' << n/2 << endl;
        while (1) {
            int tp;
            cin >> tp;
            if (tp == 0)
                exit(0);
            assert(tp == 3);

            int t, p;
            cin >> t >> p;
            int sh = n/2+1;
            if (p < n/2) {
                cout << t << ' ' << p + sh << endl;
            }   
            else {
                cout << t << ' ' << p - sh << endl;
            }   
        }   
    }   
    else {
        cout << 1 << ' ' << n/2 + 1 << endl;
        while (1) {
            int tp;
            cin >> tp;
            if (tp == 0)
                exit(0);
            assert(tp == 3);

            int t, p;
            cin >> t >> p;
            int sh = n/2+1;
            if (p < n/2) {
                cout << t << ' ' << p + sh << endl;
            }   
            else {
                cout << t << ' ' << p - sh << endl;
            }   
        }   
    }   
}
0