# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
296089 | groeneprof | Furniture (JOI20_furniture) | C++14 | 3661 ms | 28192 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>
#define P(a) do{if(debug) cout<<a<<endl;} while(false)
#define H(a) P(#a<<": "<<a)
#define FR(i,a,b) for(int i = (a); i<(int)((b)); i++)
#define F(i,n) FR(i,0,n)
const int debug = 0;
using namespace std;
int n,m,Q;
bool inbounds(int x,int y){
return x>=0 && x<n && y>=0 && y<m;
}
vector<vector<int> > C;
vector<vector<int> > A;
vector<vector<int> > B;
vector<vector<int> > D;
vector<int> vx,vy;
void updateB(int x, int y){
if(!inbounds(x,y) || B[x][y] == 1){
return;
}
if(C[x][y] == 1 || !((inbounds(x-1,y) && B[x-1][y]==0) || (inbounds(x,y-1) && B[x][y-1]==0))) {
B[x][y] = 1;
updateB(x+1,y);
updateB(x,y+1);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |