# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
144979 | emilem | Zagrade (COI17_zagrade) | C++14 | 857 ms | 20668 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 <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
long long ans;
int n;
int op, clos;
string path;
vector< vector<int> > nei;
string a;
long long Chain(const string& a)
{
vector< pair<int, int> > pref(a.length());
for (int i = 0; i < pref.size(); ++i)
{
pref[i].second = i;
if (a[i] == '(') ++pref[i].first;
else --pref[i].first;
if (i) pref[i].first += pref[i - 1].first;
}
vector<int> r(n, -1);
for (int i = 0; i < n; ++i)
{
r[i] = -1;
int minElem = pref[i].first;
for (int j = i; j < n; ++j)
{
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... |