結果

問題 No.1149 色塗りゲーム
ユーザー mencotton
提出日時 2020-11-02 22:21:22
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 532 bytes
コンパイル時間 816 ms
コンパイル使用メモリ 69,040 KB
実行使用メモリ 25,844 KB
平均クエリ数 7.22
最終ジャッジ日時 2024-07-17 07:14:10
合計ジャッジ時間 6,204 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 42
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

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

    while (true) {
        {
            int response;
            cin >> response;
            if (response <= 1)return 0;
        }

        int k, x;
        cin >> k >> x;

        if (k == 1) cout << k << " " << n + 1 - x << endl;
        else cout << k << " " << n - 1 - x << endl;
    }
    return 0;
}
0