結果
問題 |
No.1149 色塗りゲーム
|
ユーザー |
|
提出日時 | 2020-08-07 22:19:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 502 bytes |
コンパイル時間 | 1,034 ms |
コンパイル使用メモリ | 92,436 KB |
最終ジャッジ日時 | 2025-01-12 17:11:41 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 TLE * 46 |
ソースコード
#include <algorithm> #include <cmath> #include <cstring> #include <iomanip> #include <iostream> using namespace std; int main() { int n, t, k, x; cin >> n; if (n & 1) { cout << "1 " << n / 2 + 1 << endl; } else { cout << "2 " << n / 2 << endl; } while (true) { cin >> t; if (t == 0) break; cin >> k >> x; if (k > n / 2 + 1) { cout << k << " " << k - (n / 2 + 1) << endl; } else { cout << k << " " << k + (n / 2 + 1) << endl; } } return 0; }