QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#725717 | #7683. Hard Brackets Problem | rqoi031 | WA | 0ms | 1492kb | C++20 | 329b | 2024-11-08 19:34:47 | 2024-11-08 19:34:47 |
Judging History
answer
#include<stdio.h>
#include<algorithm>
#include<cstring>
char str[1000005];
inline void solve() {
scanf("%s",str);
const int n(std::strlen(str));
puts(std::count(str,str+n,'(')<<1>n?"Impossible":str);
}
int main() {
int t;
scanf("%d",&t);
while(t--) {
solve();
}
return 0;
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 1492kb
input:
3 ((())) ( )))()
output:
((())) Impossible )))()
result:
wrong answer the output is too long (test case 2)