# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
22719 | King_God_OnionPringles (#40) | Young Zebra (KRIII5_YZ) | C++98 | 69 ms | 25236 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;
int rr[4] = {1,0,-1,0};
int cc[4] = {0,1,0,-1};
char bd[805][805];
int vis[2][805][805];
int n,m;
int ans[160001], clr = 1;
int my_clr[401][401], cntt[2][160001];
void dfs(int flag, int r, int c, int md){
//printf("%d %d %d %d %d %d\n",flag,r,c,bf,br,bc);
cntt[md][clr]++;
for(int i=0;i<4;i++){
int new_flag = flag, nr = r, nc = c;
nr += rr[i]; nc += cc[i];
if(nr == -1){
nr = n-1;
new_flag = 1;
}
if(nr == n){
nr = 0;
new_flag = 1;
}
if(nc == -1){
nc = m-1;
new_flag = 1;
}
if(nc == m){
nc = 0;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |