# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1106010 | snpmrnhlol | Rectangles (IOI19_rect) | C++17 | 1343 ms | 667176 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 "rect.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 25e2;
const int inf = N + 1;
int nxt[4][N][N];
int prv[N][N];
int na[N][N];
int v2[N], cnt = 0;
int n, m;
vector <int> righ[N][N];
vector <int> down[N][N];
int rightspec[N][N];
int leftspec[N][N];
int downspec[N][N];
int upspec[N][N];
pair<int,int> rot(int x, int y, int deg, int n2 = n,int m2 = m){
for(int i = 0;i < deg;i++){
swap(x,y);
y = n2 - 1 - y;
swap(n2, m2);
}
return {x,y};
}
pair<int,int> get(int x, int y, int dir){
if(dir == 0){
return {x, nxt[0][x][y]};
}else if(dir == 1){
pair<int,int> f2 = rot(x, y, 1);
return {rot(0, nxt[1][f2.first][f2.second], 3, m, n).first, y};
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... |
# | 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... |