11573 | 2024-10-27 08:50:55 | chucknorris | Bob Baba Zárójelsorozata | cpp17 | Wrong answer 20/100 | 4ms | 560 KiB |
// NOTE: it is recommended to use this even if you don't understand the following code.
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
// uncomment the two following lines if you want to read/write from files
// ifstream cin("input.txt");
// ofstream cout("output.txt");
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
vector<int> A(N);
for (int i = 0; i < N; ++i)
cin >> A[i];
string ans = "";
if(N == 1) ans = "-1";
else if(N == 2){
if(A[0] == A[1]){
for(int i = 0; i < A[0]; i++) ans = ans + '(';
for(int i = 0; i < A[0]; i++) ans = ans + ')';
}
else ans = "-1";
}
cout << ans << endl;
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Wrong answer | 1ms | 320 KiB | ||||
2 | Wrong answer | 1ms | 320 KiB | ||||
3 | Accepted | 1ms | 320 KiB | ||||
subtask2 | 20/20 | ||||||
4 | Accepted | 1ms | 320 KiB | ||||
5 | Accepted | 1ms | 320 KiB | ||||
6 | Accepted | 4ms | 320 KiB | ||||
subtask3 | 0/30 | ||||||
7 | Wrong answer | 1ms | 320 KiB | ||||
8 | Wrong answer | 1ms | 496 KiB | ||||
9 | Wrong answer | 1ms | 324 KiB | ||||
10 | Wrong answer | 1ms | 324 KiB | ||||
11 | Wrong answer | 1ms | 320 KiB | ||||
subtask4 | 0/50 | ||||||
12 | Wrong answer | 1ms | 320 KiB | ||||
13 | Wrong answer | 1ms | 320 KiB | ||||
14 | Wrong answer | 1ms | 320 KiB | ||||
15 | Wrong answer | 1ms | 320 KiB | ||||
16 | Wrong answer | 1ms | 320 KiB | ||||
17 | Wrong answer | 1ms | 500 KiB | ||||
18 | Wrong answer | 1ms | 320 KiB | ||||
19 | Wrong answer | 1ms | 380 KiB | ||||
20 | Wrong answer | 1ms | 380 KiB | ||||
21 | Wrong answer | 1ms | 320 KiB | ||||
22 | Wrong answer | 1ms | 320 KiB | ||||
23 | Wrong answer | 1ms | 560 KiB | ||||
24 | Wrong answer | 1ms | 320 KiB | ||||
25 | Wrong answer | 1ms | 508 KiB | ||||
26 | Wrong answer | 1ms | 320 KiB | ||||
27 | Wrong answer | 1ms | 320 KiB | ||||
28 | Wrong answer | 1ms | 512 KiB | ||||
29 | Wrong answer | 1ms | 320 KiB | ||||
30 | Wrong answer | 1ms | 320 KiB | ||||
31 | Wrong answer | 1ms | 520 KiB | ||||
32 | Wrong answer | 1ms | 320 KiB | ||||
33 | Wrong answer | 1ms | 320 KiB | ||||
34 | Wrong answer | 1ms | 320 KiB | ||||
35 | Wrong answer | 1ms | 320 KiB | ||||
36 | Wrong answer | 1ms | 420 KiB | ||||
37 | Wrong answer | 1ms | 560 KiB | ||||
38 | Wrong answer | 1ms | 320 KiB | ||||
39 | Wrong answer | 1ms | 320 KiB | ||||
40 | Wrong answer | 1ms | 320 KiB | ||||
41 | Wrong answer | 1ms | 320 KiB | ||||
42 | Wrong answer | 1ms | 376 KiB | ||||
43 | Wrong answer | 1ms | 320 KiB | ||||
44 | Wrong answer | 1ms | 500 KiB | ||||
45 | Wrong answer | 1ms | 500 KiB | ||||
46 | Wrong answer | 1ms | 320 KiB | ||||
47 | Wrong answer | 1ms | 320 KiB | ||||
48 | Wrong answer | 1ms | 508 KiB | ||||
49 | Wrong answer | 1ms | 396 KiB | ||||
50 | Wrong answer | 1ms | 320 KiB | ||||
51 | Wrong answer | 1ms | 320 KiB | ||||
52 | Wrong answer | 1ms | 320 KiB | ||||
53 | Wrong answer | 1ms | 320 KiB | ||||
54 | Wrong answer | 1ms | 320 KiB | ||||
55 | Wrong answer | 1ms | 508 KiB | ||||
56 | Wrong answer | 1ms | 508 KiB | ||||
57 | Wrong answer | 1ms | 332 KiB | ||||
58 | Wrong answer | 1ms | 548 KiB |