# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
929222 | 1075508020060209tc | Furniture (JOI20_furniture) | C++14 | 249 ms | 14416 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
//#define int long long
int n;int m;int Q;
int gr[1010][1010];
int rch[1010][1010];
int rrch[1010][1010];
int okcnt[3010];
int ok(int x,int y){
if(x>=1&&y>=1&&x<=n&&y<=m){return 1;}
return 0;
}
void precalc(){
queue<pair<int,int>>q;
q.push({1,1});
rch[1][1]=1;
while(q.size()){
int nwx=q.front().first;
int nwy=q.front().second;
q.pop();
int x=nwx;int y=nwy;
x++;
if(gr[x][y]==0&&rch[x][y]==0&&ok(x,y)){
rch[x][y]=1;
q.push({x,y});
}
x--;y++;
if(gr[x][y]==0&&rch[x][y]==0&&ok(x,y)){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |