# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
105132 | leonarda | Konj (COCI19_konj) | C++14 | 116 ms | 12628 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>
using namespace std;
#define pb push_back
#define mp make_pair
typedef pair<int, int> pi;
int n, tx, ty;
vector<pi> m[300 + 5][300 + 5];
bool memo[300 + 5][300 + 5];
queue<int> qx, qy;
char crtez[300 + 5][300 + 5];
int minix = 0x3f3f3f3f, maksx = 0, miniy = 0x3f3f3f3f, maksy = 0;
vector<pi> v1, v2;
void crtaj(int x, int y) {
for(int i = 0; i < m[x][y].size(); ++i) {
int u = m[x][y][i].first;
int v = m[x][y][i].second;
minix = min(minix, u);
maksx = max(maksx, u);
miniy = min(miniy, v);
maksy = max(maksy, v);
if(u == x) {
for(int j = min(y, v); j <= max(y, v); ++j)
crtez[x][j] = '#';
} else if(y == v) {
for(int j = min(u, x); j <= max(u, x); ++j) {
crtez[j][y] = '#';
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |