Submission #00388
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #include<bits/stdc++.h> using namespace std; #define vi vector<int> #define vvi vector<vi> #define vs vector<string> #define pb push_back #define P pair<int,int> #define vp vector<P> #define PP pair<P,int> #define vpp vector<PP> #define fi first #define se second #define INF (1<<30) #define MOD 1000000007 #define REP(i,n) for(int i=0;i<n;i++) #define REPR(i,n) for(int i=n;i>=0;i--) #define FOR(i,m,n) for(int i=m;i<n;i++) #define all(x) (x).begin(),(x).end() int main(){ int q; cin>>q; vp d; REP(i,q){ int f; cin>>f; if (f==1){ int r,v; string t; cin>>r>>t>>v; if (t== "A" ){ d.pb(P(0,v)); } else if (t== "B" ){ d.pb(P(1,v)); } else { d.pb(P(2,v)); } } else { int a,b,c; cin>>a>>b>>c; REP(j,b){ if (d[j].fi==0){ if (c>d[j].se){ c=d[j].se; } } else if (d[j].fi==1){ if (c<d[j].se){ c=d[j].se; } } else { c+=d[j].se; } } cout<<c<<endl; } } return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0006 - tubequery |
ユーザー名 | SugarDragon5 |
投稿日時 | 2017-11-26 15:08:02 |
言語 | C++17 |
状態 | Wrong Answer |
得点 | 0 |
ソースコード長 | 1357 Byte |
最大実行時間 | 272 ms |
最大メモリ使用量 | 8608 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 60 | * |
2 | partial_1 | 0 / 20 | !test_01.txt, *S* |
3 | partial_2 | 0 / 20 | !*, *S*, *M* |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # | ||
---|---|---|---|---|---|---|
!test_01.txt | AC | 17 ms | 480 KB |
1
|
2
|
3
|
!test_02.txt | WA | 25 ms | 456 KB |
1
|
3
|
|
cornL_01.txt | RE | 44 ms | 560 KB |
1
|
||
cornL_02.txt | RE | 23 ms | 412 KB |
1
|
||
cornS_01.txt | WA | 19 ms | 516 KB |
1
|
2
|
3
|
cornS_02.txt | WA | 17 ms | 360 KB |
1
|
2
|
3
|
hand_01.txt | RE | 28 ms | 464 KB |
1
|
||
hand_02.txt | AC | 26 ms | 576 KB |
1
|
||
hand_03.txt | RE | 20 ms | 548 KB |
1
|
||
randL_01.txt | RE | 33 ms | 528 KB |
1
|
||
randL_02.txt | RE | 23 ms | 636 KB |
1
|
||
randL_03.txt | RE | 26 ms | 740 KB |
1
|
||
randL_04.txt | RE | 29 ms | 712 KB |
1
|
||
randL_05.txt | RE | 36 ms | 564 KB |
1
|
||
randL_06.txt | RE | 25 ms | 544 KB |
1
|
||
randL_07.txt | RE | 24 ms | 648 KB |
1
|
||
randL_08.txt | RE | 28 ms | 624 KB |
1
|
||
randL_09.txt | RE | 25 ms | 604 KB |
1
|
||
randL_10.txt | RE | 29 ms | 584 KB |
1
|
||
randM_01.txt | WA | 21 ms | 564 KB |
1
|
3
|
|
randM_02.txt | WA | 259 ms | 2572 KB |
1
|
3
|
|
randM_03.txt | WA | 272 ms | 3540 KB |
1
|
3
|
|
randM_04.txt | WA | 258 ms | 4520 KB |
1
|
3
|
|
randM_05.txt | WA | 261 ms | 5624 KB |
1
|
3
|
|
randS_01.txt | WA | 17 ms | 4816 KB |
1
|
2
|
3
|
randS_02.txt | WA | 19 ms | 4788 KB |
1
|
2
|
3
|
randS_03.txt | WA | 266 ms | 6664 KB |
1
|
2
|
3
|
randS_04.txt | WA | 263 ms | 7636 KB |
1
|
2
|
3
|
randS_05.txt | WA | 259 ms | 8608 KB |
1
|
2
|
3
|