# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
17206 | erdemkiraz | Art Class (IOI13_artclass) | C++98 | 466 ms | 21280 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 "artclass.h"
#include <bits/stdc++.h>
using namespace std;
#define type(x) __typeof((x).begin())
#define foreach(it, x) for(type(x) it = (x).begin(); it != (x).end(); it++)
typedef long long ll;
typedef pair < int, int > ii;
const int inf = 1e9 + 333;
const ll linf = 1e18 + inf;
const int N = 500;
int n, m, r[N][N], g[N][N], b[N][N];
ii root[N][N];
ii f(int x, int y) {
if(root[x][y] == ii(0, 0) or root[x][y] == ii(x, y))
return ii(x, y);
return root[x][y] = f(root[x][y].first, root[x][y].second);
}
void road(int x1, int y1, int x2, int y2, int A, int B, int C, int x = 0) {
bool flag = 0;
if(x2 < n and y2 < m) {
flag = 1;
flag &= abs(r[x1][y1] - r[x2][y2]) <= A;
flag &= abs(g[x1][y1] - g[x2][y2]) <= B;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |