# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
698541 | dattranxxx | Match (CEOI16_match) | C++11 | 12 ms | 12488 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;
using ll = long long;
const int N = 1e5 + 5;
string s;
int n;
char ans[N];
int good(stack<char> st, int i, int j = n) {
for (; i <= j; ++i) {
if (st.empty() || st.top() != s[i]) {
st.push(s[i]);
} else {
st.pop();
}
}
return st.empty();
}
void task1() {
stack<char> st;
for (int i = 1; i <= n; ++i) {
if (st.empty() || st.top() != s[i]) {
st.push(s[i]);
ans[i] = '(';
} else {
st.push(s[i]);
ans[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... |