Submission #60946
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #include<iostream> #include<vector> using namespace std; int main(){ int n,q,a,i; cin>>n>>q; vector< int > minv(n+10,0); cin>>a; minv[1]=a; for (i=2;i<=n;i++){ cin>>a; if (minv[i-1]>a){ minv[i]=a; } else { minv[i]=minv[i-1]; } } int r; for (i=0;i<q;i++){ cin>>r; cout<<minv[r]<<endl; } return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 1356 - Minimum Value |
ユーザー名 | ei2007 |
投稿日時 | 2020-07-16 16:16:21 |
言語 | C++ |
状態 | Accepted |
得点 | 30 |
ソースコード長 | 430 Byte |
最大実行時間 | 496 ms |
最大メモリ使用量 | 23380 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | task01 | 10 / 10 | in01*, sample01.txt |
2 | task02 | 20 / 20 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # | |
---|---|---|---|---|---|
in01_01.txt | AC | 22 ms | 604 KB |
1
|
2
|
in01_02.txt | AC | 16 ms | 444 KB |
1
|
2
|
in01_03.txt | AC | 31 ms | 412 KB |
1
|
2
|
in01_04.txt | AC | 24 ms | 512 KB |
1
|
2
|
in01_05.txt | AC | 23 ms | 604 KB |
1
|
2
|
in01_06.txt | AC | 23 ms | 572 KB |
1
|
2
|
in01_07.txt | AC | 27 ms | 536 KB |
1
|
2
|
in01_08.txt | AC | 23 ms | 500 KB |
1
|
2
|
in01_09.txt | AC | 25 ms | 600 KB |
1
|
2
|
in01_10.txt | AC | 21 ms | 568 KB |
1
|
2
|
in01_11.txt | AC | 20 ms | 664 KB |
1
|
2
|
in01_12.txt | AC | 20 ms | 760 KB |
1
|
2
|
in01_13.txt | AC | 20 ms | 600 KB |
1
|
2
|
in02_01.txt | AC | 226 ms | 1592 KB |
2
|
|
in02_02.txt | AC | 262 ms | 3064 KB |
2
|
|
in02_03.txt | AC | 113 ms | 3316 KB |
2
|
|
in02_04.txt | AC | 475 ms | 5616 KB |
2
|
|
in02_05.txt | AC | 476 ms | 7620 KB |
2
|
|
in02_06.txt | AC | 480 ms | 9492 KB |
2
|
|
in02_07.txt | AC | 476 ms | 12004 KB |
2
|
|
in02_08.txt | AC | 482 ms | 14132 KB |
2
|
|
in02_09.txt | AC | 471 ms | 16260 KB |
2
|
|
in02_10.txt | AC | 477 ms | 18392 KB |
2
|
|
in02_11.txt | AC | 472 ms | 20652 KB |
2
|
|
in02_12.txt | AC | 496 ms | 22912 KB |
2
|
|
in02_13.txt | AC | 441 ms | 23380 KB |
2
|
|
sample01.txt | AC | 25 ms | 22436 KB |
1
|
2
|