結果
問題 |
No.1149 色塗りゲーム
|
ユーザー |
![]() |
提出日時 | 2020-08-07 21:42:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,403 bytes |
コンパイル時間 | 875 ms |
コンパイル使用メモリ | 82,756 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 1.96 |
最終ジャッジ日時 | 2024-07-17 04:27:23 |
合計ジャッジ時間 | 6,354 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 48 |
ソースコード
#include <iostream> #include <algorithm> #include <iomanip> #include <vector> #include <queue> #include <set> #include <map> using namespace std; typedef long long ll; int main(){ ios::sync_with_stdio(false); cin.tie(0); cout << setprecision(10) << fixed; int N; int t, k, x; cin >> N; if(N == 1){ cout << 1 << ' ' << 1 << endl; cin >> t; return 0; } if(N == 2){ cout << 2 << ' ' << 1 << endl; cin >> t; return 0; } if(N%2 == 1){ int m = N/2+1; cout << 1 << ' ' << m << endl; while(true){ cin >> t; if(t <= 1) return 0; if(t == 2) { cin >> k >> x; return 0; } cin >> k >> x; if(k < m){ cout << x+m << ' ' << k << endl; }else{ cout << x-m << ' ' << k << endl; } } } if(N%2 == 0){ int m = N/2; cout << 2 << ' ' << m << endl; while(true){ cin >> t; if(t <= 1) return 0; if(t == 2) { cin >> k >> x; return 0; } cin >> k >> x; if(k < m){ cout << x+m << ' ' << k << endl; }else{ cout << x-m << ' ' << k << endl; } } } }