Submission #42099


ソースコード

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
#include <iostream>
using namespace std;
int n;
int d[300005];
int main()
{
int flg = 1;
int need;
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> d[i];
}
need = 10;
for (int i = 1; i < n; ++i) {
if (d[i] >= need) {
need = 0;
}
need += 10;
}
if (need > 10) {
flg = 0;
}
need = 10;
for (int i = n - 2; i >= 0; --i) {
if (d[i] >= need) {
need = 0;
}
need += 10;
}
if (need > 10) {
flg = 0;
}
cout << (flg ? "yes" : "no") << endl;
return 0;
}

ステータス

項目 データ
問題 0960 - トランポリン
ユーザー名 ei1710
投稿日時 2018-08-28 11:26:33
言語 C++14
状態 Accepted
得点 11
ソースコード長 666 Byte
最大実行時間 86 ms
最大メモリ使用量 2012 KB

セット

セット 得点 Cases
1 ALL 11 / 11 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
in1.txt AC 22 ms 480 KB
1
in2.txt AC 21 ms 628 KB
1
in3.txt AC 20 ms 516 KB
1
in4.txt AC 24 ms 772 KB
1
in5.txt AC 26 ms 696 KB
1
in6.txt AC 20 ms 668 KB
1
in7.txt AC 25 ms 640 KB
1
in8.txt AC 60 ms 2012 KB
1
in9.txt AC 64 ms 1836 KB
1
in10.txt AC 82 ms 1596 KB
1
in11.txt AC 17 ms 532 KB
1
in12.txt AC 25 ms 496 KB
1
in13.txt AC 23 ms 592 KB
1
in14.txt AC 24 ms 560 KB
1
in15.txt AC 17 ms 528 KB
1
in16.txt AC 19 ms 496 KB
1
in17.txt AC 23 ms 592 KB
1
in18.txt AC 25 ms 560 KB
1
in19.txt AC 20 ms 660 KB
1
in20.txt AC 23 ms 592 KB
1
in21.txt AC 20 ms 556 KB
1
in22.txt AC 17 ms 520 KB
1
in23.txt AC 22 ms 612 KB
1
in24.txt AC 23 ms 580 KB
1
in25.txt AC 29 ms 544 KB
1
in26.txt AC 28 ms 640 KB
1
in27.txt AC 32 ms 736 KB
1
in28.txt AC 29 ms 664 KB
1
in29.txt AC 30 ms 588 KB
1
in30.txt AC 21 ms 612 KB
1
in31.txt AC 31 ms 924 KB
1
in32.txt AC 61 ms 1656 KB
1
in33.txt AC 64 ms 1736 KB
1
in34.txt AC 72 ms 1816 KB
1
in35.txt AC 67 ms 1772 KB
1
in36.txt AC 86 ms 1856 KB
1
in37.txt AC 63 ms 1808 KB
1
in38.txt AC 53 ms 1884 KB
1
in39.txt AC 56 ms 1836 KB
1
in40.txt AC 53 ms 1892 KB
1