# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
226182 | super_j6 | Match (CEOI16_match) | C++14 | 19 ms | 9984 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 <cstdio>
#include <algorithm>
#include <string.h>
#include <vector>
using namespace std;
#define endl '\n'
#define ll long long
#define pi pair<int, int>
#define f first
#define s second
const int maxn = 100001, k = 26;
int n;
string s;
int it[maxn], l[maxn], p[maxn];
int tr[maxn][k];
vector<int> v[maxn];
int m = 1;
string ret;
void solve(int l, int r){
if(l > r) return;
int x = *--upper_bound(v[it[l]].begin(), v[it[l]].end(), r);
ret[l - 1] = '(', ret[x] = ')';
solve(l + 1, x), solve(x + 2, r);
}
int main(){
ios::sync_with_stdio(false);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |