Submission #66674
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #include<bits/stdc++.h> using namespace std; #define ll long long int main(){ int h,w; cin>>h>>w; vector<vector<ll>> dp(h+1,vector<ll>(w+1,0)); for ( int i=1;i<=h;++i){ for ( int j=1;j<=w;++j){ cin>>dp[i][j]; } } for ( int i=1;i<=h;++i){ for ( int j=1;j<=w;++j){ dp[i][j]+=max({dp[i-1][j],dp[i][j-1]}); } } cout<<dp[h][w]<< "\n" ; return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0910 - 百円以下の拾得物 |
ユーザー名 | r2031 |
投稿日時 | 2021-05-14 16:08:13 |
言語 | C++17 |
状態 | Accepted |
得点 | 3 |
ソースコード長 | 448 Byte |
最大実行時間 | 206 ms |
最大メモリ使用量 | 25828 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 3 / 3 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 34 ms | 604 KB |
1
|
in02.txt | AC | 26 ms | 576 KB |
1
|
in03.txt | AC | 25 ms | 544 KB |
1
|
in04.txt | AC | 26 ms | 648 KB |
1
|
in05.txt | AC | 34 ms | 616 KB |
1
|
in06.txt | AC | 185 ms | 12108 KB |
1
|
in07.txt | AC | 192 ms | 15988 KB |
1
|
in08.txt | AC | 206 ms | 20640 KB |
1
|
in09.txt | AC | 189 ms | 25420 KB |
1
|
in10.txt | AC | 47 ms | 17776 KB |
1
|
in11.txt | AC | 126 ms | 25828 KB |
1
|
sample_in_1.txt | AC | 19 ms | 20972 KB |
1
|
sample_in_2.txt | AC | 18 ms | 20940 KB |
1
|