# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
403561 | tqbfjotld | 조개 줍기 (KOI17_shell) | C++14 | 296 ms | 39284 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 <bits/stdc++.h>
using namespace std;
#define int long long
int vals[1505][1505];
int val2[1505][1505];
int num[1505][1505];
set<pair<int,int> > vis;
int curans = 0;
int n;
void decr(int x, int y){
int t=vis.size();
vis.insert({x,y});
if (vis.size()==t) return;
val2[x][y]--;
curans --;
if (x!=n){
if (vals[x+1][y]+max(val2[x][y],y!=1?val2[x+1][y-1]:0)<val2[x+1][y]){
decr(x+1,y);
}
}
if (y!=n){
if (vals[x][y+1]+max(val2[x][y],x!=1?val2[x-1][y+1]:0)<val2[x][y+1]){
decr(x,y+1);
}
}
}
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... |