QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#586132 | #2397. Eye of Sauron | Tenshi | AC ✓ | 0ms | 3800kb | C++20 | 791b | 2024-09-24 06:24:12 | 2024-09-24 06:24:12 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define debug(x) cerr << #x << ": " << (x) << endl
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define dwn(i,a,b) for(int i=(a);i>=(b);i--)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define x first
#define y second
using pii = pair<int, int>;
using ll = long long;
inline void read(int &x){
int s=0; x=1;
char ch=getchar();
while(ch<'0' || ch>'9') {if(ch=='-')x=-1;ch=getchar();}
while(ch>='0' && ch<='9') s=(s<<3)+(s<<1)+ch-'0',ch=getchar();
x*=s;
}
signed main(){
int x=0, y=0;
string s; cin>>s;
for(auto e: s){
if(e=='|') ++x;
else break;
}
reverse(all(s));
for(auto e: s){
if(e=='|') ++y;
else break;
}
puts(x==y? "correct": "fix");
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3520kb
input:
|()||
output:
fix
result:
ok single line: 'fix'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
||||()||||
output:
correct
result:
ok single line: 'correct'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
|()|
output:
correct
result:
ok single line: 'correct'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3796kb
input:
|||()|
output:
fix
result:
ok single line: 'fix'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
|||||||||||||||||||||||||||||||||||||||||||||||||()|||||||||||||||||||||||||||||||||||||||||||||||||
output:
correct
result:
ok single line: 'correct'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
|||||||||||||||||||||||||||||||||||||||()|||||||||||||||||||||||||||||||||||||||||
output:
fix
result:
ok single line: 'fix'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
||||||||||||||||||||||||()||||||||||||||||||||||||
output:
correct
result:
ok single line: 'correct'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
|||||||||||||||||||||||||()|||||||||||||||||||||||
output:
fix
result:
ok single line: 'fix'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
|||||||||||||||||||||||()|||||||||||||||||||||||||
output:
fix
result:
ok single line: 'fix'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
||()|
output:
fix
result:
ok single line: 'fix'