# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
115733 | Breno_XD | Retro (COCI17_retro) | C++14 | 1087 ms | 512 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 MAX 310
string seq, ans;
int r, s, x, y;
char v[MAX][MAX];
bool valid(int i, int j){
if(i >= 1 && i <= r+1 && j >= 1 && j <= s)return true;
return false;
}
void dfs(int i, int j){
if(v[i][j] == '*' || (i < 1 && j >= 1 && j <= s)){
stack<char> pilha;
bool ok = true;
for(int i = 0; i < seq.size(); i++){
if(seq[i] == '('){
pilha.push('(');
}else if(seq[i] == ')'){
if(pilha.size() > 0){
pilha.pop();
}else{
ok = false;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |