# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
223060 | Autoratch | Dango Maker (JOI18_dango_maker) | C++14 | 767 ms | 262148 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;
const int N = 3010;
int m,n,ans;
char c[N][N];
int v[N][N],h[N][N];
int cv[N][N],ch[N][N];
set<tuple<int,int,int,int> > s;
void del(tuple<int,int,int,int> a,tuple<int,int,int,int> tt)
{
auto [c,x,y,t] = a;
if(t==0)
{
auto it = s.find({ch[x-2][y+2],x-2,y+2,1});
if(it!=s.end() and *it!=tt) ch[x-2][y+2]--,s.erase(it),s.insert({ch[x-2][y+2],x-2,y+2,1});
it = s.find({ch[x-1][y+1],x-1,y+1,1});
if(it!=s.end() and *it!=tt) ch[x-1][y+1]--,s.erase(it),s.insert({ch[x-1][y+1],x-1,y+1,1});
it = s.find({ch[x][y],x,y,1});
if(it!=s.end() and *it!=tt) ch[x][y]--,s.erase(it),s.insert({ch[x][y],x,y,1});
}
else
{
auto it = s.find({cv[x+2][y-2],x+2,y-2,0});
if(it!=s.end() and *it!=tt) cv[x+2][y-2]--,s.erase(it),s.insert({cv[x+2][y-2],x+2,y-2,0});
it = s.find({cv[x+1][y-1],x+1,y-1,0});
if(it!=s.end() and *it!=tt) cv[x+1][y-1]--,s.erase(it),s.insert({cv[x+1][y-1],x+1,y-1,0});
it = s.find({cv[x][y],x,y,0});
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... |