# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
12116 | ainu7 | 전선 연결하기 (GA9_wire) | C++98 | 1000 ms | 5100 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 <math.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <sstream>
#include <set>
using namespace std;
char res[600002];
int area[600002];
bool solve(int ll, int rr, vector<int>& A, vector<int>& other) {
if (ll > rr) return true;
res[ll] = '^';
res[other[ll]] = '^';
while (1) {
area[ll] = 0;
for (int i=ll+1; i<=rr; i++)
area[i] = area[i-1] + (res[i] == '^' || res[i] == 'v');
int ok = 0;
for (int i=ll+1; i<=rr; i++)
if (res[i] != '^' && res[i] != 'v' && area[i] != area[other[i]]) {
int lll = i;
# | 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... |