結果
問題 | No.1149 色塗りゲーム |
ユーザー |
![]() |
提出日時 | 2020-11-30 07:42:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 732 bytes |
コンパイル時間 | 1,737 ms |
コンパイル使用メモリ | 167,456 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 14.88 |
最終ジャッジ日時 | 2024-07-17 07:35:54 |
合計ジャッジ時間 | 7,665 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 26 WA * 24 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for(int i= 0; i < (n); i++) using ll= long long int; using namespace std; 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; } ll mod= 1e9 + 7; ll mmod= 998244353; int main(){ int n; cin >>n; if(n%2==1){cout << 1 << " " << (n+1)/2 << endl;} else{cout << 2 << " " << n/2 <<endl;} while(1){ int t; cin >>t; if(t==0 || t==1)return 0; if(t==2 || t==3){ int k,x; cin >> k >>x; if(t==2)return 0; if(n%2==1){cout << k << " " << n+1-x-k+1 << endl;} else{cout << k << " " << n-x-k+1 << endl;} } } }