# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
122473 | neki | 늑대인간 (IOI18_werewolf) | C++14 | 4049 ms | 297956 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "werewolf.h"
#include <bits/stdc++.h>
#define maxn 200010
#define loop(i, a, b) for(int i=a;i<b;i++)
#define cc(a) cout<< a << endl;
using namespace std;
struct seg{
map<int, map<int, bool>> tree;
void update(int x, int y){
x+=maxn;y+=maxn;
tree[x][y]=1;
for(int tx=x;tx>=1;tx>>=1){
for(int ty=y;ty>=1;ty>>=1) tree[tx][ty]=1;
}
}
bool query(int lx, int ly, int rx, int ry){
bool ret=0;
lx+=maxn;ly+=maxn;rx+=maxn;ry+=maxn;
int slx=lx; int srx=rx;
for(;slx<srx;slx>>=1, srx>>=1){
if(slx&1){
int sly=ly; int sry=ry;
for(;sly<sry;sly>>=1, sry>>=1){
if(sly&1) ret=ret or tree[slx][sly++];
if(sry&1) ret=ret or tree[slx][--sry];
}
slx++;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |