Submission #00114
ソースコード
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 | #include <bits/stdc++.h> using namespace std; int main(){ int n,i,j,np; bool tf= true ; queue< int > g; g.push(0); queue< int > b; cin>>n; int d[n]; for (i=0;i<n;i++){ cin>>d[i]; } np=g.front(); while (np<n&&!g.empty()){ g.pop(); i=np+1; while (i<n&&i<np+d[np]/10){ g.push(i); i++; } if (np==n-1){ break ; } if (g.empty()){ cout<< "no\n" ; return (0); } else { np=g.front(); } } b.push(n-1); np=b.front(); while (0<np&&!b.empty()){ b.pop(); i=np; while (0<=i&&0<=np-d[np]/10){ b.push(i); i--; } if (np==0){ break ; } if (b.empty()){ cout<< "no\n" ; return (0); } else { np=b.front(); } } cout<< "yes\n" ; return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0006 - トランポリン |
ユーザー名 | ei2229 |
投稿日時 | 2023-07-31 11:04:49 |
言語 | C++17 |
状態 | Memory Limit Exceeded |
得点 | 0 |
ソースコード長 | 1008 Byte |
最大実行時間 | 1000 ms |
最大メモリ使用量 | 65536 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 0 / 11 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in1.txt | AC | 25 ms | 604 KB |
1
|
in2.txt | AC | 21 ms | 5956 KB |
1
|
in3.txt | AC | 22 ms | 6052 KB |
1
|
in4.txt | AC | 24 ms | 5904 KB |
1
|
in5.txt | AC | 20 ms | 5800 KB |
1
|
in6.txt | WA | 21 ms | 5900 KB |
1
|
in7.txt | AC | 22 ms | 5864 KB |
1
|
in8.txt | WA | 50 ms | 6980 KB |
1
|
in9.txt | AC | 54 ms | 7068 KB |
1
|
in10.txt | MLE | 1000 ms | 65536 KB |
1
|
in11.txt | WA | 23 ms | 5988 KB |
1
|
in12.txt | AC | 19 ms | 5832 KB |
1
|
in13.txt | AC | 24 ms | 5928 KB |
1
|
in14.txt | AC | 25 ms | 5764 KB |
1
|
in15.txt | AC | 23 ms | 5992 KB |
1
|
in16.txt | WA | 24 ms | 6092 KB |
1
|
in17.txt | AC | 25 ms | 5924 KB |
1
|
in18.txt | WA | 24 ms | 5888 KB |
1
|
in19.txt | AC | 15 ms | 5984 KB |
1
|
in20.txt | AC | 21 ms | 5924 KB |
1
|
in21.txt | AC | 21 ms | 5896 KB |
1
|
in22.txt | AC | 21 ms | 5864 KB |
1
|
in23.txt | AC | 24 ms | 5964 KB |
1
|
in24.txt | AC | 36 ms | 19048 KB |
1
|
in25.txt | AC | 23 ms | 6356 KB |
1
|
in26.txt | AC | 25 ms | 6064 KB |
1
|
in27.txt | AC | 19 ms | 6000 KB |
1
|
in28.txt | AC | 21 ms | 6064 KB |
1
|
in29.txt | WA | 23 ms | 5992 KB |
1
|
in30.txt | MLE | 1000 ms | 65536 KB |
1
|
in31.txt | AC | 31 ms | 1812 KB |
1
|
in32.txt | MLE | 1000 ms | 65536 KB |
1
|
in33.txt | MLE | 1000 ms | 65536 KB |
1
|
in34.txt | MLE | 1000 ms | 65536 KB |
1
|
in35.txt | MLE | 1000 ms | 65536 KB |
1
|
in36.txt | MLE | 1000 ms | 65536 KB |
1
|
in37.txt | WA | 61 ms | 6944 KB |
1
|
in38.txt | AC | 59 ms | 6900 KB |
1
|
in39.txt | AC | 53 ms | 7104 KB |
1
|
in40.txt | AC | 65 ms | 7536 KB |
1
|