QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#433413 | #2397. Eye of Sauron | JustJie# | AC ✓ | 1ms | 3852kb | C++20 | 976b | 2024-06-08 10:56:49 | 2024-06-08 10:56:51 |
Judging History
answer
/***************************************************************************************************
* author : Jie Chen (4th Year CS)
* school : Rochester Institute of Technology
* created: 06.07.2024 22:54:32
****************************************************************************************************/
#include "bits/stdc++.h"
using namespace std;
using i64 = long long;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
string s;
cin >> s;
int n = s.size();
if (n % 2 == 0) {
for (int i = 0; i < n / 2 - 1; i++) {
if (s[i] != '|') {
cout << "fix\n";
return 0;
}
if (s[n - i - 1] != '|') {
cout << "fix\n";
return 0;
}
}
cout << (s.substr(n / 2 - 1, 2) == "()" ? "correct" : "fix") << "\n";
} else {
cout << "fix\n";
}
}
// ~ Just Jie
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3656kb
input:
|()||
output:
fix
result:
ok single line: 'fix'
Test #2:
score: 0
Accepted
time: 1ms
memory: 3628kb
input:
||||()||||
output:
correct
result:
ok single line: 'correct'
Test #3:
score: 0
Accepted
time: 1ms
memory: 3792kb
input:
|()|
output:
correct
result:
ok single line: 'correct'
Test #4:
score: 0
Accepted
time: 1ms
memory: 3628kb
input:
|||()|
output:
fix
result:
ok single line: 'fix'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
|||||||||||||||||||||||||||||||||||||||||||||||||()|||||||||||||||||||||||||||||||||||||||||||||||||
output:
correct
result:
ok single line: 'correct'
Test #6:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
|||||||||||||||||||||||||||||||||||||||()|||||||||||||||||||||||||||||||||||||||||
output:
fix
result:
ok single line: 'fix'
Test #7:
score: 0
Accepted
time: 1ms
memory: 3564kb
input:
||||||||||||||||||||||||()||||||||||||||||||||||||
output:
correct
result:
ok single line: 'correct'
Test #8:
score: 0
Accepted
time: 1ms
memory: 3852kb
input:
|||||||||||||||||||||||||()|||||||||||||||||||||||
output:
fix
result:
ok single line: 'fix'
Test #9:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
|||||||||||||||||||||||()|||||||||||||||||||||||||
output:
fix
result:
ok single line: 'fix'
Test #10:
score: 0
Accepted
time: 1ms
memory: 3564kb
input:
||()|
output:
fix
result:
ok single line: 'fix'