QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#364188#5108. Prehistoric ProgramswaifuSenpai#WA 234ms65720kbC++201.2kb2024-03-24 12:51:142024-03-24 12:51:16

詳細信息

Test #1:

score: 100
Accepted
time: 16ms
memory: 35880kb

input:

50000
(
(
))))()))()(()))()()()))()(((((()(((()))()(((()))((()(())))))(()(
)
(
)
(((
(
(
(
(
(
()
(
)
(
)((())()((
)))))(
(
)
))
)()
(
)
)
)()(
(
(
()
(
)
(
)()((((())()))())(
(
(
)(
(
(
(()())())
)
)
(
(
(
)((())))((())))))))))((((()()))()))))))))((()())()))
)
)()
)
)
)
)
)
())(())))))()(()((()(())...

output:

41248
4238
13809
27609
5338
48374
2458
389
48749
6754
42979
18533
14096
6986
32583
31692
23456
5803
3405
169
43508
38930
34539
26695
26677
10427
9225
46429
46194
41740
39743
35132
30771
25061
24373
21764
11398
2253
45491
35039
34110
33777
31402
23312
5699
41641
41639
39389
35743
28794
23551
9790
736...

result:

ok good plan

Test #2:

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

input:

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

output:

36
13
66
386
966
585
286
257
127
83
39
595
476
907
814
598
329
214
981
427
62
707
662
384
131
807
793
511
869
767
638
449
379
271
80
746
632
474
422
387
327
239
20
989
975
919
915
715
553
535
502
473
345
334
296
171
168
88
31
947
945
929
881
872
863
859
852
827
820
819
799
778
774
738
731
725
686
66...

result:

ok good plan

Test #3:

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

input:

2
()
()

output:

2
1

result:

ok good plan

Test #4:

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

input:

2
((
))

output:

1
2

result:

ok good plan

Test #5:

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

input:

2
)(
()

output:

impossible

result:

ok impossible

Test #6:

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

input:

3
()
(
)

output:

2
1
3

result:

ok good plan

Test #7:

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

input:

3
)(
(
)

output:

2
1
3

result:

ok good plan

Test #8:

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

input:

5
))(
(()
)(
(
)

output:

4
2
3
1
5

result:

ok good plan

Test #9:

score: 0
Accepted
time: 5ms
memory: 34836kb

input:

3
((
))())
(

output:

1
3
2

result:

ok good plan

Test #10:

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

input:

6
)
()
()()()
((
)
)

output:

impossible

result:

ok impossible

Test #11:

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

input:

500
(
)
)
(
)(
(
(
)
))(
(
(
(
(
)
)
(
(
)
(
(
)
(
()(()
(
)())
(
(
)
(
)()((
(
)
(
)
)
(
(
(
)
(
(
)
)
)(
(
(
)
)
(
)
(
(
(
)
(
(
())))
(
(
(
)
(
)
)
(
(
)
)
(
(
(
(
(
()
(
(
(
(
(
((
)
(
(
)
(
(
(
)
())
(
(
(
)
(
(
(
)
)
(
)
)
(
)
(
(
(
(
)
(
)
)
)
)
(
)
)))()(
(
)
)
(
)
)(
)
(
)
)
))
(
(
(
(
(
(
...

output:

479
329
311
483
443
232
199
414
357
350
297
265
253
211
177
80
496
495
494
492
491
489
487
486
480
476
474
472
467
464
459
456
452
449
445
442
440
439
437
436
435
434
431
429
428
427
426
424
420
416
415
413
412
411
410
409
406
405
404
399
398
395
393
392
388
381
378
373
370
368
367
366
362
360
356
3...

result:

ok good plan

Test #12:

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

input:

50
)
)
((((()())())))(())(())
()(((()))
(((()))(()
()(((
))
)
)()))(()(()())(((((()
(
)
)
)((
)()((
())()))
(())))()
(((
))))(()
()(())(()))())()
)
)
(
(
(
(
((())()())())))(((())
()(
(()(())()((()
()(((()())))())()(
)
)((()
(
)
((
)
()(
(
(
)
)))((())
)
()))()(((()(()
((
((()))(())(()())(()())())()...

output:

28
17
6
43
34
5
38
37
36
32
27
25
24
23
22
10
4
3
46
31
14
13
29
42
9
45
44
50
49
18
15
40
26
7
16
19
48
47
1
2
8
11
12
20
21
30
33
35
39
41

result:

ok good plan

Test #13:

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

input:

50
)
(
)()(
())(
()()(((((())(
)(())(()((())(()(()))(())())))))(())()))()())))))()(()()))(())))(()(((())(())()((())())()())(())())))()((()(()(())((()()))))()((((())()())((()))))((()()(())))))(()(())(()(()((())(()(())((()())))())(()))()())))()()((((()()((()()))((())())))()(())((()()((()((())())(()(()...

output:

26
5
11
47
46
41
40
28
18
16
13
8
2
33
15
37
44
42
19
10
4
3
29
21
6
31
36
12
17
23
39
1
7
9
14
20
22
24
25
27
30
32
34
35
38
43
45
48
49
50

result:

ok good plan

Test #14:

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

input:

150
))(()))(())(())))()))())()()()(())(((())))()))))()
)))()(()()(()((())())))(()(()(())((())))(((()(((())()()())))()())(((((((()))((())((())(())())(()))()(()()()()((((()))(()())))()(()((()(()(((((()((()())()))((((()))()))(()(((()()(((()(((()(((())(())())(()((()))))))()())((()(())())))((()()(()(((()...

output:

17
105
142
98
24
12
120
148
28
7
106
87
84
69
60
38
14
11
149
143
141
140
111
104
100
94
92
79
73
52
49
40
37
35
32
15
6
4
136
130
103
53
48
20
93
89
61
135
91
62
23
70
51
27
133
16
10
137
129
117
96
5
102
29
147
77
125
25
2
3
9
122
56
18
47
43
86
115
41
150
134
59
30
45
85
19
55
72
21
71
127
50
81
...

result:

ok good plan

Test #15:

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

input:

150
)))(
(()
(())((())))(()))()(()
((((()(((()))()(((((())()(()()((((()))((((()(())()(()))(()(())())(())(())))(((()))(())()))()((())((()(()(())())))))()(((()(()()())()))))()))(()(()()()(()(())()))))()))(((((())(()())((()()((((()))))(())())(())(())((()()(())))((((())((((()))()))()))))))))()())))))
(
...

output:

129
49
149
142
100
150
121
70
32
148
104
98
86
64
51
19
141
128
127
118
94
89
87
61
58
56
52
46
44
37
36
26
14
10
8
5
2
66
42
15
4
23
29
16
112
145
75
55
117
107
102
84
113
80
50
18
39
74
63
82
34
53
136
114
76
88
90
85
144
21
140
13
41
7
62
45
122
40
81
96
111
79
97
12
125
116
123
22
108
20
139
115...

result:

ok good plan

Test #16:

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

input:

150
)()((
)
)))())))
)()())((()(()())((())()))(()))(())((((((((()()(())())(()(((()))())()((()((())())))))))()((()))))((()(((()(((((()))()))((()((()()))(())))))()))))()())()()())(())(())(()))())((((((()()()))()((((()))))))((())()))()(()((()(())(())(())()())(())
()()
)
(())()))(())(()((())()()())())((...

output:

129
50
131
84
115
27
117
45
140
130
122
92
75
52
149
136
123
118
111
110
108
106
99
97
93
81
74
67
65
60
58
55
48
36
30
8
98
89
68
5
63
127
100
88
46
42
70
24
56
31
11
1
124
57
26
19
9
114
15
101
35
120
146
82
119
128
91
14
133
107
37
32
43
12
90
78
44
112
61
7
64
109
125
72
134
85
71
77
95
20
116
1...

result:

ok good plan

Test #17:

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

input:

750
(()()((()((((())()((()))()()))()))(()()(()))(()(())()))((((((
)))))))
)
((()()()(())((()(()())(())(((()((((()))(()(())((())(()())(())())))())))()(())()))((()(()((((()(()))(()())()((()()()))))(())())(())())())()((()(
)
)
(
)()(((()(())))()))))(((((((()))()()()(()())))(()())(()((
(
)
)(()))
((())(...

output:

468
163
390
379
204
396
707
590
585
122
4
1
658
657
601
405
274
180
104
79
34
473
158
730
705
681
571
547
526
504
485
269
149
108
25
606
530
494
481
426
418
408
406
395
382
341
246
230
218
166
164
156
131
103
56
55
43
41
749
745
743
738
736
726
725
723
722
721
719
717
712
709
699
698
697
690
684
680...

result:

ok good plan

Test #18:

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

input:

100
)
)
)
(
)
(
))))()
)
(
(
(
(
)
)
)
)
(
(
(
(
())
(
)
)
)((
)
(
(
(
)
(
(
)
)
)
)
()((
(
)
)
)
)(((
((((
(
)
(
)
((
)
(
(
)
(
())(()))
)
)
(
)
(
(
(
(
)))()()
)
(
(
(
(
)
(
)
)
)
(
)
)
)
)
(
)
(
(
)
(
)
(
(
(
)
)
(
)
)
(
)((((
)
)
()((()()(()))))
)
(

output:

43
48
37
100
94
91
88
87
86
84
82
81
79
74
70
68
67
66
65
62
61
60
59
57
53
51
50
46
44
38
32
31
29
28
27
22
20
19
18
17
12
11
10
9
6
4
95
42
25
7
63
54
1
2
3
5
8
13
14
15
16
21
23
24
26
30
33
34
35
36
39
40
41
45
47
49
52
55
56
58
64
69
71
72
73
75
76
77
78
80
83
85
89
90
92
93
96
97
98
99

result:

ok good plan

Test #19:

score: 0
Accepted
time: 2ms
memory: 34752kb

input:

100
)
()(
(
)
(
)
(
(
)
)
)(()
)
)))
)
)
(
(
(
)
(
(
)
(
)
(
(
(
))(
(
(
))((
(
)
(
))())
)
(()
)
)
(
)
(
(
)
)
(
)
(
))
(
(
)
)
(
)
)
)
)
(
())
)
(
(
)
)
(
)
(
))
(
)
)
(
(
(((
(
(
(()
)
)()())(()((()((())
(
)
)
(
(
)
)
(
)
(
)
(
))(
)
(
(
(
)
(
(((())

output:

impossible

result:

ok impossible

Test #20:

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

input:

100
)
)
()))((((
))()
(
(
(
)
(
)
(
(
)
()
(
(
)
)
(
)
(
(
)
)
)
(
)
)
(
(
)
)
(
)
)
)
)
(
(
)
((
(
(
)
)
(
(
)
(
)
(()((
)
(
)
)
(()))()()())))()()((
(
)
)
(
(
(
)
)
(
(
)
(
(
(
)
(
(
)
)(
(
)
)
)
(
(())())(()
)
)
(
()
((
(
)
)
)
)
(
)
(
(
)
)
(
())
)(

output:

51
86
41
98
95
94
92
87
84
80
76
73
72
70
69
68
66
65
62
61
60
57
53
49
47
46
43
42
39
38
33
30
29
26
22
21
19
16
15
12
11
9
7
6
5
85
14
100
81
75
3
56
4
1
2
8
10
13
17
18
20
23
24
25
27
28
31
32
34
35
36
37
40
44
45
48
50
52
54
55
58
59
63
64
67
71
74
77
78
79
82
83
88
89
90
91
93
96
97
99

result:

ok good plan

Test #21:

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

input:

100
(
(
)
(
)
(
(
(
(
)
)
)
)
()
)(
)
)
(
(
)
(
(
)
)
)
(
)
(
(
))))
(
)
(
)
(
(
(
()()(
)
())
(
(
)
)
(
(
)
(
(
)
)
(
(
(
(
(
)
(
(
(((
)
)
)
))))
(
))(
)
)
()
())()
)
)
(
)))
(
)((()))(
(
(((
((
(
)
(
(
)
(
)
)
()
)()
)
)
()))()(
)(())(
)
(
(
(
(
)(
)

output:

78
60
79
98
97
96
95
85
83
82
80
77
75
73
65
59
58
56
55
54
53
52
49
48
46
45
42
41
38
37
36
35
33
31
29
28
26
22
21
19
18
9
8
7
6
4
2
1
88
69
14
99
93
76
15
30
64
74
66
92
3
5
10
11
12
13
16
17
20
23
24
25
27
32
34
39
40
43
44
47
50
51
57
61
62
63
67
68
70
71
72
81
84
86
87
89
90
91
94
100

result:

ok good plan

Test #22:

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

input:

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

output:

impossible

result:

ok impossible

Test #23:

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

input:

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

output:

impossible

result:

ok impossible

Test #24:

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

input:

4000
(
)
))
)()))))(
(
)
(
)
)
)
)((()((
(
)
)()(
)
)
)
)
(
)
(
)
)
(
()))((()))))()((()(
(
)))
(
)
(
(
(
(
)
)()(()()(()()))))())
)
)
)(((
)
)
)
)
(
(
)
))()()))((())
(
(
)
(
))(
(
)
)
(
)
)
())(
)
(
(
(
)
())))(())((()(()()((()((
(
)
)
(
)
)
)
)
)
)
)
)
(
)
(()))))(
)
)
(
())))(((())()(
(
(
()(
(
...

output:

impossible

result:

ok impossible

Test #25:

score: 0
Accepted
time: 182ms
memory: 61508kb

input:

1000000
)
(
)()(((()))(
(
(
(
)
(
(
)
)
(((())((()(()((())
(
)
)(
)
)
))))(()))()())(()((()))(()()()))()()()))))))))(())))((((()(()()))((((((()((((()()(
)
((
)
)
(
)
())()()((
)
)))(())((()))((()()))(()(())())))())))())))(()()(
(
()(
(
(
()()
)
))
)
(
(
(
)
)
)
(
)
(
)
)
)
)(()))()))
(
)
)))
(
)
(
(...

output:

149392
264227
387984
770337
898404
995820
83071
269214
349084
897909
857929
731069
604894
385160
174818
196234
765299
352796
904916
760108
134097
708004
526593
308325
992894
911588
748267
675083
592970
540367
501576
489285
309146
900795
474263
342091
197429
160328
619800
610823
507757
475916
267140
...

result:

ok good plan

Test #26:

score: 0
Accepted
time: 25ms
memory: 51624kb

input:

1
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...

output:

impossible

result:

ok impossible

Test #27:

score: 0
Accepted
time: 22ms
memory: 51516kb

input:

1
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))...

output:

impossible

result:

ok impossible

Test #28:

score: 0
Accepted
time: 24ms
memory: 52336kb

input:

1
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...

output:

1

result:

ok good plan

Test #29:

score: 0
Accepted
time: 18ms
memory: 52080kb

input:

1
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...

output:

impossible

result:

ok impossible

Test #30:

score: 0
Accepted
time: 19ms
memory: 51132kb

input:

1
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((...

output:

impossible

result:

ok impossible

Test #31:

score: 0
Accepted
time: 14ms
memory: 52908kb

input:

2
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))...

output:

2
1

result:

ok good plan

Test #32:

score: 0
Accepted
time: 28ms
memory: 51400kb

input:

2
)()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(...

output:

impossible

result:

ok impossible

Test #33:

score: 0
Accepted
time: 9ms
memory: 52300kb

input:

3
)()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(...

output:

3
1
2

result:

ok good plan

Test #34:

score: 0
Accepted
time: 61ms
memory: 54272kb

input:

1000000
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((((((
((((((...

output:

impossible

result:

ok impossible

Test #35:

score: 0
Accepted
time: 71ms
memory: 47512kb

input:

1000000
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))))))
))))))...

output:

impossible

result:

ok impossible

Test #36:

score: 0
Accepted
time: 108ms
memory: 54256kb

input:

1000000
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))))))
((((((((((
))))))...

output:

1000000
999998
999996
999994
999992
999990
999988
999986
999984
999982
999980
999978
999976
999974
999972
999970
999968
999966
999964
999962
999960
999958
999956
999954
999952
999950
999948
999946
999944
999942
999940
999938
999936
999934
999932
999930
999928
999926
999924
999922
999920
999918
99991...

result:

ok good plan

Test #37:

score: 0
Accepted
time: 89ms
memory: 65704kb

input:

999999
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)...

output:

999999
999998
999997
999996
999995
999994
999993
999992
999991
999990
999989
999988
999987
999986
999985
999984
999983
999982
999981
999980
999979
999978
999977
999976
999975
999974
999973
999972
999971
999970
999969
999968
999967
999966
999965
999964
999963
999962
999961
999960
999959
999958
999957...

result:

ok good plan

Test #38:

score: 0
Accepted
time: 221ms
memory: 65720kb

input:

1000000
)(
()(()))()((
)())
)()((((((
((((
))))))))()())((()(
)((
)())
))()((()
()
(
)(
()(
(((()((()())(()))(((())(((
)()()
)))(
(((
(()(()(())))(())))(((((
())())((()))(
(())
(()
()))(()(())()())(
())((
)))))))))
())()((())))(
()())((((()())()
((
()())
()((())
)()))))))))()())()))())
()())
)()())
...

output:

510441
164663
944202
483356
500584
889056
879218
763948
732016
679768
637097
496501
183559
163748
90286
924596
911154
629235
590693
428626
321244
970762
651410
598737
480176
475331
378339
323909
295142
261112
67591
947844
897141
880821
850025
766848
740159
553153
491924
480934
451519
354542
235797
1...

result:

ok good plan

Test #39:

score: 0
Accepted
time: 234ms
memory: 64136kb

input:

1000000
)()))))(()(((()
()((((()))
)())
)
()()(
()
())()((())))))())()(())(())
())))()())((
)()()((()((())
)
)()(
()()(
((())((
)(
(
)((()((()((()(())(()())
))()
())
()()()
(())
))()(()(()()()()((
(())))()((((()()(
(())
)())((()))
))(()
()()()(()(()()((((())))((())))(()()(()))))
(()()))()(())))()))(...

output:

568499
250826
675014
629151
494698
985988
795023
536620
425960
926090
561779
463859
300744
106383
689231
597972
575206
137311
963161
930603
746420
427235
388609
353729
333208
207485
129338
997127
905927
834142
770416
696104
623824
487205
470327
123122
116108
902316
858526
836351
713994
665997
580640...

result:

ok good plan

Test #40:

score: 0
Accepted
time: 56ms
memory: 45624kb

input:

564
)())((())((()))))(()())((((()()(()(()))(()((((()()))(((()))(()()()(()((()()()()((()))))((())))()(()((())(()())))))))())))(((())()()()))))()((((()()))()(()()())))(()()(())((())((()())(()()())()(((()))()())())))(((()(((((()())()())))()()((())))()()()(()()))()(()()()(((())())))(()(()(()((())()((()(...

output:

163
236
287
469
358
360
542
537
108
253
305
367
105
307
93
528
243
359
65
95
17
563
329
541
267
356
75
513
134
465
445
100
44
302
26
514
113
531
405
555
281
265
547
54
342
139
153
340
133
286
451
301
421
52
11
350
255
32
463
483
408
299
24
235
330
553
533
529
81
223
443
137
552
327
510
43
373
190
48...

result:

ok good plan

Test #41:

score: -100
Wrong Answer
time: 48ms
memory: 44892kb

input:

109
)(()((())()(())())))))((()(((()((()()())))()))()()()()))(()(()()((()()())())()))())(((()()))(()))))(()((()((()()(((()))()((((()(()()()(()))))))))())((())(())()((()))))((())()()())))))(())))())()())))())()(()))))(())()(((()((((()))))((()())()())())))())((()(()())()())((((()()(()((()))(())((()((()...

output:

impossible

result:

wrong answer you didn't find a solution but jury did