Submission #37944
ソースコード
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 | #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #define true 1; #define false 0; #define boolean int; int max( int a, int b) { return a < b ? b : a; } int min( int a, int b) { return a < b ? a : b; } int fgetInt() { int a; scanf ( "%d" , &a); return a; } int map[1010][1010]; int main(){ int h = fgetInt(); int w = fgetInt(); int i, j; for ( i = 1; i <= h; i++ ) { for ( j = 1; j <= w; j++ ) { map[i][j] = fgetInt(); map[i][j] += max(map[i][j-1], map[i-1][j]); } } printf ( "%d\n" , map[h][w]); return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0910 - 百円以下の拾得物 |
ユーザー名 | r1825 |
投稿日時 | 2018-06-27 21:42:29 |
言語 | C |
状態 | Accepted |
得点 | 3 |
ソースコード長 | 667 Byte |
最大実行時間 | 79 ms |
最大メモリ使用量 | 4424 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 3 / 3 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 22 ms | 380 KB |
1
|
in02.txt | AC | 31 ms | 512 KB |
1
|
in03.txt | AC | 31 ms | 396 KB |
1
|
in04.txt | AC | 19 ms | 448 KB |
1
|
in05.txt | AC | 27 ms | 360 KB |
1
|
in06.txt | AC | 79 ms | 4344 KB |
1
|
in07.txt | AC | 77 ms | 4416 KB |
1
|
in08.txt | AC | 77 ms | 4360 KB |
1
|
in09.txt | AC | 73 ms | 4424 KB |
1
|
in10.txt | AC | 25 ms | 912 KB |
1
|
in11.txt | AC | 57 ms | 3292 KB |
1
|
sample_in_1.txt | AC | 15 ms | 584 KB |
1
|
sample_in_2.txt | AC | 22 ms | 532 KB |
1
|