# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
78535 | sjhuang26 | Treasure (different grader from official contest) (CEOI13_treasure2) | C++14 | 2 ms | 612 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 "treasure.h"
#include<iostream>
using namespace std;
int d[101][101]={};
void findTreasure(int n){
int k=n/2;
for(int i=n;i>0;--i)for(int j=n;j>0;--j){
if(i>k&&j>k)d[i][j]=countTreasure(1,1,i,j);
if(i<=k&&j>k)d[i][j]=d[n][j]-countTreasure(i+1,1,n,j);
if(i<=k&&j<=k)d[i][j]=d[i][n]-countTreasure(1,j+1,i,n);
if(i>k&&j<=k)d[i][j]=d[i][n]-countTreasure(1,j+1,i,n);
}
for(int i=1;i<=n;++i)for(int j=1;j<=n;++j)if(d[i][j]-d[i-1][j]-d[i][j-1]+d[i-1][j-1])Report(i,j);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |