結果
| 問題 | 
                            No.1149 色塗りゲーム
                             | 
                    
| コンテスト | |
| ユーザー | 
                             fastmath
                         | 
                    
| 提出日時 | 2020-08-12 19:44:11 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,369 bytes | 
| コンパイル時間 | 1,666 ms | 
| コンパイル使用メモリ | 168,620 KB | 
| 実行使用メモリ | 25,476 KB | 
| 平均クエリ数 | 17.40 | 
| 最終ジャッジ日時 | 2024-07-17 05:48:11 | 
| 合計ジャッジ時間 | 9,540 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 38 RE * 12 | 
ソースコード
#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;
            }   
        }   
    }   
}
            
            
            
        
            
fastmath