# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1118026 | vjudge1 | Match (CEOI16_match) | C++17 | 24 ms | 23640 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 SPEED ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
#define ALL(x) x.begin(), x.end()
#define intt long long
#define pb push_back
#define endl "\n"
const int sz = 3e6 + 5, L = 20;
intt dp[sz][27];
bool valid(string& s) {
stack<char>st;
for(int i = 0; i < s.size(); i++) {
if(!st.empty() && st.top() == s[i]) {
st.pop();
} else{
st.push(s[i]);
}
}
return st.empty();
}
string ans, s;
void rec(intt l, intt r) {
if(l < r) {
intt pos = dp[r][s[l] - 'a'];
ans[l - 1] = '(';
ans[pos - 1] = ')';
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... |