# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
143829 | icypiggy | Rectangles (IOI19_rect) | C++14 | 4585 ms | 796824 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 <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <stack>
#include <assert.h>
using namespace std;
const int n_max = 2550; // make it not lag
vector<pair<int,int>> h_map[n_max][n_max];
vector<pair<int,int>> v_map[n_max][n_max];
//vector<pair<int,int>> v_map2[n_max];
pair<int,int> tmp[n_max][n_max]; // start and end
void update_val(int left, int right, int row) {
if(tmp[left][right].second != row-1) {
if(tmp[left][right].second!=-2) {
for(int i=tmp[left][right].first; i<=tmp[left][right].second; i++) {
h_map[i][left].push_back(make_pair(tmp[left][right].second, right));
}
}
tmp[left][right] = make_pair(row, row);
} else {
tmp[left][right].second++;
}
}
void update_val2(int left, int right, int row) {
if(tmp[left][right].second != row-1) {
if(tmp[left][right].second!=-2) {
for(int i=tmp[left][right].first; i<=tmp[left][right].second; i++) {
v_map[left][i].push_back(make_pair(right, tmp[left][right].second));
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... |