답안 #668730

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
668730 2022-12-04T18:27:35 Z kenken714 화성 (APIO22_mars) C++17
54 / 100
2155 ms 3632 KB
#include <bits/stdc++.h>

using namespace std;
 
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOR(i, m, n) for (ll i = m; i < n; i++)
#define FORR(i, m, n) for (ll i = m; i >= n; i--)
#define REPO(i, n) for (ll i = 1; i <= n; i++)
#define ll long long
#define INF (ll)1 << 60
#define MINF (-1 * INF)
#define ALL(n) n.begin(), n.end()
#define MOD 1000000007
#define P pair<ll, ll>

struct UnionFind {
    vector<int> data;
    UnionFind(int size) : data(size, -1) { }
    bool unionSet(int x, int y) {
        x = root(x); y = root(y);
        if (x != y) {
            if (data[y] < data[x]) swap(x, y);
            data[x] += data[y]; data[y] = x;
        }
        return x != y;
    }
    bool findSet(int x, int y) {
        return root(x) == root(y);
    }
    int root(int x) {
        return data[x] < 0 ? x : data[x] = root(data[x]);
    }
    int size(int x) {
        return -data[root(x)];
    }
};

string solve1(string s, int n){//n ! 2n * 1
    UnionFind uni(5000);
    vector<bool> used(5000);
    ll ans = 0, ecnt = 0;
    REP(i, n * n){
        if(s[i] == '0')ecnt++;
    }
    REP(i, n){
        REP(j, n){
            if(s[i * n + j] != '1')continue;
            if(i != n - 1 and s[(i + 1) * n + j] == '1')uni.unionSet(i * n + j, (i + 1) * n + j);
            if(j != n - 1 and s[i * n + j + 1] == '1')uni.unionSet(i * n + j, i * n + j + 1);
        }
    }
    REP(i, n * n){
        if(!used[uni.root(i)]){
            used[uni.root(i)] = true;
            ans++;
        }
    }
    ans -= ecnt;
    string res;
    while(ans > 0){
        if(ans % 2 == 1)res.push_back('1');
        else res.push_back('0');
        ans /= 2;
    }
    while(res.size() < 100) res.push_back('0');
    return res;
}


P locate(ll x, ll y, ll n){
    ll m = 2 * n + 1, fi = (m + 2)/ 3, se = m - fi * 2, I, J, X, Y;
    if(x < fi) {
        I = 0;
        X = 0;
    }
    else if(x >= fi and x < fi * 2){
        I = 1;
        X = fi;
    }
    else {
        I = 2;
        X = fi * 2;
    }
    if(y < fi) {
        J = 0;
        Y = 0;
    }
    else if(y >= fi and y < fi * 2){
        J = 1;
        Y = fi;
    }
    else {
        J = 2;
        Y = fi * 2;
    }
    if(y < fi * 2){
        return P(I * 3 + J, fi * (x - X) + (y - Y));
    }
    else{
        return P(I * 3 + J, se * (x - X) + (y - Y));
    }
}

string process(vector<vector<string>> a, int gi, int gj, int gk, int n){
    ll m = 2 * n + 1, fi = (m + 2)/ 3, se = m - fi * 2;
    if(gk < n - 1){//kousin

        vector<vector<ll>> s(m, vector<ll>(m));//sim
        REP(i, m){
            ll I;
            if(i < fi) I = 0;
            else if(i >= fi and i < fi * 2)I = 1;
            else I = 2;
            REP(j, m){
                ll J;
                if(j < fi) J = 0;
                else if(j >= fi and j < fi * 2)J = 1;
                else J = 2;
                s[i][j] = I * 3 + J + 1;
            }
        }
		bool rok = false;
        REP(kkk, n){
            REP(i, m - 2 * (kkk + 1)){
                REP(j, m - 2 * (kkk + 1)){
                    if(i == gi and j == gj and kkk == gk){
						rok = true;
						break;
					}
                    ll nmin = 10;
                    REP(x, 3){
                        REP(y, 3){
                            if(s[i + x][j + y] > 0 and nmin > s[i + x][j + y]){
                                nmin = s[i + x][j + y];
                            }
                        }
                    }
                    if(nmin == 10)continue;
                    if(s[i][j] != 0)nmin = s[i][j];
                    REP(x, 3){
                        REP(y, 3){
                            if(x == 0 and y == 0)continue;
                            if(s[i + x][j + y] == nmin){
                                s[i + x][j + y] = 0;
                            }
                        }
                    }
                    s[i][j] = nmin;
                }
				if(rok)break;
            }
			if(rok)break;
        }
			//cout << gi << " " << gj << " " << gk << " !!!"<<endl;
        //kousin
        ll nmin = 10;
        REP(x, 3){
            REP(y, 3){
                if(s[gi + x][gj + y] > 0 and nmin > s[gi + x][gj + y]){
                    nmin = s[gi + x][gj + y];
                }
            }
        }
        if(nmin == 10){//'0'
            string res(100, '0');
            return res;
        }
        if(s[gi][gj] != 0){
            nmin = s[gi][gj];
            if(gk == 0) swap(a[0][0][locate(gi, gj, n).second], a[0][0][0]);
        }
		else{
			 REP(d, 100) a[0][0][d] = '0';
		}
        REP(x, 3){
            REP(y, 3){
                if(x == 0 and y == 0)continue;
                if(s[gi + x][gj + y] == nmin){
                    if(gk == 0) swap(a[x][y][locate(gi + x, gj + y, n).second], a[x][y][0]);
                    REP(d, 100) if(a[x][y][d] == '1')a[0][0][d] = '1';
                }
            }
        }
		//cout << a[0][0] <<endl;
        return a[0][0];
    }
    else {//last
        string mp;
        REP(i, m){//init
            REP(j, m){
                P pos = locate(i, j, n);
                mp.push_back(a[pos.first / 3][pos.first % 3][pos.second]);
				//cout << i <<" " << j << "  ! " << pos.first / 3 << " " << pos.first % 3 << " " << pos.second <<" " << a[pos.first / 3][pos.first % 3][pos.second]<<endl;
            }
        }
        string res = solve1(mp, m);
        return res;
    }
}


 

Compilation message

mars.cpp: In function 'std::string process(std::vector<std::vector<std::__cxx11::basic_string<char> > >, int, int, int, int)':
mars.cpp:106:40: warning: unused variable 'se' [-Wunused-variable]
  106 |     ll m = 2 * n + 1, fi = (m + 2)/ 3, se = m - fi * 2;
      |                                        ^~
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 2288 KB Output is correct
2 Correct 8 ms 2148 KB Output is correct
3 Correct 8 ms 2212 KB Output is correct
4 Correct 8 ms 2336 KB Output is correct
5 Correct 8 ms 2088 KB Output is correct
6 Correct 8 ms 2080 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 2288 KB Output is correct
2 Correct 8 ms 2148 KB Output is correct
3 Correct 8 ms 2212 KB Output is correct
4 Correct 8 ms 2336 KB Output is correct
5 Correct 8 ms 2088 KB Output is correct
6 Correct 8 ms 2080 KB Output is correct
7 Correct 11 ms 2080 KB Output is correct
8 Correct 18 ms 2376 KB Output is correct
9 Correct 17 ms 2284 KB Output is correct
10 Correct 17 ms 2328 KB Output is correct
11 Correct 16 ms 2436 KB Output is correct
12 Correct 17 ms 2412 KB Output is correct
13 Correct 17 ms 2416 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 2288 KB Output is correct
2 Correct 8 ms 2148 KB Output is correct
3 Correct 8 ms 2212 KB Output is correct
4 Correct 8 ms 2336 KB Output is correct
5 Correct 8 ms 2088 KB Output is correct
6 Correct 8 ms 2080 KB Output is correct
7 Correct 11 ms 2080 KB Output is correct
8 Correct 18 ms 2376 KB Output is correct
9 Correct 17 ms 2284 KB Output is correct
10 Correct 17 ms 2328 KB Output is correct
11 Correct 16 ms 2436 KB Output is correct
12 Correct 17 ms 2412 KB Output is correct
13 Correct 17 ms 2416 KB Output is correct
14 Correct 34 ms 2592 KB Output is correct
15 Correct 55 ms 2520 KB Output is correct
16 Correct 57 ms 2616 KB Output is correct
17 Correct 49 ms 2652 KB Output is correct
18 Correct 59 ms 2624 KB Output is correct
19 Correct 57 ms 2644 KB Output is correct
20 Correct 49 ms 2604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 2288 KB Output is correct
2 Correct 8 ms 2148 KB Output is correct
3 Correct 8 ms 2212 KB Output is correct
4 Correct 8 ms 2336 KB Output is correct
5 Correct 8 ms 2088 KB Output is correct
6 Correct 8 ms 2080 KB Output is correct
7 Correct 11 ms 2080 KB Output is correct
8 Correct 18 ms 2376 KB Output is correct
9 Correct 17 ms 2284 KB Output is correct
10 Correct 17 ms 2328 KB Output is correct
11 Correct 16 ms 2436 KB Output is correct
12 Correct 17 ms 2412 KB Output is correct
13 Correct 17 ms 2416 KB Output is correct
14 Correct 34 ms 2592 KB Output is correct
15 Correct 55 ms 2520 KB Output is correct
16 Correct 57 ms 2616 KB Output is correct
17 Correct 49 ms 2652 KB Output is correct
18 Correct 59 ms 2624 KB Output is correct
19 Correct 57 ms 2644 KB Output is correct
20 Correct 49 ms 2604 KB Output is correct
21 Correct 97 ms 2636 KB Output is correct
22 Correct 157 ms 2676 KB Output is correct
23 Correct 162 ms 2660 KB Output is correct
24 Correct 152 ms 2664 KB Output is correct
25 Correct 157 ms 2684 KB Output is correct
26 Correct 160 ms 2664 KB Output is correct
27 Correct 175 ms 2724 KB Output is correct
28 Correct 166 ms 2672 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 2288 KB Output is correct
2 Correct 8 ms 2148 KB Output is correct
3 Correct 8 ms 2212 KB Output is correct
4 Correct 8 ms 2336 KB Output is correct
5 Correct 8 ms 2088 KB Output is correct
6 Correct 8 ms 2080 KB Output is correct
7 Correct 11 ms 2080 KB Output is correct
8 Correct 18 ms 2376 KB Output is correct
9 Correct 17 ms 2284 KB Output is correct
10 Correct 17 ms 2328 KB Output is correct
11 Correct 16 ms 2436 KB Output is correct
12 Correct 17 ms 2412 KB Output is correct
13 Correct 17 ms 2416 KB Output is correct
14 Correct 34 ms 2592 KB Output is correct
15 Correct 55 ms 2520 KB Output is correct
16 Correct 57 ms 2616 KB Output is correct
17 Correct 49 ms 2652 KB Output is correct
18 Correct 59 ms 2624 KB Output is correct
19 Correct 57 ms 2644 KB Output is correct
20 Correct 49 ms 2604 KB Output is correct
21 Correct 97 ms 2636 KB Output is correct
22 Correct 157 ms 2676 KB Output is correct
23 Correct 162 ms 2660 KB Output is correct
24 Correct 152 ms 2664 KB Output is correct
25 Correct 157 ms 2684 KB Output is correct
26 Correct 160 ms 2664 KB Output is correct
27 Correct 175 ms 2724 KB Output is correct
28 Correct 166 ms 2672 KB Output is correct
29 Correct 267 ms 2888 KB Output is correct
30 Correct 423 ms 2960 KB Output is correct
31 Correct 422 ms 2824 KB Output is correct
32 Correct 433 ms 2888 KB Output is correct
33 Correct 412 ms 2876 KB Output is correct
34 Correct 416 ms 2848 KB Output is correct
35 Correct 413 ms 2908 KB Output is correct
36 Correct 413 ms 2904 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 2288 KB Output is correct
2 Correct 8 ms 2148 KB Output is correct
3 Correct 8 ms 2212 KB Output is correct
4 Correct 8 ms 2336 KB Output is correct
5 Correct 8 ms 2088 KB Output is correct
6 Correct 8 ms 2080 KB Output is correct
7 Correct 11 ms 2080 KB Output is correct
8 Correct 18 ms 2376 KB Output is correct
9 Correct 17 ms 2284 KB Output is correct
10 Correct 17 ms 2328 KB Output is correct
11 Correct 16 ms 2436 KB Output is correct
12 Correct 17 ms 2412 KB Output is correct
13 Correct 17 ms 2416 KB Output is correct
14 Correct 34 ms 2592 KB Output is correct
15 Correct 55 ms 2520 KB Output is correct
16 Correct 57 ms 2616 KB Output is correct
17 Correct 49 ms 2652 KB Output is correct
18 Correct 59 ms 2624 KB Output is correct
19 Correct 57 ms 2644 KB Output is correct
20 Correct 49 ms 2604 KB Output is correct
21 Correct 97 ms 2636 KB Output is correct
22 Correct 157 ms 2676 KB Output is correct
23 Correct 162 ms 2660 KB Output is correct
24 Correct 152 ms 2664 KB Output is correct
25 Correct 157 ms 2684 KB Output is correct
26 Correct 160 ms 2664 KB Output is correct
27 Correct 175 ms 2724 KB Output is correct
28 Correct 166 ms 2672 KB Output is correct
29 Correct 267 ms 2888 KB Output is correct
30 Correct 423 ms 2960 KB Output is correct
31 Correct 422 ms 2824 KB Output is correct
32 Correct 433 ms 2888 KB Output is correct
33 Correct 412 ms 2876 KB Output is correct
34 Correct 416 ms 2848 KB Output is correct
35 Correct 413 ms 2908 KB Output is correct
36 Correct 413 ms 2904 KB Output is correct
37 Correct 630 ms 3156 KB Output is correct
38 Correct 954 ms 3256 KB Output is correct
39 Correct 959 ms 3508 KB Output is correct
40 Correct 945 ms 3264 KB Output is correct
41 Correct 919 ms 3320 KB Output is correct
42 Correct 980 ms 3288 KB Output is correct
43 Correct 896 ms 3324 KB Output is correct
44 Correct 917 ms 3232 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 2288 KB Output is correct
2 Correct 8 ms 2148 KB Output is correct
3 Correct 8 ms 2212 KB Output is correct
4 Correct 8 ms 2336 KB Output is correct
5 Correct 8 ms 2088 KB Output is correct
6 Correct 8 ms 2080 KB Output is correct
7 Correct 11 ms 2080 KB Output is correct
8 Correct 18 ms 2376 KB Output is correct
9 Correct 17 ms 2284 KB Output is correct
10 Correct 17 ms 2328 KB Output is correct
11 Correct 16 ms 2436 KB Output is correct
12 Correct 17 ms 2412 KB Output is correct
13 Correct 17 ms 2416 KB Output is correct
14 Correct 34 ms 2592 KB Output is correct
15 Correct 55 ms 2520 KB Output is correct
16 Correct 57 ms 2616 KB Output is correct
17 Correct 49 ms 2652 KB Output is correct
18 Correct 59 ms 2624 KB Output is correct
19 Correct 57 ms 2644 KB Output is correct
20 Correct 49 ms 2604 KB Output is correct
21 Correct 97 ms 2636 KB Output is correct
22 Correct 157 ms 2676 KB Output is correct
23 Correct 162 ms 2660 KB Output is correct
24 Correct 152 ms 2664 KB Output is correct
25 Correct 157 ms 2684 KB Output is correct
26 Correct 160 ms 2664 KB Output is correct
27 Correct 175 ms 2724 KB Output is correct
28 Correct 166 ms 2672 KB Output is correct
29 Correct 267 ms 2888 KB Output is correct
30 Correct 423 ms 2960 KB Output is correct
31 Correct 422 ms 2824 KB Output is correct
32 Correct 433 ms 2888 KB Output is correct
33 Correct 412 ms 2876 KB Output is correct
34 Correct 416 ms 2848 KB Output is correct
35 Correct 413 ms 2908 KB Output is correct
36 Correct 413 ms 2904 KB Output is correct
37 Correct 630 ms 3156 KB Output is correct
38 Correct 954 ms 3256 KB Output is correct
39 Correct 959 ms 3508 KB Output is correct
40 Correct 945 ms 3264 KB Output is correct
41 Correct 919 ms 3320 KB Output is correct
42 Correct 980 ms 3288 KB Output is correct
43 Correct 896 ms 3324 KB Output is correct
44 Correct 917 ms 3232 KB Output is correct
45 Correct 1450 ms 3376 KB Output is correct
46 Correct 2016 ms 3492 KB Output is correct
47 Correct 2136 ms 3424 KB Output is correct
48 Correct 2155 ms 3540 KB Output is correct
49 Correct 2116 ms 3532 KB Output is correct
50 Correct 2011 ms 3476 KB Output is correct
51 Correct 2012 ms 3632 KB Output is correct
52 Correct 1947 ms 3396 KB Output is correct
53 Correct 1951 ms 3480 KB Output is correct
54 Correct 1958 ms 3448 KB Output is correct
55 Correct 1961 ms 3468 KB Output is correct
56 Correct 1978 ms 3508 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 2288 KB Output is correct
2 Correct 8 ms 2148 KB Output is correct
3 Correct 8 ms 2212 KB Output is correct
4 Correct 8 ms 2336 KB Output is correct
5 Correct 8 ms 2088 KB Output is correct
6 Correct 8 ms 2080 KB Output is correct
7 Correct 11 ms 2080 KB Output is correct
8 Correct 18 ms 2376 KB Output is correct
9 Correct 17 ms 2284 KB Output is correct
10 Correct 17 ms 2328 KB Output is correct
11 Correct 16 ms 2436 KB Output is correct
12 Correct 17 ms 2412 KB Output is correct
13 Correct 17 ms 2416 KB Output is correct
14 Correct 34 ms 2592 KB Output is correct
15 Correct 55 ms 2520 KB Output is correct
16 Correct 57 ms 2616 KB Output is correct
17 Correct 49 ms 2652 KB Output is correct
18 Correct 59 ms 2624 KB Output is correct
19 Correct 57 ms 2644 KB Output is correct
20 Correct 49 ms 2604 KB Output is correct
21 Correct 97 ms 2636 KB Output is correct
22 Correct 157 ms 2676 KB Output is correct
23 Correct 162 ms 2660 KB Output is correct
24 Correct 152 ms 2664 KB Output is correct
25 Correct 157 ms 2684 KB Output is correct
26 Correct 160 ms 2664 KB Output is correct
27 Correct 175 ms 2724 KB Output is correct
28 Correct 166 ms 2672 KB Output is correct
29 Correct 267 ms 2888 KB Output is correct
30 Correct 423 ms 2960 KB Output is correct
31 Correct 422 ms 2824 KB Output is correct
32 Correct 433 ms 2888 KB Output is correct
33 Correct 412 ms 2876 KB Output is correct
34 Correct 416 ms 2848 KB Output is correct
35 Correct 413 ms 2908 KB Output is correct
36 Correct 413 ms 2904 KB Output is correct
37 Correct 630 ms 3156 KB Output is correct
38 Correct 954 ms 3256 KB Output is correct
39 Correct 959 ms 3508 KB Output is correct
40 Correct 945 ms 3264 KB Output is correct
41 Correct 919 ms 3320 KB Output is correct
42 Correct 980 ms 3288 KB Output is correct
43 Correct 896 ms 3324 KB Output is correct
44 Correct 917 ms 3232 KB Output is correct
45 Correct 1450 ms 3376 KB Output is correct
46 Correct 2016 ms 3492 KB Output is correct
47 Correct 2136 ms 3424 KB Output is correct
48 Correct 2155 ms 3540 KB Output is correct
49 Correct 2116 ms 3532 KB Output is correct
50 Correct 2011 ms 3476 KB Output is correct
51 Correct 2012 ms 3632 KB Output is correct
52 Correct 1947 ms 3396 KB Output is correct
53 Correct 1951 ms 3480 KB Output is correct
54 Correct 1958 ms 3448 KB Output is correct
55 Correct 1961 ms 3468 KB Output is correct
56 Correct 1978 ms 3508 KB Output is correct
57 Runtime error 3 ms 412 KB Execution killed with signal 6
58 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 2288 KB Output is correct
2 Correct 8 ms 2148 KB Output is correct
3 Correct 8 ms 2212 KB Output is correct
4 Correct 8 ms 2336 KB Output is correct
5 Correct 8 ms 2088 KB Output is correct
6 Correct 8 ms 2080 KB Output is correct
7 Correct 11 ms 2080 KB Output is correct
8 Correct 18 ms 2376 KB Output is correct
9 Correct 17 ms 2284 KB Output is correct
10 Correct 17 ms 2328 KB Output is correct
11 Correct 16 ms 2436 KB Output is correct
12 Correct 17 ms 2412 KB Output is correct
13 Correct 17 ms 2416 KB Output is correct
14 Correct 34 ms 2592 KB Output is correct
15 Correct 55 ms 2520 KB Output is correct
16 Correct 57 ms 2616 KB Output is correct
17 Correct 49 ms 2652 KB Output is correct
18 Correct 59 ms 2624 KB Output is correct
19 Correct 57 ms 2644 KB Output is correct
20 Correct 49 ms 2604 KB Output is correct
21 Correct 97 ms 2636 KB Output is correct
22 Correct 157 ms 2676 KB Output is correct
23 Correct 162 ms 2660 KB Output is correct
24 Correct 152 ms 2664 KB Output is correct
25 Correct 157 ms 2684 KB Output is correct
26 Correct 160 ms 2664 KB Output is correct
27 Correct 175 ms 2724 KB Output is correct
28 Correct 166 ms 2672 KB Output is correct
29 Correct 267 ms 2888 KB Output is correct
30 Correct 423 ms 2960 KB Output is correct
31 Correct 422 ms 2824 KB Output is correct
32 Correct 433 ms 2888 KB Output is correct
33 Correct 412 ms 2876 KB Output is correct
34 Correct 416 ms 2848 KB Output is correct
35 Correct 413 ms 2908 KB Output is correct
36 Correct 413 ms 2904 KB Output is correct
37 Correct 630 ms 3156 KB Output is correct
38 Correct 954 ms 3256 KB Output is correct
39 Correct 959 ms 3508 KB Output is correct
40 Correct 945 ms 3264 KB Output is correct
41 Correct 919 ms 3320 KB Output is correct
42 Correct 980 ms 3288 KB Output is correct
43 Correct 896 ms 3324 KB Output is correct
44 Correct 917 ms 3232 KB Output is correct
45 Correct 1450 ms 3376 KB Output is correct
46 Correct 2016 ms 3492 KB Output is correct
47 Correct 2136 ms 3424 KB Output is correct
48 Correct 2155 ms 3540 KB Output is correct
49 Correct 2116 ms 3532 KB Output is correct
50 Correct 2011 ms 3476 KB Output is correct
51 Correct 2012 ms 3632 KB Output is correct
52 Correct 1947 ms 3396 KB Output is correct
53 Correct 1951 ms 3480 KB Output is correct
54 Correct 1958 ms 3448 KB Output is correct
55 Correct 1961 ms 3468 KB Output is correct
56 Correct 1978 ms 3508 KB Output is correct
57 Runtime error 3 ms 412 KB Execution killed with signal 6
58 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 2288 KB Output is correct
2 Correct 8 ms 2148 KB Output is correct
3 Correct 8 ms 2212 KB Output is correct
4 Correct 8 ms 2336 KB Output is correct
5 Correct 8 ms 2088 KB Output is correct
6 Correct 8 ms 2080 KB Output is correct
7 Correct 11 ms 2080 KB Output is correct
8 Correct 18 ms 2376 KB Output is correct
9 Correct 17 ms 2284 KB Output is correct
10 Correct 17 ms 2328 KB Output is correct
11 Correct 16 ms 2436 KB Output is correct
12 Correct 17 ms 2412 KB Output is correct
13 Correct 17 ms 2416 KB Output is correct
14 Correct 34 ms 2592 KB Output is correct
15 Correct 55 ms 2520 KB Output is correct
16 Correct 57 ms 2616 KB Output is correct
17 Correct 49 ms 2652 KB Output is correct
18 Correct 59 ms 2624 KB Output is correct
19 Correct 57 ms 2644 KB Output is correct
20 Correct 49 ms 2604 KB Output is correct
21 Correct 97 ms 2636 KB Output is correct
22 Correct 157 ms 2676 KB Output is correct
23 Correct 162 ms 2660 KB Output is correct
24 Correct 152 ms 2664 KB Output is correct
25 Correct 157 ms 2684 KB Output is correct
26 Correct 160 ms 2664 KB Output is correct
27 Correct 175 ms 2724 KB Output is correct
28 Correct 166 ms 2672 KB Output is correct
29 Correct 267 ms 2888 KB Output is correct
30 Correct 423 ms 2960 KB Output is correct
31 Correct 422 ms 2824 KB Output is correct
32 Correct 433 ms 2888 KB Output is correct
33 Correct 412 ms 2876 KB Output is correct
34 Correct 416 ms 2848 KB Output is correct
35 Correct 413 ms 2908 KB Output is correct
36 Correct 413 ms 2904 KB Output is correct
37 Correct 630 ms 3156 KB Output is correct
38 Correct 954 ms 3256 KB Output is correct
39 Correct 959 ms 3508 KB Output is correct
40 Correct 945 ms 3264 KB Output is correct
41 Correct 919 ms 3320 KB Output is correct
42 Correct 980 ms 3288 KB Output is correct
43 Correct 896 ms 3324 KB Output is correct
44 Correct 917 ms 3232 KB Output is correct
45 Correct 1450 ms 3376 KB Output is correct
46 Correct 2016 ms 3492 KB Output is correct
47 Correct 2136 ms 3424 KB Output is correct
48 Correct 2155 ms 3540 KB Output is correct
49 Correct 2116 ms 3532 KB Output is correct
50 Correct 2011 ms 3476 KB Output is correct
51 Correct 2012 ms 3632 KB Output is correct
52 Correct 1947 ms 3396 KB Output is correct
53 Correct 1951 ms 3480 KB Output is correct
54 Correct 1958 ms 3448 KB Output is correct
55 Correct 1961 ms 3468 KB Output is correct
56 Correct 1978 ms 3508 KB Output is correct
57 Runtime error 3 ms 412 KB Execution killed with signal 6
58 Halted 0 ms 0 KB -