結果
問題 | No.1149 色塗りゲーム |
ユーザー | auaua |
提出日時 | 2020-08-07 21:30:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 141 ms / 2,000 ms |
コード長 | 791 bytes |
コンパイル時間 | 1,501 ms |
コンパイル使用メモリ | 167,404 KB |
実行使用メモリ | 25,476 KB |
平均クエリ数 | 19.82 |
最終ジャッジ日時 | 2024-07-17 04:15:16 |
合計ジャッジ時間 | 8,172 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define int long long #define REP(i,m,n) for(int i=(m);i<(n);i++) #define rep(i,n) REP(i,0,n) #define pb push_back #define all(a) a.begin(),a.end() #define rall(c) (c).rbegin(),(c).rend() #define mp make_pair #define endl '\n' #define vec vector<ll> #define mat vector<vector<ll> > #define fi first #define se second typedef long long ll; typedef pair<ll,ll> pll; typedef long double ld; const ll inf=1e9+7; const ll mod=998244353; signed main(){ ll n;cin>>n; if(n%2){ cout<<1<<' '<<(n+1)/2<<endl; }else{ cout<<2<<' '<<n/2<<endl; } while(1){ ll t;cin>>t; if(t==0)break; else{ ll a,b;cin>>b>>a; ll c=a+b-1; cout<<b<<' '<<n+1-c<<endl; } } }