# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
98368 | scanhex | Cats or Dogs (JOI18_catdog) | C++17 | 1526 ms | 30712 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>
#include "catdog.h"
using namespace std;
const int N=1<<17;
using val=array<array<int,2>,2>;
val t[2*N];
int par[N];
int cur[N];
#define chmi(x,y) if(x>y)x=y
#define chma(x,y) if(x<y)x=y
const int oo=100001;
int invind[N];
val gett(int x){
if(x<N)
return t[x];
val ans;
int u=invind[x-N];
for(int i=0;i<2;++i)
for(int j=0;j<2;++j)
if(i==j&&((i+1)&cur[u]))
ans[i][j]=t[x][i][j];
else
ans[i][j]=oo;
return ans;
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... |