Submission #617491

# Submission time Handle Problem Language Result Execution time Memory
617491 2022-08-01T11:44:50 Z dxz05 L-triominoes (CEOI21_ltriominoes) C++14
100 / 100
2245 ms 13328 KB
//#pragma GCC optimize("Ofast,O2,O3,unroll-loops")
//#pragma GCC target("avx2")

#include <bits/stdc++.h>

using namespace std;

void debug_out() { cerr << endl; }

template<typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cerr << "[" << H << "]";
    debug_out(T...);
}

#ifdef dddxxz
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

#define SZ(s) ((int)s.size())
#define all(x) (x).begin(), (x).end()
#define lla(x) (x).rbegin(), (x).rend()
#define bpc(x) __builtin_popcount(x)
#define bpcll(x) __builtin_popcountll(x)
#define MP make_pair

clock_t startTime;

double getCurrentTime() {
    return (double) (clock() - startTime) / CLOCKS_PER_SEC;
}

mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());

typedef long long ll;
const int MOD = 998244353;
const int INF = 1000000101;
const long long LLINF = 1223372000000000555;
const int N = 1e6 + 3e2;
const int M = 1555;

int n;
vector<vector<int>> arr;

set<int> s;
void rec(int x){
    if (x == n){
        int cur = 0;
        for (int i = 0; i < n; i++){
            for (int j = 0; j < 2; j++){
                int k = i * 2 + j;
                if (arr[i][j]) cur += (1 << k);
            }
        }
        s.insert(cur);
        return;
    }

    rec(x + 1);

    if (x + 1 < n && arr[x][0] == 0 && arr[x][1] == 0 && arr[x + 1][0] == 0){
        arr[x][0] = 1;
        arr[x][1] = 1;
        arr[x + 1][0] = 1;
        rec(x + 1);
        arr[x][0] = 0;
        arr[x][1] = 0;
        arr[x + 1][0] = 0;
    }

    if (x + 1 < n && arr[x][0] == 0 && arr[x][1] == 0 && arr[x + 1][1] == 0){
        arr[x][0] = 1;
        arr[x][1] = 1;
        arr[x + 1][1] = 1;
        rec(x + 1);
        arr[x][0] = 0;
        arr[x][1] = 0;
        arr[x + 1][1] = 0;
    }

    if (x + 1 < n && arr[x][0] == 0 && arr[x + 1][0] == 0 && arr[x + 1][1] == 0){
        arr[x][0] = 1;
        arr[x + 1][0] = 1;
        arr[x + 1][1] = 1;
        rec(x + 1);
        arr[x][0] = 0;
        arr[x + 1][0] = 0;
        arr[x + 1][1] = 0;
    }

    if (x - 1 >= 0 && arr[x][0] == 0 && arr[x - 1][1] == 0 && arr[x][1] == 0){
        arr[x][0] = 1;
        arr[x - 1][1] = 1;
        arr[x][1] = 1;
        rec(x + 1);
        arr[x][0] = 0;
        arr[x - 1][1] = 0;
        arr[x][1] = 0;
    }

}

vector<int> g[1 << 13];

void build_graph(){
    arr.resize(n, vector<int>(2));
    rec(0);
    for (int x : s){
        int maskl = 0, maskr = 0;
        for (int i = 0; i < n; i++){
            if (x & (1 << (2 * i))) maskl |= (1 << i);
            if (x & (1 << (2 * i + 1))) maskr |= (1 << i);
        }
        g[maskl].push_back(maskr);
    }
}

void out(int mask){
    for (int i = 0; i < n; i++){
        if (mask & (1 << i)) {
            cout << 1;
        } else {
            cout << 0;
        }
    }
    cout << endl;
}

bool triominoes(vector<vector<bool>> stone){
    int m = (int)stone[0].size();

    vector<vector<bool>> dp(m, vector<bool>(1 << n));
    for (int x = 0; x < (1 << n); x++){
        for (int y : g[x]){
            bool ok = true;
            for (int j = 0; j < n; j++){
                bool s0 = (x & (1 << j));
                bool s1 = (y & (1 << j));
                if (stone[j][0] && s0) ok = false;
                if (stone[j][1] && s1) ok = false;
                if (!stone[j][0] && !s0) ok = false;
            }
            if (ok) dp[1][y] = true;
        }
    }

    for (int i = 1; i + 1 < m; i++){
        for (int x = 0; x < (1 << n); x++){
            if (!dp[i][x]) continue;
            int xx = 0;
            for (int j = 0; j < n; j++){
                if (!(x & (1 << j)) && !stone[j][i]) xx |= (1 << j);
            }
            for (int y : g[xx]){
                bool ok = true;
                for (int j = 0; j < n; j++){
                    bool s1 = (y & (1 << j));
                    if (stone[j][i + 1] && s1) ok = false;
                }
                if (ok){
                    dp[i + 1][y] = true;
                }
            }
        }
    }

    int full = 0;
    for (int i = 0; i < n; i++){
        if (!stone[i][m - 1]) full |= (1 << i);
    }

    return dp[m - 1][full];
}

void solve(int TC) {
    int m, k;
    cin >> n >> m >> k;

    build_graph();

    vector<pair<int, int>> stones;

    set<int> pos = {0, m - 1};
    while (k--){
        int x, y;
        cin >> x >> y;
        --x, --y;
        stones.emplace_back(x, y);
        pos.insert(y);
    }

    vector<int> vec;
    for (int x : pos) vec.push_back(x);
    vector<int> diff;
    for (int i = 0; i + 1 < vec.size(); i++) diff.push_back(vec[i + 1] - vec[i]);

    map<int, int> mp;
    mp[0] = 0;
    int sum = 0;
    for (int i = 0; i < diff.size(); i++){
        if (diff[i] > 12) diff[i] = 6 + diff[i] % 6;
        sum += diff[i];
        mp[vec[i + 1]] = sum;
    }

    m = sum + 1;

    vector<vector<bool>> stone(n, vector<bool>(m, false));
    for (auto now : stones){
        int x = now.first, y = now.second;
        y = mp[y];
//        cout << x << ' ' << y << endl;
        stone[x][y] = true;
    }

    bool ans = triominoes(stone);

    cout << (ans ? "YES" : "NO");

}

int main() {
    startTime = clock();
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);

#ifdef dddxxz
    freopen("input.txt", "rg", stdin);
    freopen("output.txt", "w", stdout);
#endif

    int TC = 1;
    //cin >> TC;

    for (int test = 1; test <= TC; test++) {
        //debug(test);
        //cout << "Case #" << test << ": ";
        solve(test);
    }

#ifdef dddxxz
    cerr << endl << "Time: " << int(getCurrentTime() * 1000) << " ms" << endl;
#endif

    return 0;
}

Compilation message

ltrominoes.cpp: In function 'void solve(int)':
ltrominoes.cpp:197:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  197 |     for (int i = 0; i + 1 < vec.size(); i++) diff.push_back(vec[i + 1] - vec[i]);
      |                     ~~~~~~^~~~~~~~~~~~
ltrominoes.cpp:202:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  202 |     for (int i = 0; i < diff.size(); i++){
      |                     ~~^~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 0 ms 468 KB Output is correct
2 Correct 1 ms 468 KB Output is correct
3 Correct 1 ms 516 KB Output is correct
4 Correct 1 ms 596 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 596 KB Output is correct
7 Correct 1 ms 468 KB Output is correct
8 Correct 30 ms 4348 KB Output is correct
9 Correct 10 ms 1876 KB Output is correct
10 Correct 2 ms 724 KB Output is correct
11 Correct 34 ms 4340 KB Output is correct
12 Correct 6 ms 1064 KB Output is correct
13 Correct 1 ms 520 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 33 ms 4320 KB Output is correct
16 Correct 778 ms 11636 KB Output is correct
17 Correct 29 ms 1144 KB Output is correct
18 Correct 282 ms 4864 KB Output is correct
19 Correct 4 ms 596 KB Output is correct
20 Correct 581 ms 11372 KB Output is correct
21 Correct 235 ms 4780 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 3 ms 596 KB Output is correct
24 Correct 1 ms 468 KB Output is correct
25 Correct 308 ms 10856 KB Output is correct
26 Correct 392 ms 11036 KB Output is correct
27 Correct 1 ms 468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 468 KB Output is correct
2 Correct 1 ms 468 KB Output is correct
3 Correct 1 ms 468 KB Output is correct
4 Correct 1 ms 468 KB Output is correct
5 Correct 31 ms 4288 KB Output is correct
6 Correct 11 ms 1876 KB Output is correct
7 Correct 5 ms 980 KB Output is correct
8 Correct 1 ms 516 KB Output is correct
9 Correct 1 ms 552 KB Output is correct
10 Correct 1 ms 468 KB Output is correct
11 Correct 1 ms 468 KB Output is correct
12 Correct 1 ms 516 KB Output is correct
13 Correct 1 ms 468 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 1 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 468 KB Output is correct
18 Correct 112 ms 10672 KB Output is correct
19 Correct 104 ms 10652 KB Output is correct
20 Correct 1 ms 468 KB Output is correct
21 Correct 1 ms 468 KB Output is correct
22 Correct 2 ms 648 KB Output is correct
23 Correct 2 ms 652 KB Output is correct
24 Correct 2 ms 724 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 468 KB Output is correct
2 Correct 1 ms 516 KB Output is correct
3 Correct 1 ms 468 KB Output is correct
4 Correct 1 ms 468 KB Output is correct
5 Correct 1 ms 520 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 1 ms 528 KB Output is correct
8 Correct 1 ms 524 KB Output is correct
9 Correct 1 ms 468 KB Output is correct
10 Correct 1 ms 468 KB Output is correct
11 Correct 1 ms 468 KB Output is correct
12 Correct 1 ms 596 KB Output is correct
13 Correct 1 ms 468 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 0 ms 520 KB Output is correct
16 Correct 0 ms 520 KB Output is correct
17 Correct 1 ms 596 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 1 ms 596 KB Output is correct
21 Correct 0 ms 468 KB Output is correct
22 Correct 1 ms 596 KB Output is correct
23 Correct 1 ms 524 KB Output is correct
24 Correct 1 ms 468 KB Output is correct
25 Correct 0 ms 468 KB Output is correct
26 Correct 1 ms 596 KB Output is correct
27 Correct 1 ms 468 KB Output is correct
28 Correct 1 ms 468 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 596 KB Output is correct
31 Correct 1 ms 652 KB Output is correct
32 Correct 1 ms 468 KB Output is correct
33 Correct 1 ms 596 KB Output is correct
34 Correct 1 ms 596 KB Output is correct
35 Correct 1 ms 596 KB Output is correct
36 Correct 1 ms 468 KB Output is correct
37 Correct 1 ms 596 KB Output is correct
38 Correct 1 ms 596 KB Output is correct
39 Correct 1 ms 596 KB Output is correct
40 Correct 1 ms 596 KB Output is correct
41 Correct 1 ms 524 KB Output is correct
42 Correct 1 ms 724 KB Output is correct
43 Correct 1 ms 724 KB Output is correct
44 Correct 1 ms 596 KB Output is correct
45 Correct 1 ms 596 KB Output is correct
46 Correct 1 ms 664 KB Output is correct
47 Correct 1 ms 736 KB Output is correct
48 Correct 1 ms 604 KB Output is correct
49 Correct 1 ms 608 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 468 KB Output is correct
2 Correct 1 ms 480 KB Output is correct
3 Correct 2 ms 724 KB Output is correct
4 Correct 1 ms 476 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 1 ms 468 KB Output is correct
8 Correct 1 ms 524 KB Output is correct
9 Correct 1 ms 468 KB Output is correct
10 Correct 1 ms 596 KB Output is correct
11 Correct 2 ms 596 KB Output is correct
12 Correct 3 ms 724 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 1 ms 596 KB Output is correct
15 Correct 2 ms 596 KB Output is correct
16 Correct 2 ms 596 KB Output is correct
17 Correct 2 ms 596 KB Output is correct
18 Correct 2 ms 596 KB Output is correct
19 Correct 2 ms 596 KB Output is correct
20 Correct 3 ms 648 KB Output is correct
21 Correct 1 ms 596 KB Output is correct
22 Correct 2 ms 596 KB Output is correct
23 Correct 1 ms 724 KB Output is correct
24 Correct 2 ms 652 KB Output is correct
25 Correct 1 ms 596 KB Output is correct
26 Correct 1 ms 652 KB Output is correct
27 Correct 1 ms 596 KB Output is correct
28 Correct 1 ms 596 KB Output is correct
29 Correct 1 ms 596 KB Output is correct
30 Correct 1 ms 596 KB Output is correct
31 Correct 1 ms 652 KB Output is correct
32 Correct 3 ms 596 KB Output is correct
33 Correct 3 ms 648 KB Output is correct
34 Correct 3 ms 596 KB Output is correct
35 Correct 3 ms 596 KB Output is correct
36 Correct 1 ms 596 KB Output is correct
37 Correct 2 ms 524 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 468 KB Output is correct
2 Correct 2 ms 468 KB Output is correct
3 Correct 5 ms 524 KB Output is correct
4 Correct 362 ms 4940 KB Output is correct
5 Correct 115 ms 2388 KB Output is correct
6 Correct 174 ms 2328 KB Output is correct
7 Correct 35 ms 1236 KB Output is correct
8 Correct 51 ms 1244 KB Output is correct
9 Correct 13 ms 1236 KB Output is correct
10 Correct 21 ms 1148 KB Output is correct
11 Correct 36 ms 4256 KB Output is correct
12 Correct 14 ms 1876 KB Output is correct
13 Correct 3 ms 724 KB Output is correct
14 Correct 40 ms 4328 KB Output is correct
15 Correct 6 ms 596 KB Output is correct
16 Correct 4 ms 660 KB Output is correct
17 Correct 10 ms 1240 KB Output is correct
18 Correct 14 ms 788 KB Output is correct
19 Correct 9 ms 852 KB Output is correct
20 Correct 551 ms 5180 KB Output is correct
21 Correct 234 ms 2516 KB Output is correct
22 Correct 7 ms 740 KB Output is correct
23 Correct 41 ms 912 KB Output is correct
24 Correct 1864 ms 12928 KB Output is correct
25 Correct 718 ms 5584 KB Output is correct
26 Correct 1893 ms 12924 KB Output is correct
27 Correct 1894 ms 12912 KB Output is correct
28 Correct 127 ms 12024 KB Output is correct
29 Correct 830 ms 11864 KB Output is correct
30 Correct 1134 ms 12044 KB Output is correct
31 Correct 321 ms 12384 KB Output is correct
32 Correct 677 ms 11428 KB Output is correct
33 Correct 380 ms 4944 KB Output is correct
34 Correct 1415 ms 12116 KB Output is correct
35 Correct 1867 ms 12796 KB Output is correct
36 Correct 2245 ms 13328 KB Output is correct
37 Correct 118 ms 4704 KB Output is correct
38 Correct 306 ms 4948 KB Output is correct
39 Correct 218 ms 2516 KB Output is correct
40 Correct 1425 ms 12636 KB Output is correct
41 Correct 204 ms 2480 KB Output is correct
42 Correct 1382 ms 12296 KB Output is correct
43 Correct 1364 ms 12300 KB Output is correct
44 Correct 1418 ms 12272 KB Output is correct
45 Correct 1359 ms 12328 KB Output is correct
46 Correct 57 ms 5100 KB Output is correct
47 Correct 2218 ms 13324 KB Output is correct
48 Correct 1725 ms 12764 KB Output is correct
49 Correct 589 ms 11460 KB Output is correct
50 Correct 132 ms 2236 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 468 KB Output is correct
2 Correct 1 ms 468 KB Output is correct
3 Correct 1 ms 516 KB Output is correct
4 Correct 1 ms 596 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 596 KB Output is correct
7 Correct 1 ms 468 KB Output is correct
8 Correct 30 ms 4348 KB Output is correct
9 Correct 10 ms 1876 KB Output is correct
10 Correct 2 ms 724 KB Output is correct
11 Correct 34 ms 4340 KB Output is correct
12 Correct 6 ms 1064 KB Output is correct
13 Correct 1 ms 520 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 33 ms 4320 KB Output is correct
16 Correct 778 ms 11636 KB Output is correct
17 Correct 29 ms 1144 KB Output is correct
18 Correct 282 ms 4864 KB Output is correct
19 Correct 4 ms 596 KB Output is correct
20 Correct 581 ms 11372 KB Output is correct
21 Correct 235 ms 4780 KB Output is correct
22 Correct 1 ms 468 KB Output is correct
23 Correct 3 ms 596 KB Output is correct
24 Correct 1 ms 468 KB Output is correct
25 Correct 308 ms 10856 KB Output is correct
26 Correct 392 ms 11036 KB Output is correct
27 Correct 1 ms 468 KB Output is correct
28 Correct 1 ms 468 KB Output is correct
29 Correct 1 ms 468 KB Output is correct
30 Correct 1 ms 468 KB Output is correct
31 Correct 1 ms 468 KB Output is correct
32 Correct 31 ms 4288 KB Output is correct
33 Correct 11 ms 1876 KB Output is correct
34 Correct 5 ms 980 KB Output is correct
35 Correct 1 ms 516 KB Output is correct
36 Correct 1 ms 552 KB Output is correct
37 Correct 1 ms 468 KB Output is correct
38 Correct 1 ms 468 KB Output is correct
39 Correct 1 ms 516 KB Output is correct
40 Correct 1 ms 468 KB Output is correct
41 Correct 1 ms 468 KB Output is correct
42 Correct 1 ms 468 KB Output is correct
43 Correct 1 ms 468 KB Output is correct
44 Correct 1 ms 468 KB Output is correct
45 Correct 112 ms 10672 KB Output is correct
46 Correct 104 ms 10652 KB Output is correct
47 Correct 1 ms 468 KB Output is correct
48 Correct 1 ms 468 KB Output is correct
49 Correct 2 ms 648 KB Output is correct
50 Correct 2 ms 652 KB Output is correct
51 Correct 2 ms 724 KB Output is correct
52 Correct 1 ms 468 KB Output is correct
53 Correct 1 ms 516 KB Output is correct
54 Correct 1 ms 468 KB Output is correct
55 Correct 1 ms 468 KB Output is correct
56 Correct 1 ms 520 KB Output is correct
57 Correct 1 ms 468 KB Output is correct
58 Correct 1 ms 528 KB Output is correct
59 Correct 1 ms 524 KB Output is correct
60 Correct 1 ms 468 KB Output is correct
61 Correct 1 ms 468 KB Output is correct
62 Correct 1 ms 468 KB Output is correct
63 Correct 1 ms 596 KB Output is correct
64 Correct 1 ms 468 KB Output is correct
65 Correct 1 ms 468 KB Output is correct
66 Correct 0 ms 520 KB Output is correct
67 Correct 0 ms 520 KB Output is correct
68 Correct 1 ms 596 KB Output is correct
69 Correct 1 ms 468 KB Output is correct
70 Correct 1 ms 468 KB Output is correct
71 Correct 1 ms 596 KB Output is correct
72 Correct 0 ms 468 KB Output is correct
73 Correct 1 ms 596 KB Output is correct
74 Correct 1 ms 524 KB Output is correct
75 Correct 1 ms 468 KB Output is correct
76 Correct 0 ms 468 KB Output is correct
77 Correct 1 ms 596 KB Output is correct
78 Correct 1 ms 468 KB Output is correct
79 Correct 1 ms 468 KB Output is correct
80 Correct 1 ms 468 KB Output is correct
81 Correct 1 ms 596 KB Output is correct
82 Correct 1 ms 652 KB Output is correct
83 Correct 1 ms 468 KB Output is correct
84 Correct 1 ms 596 KB Output is correct
85 Correct 1 ms 596 KB Output is correct
86 Correct 1 ms 596 KB Output is correct
87 Correct 1 ms 468 KB Output is correct
88 Correct 1 ms 596 KB Output is correct
89 Correct 1 ms 596 KB Output is correct
90 Correct 1 ms 596 KB Output is correct
91 Correct 1 ms 596 KB Output is correct
92 Correct 1 ms 524 KB Output is correct
93 Correct 1 ms 724 KB Output is correct
94 Correct 1 ms 724 KB Output is correct
95 Correct 1 ms 596 KB Output is correct
96 Correct 1 ms 596 KB Output is correct
97 Correct 1 ms 664 KB Output is correct
98 Correct 1 ms 736 KB Output is correct
99 Correct 1 ms 604 KB Output is correct
100 Correct 1 ms 608 KB Output is correct
101 Correct 1 ms 468 KB Output is correct
102 Correct 1 ms 480 KB Output is correct
103 Correct 2 ms 724 KB Output is correct
104 Correct 1 ms 476 KB Output is correct
105 Correct 1 ms 468 KB Output is correct
106 Correct 1 ms 468 KB Output is correct
107 Correct 1 ms 468 KB Output is correct
108 Correct 1 ms 524 KB Output is correct
109 Correct 1 ms 468 KB Output is correct
110 Correct 1 ms 596 KB Output is correct
111 Correct 2 ms 596 KB Output is correct
112 Correct 3 ms 724 KB Output is correct
113 Correct 1 ms 596 KB Output is correct
114 Correct 1 ms 596 KB Output is correct
115 Correct 2 ms 596 KB Output is correct
116 Correct 2 ms 596 KB Output is correct
117 Correct 2 ms 596 KB Output is correct
118 Correct 2 ms 596 KB Output is correct
119 Correct 2 ms 596 KB Output is correct
120 Correct 3 ms 648 KB Output is correct
121 Correct 1 ms 596 KB Output is correct
122 Correct 2 ms 596 KB Output is correct
123 Correct 1 ms 724 KB Output is correct
124 Correct 2 ms 652 KB Output is correct
125 Correct 1 ms 596 KB Output is correct
126 Correct 1 ms 652 KB Output is correct
127 Correct 1 ms 596 KB Output is correct
128 Correct 1 ms 596 KB Output is correct
129 Correct 1 ms 596 KB Output is correct
130 Correct 1 ms 596 KB Output is correct
131 Correct 1 ms 652 KB Output is correct
132 Correct 3 ms 596 KB Output is correct
133 Correct 3 ms 648 KB Output is correct
134 Correct 3 ms 596 KB Output is correct
135 Correct 3 ms 596 KB Output is correct
136 Correct 1 ms 596 KB Output is correct
137 Correct 2 ms 524 KB Output is correct
138 Correct 1 ms 468 KB Output is correct
139 Correct 2 ms 468 KB Output is correct
140 Correct 5 ms 524 KB Output is correct
141 Correct 362 ms 4940 KB Output is correct
142 Correct 115 ms 2388 KB Output is correct
143 Correct 174 ms 2328 KB Output is correct
144 Correct 35 ms 1236 KB Output is correct
145 Correct 51 ms 1244 KB Output is correct
146 Correct 13 ms 1236 KB Output is correct
147 Correct 21 ms 1148 KB Output is correct
148 Correct 36 ms 4256 KB Output is correct
149 Correct 14 ms 1876 KB Output is correct
150 Correct 3 ms 724 KB Output is correct
151 Correct 40 ms 4328 KB Output is correct
152 Correct 6 ms 596 KB Output is correct
153 Correct 4 ms 660 KB Output is correct
154 Correct 10 ms 1240 KB Output is correct
155 Correct 14 ms 788 KB Output is correct
156 Correct 9 ms 852 KB Output is correct
157 Correct 551 ms 5180 KB Output is correct
158 Correct 234 ms 2516 KB Output is correct
159 Correct 7 ms 740 KB Output is correct
160 Correct 41 ms 912 KB Output is correct
161 Correct 1864 ms 12928 KB Output is correct
162 Correct 718 ms 5584 KB Output is correct
163 Correct 1893 ms 12924 KB Output is correct
164 Correct 1894 ms 12912 KB Output is correct
165 Correct 127 ms 12024 KB Output is correct
166 Correct 830 ms 11864 KB Output is correct
167 Correct 1134 ms 12044 KB Output is correct
168 Correct 321 ms 12384 KB Output is correct
169 Correct 677 ms 11428 KB Output is correct
170 Correct 380 ms 4944 KB Output is correct
171 Correct 1415 ms 12116 KB Output is correct
172 Correct 1867 ms 12796 KB Output is correct
173 Correct 2245 ms 13328 KB Output is correct
174 Correct 118 ms 4704 KB Output is correct
175 Correct 306 ms 4948 KB Output is correct
176 Correct 218 ms 2516 KB Output is correct
177 Correct 1425 ms 12636 KB Output is correct
178 Correct 204 ms 2480 KB Output is correct
179 Correct 1382 ms 12296 KB Output is correct
180 Correct 1364 ms 12300 KB Output is correct
181 Correct 1418 ms 12272 KB Output is correct
182 Correct 1359 ms 12328 KB Output is correct
183 Correct 57 ms 5100 KB Output is correct
184 Correct 2218 ms 13324 KB Output is correct
185 Correct 1725 ms 12764 KB Output is correct
186 Correct 589 ms 11460 KB Output is correct
187 Correct 132 ms 2236 KB Output is correct
188 Correct 1317 ms 12272 KB Output is correct
189 Correct 1 ms 520 KB Output is correct
190 Correct 1 ms 468 KB Output is correct
191 Correct 1 ms 468 KB Output is correct
192 Correct 4 ms 596 KB Output is correct
193 Correct 2 ms 468 KB Output is correct
194 Correct 0 ms 468 KB Output is correct
195 Correct 2 ms 648 KB Output is correct
196 Correct 1 ms 468 KB Output is correct
197 Correct 1 ms 596 KB Output is correct
198 Correct 1 ms 524 KB Output is correct
199 Correct 143 ms 2320 KB Output is correct
200 Correct 1 ms 596 KB Output is correct
201 Correct 36 ms 1236 KB Output is correct
202 Correct 13 ms 1068 KB Output is correct
203 Correct 1 ms 520 KB Output is correct
204 Correct 1 ms 468 KB Output is correct
205 Correct 1 ms 468 KB Output is correct
206 Correct 1 ms 468 KB Output is correct
207 Correct 1 ms 528 KB Output is correct
208 Correct 1078 ms 12068 KB Output is correct
209 Correct 1172 ms 12140 KB Output is correct
210 Correct 5 ms 688 KB Output is correct
211 Correct 15 ms 784 KB Output is correct
212 Correct 488 ms 5184 KB Output is correct
213 Correct 2 ms 596 KB Output is correct
214 Correct 42 ms 980 KB Output is correct
215 Correct 2 ms 652 KB Output is correct
216 Correct 2001 ms 12928 KB Output is correct
217 Correct 1848 ms 12920 KB Output is correct
218 Correct 1 ms 596 KB Output is correct
219 Correct 1 ms 596 KB Output is correct
220 Correct 1 ms 596 KB Output is correct
221 Correct 1 ms 596 KB Output is correct
222 Correct 1 ms 596 KB Output is correct
223 Correct 3 ms 652 KB Output is correct
224 Correct 2204 ms 13328 KB Output is correct
225 Correct 1 ms 596 KB Output is correct
226 Correct 2 ms 596 KB Output is correct
227 Correct 2 ms 596 KB Output is correct
228 Correct 768 ms 11868 KB Output is correct
229 Correct 292 ms 12504 KB Output is correct
230 Correct 885 ms 11740 KB Output is correct
231 Correct 1168 ms 12236 KB Output is correct
232 Correct 1 ms 724 KB Output is correct
233 Correct 1 ms 596 KB Output is correct
234 Correct 1736 ms 12800 KB Output is correct
235 Correct 1 ms 596 KB Output is correct
236 Correct 305 ms 5040 KB Output is correct
237 Correct 1 ms 596 KB Output is correct
238 Correct 1 ms 596 KB Output is correct
239 Correct 202 ms 2388 KB Output is correct
240 Correct 1343 ms 12300 KB Output is correct
241 Correct 1 ms 468 KB Output is correct
242 Correct 2 ms 656 KB Output is correct
243 Correct 1 ms 524 KB Output is correct
244 Correct 0 ms 468 KB Output is correct
245 Correct 28 ms 4312 KB Output is correct