結果
| 問題 |
No.1149 色塗りゲーム
|
| コンテスト | |
| ユーザー |
magsta
|
| 提出日時 | 2021-06-12 14:21:00 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 140 ms / 2,000 ms |
| コード長 | 630 bytes |
| コンパイル時間 | 1,579 ms |
| コンパイル使用メモリ | 167,332 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 19.82 |
| 最終ジャッジ日時 | 2024-07-17 11:26:25 |
| 合計ジャッジ時間 | 8,297 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int N; cin >> N;
if (N % 2 == 0) {
cout << 2 << " " << N / 2 << endl;
while (true) {
int t; cin >> t;
if (t == 3) {
int k, x; cin >> k >> x;
if (k == 1) cout << 1 << " " << N + 1 - x << endl;
else cout << 2 << " " << N - x << endl;
}
else {
return 0;
}
}
}
else {
cout << 1 << " " << N / 2 + 1 << endl;
while (true) {
int t; cin >> t;
if (t == 3) {
int k, x; cin >> k >> x;
if (k == 1) cout << 1 << " " << N + 1 - x << endl;
else cout << 2 << " " << N - x << endl;
}
else {
return 0;
}
}
}
}
magsta