Submission #71621
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; vector<vector< int >> ld(a+1,vector< int >(b+1,0)); for ( int i=1;i<=a;i++){ for ( int j=1;j<=b;j++){ cin>>ld[i][j]; } } for ( int i=1;i<=a;i++){ for ( int j=1;j<=b;j++){ ld[i][j]=max(ld[i][j]+ld[i-1][j],ld[i][j]+ld[i][j-1]); } } cout<<ld[a][b]<<endl; return 0; } |
ステータス
項目 | データ |
---|---|
問題 | 0910 - 百円以下の拾得物 |
ユーザー名 | ei2119 |
投稿日時 | 2022-08-04 10:00:24 |
言語 | C++17 |
状態 | Accepted |
得点 | 3 |
ソースコード長 | 438 Byte |
最大実行時間 | 186 ms |
最大メモリ使用量 | 4632 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 3 / 3 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 25 ms | 604 KB |
1
|
in02.txt | AC | 20 ms | 444 KB |
1
|
in03.txt | AC | 20 ms | 536 KB |
1
|
in04.txt | AC | 28 ms | 508 KB |
1
|
in05.txt | AC | 22 ms | 608 KB |
1
|
in06.txt | AC | 160 ms | 4420 KB |
1
|
in07.txt | AC | 160 ms | 4536 KB |
1
|
in08.txt | AC | 172 ms | 4520 KB |
1
|
in09.txt | AC | 186 ms | 4632 KB |
1
|
in10.txt | AC | 29 ms | 652 KB |
1
|
in11.txt | AC | 126 ms | 3120 KB |
1
|
sample_in_1.txt | AC | 19 ms | 532 KB |
1
|
sample_in_2.txt | AC | 23 ms | 624 KB |
1
|