Submission #58418

# Submission time Handle Problem Language Result Execution time Memory
58418 2018-07-17T19:00:56 Z ksun48 Security Gate (JOI18_security_gate) C++14
73 / 100
3861 ms 1284 KB
#include <bits/stdc++.h>
using namespace std;
typedef unsigned int LL;

const LL MOD = 1000000007;
const LL OFF = 101;
const LL MAXS = 204;
LL check2(string s){
	vector<int> psums(1,0);
	for(int j = 0; j < s.size(); j++){
		if(s[j] == '('){
			psums.push_back(psums[psums.size() - 1] + 1);
		} else {
			psums.push_back(psums[psums.size() - 1] - 1);
		}
	}
	int laste = psums.size() - 1;
	while(laste > 0 && psums[laste - 1] >= psums[psums.size() - 1]){
		laste--;
	}
	int lasts = 0;
	while(lasts + 1 < psums.size() && psums[lasts + 1] >= psums[0]){
		lasts++;
	}
	int a = psums[psums.size() - 1] / 2;
	if(lasts == psums.size() - 1 && laste == 0){
		return 1;
	} else if(lasts == psums.size() - 1){
		int maxv = 0;
		for(int i = laste; i < psums.size(); i++){
			maxv = max(maxv, psums[i] - psums[psums.size() - 1]);
		}
		for(int i = laste; i >= 0; i--){
			if(psums[i] - psums[psums.size() - 1] <= maxv - a) return 1;
			if(psums[i] - psums[psums.size() - 1] > 2 * maxv) return 0;
		}
	} else if(laste == 0){
		int maxv = 0;
		for(int i = 0; i <= lasts; i++){
			maxv = max(maxv, psums[i]);
		}
		for(int i = lasts; i < psums.size(); i++){
			if(psums[i] <= maxv + a) return 1;
			if(psums[i] > 2 * maxv) return 0;
		}
	} else {
		int maxl = psums[0];
		int maxm = psums[lasts];
		int maxr = psums[psums.size() - 1];
		for(int i = 0; i <= lasts; i++){
			maxl = max(maxl, psums[i]);
		}
		for(int i = lasts; i <= laste; i++){
			maxm = max(maxm, psums[i]);
		}
		for(int i = laste; i < psums.size(); i++){
			maxr = max(maxr, psums[i]);
		}	
		return (maxm <= 2 * maxl && maxm <= 2 * (maxr - a));
	}
	return 0;
}

LL case1(string s){
	// how many correct bracket sequences are there
	LL dp[s.size() + 1][MAXS];
	for(int i = 0; i <= s.size(); i++){
		for(int j = 0; j < MAXS; j++){
			dp[i][j] = 0;
		}
	}
	dp[0][OFF] = 1;
	for(int i = 0; i < s.size(); i++){
		for(int j = 0; j <= i; j++){
			if(s[i] != ')'){
				dp[i + 1][OFF + j + 1] += dp[i][OFF + j];
			}
			if(s[i] != '('){
				dp[i + 1][OFF + j - 1] += dp[i][OFF + j];
			}
		}
		for(int j = 0; j < MAXS; j++){
			dp[i + 1][j] %= MOD;
		}
	}
	return dp[s.size()][OFF];
}
LL case2(string s){
	// phases:
	// not found max, found max, gone negative, found a + b/2
	LL ans = 0;
	int z = s.size();
	for(int b = -z; b < 0; b += 2){
		for(int m = 0; m <= s.size(); m++){
			LL dp[s.size() + 1][MAXS][4]; // i, pos, 
			for(int i = 0; i <= s.size(); i++){
				for(int r = 0; r < MAXS; r++){
					for(int c = 0; c < 4; c++){
						dp[i][r][c] = 0;
					}
				}
			}
			dp[0][OFF][(m == 0)] = 1;
			for(int i = 0; i < s.size(); i++){
				for(int j = -z; j <= z; j++){
					if((i + j) % 2) continue;
					if(abs(j-b) > (s.size() - i)) continue;
					auto& rp = dp[i + 1][OFF + j + 1];
					auto& rz = dp[i][OFF + j];
					auto& rm = dp[i + 1][OFF + j - 1];
					if(!rz[0] && !rz[1] && !rz[2] && !rz[3]) continue;
					if(s[i] != ')'){
						if(j + 1 <= m){
							rp[(j + 1 == m)] += rz[0];
							rp[1] += rz[1];
						}
						if(j + 1 <= 2 * m){
							rp[2] += rz[2];
						}
						rp[3] += rz[3];
					}
					if(s[i] != '('){
						if(j - 1 >= b){
							if(j - 1 >= 0){
								rm[0] += rz[0];
								rm[1] += rz[1];
							} else {
								rm[2 + (j - 1 <= m + b/2)] += rz[1];
							}
							rm[2 + (j - 1 <= m + b/2)] += rz[2];
							rm[3] += rz[3];
						}
					}
				}
				for(int j = 0; j < MAXS; j++){
					for(int c = 0; c < 4; c++){
						if(dp[i + 1][j][c] >= MOD) dp[i + 1][j][c] %= MOD;
					}
				}
			}
			ans += dp[s.size()][OFF + b][3];
			ans %= MOD;
			if(dp[s.size()][OFF + b][3] > 0){
				//cout << m << " " << b << " " << dp[s.size()][OFF + b][3] << endl;
			}
		}
	}
	return ans;
}
LL case3(string s){
	// do shitty n^4 dp here
	LL ans = 0;
	int z = s.size();
	for(int b = -z; b <= z; b += 2){
		for(int m = 0; m <= s.size(); m++){
			if(m < b) continue;
			// phases: 
			// not hit needed, hit needed, went negative, hit max, went positive, hit needed
			LL dp[s.size() + 1][MAXS][6];
			for(int i = 0; i <= s.size(); i++){
				for(int r = (i + OFF) % 2; r < MAXS; r+= 2){
					for(int c = 0; c < 6; c++){
						dp[i][r][c] = 0;
					}
				}
			}
			int lneeded = (m + 1) / 2;
			int rneeded = lneeded + b/2;
			dp[0][OFF][(0 >= lneeded)] = 1;
			for(int i = 0; i < s.size(); i++){
				for(int j = -z; j <= z; j++){
					if((i + j) % 2) continue;
					if(abs(j-b) > (s.size() - i)) continue;
					auto& rp = dp[i + 1][OFF + j + 1];
					auto& rz = dp[i][OFF + j];
					auto& rm = dp[i + 1][OFF + j - 1];
					if(!rz[0] && !rz[1] && !rz[2] && !rz[3] && !rz[4] && !rz[5]) continue;
					if(s[i] != ')'){
						rp[(j + 1 >= lneeded)] += rz[0];
						rp[1] += rz[1];
						if(j + 1 <= m){
							rp[2 + (j + 1 == m)] += rz[2];
							rp[3] += rz[3];
							if(j + 1 == b){
								if(j + 1 == m){
									rp[4 + (j + 1 >= rneeded)] += rz[2];
								}
								rp[4 + (j + 1 >= rneeded)] += rz[3];
							}
						}
						rp[4 + (j + 1 >= rneeded)] += rz[4];
						rp[5] += rz[5];
					}
					if(s[i] != '('){
						if(j - 1 >= 0){
							rm[0] += rz[0];
							rm[1] += rz[1];
						} else {
							rm[2 + (m == 0)] += rz[1];
						}
						rm[2] += rz[2];
						rm[3] += rz[3];
						if(j - 1 >= b){
							rm[4] += rz[4];
							rm[5] += rz[5];
						}
					}
				}
				for(int j = 0; j < MAXS; j++){
					for(int c = 0; c < 6; c++){
						if(dp[i + 1][j][c] >= MOD) dp[i + 1][j][c] %= MOD;
					}
				}
			}
			ans += dp[s.size()][OFF + b][5];
			ans %= MOD;
		}
	}
	return ans;
}
LL solve(string s){
	string t = s;
	reverse(t.begin(), t.end());
	for(int i = 0; i < t.size(); i++){
		if(t[i] != 'x'){
			t[i] = '(' + ')' - t[i];
		}
	}
	return ((case1(s) + case2(s)) % MOD + (case2(t) + case3(s)) % MOD) % MOD;
}

LL cnt(string s, int idx){
	if(idx == s.size()){
		return check2(s);
	}
	if(s[idx] != 'x'){
		return cnt(s, idx + 1);
	}
	string s1 = s;
	string s2 = s;
	s1[idx] = '(';
	s2[idx] = ')';
	for(int z = idx + 1; z <= s.size(); z++){
		if(z == s.size() || s[z] == 'x'){
			return (cnt(s1, z) + cnt(s2, z)) % MOD;
		}
	}
}
int main(){
	int n;
	string s;
	cin >> n >> s;
	if(n % 2 == 1){
		cout << 0 << '\n';
		return 0;
	}
	cout << solve(s) << '\n';
}

Compilation message

securitygate.cpp: In function 'LL check2(std::__cxx11::string)':
securitygate.cpp:10:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int j = 0; j < s.size(); j++){
                 ~~^~~~~~~~~~
securitygate.cpp:22:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  while(lasts + 1 < psums.size() && psums[lasts + 1] >= psums[0]){
        ~~~~~~~~~~^~~~~~~~~~~~~~
securitygate.cpp:26:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(lasts == psums.size() - 1 && laste == 0){
     ~~~~~~^~~~~~~~~~~~~~~~~~~
securitygate.cpp:28:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  } else if(lasts == psums.size() - 1){
            ~~~~~~^~~~~~~~~~~~~~~~~~~
securitygate.cpp:30:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = laste; i < psums.size(); i++){
                      ~~^~~~~~~~~~~~~~
securitygate.cpp:42:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = lasts; i < psums.size(); i++){
                      ~~^~~~~~~~~~~~~~
securitygate.cpp:56:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int i = laste; i < psums.size(); i++){
                      ~~^~~~~~~~~~~~~~
securitygate.cpp: In function 'LL case1(std::__cxx11::string)':
securitygate.cpp:67:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i <= s.size(); i++){
                 ~~^~~~~~~~~~~
securitygate.cpp:68:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0; j < MAXS; j++){
                  ~~^~~~~~
securitygate.cpp:73:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < s.size(); i++){
                 ~~^~~~~~~~~~
securitygate.cpp:82:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0; j < MAXS; j++){
                  ~~^~~~~~
securitygate.cpp: In function 'LL case2(std::__cxx11::string)':
securitygate.cpp:94:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int m = 0; m <= s.size(); m++){
                  ~~^~~~~~~~~~~
securitygate.cpp:96:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(int i = 0; i <= s.size(); i++){
                   ~~^~~~~~~~~~~
securitygate.cpp:97:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int r = 0; r < MAXS; r++){
                    ~~^~~~~~
securitygate.cpp:104:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(int i = 0; i < s.size(); i++){
                   ~~^~~~~~~~~~
securitygate.cpp:135:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int j = 0; j < MAXS; j++){
                    ~~^~~~~~
securitygate.cpp: In function 'LL case3(std::__cxx11::string)':
securitygate.cpp:155:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int m = 0; m <= s.size(); m++){
                  ~~^~~~~~~~~~~
securitygate.cpp:160:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(int i = 0; i <= s.size(); i++){
                   ~~^~~~~~~~~~~
securitygate.cpp:161:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int r = (i + OFF) % 2; r < MAXS; r+= 2){
                                ~~^~~~~~
securitygate.cpp:170:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for(int i = 0; i < s.size(); i++){
                   ~~^~~~~~~~~~
securitygate.cpp:209:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int j = 0; j < MAXS; j++){
                    ~~^~~~~~
securitygate.cpp: In function 'LL solve(std::__cxx11::string)':
securitygate.cpp:224:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < t.size(); i++){
                 ~~^~~~~~~~~~
securitygate.cpp: In function 'LL cnt(std::__cxx11::string, int)':
securitygate.cpp:233:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  if(idx == s.size()){
     ~~~~^~~~~~~~~~~
securitygate.cpp:243:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int z = idx + 1; z <= s.size(); z++){
                       ~~^~~~~~~~~~~
securitygate.cpp:244:8: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if(z == s.size() || s[z] == 'x'){
      ~~^~~~~~~~~~~
securitygate.cpp:248:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2955 ms 996 KB Output is correct
3 Correct 2 ms 996 KB Output is correct
4 Correct 2 ms 996 KB Output is correct
5 Correct 140 ms 996 KB Output is correct
6 Correct 326 ms 996 KB Output is correct
7 Correct 47 ms 996 KB Output is correct
8 Correct 3511 ms 996 KB Output is correct
9 Correct 3724 ms 996 KB Output is correct
10 Correct 3020 ms 1112 KB Output is correct
11 Correct 40 ms 1112 KB Output is correct
12 Correct 1403 ms 1112 KB Output is correct
13 Correct 1191 ms 1112 KB Output is correct
14 Correct 425 ms 1112 KB Output is correct
15 Correct 3007 ms 1112 KB Output is correct
16 Correct 3011 ms 1112 KB Output is correct
17 Correct 3042 ms 1112 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2955 ms 996 KB Output is correct
3 Correct 2 ms 996 KB Output is correct
4 Correct 2 ms 996 KB Output is correct
5 Correct 140 ms 996 KB Output is correct
6 Correct 326 ms 996 KB Output is correct
7 Correct 47 ms 996 KB Output is correct
8 Correct 3511 ms 996 KB Output is correct
9 Correct 3724 ms 996 KB Output is correct
10 Correct 3020 ms 1112 KB Output is correct
11 Correct 40 ms 1112 KB Output is correct
12 Correct 1403 ms 1112 KB Output is correct
13 Correct 1191 ms 1112 KB Output is correct
14 Correct 425 ms 1112 KB Output is correct
15 Correct 3007 ms 1112 KB Output is correct
16 Correct 3011 ms 1112 KB Output is correct
17 Correct 3042 ms 1112 KB Output is correct
18 Correct 357 ms 1112 KB Output is correct
19 Correct 2729 ms 1120 KB Output is correct
20 Correct 60 ms 1120 KB Output is correct
21 Correct 1923 ms 1120 KB Output is correct
22 Correct 2962 ms 1120 KB Output is correct
23 Correct 3053 ms 1232 KB Output is correct
24 Correct 3418 ms 1232 KB Output is correct
25 Correct 1589 ms 1232 KB Output is correct
26 Correct 341 ms 1232 KB Output is correct
27 Correct 1767 ms 1232 KB Output is correct
28 Correct 40 ms 1232 KB Output is correct
29 Correct 3101 ms 1276 KB Output is correct
30 Correct 3113 ms 1276 KB Output is correct
31 Correct 3123 ms 1276 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2955 ms 996 KB Output is correct
3 Correct 2 ms 996 KB Output is correct
4 Correct 2 ms 996 KB Output is correct
5 Correct 140 ms 996 KB Output is correct
6 Correct 326 ms 996 KB Output is correct
7 Correct 47 ms 996 KB Output is correct
8 Correct 3511 ms 996 KB Output is correct
9 Correct 3724 ms 996 KB Output is correct
10 Correct 3020 ms 1112 KB Output is correct
11 Correct 40 ms 1112 KB Output is correct
12 Correct 1403 ms 1112 KB Output is correct
13 Correct 1191 ms 1112 KB Output is correct
14 Correct 425 ms 1112 KB Output is correct
15 Correct 3007 ms 1112 KB Output is correct
16 Correct 3011 ms 1112 KB Output is correct
17 Correct 3042 ms 1112 KB Output is correct
18 Correct 357 ms 1112 KB Output is correct
19 Correct 2729 ms 1120 KB Output is correct
20 Correct 60 ms 1120 KB Output is correct
21 Correct 1923 ms 1120 KB Output is correct
22 Correct 2962 ms 1120 KB Output is correct
23 Correct 3053 ms 1232 KB Output is correct
24 Correct 3418 ms 1232 KB Output is correct
25 Correct 1589 ms 1232 KB Output is correct
26 Correct 341 ms 1232 KB Output is correct
27 Correct 1767 ms 1232 KB Output is correct
28 Correct 40 ms 1232 KB Output is correct
29 Correct 3101 ms 1276 KB Output is correct
30 Correct 3113 ms 1276 KB Output is correct
31 Correct 3123 ms 1276 KB Output is correct
32 Correct 31 ms 1276 KB Output is correct
33 Correct 23 ms 1276 KB Output is correct
34 Correct 155 ms 1276 KB Output is correct
35 Correct 15 ms 1276 KB Output is correct
36 Correct 3107 ms 1276 KB Output is correct
37 Correct 2950 ms 1276 KB Output is correct
38 Correct 3451 ms 1276 KB Output is correct
39 Correct 14 ms 1276 KB Output is correct
40 Correct 2060 ms 1276 KB Output is correct
41 Correct 1749 ms 1276 KB Output is correct
42 Correct 3062 ms 1276 KB Output is correct
43 Correct 3182 ms 1276 KB Output is correct
44 Correct 3243 ms 1276 KB Output is correct
45 Correct 3018 ms 1276 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2955 ms 996 KB Output is correct
3 Correct 2 ms 996 KB Output is correct
4 Correct 2 ms 996 KB Output is correct
5 Correct 140 ms 996 KB Output is correct
6 Correct 326 ms 996 KB Output is correct
7 Correct 47 ms 996 KB Output is correct
8 Correct 3511 ms 996 KB Output is correct
9 Correct 3724 ms 996 KB Output is correct
10 Correct 3020 ms 1112 KB Output is correct
11 Correct 40 ms 1112 KB Output is correct
12 Correct 1403 ms 1112 KB Output is correct
13 Correct 1191 ms 1112 KB Output is correct
14 Correct 425 ms 1112 KB Output is correct
15 Correct 3007 ms 1112 KB Output is correct
16 Correct 3011 ms 1112 KB Output is correct
17 Correct 3042 ms 1112 KB Output is correct
18 Correct 357 ms 1112 KB Output is correct
19 Correct 2729 ms 1120 KB Output is correct
20 Correct 60 ms 1120 KB Output is correct
21 Correct 1923 ms 1120 KB Output is correct
22 Correct 2962 ms 1120 KB Output is correct
23 Correct 3053 ms 1232 KB Output is correct
24 Correct 3418 ms 1232 KB Output is correct
25 Correct 1589 ms 1232 KB Output is correct
26 Correct 341 ms 1232 KB Output is correct
27 Correct 1767 ms 1232 KB Output is correct
28 Correct 40 ms 1232 KB Output is correct
29 Correct 3101 ms 1276 KB Output is correct
30 Correct 3113 ms 1276 KB Output is correct
31 Correct 3123 ms 1276 KB Output is correct
32 Correct 31 ms 1276 KB Output is correct
33 Correct 23 ms 1276 KB Output is correct
34 Correct 155 ms 1276 KB Output is correct
35 Correct 15 ms 1276 KB Output is correct
36 Correct 3107 ms 1276 KB Output is correct
37 Correct 2950 ms 1276 KB Output is correct
38 Correct 3451 ms 1276 KB Output is correct
39 Correct 14 ms 1276 KB Output is correct
40 Correct 2060 ms 1276 KB Output is correct
41 Correct 1749 ms 1276 KB Output is correct
42 Correct 3062 ms 1276 KB Output is correct
43 Correct 3182 ms 1276 KB Output is correct
44 Correct 3243 ms 1276 KB Output is correct
45 Correct 3018 ms 1276 KB Output is correct
46 Correct 2 ms 1276 KB Output is correct
47 Correct 3069 ms 1280 KB Output is correct
48 Correct 2 ms 1280 KB Output is correct
49 Correct 2778 ms 1284 KB Output is correct
50 Correct 642 ms 1284 KB Output is correct
51 Correct 53 ms 1284 KB Output is correct
52 Correct 1774 ms 1284 KB Output is correct
53 Correct 3072 ms 1284 KB Output is correct
54 Correct 3861 ms 1284 KB Output is correct
55 Correct 3776 ms 1284 KB Output is correct
56 Correct 319 ms 1284 KB Output is correct
57 Correct 130 ms 1284 KB Output is correct
58 Correct 156 ms 1284 KB Output is correct
59 Correct 1120 ms 1284 KB Output is correct
60 Correct 3406 ms 1284 KB Output is correct
61 Correct 3486 ms 1284 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 248 KB Output is correct
2 Correct 2955 ms 996 KB Output is correct
3 Correct 2 ms 996 KB Output is correct
4 Correct 2 ms 996 KB Output is correct
5 Correct 140 ms 996 KB Output is correct
6 Correct 326 ms 996 KB Output is correct
7 Correct 47 ms 996 KB Output is correct
8 Correct 3511 ms 996 KB Output is correct
9 Correct 3724 ms 996 KB Output is correct
10 Correct 3020 ms 1112 KB Output is correct
11 Correct 40 ms 1112 KB Output is correct
12 Correct 1403 ms 1112 KB Output is correct
13 Correct 1191 ms 1112 KB Output is correct
14 Correct 425 ms 1112 KB Output is correct
15 Correct 3007 ms 1112 KB Output is correct
16 Correct 3011 ms 1112 KB Output is correct
17 Correct 3042 ms 1112 KB Output is correct
18 Correct 357 ms 1112 KB Output is correct
19 Correct 2729 ms 1120 KB Output is correct
20 Correct 60 ms 1120 KB Output is correct
21 Correct 1923 ms 1120 KB Output is correct
22 Correct 2962 ms 1120 KB Output is correct
23 Correct 3053 ms 1232 KB Output is correct
24 Correct 3418 ms 1232 KB Output is correct
25 Correct 1589 ms 1232 KB Output is correct
26 Correct 341 ms 1232 KB Output is correct
27 Correct 1767 ms 1232 KB Output is correct
28 Correct 40 ms 1232 KB Output is correct
29 Correct 3101 ms 1276 KB Output is correct
30 Correct 3113 ms 1276 KB Output is correct
31 Correct 3123 ms 1276 KB Output is correct
32 Correct 31 ms 1276 KB Output is correct
33 Correct 23 ms 1276 KB Output is correct
34 Correct 155 ms 1276 KB Output is correct
35 Correct 15 ms 1276 KB Output is correct
36 Correct 3107 ms 1276 KB Output is correct
37 Correct 2950 ms 1276 KB Output is correct
38 Correct 3451 ms 1276 KB Output is correct
39 Correct 14 ms 1276 KB Output is correct
40 Correct 2060 ms 1276 KB Output is correct
41 Correct 1749 ms 1276 KB Output is correct
42 Correct 3062 ms 1276 KB Output is correct
43 Correct 3182 ms 1276 KB Output is correct
44 Correct 3243 ms 1276 KB Output is correct
45 Correct 3018 ms 1276 KB Output is correct
46 Correct 2 ms 1276 KB Output is correct
47 Correct 3069 ms 1280 KB Output is correct
48 Correct 2 ms 1280 KB Output is correct
49 Correct 2778 ms 1284 KB Output is correct
50 Correct 642 ms 1284 KB Output is correct
51 Correct 53 ms 1284 KB Output is correct
52 Correct 1774 ms 1284 KB Output is correct
53 Correct 3072 ms 1284 KB Output is correct
54 Correct 3861 ms 1284 KB Output is correct
55 Correct 3776 ms 1284 KB Output is correct
56 Correct 319 ms 1284 KB Output is correct
57 Correct 130 ms 1284 KB Output is correct
58 Correct 156 ms 1284 KB Output is correct
59 Correct 1120 ms 1284 KB Output is correct
60 Correct 3406 ms 1284 KB Output is correct
61 Correct 3486 ms 1284 KB Output is correct
62 Runtime error 3 ms 1284 KB Execution killed with signal 11 (could be triggered by violating memory limits)
63 Halted 0 ms 0 KB -