11620 | 2024-10-31 22:17:32 | Kezdő | Bob Baba Zárójelsorozata | python3 | Wrong answer 20/100 | 17ms | 3428 KiB |
N = int(input())
A = [int(i) for i in input().split()]
nyit = 0
z = ''
for x in A:
if nyit-x >= 0:
z += ')' * x
nyit -= x
else:
z += '(' * x
nyit += x
if nyit == 0:
print(z)
else:
print(-1)
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 16ms | 3144 KiB | ||||
2 | Accepted | 14ms | 2872 KiB | ||||
3 | Accepted | 16ms | 3112 KiB | ||||
subtask2 | 20/20 | ||||||
4 | Accepted | 16ms | 2936 KiB | ||||
5 | Accepted | 16ms | 2968 KiB | ||||
6 | Accepted | 14ms | 3120 KiB | ||||
subtask3 | 0/30 | ||||||
7 | Wrong answer | 16ms | 3064 KiB | ||||
8 | Wrong answer | 16ms | 2868 KiB | ||||
9 | Wrong answer | 16ms | 3128 KiB | ||||
10 | Accepted | 16ms | 3064 KiB | ||||
11 | Wrong answer | 14ms | 3092 KiB | ||||
subtask4 | 0/50 | ||||||
12 | Accepted | 17ms | 3316 KiB | ||||
13 | Wrong answer | 17ms | 3316 KiB | ||||
14 | Wrong answer | 17ms | 3128 KiB | ||||
15 | Wrong answer | 17ms | 3128 KiB | ||||
16 | Accepted | 17ms | 3224 KiB | ||||
17 | Accepted | 17ms | 3284 KiB | ||||
18 | Accepted | 16ms | 3088 KiB | ||||
19 | Wrong answer | 17ms | 3248 KiB | ||||
20 | Wrong answer | 17ms | 3128 KiB | ||||
21 | Wrong answer | 17ms | 3128 KiB | ||||
22 | Accepted | 17ms | 3116 KiB | ||||
23 | Accepted | 17ms | 3124 KiB | ||||
24 | Accepted | 16ms | 3188 KiB | ||||
25 | Wrong answer | 17ms | 3128 KiB | ||||
26 | Wrong answer | 17ms | 3276 KiB | ||||
27 | Accepted | 17ms | 3088 KiB | ||||
28 | Accepted | 17ms | 3124 KiB | ||||
29 | Accepted | 17ms | 3144 KiB | ||||
30 | Accepted | 17ms | 3072 KiB | ||||
31 | Wrong answer | 16ms | 3128 KiB | ||||
32 | Wrong answer | 16ms | 3120 KiB | ||||
33 | Accepted | 16ms | 3128 KiB | ||||
34 | Accepted | 17ms | 3208 KiB | ||||
35 | Accepted | 17ms | 3184 KiB | ||||
36 | Wrong answer | 17ms | 3236 KiB | ||||
37 | Wrong answer | 17ms | 3428 KiB | ||||
38 | Wrong answer | 17ms | 3324 KiB | ||||
39 | Wrong answer | 16ms | 3128 KiB | ||||
40 | Wrong answer | 16ms | 3084 KiB | ||||
41 | Wrong answer | 16ms | 3076 KiB | ||||
42 | Wrong answer | 16ms | 3080 KiB | ||||
43 | Wrong answer | 16ms | 3088 KiB | ||||
44 | Wrong answer | 16ms | 3320 KiB | ||||
45 | Wrong answer | 16ms | 3140 KiB | ||||
46 | Wrong answer | 17ms | 3216 KiB | ||||
47 | Wrong answer | 16ms | 3324 KiB | ||||
48 | Wrong answer | 16ms | 3140 KiB | ||||
49 | Wrong answer | 16ms | 3324 KiB | ||||
50 | Wrong answer | 16ms | 3236 KiB | ||||
51 | Wrong answer | 17ms | 3152 KiB | ||||
52 | Wrong answer | 17ms | 3128 KiB | ||||
53 | Wrong answer | 17ms | 3236 KiB | ||||
54 | Wrong answer | 17ms | 3136 KiB | ||||
55 | Wrong answer | 17ms | 3152 KiB | ||||
56 | Wrong answer | 16ms | 3140 KiB | ||||
57 | Wrong answer | 17ms | 3140 KiB | ||||
58 | Wrong answer | 17ms | 3144 KiB |