結果

問題 No.1149 色塗りゲーム
ユーザー yuui
提出日時 2020-08-07 21:38:45
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 537 bytes
コンパイル時間 2,578 ms
コンパイル使用メモリ 192,108 KB
最終ジャッジ日時 2025-01-12 16:11:08
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    ll N;
    cin >> N;
    if(N%2==1){
        cout << 1<<" " <<  (N/2)+1<< endl;
    }else{
        cout << 2 << " " << (N/2) << endl;
    }

    while(true){
        int t;
        cin >> t;
        if(t==0 || t==1 || t==2){
            return 0;
        }
        int k,x;
        cin >> k >> x;
        if(k==1){
            cout << k << " " << N+1-x << endl;
        }else{
            cout << k << " " << N-x << endl;
        }
    }

    return 0;
}
0