結果
問題 |
No.1149 色塗りゲーム
|
ユーザー |
![]() |
提出日時 | 2024-01-05 23:26:45 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 125 ms / 2,000 ms |
コード長 | 357 bytes |
コンパイル時間 | 1,077 ms |
コンパイル使用メモリ | 71,472 KB |
最終ジャッジ日時 | 2025-02-18 16:19:30 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#include <iomanip> #include <iostream> using namespace std; int main() { int n; cin >> n; if (n % 2) cout << 1 << " " << (n + 1)/2 << endl; else cout << 2 << " " << n / 2 << endl; while (true) { int t; cin >> t; if (t == 0) break; int k, x; cin >> k >> x; cout << k << " " << n + 2 - x - k << endl; } return 0; }