# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
86252 | tjdgus4384 | 조개 줍기 (KOI17_shell) | C++14 | 2032 ms | 23152 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<cstdio>
#include<algorithm>
using namespace std;
int board[1501][1501], boardsum[1501][1501];
char x;
int n;
void sum()
{
int ans = 0;
for(int i = 1;i <= n;i++)
{
for(int j = 1;j <= n;j++)
{
boardsum[i][j] = board[i][j] + max(boardsum[i - 1][j], boardsum[i][j - 1]);
ans += boardsum[i][j];
}
}
printf("%d\n", ans);
}
int main()
{
int a, b;
scanf("%d", &n);
for(int i = 1;i <= n;i++)
{
for(int j = 1;j <= n;j++)
{
scanf("%d", &board[i][j]);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |