結果
問題 | No.305 鍵(2) |
ユーザー |
![]() |
提出日時 | 2018-06-16 09:09:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 24 ms / 2,000 ms |
コード長 | 834 bytes |
コンパイル時間 | 1,718 ms |
コンパイル使用メモリ | 167,272 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 44.08 |
最終ジャッジ日時 | 2024-07-17 01:46:28 |
合計ジャッジ時間 | 2,882 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include "bits/stdc++.h" #define REP(i,n,N) for(int i=(n); i<(N); i++) #define RREP(i,n,N) for(int i=(N-1); i>=n; i--) #define CK(n,a,b) (a)<=(n)&&(n)<(b) #define ALL(v) (v).begin(),(v).end() #define p(s) cout<<(s)<<endl typedef long long ll; using namespace std; const ll mod =1e9+7; int main(){ string s="0000000000"; cout<<"0000000000"<<endl; int now,idx=0,prev; string ok; cin>>now>>ok; if(ok=="unlocked") return 0; s[idx]++; cout<<s<<endl; prev=now; while(cin>>now>>ok){ if(ok=="unlocked") break; if(prev==now) s[idx]++; else if(prev>now){ s[idx]--; idx++; s[idx]++; now++; } else { idx++; s[idx]++; } prev = now; cout<<s<<endl; } return 0; }