結果
問題 | No.1149 色塗りゲーム |
ユーザー |
![]() |
提出日時 | 2020-08-08 05:42:22 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 133 ms / 2,000 ms |
コード長 | 776 bytes |
コンパイル時間 | 2,186 ms |
コンパイル使用メモリ | 191,556 KB |
最終ジャッジ日時 | 2025-01-12 18:45:40 |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#include <bits/stdc++.h> #define rep(a,n) for (ll a = 0; a < (n); ++a) using namespace std; using ll = long long; typedef pair<ll,ll> P; typedef pair<P,ll> PP; typedef vector<vector<ll> > Graph; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } const ll INF = 1e18; //入力 ll n; ll t; ll k,x; int main(){ cin >> n; if(n%2==0){ cout << 2 << ' ' << n/2 << endl; } else{ cout << 1 << ' ' << n/2+1 << endl; } cout.flush(); while(1){ cin >> t; if(t==0)return 0; cin >> k >> x; cout << k << ' ' << n+2-k-x << endl; cout.flush(); } return 0; }