結果
| 問題 | No.1149 色塗りゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-22 00:41:39 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 136 ms / 2,000 ms |
| コード長 | 500 bytes |
| 記録 | |
| コンパイル時間 | 3,285 ms |
| コンパイル使用メモリ | 333,876 KB |
| 実行使用メモリ | 28,964 KB |
| 平均クエリ数 | 19.82 |
| 最終ジャッジ日時 | 2026-01-22 00:41:51 |
| 合計ジャッジ時間 | 10,800 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i)
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 t;
cin >> t;
if (t == 0 || t == 1) break;
int k, x;
cin >> k >> x;
if (t == 2) break;
if (k == 1) cout << 1 << ' ' << N - x + 1 << endl;
else cout << 2 << ' ' << min(N - x + 1, N - x) << endl;
}
}