結果
問題 | No.1149 色塗りゲーム |
ユーザー |
|
提出日時 | 2020-08-07 22:11:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 141 ms / 2,000 ms |
コード長 | 505 bytes |
コンパイル時間 | 1,533 ms |
コンパイル使用メモリ | 166,976 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 19.82 |
最終ジャッジ日時 | 2024-07-17 04:45:18 |
合計ジャッジ時間 | 8,295 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; } template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; } void out(int k, int x){ cout << k << " " << x << endl; return; } signed main(){ int n; cin >> n; out(n%2 == 0 ? 2 : 1, (n+1)/2); int t; while(cin >> t, t == 3){ int k, x; cin >> k >> x; x = n-x+1; if(k==2) x--; out(k, x); } return 0; }