QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#387669#3734. Parenthesisucup-team1383AC ✓41ms8684kbC++171.5kb2024-04-12 18:23:492024-04-12 18:23:50

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 6476kb

input:

10 100
(()())()()
1 2
4 2
3 1
2 3
4 1
3 2
5 4
2 4
1 5
4 3
3 5
3 1
5 3
2 5
4 5
3 5
4 2
5 4
3 5
2 3
4 1
2 4
2 5
2 5
3 4
4 1
5 1
1 2
5 1
2 3
4 2
1 3
2 3
2 1
4 1
1 5
5 1
3 4
3 4
1 5
1 4
1 3
4 1
3 5
1 2
3 1
1 2
2 3
5 3
2 1
3 5
1 5
5 4
2 1
1 4
4 5
4 1
4 1
2 4
5 3
5 4
3 2
3 5
5 4
3 5
1 4
5 1
1 5
3 2
3 4
2 ...

output:

Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
Yes
Yes
No
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
Yes
No
Y...

result:

ok 100 tokens

Test #2:

score: 0
Accepted
time: 1ms
memory: 8456kb

input:

10 100
(()(())())
4 3
1 3
5 1
5 2
3 4
5 2
5 4
5 2
5 2
4 2
3 4
1 3
4 2
1 5
1 5
2 5
4 1
3 4
3 1
5 2
5 4
4 5
4 2
4 3
5 1
1 2
4 5
4 3
1 5
4 2
3 4
1 5
2 3
3 4
4 2
2 5
5 2
3 2
5 2
1 4
3 1
5 4
3 4
5 1
5 4
4 2
3 2
2 5
2 1
1 2
3 5
5 2
3 5
5 2
2 3
4 3
1 5
3 5
1 4
1 2
2 5
5 1
1 3
2 1
4 5
1 2
3 2
3 1
2 5
5 4
3 ...

output:

Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
No
No
No
Yes
Ye...

result:

ok 100 tokens

Test #3:

score: 0
Accepted
time: 1ms
memory: 6408kb

input:

10 100
(()()()())
1 2
4 5
2 5
2 4
3 1
5 1
3 2
3 2
3 1
5 2
3 4
3 5
5 4
2 5
4 2
1 5
3 1
3 2
4 1
5 2
4 5
5 3
2 3
2 5
4 1
5 1
3 4
2 3
2 4
2 4
1 5
5 4
1 5
4 5
4 1
3 1
2 1
5 2
2 3
1 2
5 2
4 1
3 5
4 5
3 4
4 5
3 1
5 3
4 2
2 1
2 5
4 2
1 5
1 2
3 2
5 1
1 4
5 1
2 4
3 1
1 2
5 3
5 4
4 1
4 5
3 1
5 1
3 5
5 4
5 4
2 ...

output:

Yes
Yes
No
Yes
No
No
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
No
Yes
Yes
No
No
Yes
Ye...

result:

ok 100 tokens

Test #4:

score: 0
Accepted
time: 1ms
memory: 6464kb

input:

10 100
()()()()()
2 1
5 3
4 3
3 4
1 5
3 5
3 2
4 1
2 1
4 3
2 3
3 5
5 4
1 3
2 3
1 3
2 1
3 2
3 2
4 1
1 5
1 5
4 3
3 4
3 4
1 2
4 5
3 4
5 4
4 1
4 2
4 5
3 4
5 2
3 1
2 1
3 1
1 4
1 3
4 2
5 1
2 1
1 3
4 5
2 4
2 3
5 4
1 2
3 2
1 2
3 5
1 5
1 2
1 5
5 4
4 3
2 4
3 1
4 2
5 1
5 1
3 2
2 1
1 5
3 2
1 3
1 3
1 4
4 1
5 3
4 ...

output:

No
Yes
No
No
Yes
Yes
Yes
No
No
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
No
No
No
No
Yes
No
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
No
Yes
No
Yes
No
Yes
Yes
No
No
Yes
No
No
Yes
Yes
No
...

result:

ok 100 tokens

Test #5:

score: 0
Accepted
time: 1ms
memory: 8112kb

input:

10 100
()(()()())
2 1
4 2
2 4
2 3
1 5
3 2
4 2
4 1
2 5
4 5
2 3
5 3
1 5
4 1
5 2
1 5
2 5
3 4
5 2
4 2
3 1
1 4
5 2
4 2
4 3
4 2
5 3
5 2
2 4
2 5
1 4
5 1
2 3
3 5
5 3
3 5
2 4
5 1
3 5
1 2
2 3
1 3
3 2
2 5
4 5
1 3
5 4
1 2
3 4
3 2
1 5
4 2
4 1
3 4
5 4
1 4
3 5
1 2
2 3
1 3
5 3
1 5
5 2
4 2
5 1
4 5
4 1
5 4
4 3
2 4
2 ...

output:

No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
No
No
No
Yes
No
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
Yes
No
No
Yes
Yes
Y...

result:

ok 100 tokens

Test #6:

score: 0
Accepted
time: 0ms
memory: 6712kb

input:

10 100
(()()()())
4 2
1 4
4 1
3 2
2 4
4 5
4 1
5 4
5 2
4 1
2 5
1 2
3 5
4 3
1 5
3 1
1 5
4 5
5 2
5 2
1 3
5 3
5 4
3 1
5 3
1 2
1 5
4 3
4 3
5 1
5 4
4 5
4 1
3 4
5 4
4 3
3 2
4 2
4 3
1 3
1 2
1 3
3 4
1 3
3 2
4 1
3 1
2 5
3 5
4 5
5 4
3 4
4 2
3 2
2 1
1 2
3 2
4 1
1 5
5 4
5 1
2 1
3 1
5 2
1 2
4 2
5 4
5 3
3 1
2 5
4 ...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
No
No
Yes
No
No
No
Yes
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
No
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
No
No
Yes
Yes
Yes
Yes
No
No
Yes...

result:

ok 100 tokens

Test #7:

score: 0
Accepted
time: 1ms
memory: 6476kb

input:

10 100
((()())())
1 5
4 3
1 2
2 1
1 2
3 5
1 3
2 1
2 4
4 2
4 3
5 3
4 2
1 4
5 4
2 4
3 5
1 3
1 2
5 4
3 2
5 2
5 4
4 1
4 1
3 2
5 1
5 1
1 2
4 2
2 1
4 2
4 3
2 4
5 4
5 4
1 5
3 1
2 3
2 4
4 2
1 2
2 4
2 3
3 2
1 4
5 2
4 2
5 2
4 2
1 2
2 1
4 1
4 1
1 4
4 5
5 1
5 1
5 2
4 1
2 3
3 1
1 2
5 1
3 1
1 2
4 2
3 4
4 1
2 4
1 ...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Y...

result:

ok 100 tokens

Test #8:

score: 0
Accepted
time: 1ms
memory: 7880kb

input:

10 100
()()()()()
2 1
5 2
5 1
3 5
4 3
4 5
2 3
5 4
5 1
4 2
3 2
2 1
2 3
5 2
4 3
3 4
3 5
5 4
2 1
2 3
5 4
2 5
1 3
3 5
5 4
5 4
4 5
3 4
5 4
4 5
4 3
1 4
2 4
3 1
1 5
4 3
1 3
1 3
2 4
1 2
3 2
2 1
1 5
5 4
3 4
5 3
1 5
3 4
3 1
5 3
3 5
3 1
5 4
1 3
4 3
4 5
3 2
5 4
1 4
5 3
5 2
4 5
1 5
5 4
2 1
1 3
1 4
5 2
3 4
5 4
1 ...

output:

No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
N...

result:

ok 100 tokens

Test #9:

score: 0
Accepted
time: 1ms
memory: 6456kb

input:

10 100
()()()()()
5 3
4 5
2 3
3 5
1 3
1 3
2 1
1 2
3 1
4 5
1 4
1 4
1 2
4 1
3 2
3 5
5 4
5 2
4 5
4 3
5 3
4 1
1 5
4 2
4 1
2 3
1 3
4 2
4 1
3 2
5 4
1 3
5 3
2 1
1 5
4 3
2 4
5 3
3 1
2 5
5 4
1 2
4 1
2 5
4 2
4 2
5 1
3 4
5 1
4 1
2 4
3 5
2 5
1 5
4 1
2 4
2 4
4 2
3 2
4 2
3 5
2 3
5 1
3 1
3 4
1 3
3 1
3 1
2 3
4 5
1 ...

output:

Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
No
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
Yes
No
Yes
Yes
No
Yes
Yes...

result:

ok 100 tokens

Test #10:

score: 0
Accepted
time: 1ms
memory: 6676kb

input:

10 100
()(()()())
1 3
3 1
2 5
1 2
3 5
3 4
4 3
3 2
1 5
3 1
5 2
3 1
1 2
3 1
2 1
3 4
4 3
4 2
5 3
5 4
5 2
2 1
5 2
5 1
4 1
2 1
3 1
5 2
3 5
4 3
3 1
1 2
5 1
2 1
3 5
2 1
1 2
2 3
5 4
4 3
3 4
3 5
5 3
3 1
4 1
4 5
1 3
1 5
1 3
1 4
2 4
2 5
5 3
4 5
4 5
4 3
3 4
2 1
1 4
5 2
2 4
4 3
2 4
1 3
3 1
4 2
5 1
3 4
2 4
3 2
1 ...

output:

Yes
Yes
Yes
No
No
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
Yes
No
Yes
Yes
No
Yes
Yes
No
No
No
No
No
No
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Y...

result:

ok 100 tokens

Test #11:

score: 0
Accepted
time: 8ms
memory: 6412kb

input:

1000 10000
((((()()()(())(((()())()()()()()()()())()()(()()())()()()()()()((()()()()()(())())))(()()(()()(()))(()()()()()()())()()()()()()()))()(())()()()()()()()()()()()()(()()()()()()))()()(()()())()(())(()()()())(())()()(()()()()()()()()())(()((())())()()()())()()()()(()()()()()()(()()()()()(((()...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
...

result:

ok 10000 tokens

Test #12:

score: 0
Accepted
time: 0ms
memory: 8188kb

input:

1000 10000
(((((()(())(())()()()(()(()()()()()))((())((()))()()()()()()())()()()()()()()(())(()(())())(()())(())()()(())()()()()((()(()()())()())()()()()()())()((()()()(()()())()()())))(()())(((((())((())())(())())()())))((())()()()()()))(())()(())(())()()()()())(()()()()()()()()()()()()()()(((()()(...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
...

result:

ok 10000 tokens

Test #13:

score: 0
Accepted
time: 0ms
memory: 8296kb

input:

1000 10000
()()()()()()()()(())(())()()(()()()())()()()()()(()()(()())())(())((()()(()()()()())()()()(())))((((((()()()()()(()()()()()()()()()())()()()(())()()())))()((())(()(()()()))((()(()(())))()()))))((()()((()()))(())()(((()()(())()())))())(()()(())()()())()()()()(()()()()())()()(())((()())())(...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
...

result:

ok 10000 tokens

Test #14:

score: 0
Accepted
time: 3ms
memory: 8524kb

input:

1000 10000
(()()()()()()((()()()())(())()(())((()())()())))(()()(())()(()())(())()()()()((()))()()()(()(()))()(())()()()((()))(())())()()()()()()()((()()()((()()))))()()()()()()()()()()()()()()((()()))()()()()(()()()()(())()()())(()()())()()()()()()()()()()()()()()()()()((()(())))()()()()()()((()))(...

output:

Yes
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
No
Yes
No
Yes
No
...

result:

ok 10000 tokens

Test #15:

score: 0
Accepted
time: 4ms
memory: 8428kb

input:

1000 10000
((()()((())()()(()()()()()()()))(()()()()()()())(()())(()((()))()()()())()()()()()(()())()(()()()()())()((((())()()()()())((()()))(()(()))()(()()()))()()()()()()))((((()())()()()()()()(()()()()()()())()()(())(()()(()()()())())((()()())((((()()()))))()()()(())()()())((()()()))(())()()()()(...

output:

No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes...

result:

ok 10000 tokens

Test #16:

score: 0
Accepted
time: 0ms
memory: 8684kb

input:

1000 10000
((()()()()()()()()()()()()(()())()()(())(())(()())()(())()()()()()(()()()()()()()()())()()((()))()(()()()(()))(((()))()()()()()()()()()()()(()()()()())(()()()())()()()()())(())()()(()()()()()()()()()()()()()(())()()((()())(()()()()()()(())(()))()(()()()))()()())(()())()((()())((()()())))(...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes...

result:

ok 10000 tokens

Test #17:

score: 0
Accepted
time: 6ms
memory: 6412kb

input:

1000 10000
((())()()()()(((()()(())())(((()(()())()()()()()())()(())(())()()))()(())()()(()()()()()()()()(()()))()()(()()())((()()(())(())))))(()()()()()()()()()())(()()()())((()()(()())()()()(()))(())(()()()()()())()()()())((((()))())()(()()()()(()()()))(((((()()())))))()()(())()(((())()()()))()(()...

output:

No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
Yes
Yes
No
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Y...

result:

ok 10000 tokens

Test #18:

score: 0
Accepted
time: 0ms
memory: 6716kb

input:

1000 10000
((()()()()()()()(())()()()()()()()()()()()()(()()(()()())()()((())((()(()())))()(((()))())()()()(()))((())()(()(()(()()()())))))(((((((()()((()()))(()(()))()()(())()(())()()())(((())()(()()())()()))()(())))()()()())(()()()))))()((()()()()()()()()()()))((())()()(())))((()()(()()(())(()()()...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Ye...

result:

ok 10000 tokens

Test #19:

score: 0
Accepted
time: 0ms
memory: 6484kb

input:

1000 10000
(((((((()()()(())()()()()(((((()()(()()))()()()()(())()())))()(()()()())()))()()(())()()(()()()()()(())())()()(()())()()))(()))()())()()()()()()()()()()()(())(())(()))(()()()(())()(()()()()(())()(())()()()()()()()()()(()())()()()())(((()())(((()()()()()()()))(())()()()()()(()()()()()()())...

output:

Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
No
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
...

result:

ok 10000 tokens

Test #20:

score: 0
Accepted
time: 3ms
memory: 6448kb

input:

1000 10000
(((()()()(())()()()()(()()(()()))(()())((()()()()()()()))())()()()()(())()()()))(((()()()()()()()())()()()()()()()()()()))(((((()))()()()()()()()()()()()((())(()))()(())()()()()()()()()()((()())(())((()())()()()())(()()()))()())))((()()))(()())()()()(()(()))((((())()()()()()()(()())())))(...

output:

Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
No
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
...

result:

ok 10000 tokens

Test #21:

score: 0
Accepted
time: 41ms
memory: 8584kb

input:

100000 100000
((())(())()()()()()()()(())()()()()()()()()()()()(())()()()()()()()()()()()()()()((()()()()()))()()()()()(()())()()()()()()()()()()()()()()()(()())()()()()()()()()()()()(())()()()()()()()()()()()()()((()()(()())))()(()())()()()()()(())()()()(())()()()()()()(()()())()()()(()()()())()()(...

output:

Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
No
Yes
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Yes
No
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
No
Yes
No
No
No
Yes
No
Yes
...

result:

ok 100000 tokens

Test #22:

score: 0
Accepted
time: 32ms
memory: 8656kb

input:

100000 100000
(()()()()()()()()()(()()()()()())()()()()()()()()()()()()()()(()())()()(())()()()()()()()()()()()()()()()()()()()()(())()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(()()()()()()()()()()()()()()()(())(()()()()()()()((())()))(()())()()()())()()()()()()()()()()()()()()()(...

output:

Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
No
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
Yes
Yes
Yes
Yes
Yes
No
Yes
No
Yes
Yes
Yes
No
No
No
Yes
Yes
No
...

result:

ok 100000 tokens