Submission #876885

# Submission time Handle Problem Language Result Execution time Memory
876885 2023-11-22T12:58:09 Z Ice_man Jail (JOI22_jail) C++14
100 / 100
851 ms 199508 KB
#include <iostream>
#include <vector>
#include <cstring>
#include <stack>

#define maxn 120005
#define maxlog 20
#define pb(x) push_back(x)
#define control cout<<"passed"<<endl;

#pragma GCC optimize("O3" , "Ofast" , "unroll-loops")
#pragma GCC target(avx2)

using namespace std;

int n, m,  q;
vector <int> v[maxn * 12];
int start[maxn * 12], _final[maxn * 12];
vector <int> new_tree[maxn * 12];
int bin_lift[maxn * 12][maxlog];
int pom1[maxn * 12];
int pom2[maxn * 12];
int chain[maxn * 12];

void read()
{
    cin >> n;

    for(int i = 1; i <= n; i++)
    {
        v[i].clear();
       /// for(int j = 0; j < maxlog; j++) bin_lift[i][j] = 0;
    }

    for(int i = 1; i <= n * 12 - 1; i++)
    {
        pom1[i] = 0;
        pom2[i] = 0;
        ///v[i].clear();
        new_tree[i].clear();
    }

    int from, to;
    for(int i = 1; i <= (n - 1); i++)
    {
        cin >> from >> to;

        v[from].pb(to);
        v[to].pb(from);
    }

    cin >> m;

    for(int i = 1; i <= m; i++)
    {
        pom1[i] = 0;
        pom2[i] = 0;
    }

    for(int i = 1; i <= m; i++) cin >> start[i] >> _final[i];

}

int tree[12 * maxn];

void build_seg(int node , int l , int r)
{
    if(l == r)
    {
        tree[l] = node;
        return;
    }

    int mid = (r - l) / 2 + l;

    build_seg(node * 2 , l , mid);
    build_seg(node* 2 + 1 , mid + 1 , r);

    new_tree[node].pb(node * 2);
    new_tree[node].pb(node * 2 + 1);

    new_tree[node * 2 + 4 * n].pb(node + 4 * n);
    new_tree[node * 2 + 1 + 4 * n].pb(node + 4 * n);
}

void _add(int node , int l , int r , int ql , int qr , int val)
{

    if(ql <= l && r <= qr)
    {
        new_tree[node + n * 4].pb(val + n * 8);

        new_tree[val + n * 8].pb(node);

        return;
    }

    if(qr < l || r < ql || ql > qr) return;

    int mid = (r - l) / 2 + l;

    _add(node * 2 , l , mid , ql , qr , val);
    _add(node * 2 + 1 , mid + 1 , r , ql , qr , val);

}


///int bin_lift[maxn][maxlog];
int depth[maxn * 12];
int subtree[maxn * 12];
int help[maxn * 12];

void calc_bin(int node, int parent)
{
    
    subtree[node] = 1;
    
    for(int &nb : v[node])
    {
        if(nb != parent)
        {

            bin_lift[nb][0] = node;
            ///for(int i = 1; i < maxlog; i++) bin_lift[nb][i] = bin_lift[bin_lift[nb][i - 1]][i - 1];

            depth[nb] = depth[node] + 1;
            calc_bin(nb, node);

            subtree[node] += subtree[nb];

            if(subtree[v[node][0]] < subtree[nb] || v[node][0] == parent) swap(v[node][0] , nb);

        }
    }

}


int get_lca(int a, int b)
{
    if(depth[a] < depth[b]) swap(a, b);

    ///cout << a << "-" << b << endl;

    int levels = depth[a] - depth[b];
    ///cout << "** " << levels << endl;;
    for(int i = maxlog - 1; i >= 0; i--)
    {
        if(levels >> i & 1)
        {
            ///cout  << ">< "<< (1 << i) << endl;
            a = bin_lift[a][i];
            ///levels -= (1 << i);
            ///cout << (1 << i) << endl;
        }
    }

    ///cout << a << "-" << b << endl;
    if(a == b) return a;

    for(int i = maxlog - 1; i >= 0; i--)
    {
        if(!bin_lift[a][i]) continue;
        if(!bin_lift[b][i]) continue;

        if(bin_lift[a][i] != bin_lift[b][i])
        {
            a = bin_lift[a][i];
            b = bin_lift[b][i];
        }

    }

    return bin_lift[a][0];

}

int heads[maxn * 12];

void add_edges(int node , int from , int to)
{
    bool lamp1 = true;
    bool lamp2 = true;

    while(heads[from] != heads[to])
    {
        ///cout << from << " " << to << endl;
        if(heads[from] == heads[to]) break;

        if(depth[heads[to]] > depth[heads[from]])
        {
            swap(from , to);
            swap(lamp1 , lamp2);
        }

        _add(1 , 1 , n , chain[heads[from]] , chain[from] - lamp1 , node);

        lamp1 = false;
        from = bin_lift[heads[from]][0];
    }


    if(chain[from] > chain[to])
    {
        swap(from , to);
        swap(lamp1 , lamp2);
    }

    _add(1 , 1 , n , chain[from] + lamp1 , chain[to] - lamp2 , node);

}


bool check(int a, int b, int c)
{
    int lca = get_lca(a, b);
    ///int pom = get_lca(lca , c);

    if(get_lca(lca, c) == lca && get_lca(c, a) == c) return true;
    if(get_lca(lca, c) == lca && get_lca(c, b) == c) return true;

    return false;

}

int cur_chain = 0;
///int heads[maxn];

void dfs_hld(int node , int parent , int leader)
{

    cur_chain++;

    chain[node] = cur_chain;
    heads[node] = leader;

    if(v[node][0] != parent) dfs_hld(v[node][0] , node , leader);

    for(int nb : v[node]) if(nb != parent && nb != v[node][0])
    {
        dfs_hld(nb , node , nb);
    }

}



//vector <int> new_tree[maxn];

void solve()
{

    calc_bin(1, 0);

    ///control

    /**for(int a = 1; a <= m; a++)
    {
        for(int b = 1; b <= m; b++)
        {
            if(a == b) continue;
            ///int lca1 = get_lca(start[a], _final[a]);

            if(check(start[a], _final[a], start[b]) == true) new_tree[b].pb(a);
            if(check(start[a], _final[a], _final[b]) == true) new_tree[a].pb(b);

            ///cout << check(start[a] , _final[a] , start[b]) << " " <<  check(start[a] , _final[a] , _final[b]) << endl;

        }
    }*/

    cur_chain = 0;
    ///_time = 0;
    dfs_hld(1 , 0 , 1);

    /**cout << "--------------" << endl;
    for(int i = 1; i <= n; i++) cout << heads[i] << " ";
    cout << endl << "--------------" << endl;*/


    ///control

    build_seg(1 , 1 , n);

    ///cout << "sd;inkmsad" << endl;
    ///control

    for(int i = 1; i <= n * 12 - 1; i++) help[i] = 0;

    for(int i = 1; i <= m; i++)
    {
        new_tree[tree[chain[_final[i]]]].pb(8 * n + i);
        new_tree[i + n * 8].pb(n * 4 + tree[chain[start[i]]]);

        help[_final[i]] = i;
        add_edges(i , start[i] , _final[i]);

        ///cout << "passed " << i << endl;

    }


    ///cout << "-----------------" << endl;
    ///control

    for(int i = 1; i <= m; i++) if(help[start[i]])
    {
        new_tree[i + 8 * n].pb(help[start[i]] + 8 * n);
    }

    /**for(int i = 1; i <= n; i++)
    {
       cout << i << ": ";
       for(int nb : new_tree[i]) cout << nb << " ";
       cout << endl;
    }*/

}

stack <int> s;
///int pom1[maxn] , pom2[maxn];
int _time = 0;
int br = 0;
bool ans = true;

void count_ssc(int node, int parent)
{
    s.push(node);
    _time++;

    pom1[node] = _time;
    pom2[node] = _time;

    for(int nb : new_tree[node])
    {
        if(pom2[nb] == -1) continue;
        if(pom2[nb])
        {
            pom1[node] = min(pom1[node], pom1[nb]);
        }
        else
        {
            count_ssc(nb, node);
            pom1[node] = min(pom1[node], pom1[nb]);
        }
    }

    int h;

    if(pom1[node] == pom2[node])
    {
        br++;

        h = 0;

        while(!s.empty() && s.top() != node)
        {
            pom2[s.top()] = -1;

            h += s.top() > 8 * n? 1 : 0;

            s.pop();
        }

        h += node > 8 * n? 1 : 0;

        pom2[node] = -1;
        if(h > 1) ans = false;

        s.pop();
    }


}

int _pom[maxn * 12];

void combine()
{
    cin >> q;
    while(q--)
    {
        br = 0;
        _time = 0;
        ans = true;

        read();

        ///control

        solve();

        ///control

        /**for(int i = 1; i <= n; i++)
        {
            cout << i << ": ";
            for(int power = 0; power < maxlog; power++)
            {
                cout << bin_lift[i][power] << " ";
            }
            cout << endl;
        }*/

        ///cout << "-> " << get_lca(1 , 5) << endl;
        while(s.size()) s.pop();
        for(int i = 1; i <= 8 * n + m; i++) if(!pom2[i]) count_ssc(i, -1);

        if(ans == true) cout << "Yes" << endl;
        else cout << "No" << endl;

    }
}

int main()
{
    /**ios_base::sync_with_stdio(false);
    cin.tie(nullptr);*/

    combine();

    return 0;

}
/**

3
3
1 2
2 3
2
2 1
3 2
7
1 2
2 3
3 4
4 5
5 6
6 7
3
1 3
4 2
2 5
8
1 2
2 3
3 4
4 5
5 6
6 7
7 8
4
1 5
2 6
3 7
4 8


*/

Compilation message

jail.cpp:12:20: warning: '#pragma GCC option' is not a string [-Wpragmas]
   12 | #pragma GCC target(avx2)
      |                    ^~~~
# Verdict Execution time Memory Grader output
1 Correct 28 ms 90704 KB Output is correct
2 Correct 18 ms 90712 KB Output is correct
3 Correct 18 ms 90716 KB Output is correct
4 Correct 38 ms 90672 KB Output is correct
5 Correct 66 ms 90716 KB Output is correct
6 Correct 21 ms 90712 KB Output is correct
7 Correct 20 ms 90716 KB Output is correct
8 Correct 20 ms 90912 KB Output is correct
9 Correct 87 ms 95580 KB Output is correct
10 Correct 163 ms 167508 KB Output is correct
11 Correct 28 ms 90712 KB Output is correct
12 Correct 82 ms 91732 KB Output is correct
13 Correct 246 ms 172860 KB Output is correct
14 Correct 239 ms 174544 KB Output is correct
15 Correct 351 ms 179760 KB Output is correct
16 Correct 582 ms 199508 KB Output is correct
17 Correct 248 ms 181328 KB Output is correct
18 Correct 221 ms 178348 KB Output is correct
19 Correct 241 ms 178968 KB Output is correct
20 Correct 238 ms 178936 KB Output is correct
21 Correct 275 ms 181632 KB Output is correct
22 Correct 194 ms 173648 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 90712 KB Output is correct
2 Correct 17 ms 90716 KB Output is correct
3 Correct 20 ms 90716 KB Output is correct
4 Correct 20 ms 90716 KB Output is correct
5 Correct 20 ms 90852 KB Output is correct
6 Correct 19 ms 90716 KB Output is correct
7 Correct 20 ms 90684 KB Output is correct
8 Correct 19 ms 90716 KB Output is correct
9 Correct 20 ms 90712 KB Output is correct
10 Correct 20 ms 90716 KB Output is correct
11 Correct 19 ms 90716 KB Output is correct
12 Correct 19 ms 90600 KB Output is correct
13 Correct 18 ms 90716 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 90712 KB Output is correct
2 Correct 17 ms 90716 KB Output is correct
3 Correct 20 ms 90716 KB Output is correct
4 Correct 20 ms 90716 KB Output is correct
5 Correct 20 ms 90852 KB Output is correct
6 Correct 19 ms 90716 KB Output is correct
7 Correct 20 ms 90684 KB Output is correct
8 Correct 19 ms 90716 KB Output is correct
9 Correct 20 ms 90712 KB Output is correct
10 Correct 20 ms 90716 KB Output is correct
11 Correct 19 ms 90716 KB Output is correct
12 Correct 19 ms 90600 KB Output is correct
13 Correct 18 ms 90716 KB Output is correct
14 Correct 17 ms 90728 KB Output is correct
15 Correct 17 ms 90716 KB Output is correct
16 Correct 19 ms 90676 KB Output is correct
17 Correct 19 ms 90712 KB Output is correct
18 Correct 20 ms 90716 KB Output is correct
19 Correct 17 ms 90716 KB Output is correct
20 Correct 20 ms 90840 KB Output is correct
21 Correct 20 ms 90712 KB Output is correct
22 Correct 19 ms 90716 KB Output is correct
23 Correct 17 ms 90716 KB Output is correct
24 Correct 19 ms 90712 KB Output is correct
25 Correct 19 ms 90696 KB Output is correct
26 Correct 18 ms 90712 KB Output is correct
27 Correct 19 ms 90716 KB Output is correct
28 Correct 18 ms 90716 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 90712 KB Output is correct
2 Correct 17 ms 90716 KB Output is correct
3 Correct 20 ms 90716 KB Output is correct
4 Correct 20 ms 90716 KB Output is correct
5 Correct 20 ms 90852 KB Output is correct
6 Correct 19 ms 90716 KB Output is correct
7 Correct 20 ms 90684 KB Output is correct
8 Correct 19 ms 90716 KB Output is correct
9 Correct 20 ms 90712 KB Output is correct
10 Correct 20 ms 90716 KB Output is correct
11 Correct 19 ms 90716 KB Output is correct
12 Correct 19 ms 90600 KB Output is correct
13 Correct 18 ms 90716 KB Output is correct
14 Correct 17 ms 90728 KB Output is correct
15 Correct 17 ms 90716 KB Output is correct
16 Correct 19 ms 90676 KB Output is correct
17 Correct 19 ms 90712 KB Output is correct
18 Correct 20 ms 90716 KB Output is correct
19 Correct 17 ms 90716 KB Output is correct
20 Correct 20 ms 90840 KB Output is correct
21 Correct 20 ms 90712 KB Output is correct
22 Correct 19 ms 90716 KB Output is correct
23 Correct 17 ms 90716 KB Output is correct
24 Correct 19 ms 90712 KB Output is correct
25 Correct 19 ms 90696 KB Output is correct
26 Correct 18 ms 90712 KB Output is correct
27 Correct 19 ms 90716 KB Output is correct
28 Correct 18 ms 90716 KB Output is correct
29 Correct 20 ms 90712 KB Output is correct
30 Correct 21 ms 90716 KB Output is correct
31 Correct 20 ms 90716 KB Output is correct
32 Correct 21 ms 90776 KB Output is correct
33 Correct 19 ms 90716 KB Output is correct
34 Correct 21 ms 90716 KB Output is correct
35 Correct 20 ms 90712 KB Output is correct
36 Correct 22 ms 90972 KB Output is correct
37 Correct 19 ms 90716 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 90712 KB Output is correct
2 Correct 17 ms 90716 KB Output is correct
3 Correct 20 ms 90716 KB Output is correct
4 Correct 20 ms 90716 KB Output is correct
5 Correct 20 ms 90852 KB Output is correct
6 Correct 19 ms 90716 KB Output is correct
7 Correct 20 ms 90684 KB Output is correct
8 Correct 19 ms 90716 KB Output is correct
9 Correct 20 ms 90712 KB Output is correct
10 Correct 20 ms 90716 KB Output is correct
11 Correct 19 ms 90716 KB Output is correct
12 Correct 19 ms 90600 KB Output is correct
13 Correct 18 ms 90716 KB Output is correct
14 Correct 17 ms 90728 KB Output is correct
15 Correct 17 ms 90716 KB Output is correct
16 Correct 19 ms 90676 KB Output is correct
17 Correct 19 ms 90712 KB Output is correct
18 Correct 20 ms 90716 KB Output is correct
19 Correct 17 ms 90716 KB Output is correct
20 Correct 20 ms 90840 KB Output is correct
21 Correct 20 ms 90712 KB Output is correct
22 Correct 19 ms 90716 KB Output is correct
23 Correct 17 ms 90716 KB Output is correct
24 Correct 19 ms 90712 KB Output is correct
25 Correct 19 ms 90696 KB Output is correct
26 Correct 18 ms 90712 KB Output is correct
27 Correct 19 ms 90716 KB Output is correct
28 Correct 18 ms 90716 KB Output is correct
29 Correct 20 ms 90712 KB Output is correct
30 Correct 21 ms 90716 KB Output is correct
31 Correct 20 ms 90716 KB Output is correct
32 Correct 21 ms 90776 KB Output is correct
33 Correct 19 ms 90716 KB Output is correct
34 Correct 21 ms 90716 KB Output is correct
35 Correct 20 ms 90712 KB Output is correct
36 Correct 22 ms 90972 KB Output is correct
37 Correct 19 ms 90716 KB Output is correct
38 Correct 87 ms 95568 KB Output is correct
39 Correct 156 ms 167512 KB Output is correct
40 Correct 122 ms 95916 KB Output is correct
41 Correct 114 ms 95160 KB Output is correct
42 Correct 88 ms 96080 KB Output is correct
43 Correct 79 ms 95324 KB Output is correct
44 Correct 36 ms 91224 KB Output is correct
45 Correct 150 ms 130388 KB Output is correct
46 Correct 151 ms 130068 KB Output is correct
47 Correct 143 ms 148820 KB Output is correct
48 Correct 152 ms 149108 KB Output is correct
49 Correct 141 ms 130896 KB Output is correct
50 Correct 140 ms 130896 KB Output is correct
51 Correct 134 ms 136276 KB Output is correct
52 Correct 149 ms 136276 KB Output is correct
53 Correct 38 ms 94548 KB Output is correct
54 Correct 152 ms 130112 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 17 ms 90736 KB Output is correct
2 Correct 18 ms 90972 KB Output is correct
3 Correct 17 ms 90712 KB Output is correct
4 Correct 18 ms 90716 KB Output is correct
5 Correct 28 ms 90712 KB Output is correct
6 Correct 18 ms 90968 KB Output is correct
7 Correct 18 ms 90716 KB Output is correct
8 Correct 18 ms 90712 KB Output is correct
9 Correct 18 ms 90716 KB Output is correct
10 Correct 18 ms 90716 KB Output is correct
11 Correct 18 ms 90568 KB Output is correct
12 Correct 20 ms 90712 KB Output is correct
13 Correct 60 ms 90716 KB Output is correct
14 Correct 85 ms 90712 KB Output is correct
15 Correct 82 ms 90832 KB Output is correct
16 Correct 183 ms 131796 KB Output is correct
17 Correct 404 ms 144028 KB Output is correct
18 Correct 654 ms 166348 KB Output is correct
19 Correct 241 ms 133456 KB Output is correct
20 Correct 238 ms 133752 KB Output is correct
21 Correct 247 ms 133496 KB Output is correct
22 Correct 383 ms 141772 KB Output is correct
23 Correct 304 ms 140496 KB Output is correct
24 Correct 319 ms 140464 KB Output is correct
25 Correct 316 ms 140572 KB Output is correct
26 Correct 316 ms 140412 KB Output is correct
27 Correct 317 ms 146304 KB Output is correct
28 Correct 310 ms 151792 KB Output is correct
29 Correct 324 ms 146708 KB Output is correct
30 Correct 277 ms 139216 KB Output is correct
31 Correct 290 ms 144848 KB Output is correct
32 Correct 290 ms 140660 KB Output is correct
33 Correct 267 ms 144612 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 28 ms 90704 KB Output is correct
2 Correct 18 ms 90712 KB Output is correct
3 Correct 18 ms 90716 KB Output is correct
4 Correct 38 ms 90672 KB Output is correct
5 Correct 66 ms 90716 KB Output is correct
6 Correct 21 ms 90712 KB Output is correct
7 Correct 20 ms 90716 KB Output is correct
8 Correct 20 ms 90912 KB Output is correct
9 Correct 87 ms 95580 KB Output is correct
10 Correct 163 ms 167508 KB Output is correct
11 Correct 28 ms 90712 KB Output is correct
12 Correct 82 ms 91732 KB Output is correct
13 Correct 246 ms 172860 KB Output is correct
14 Correct 239 ms 174544 KB Output is correct
15 Correct 351 ms 179760 KB Output is correct
16 Correct 582 ms 199508 KB Output is correct
17 Correct 248 ms 181328 KB Output is correct
18 Correct 221 ms 178348 KB Output is correct
19 Correct 241 ms 178968 KB Output is correct
20 Correct 238 ms 178936 KB Output is correct
21 Correct 275 ms 181632 KB Output is correct
22 Correct 194 ms 173648 KB Output is correct
23 Correct 18 ms 90712 KB Output is correct
24 Correct 17 ms 90716 KB Output is correct
25 Correct 20 ms 90716 KB Output is correct
26 Correct 20 ms 90716 KB Output is correct
27 Correct 20 ms 90852 KB Output is correct
28 Correct 19 ms 90716 KB Output is correct
29 Correct 20 ms 90684 KB Output is correct
30 Correct 19 ms 90716 KB Output is correct
31 Correct 20 ms 90712 KB Output is correct
32 Correct 20 ms 90716 KB Output is correct
33 Correct 19 ms 90716 KB Output is correct
34 Correct 19 ms 90600 KB Output is correct
35 Correct 18 ms 90716 KB Output is correct
36 Correct 17 ms 90728 KB Output is correct
37 Correct 17 ms 90716 KB Output is correct
38 Correct 19 ms 90676 KB Output is correct
39 Correct 19 ms 90712 KB Output is correct
40 Correct 20 ms 90716 KB Output is correct
41 Correct 17 ms 90716 KB Output is correct
42 Correct 20 ms 90840 KB Output is correct
43 Correct 20 ms 90712 KB Output is correct
44 Correct 19 ms 90716 KB Output is correct
45 Correct 17 ms 90716 KB Output is correct
46 Correct 19 ms 90712 KB Output is correct
47 Correct 19 ms 90696 KB Output is correct
48 Correct 18 ms 90712 KB Output is correct
49 Correct 19 ms 90716 KB Output is correct
50 Correct 18 ms 90716 KB Output is correct
51 Correct 20 ms 90712 KB Output is correct
52 Correct 21 ms 90716 KB Output is correct
53 Correct 20 ms 90716 KB Output is correct
54 Correct 21 ms 90776 KB Output is correct
55 Correct 19 ms 90716 KB Output is correct
56 Correct 21 ms 90716 KB Output is correct
57 Correct 20 ms 90712 KB Output is correct
58 Correct 22 ms 90972 KB Output is correct
59 Correct 19 ms 90716 KB Output is correct
60 Correct 87 ms 95568 KB Output is correct
61 Correct 156 ms 167512 KB Output is correct
62 Correct 122 ms 95916 KB Output is correct
63 Correct 114 ms 95160 KB Output is correct
64 Correct 88 ms 96080 KB Output is correct
65 Correct 79 ms 95324 KB Output is correct
66 Correct 36 ms 91224 KB Output is correct
67 Correct 150 ms 130388 KB Output is correct
68 Correct 151 ms 130068 KB Output is correct
69 Correct 143 ms 148820 KB Output is correct
70 Correct 152 ms 149108 KB Output is correct
71 Correct 141 ms 130896 KB Output is correct
72 Correct 140 ms 130896 KB Output is correct
73 Correct 134 ms 136276 KB Output is correct
74 Correct 149 ms 136276 KB Output is correct
75 Correct 38 ms 94548 KB Output is correct
76 Correct 152 ms 130112 KB Output is correct
77 Correct 17 ms 90736 KB Output is correct
78 Correct 18 ms 90972 KB Output is correct
79 Correct 17 ms 90712 KB Output is correct
80 Correct 18 ms 90716 KB Output is correct
81 Correct 28 ms 90712 KB Output is correct
82 Correct 18 ms 90968 KB Output is correct
83 Correct 18 ms 90716 KB Output is correct
84 Correct 18 ms 90712 KB Output is correct
85 Correct 18 ms 90716 KB Output is correct
86 Correct 18 ms 90716 KB Output is correct
87 Correct 18 ms 90568 KB Output is correct
88 Correct 20 ms 90712 KB Output is correct
89 Correct 60 ms 90716 KB Output is correct
90 Correct 85 ms 90712 KB Output is correct
91 Correct 82 ms 90832 KB Output is correct
92 Correct 183 ms 131796 KB Output is correct
93 Correct 404 ms 144028 KB Output is correct
94 Correct 654 ms 166348 KB Output is correct
95 Correct 241 ms 133456 KB Output is correct
96 Correct 238 ms 133752 KB Output is correct
97 Correct 247 ms 133496 KB Output is correct
98 Correct 383 ms 141772 KB Output is correct
99 Correct 304 ms 140496 KB Output is correct
100 Correct 319 ms 140464 KB Output is correct
101 Correct 316 ms 140572 KB Output is correct
102 Correct 316 ms 140412 KB Output is correct
103 Correct 317 ms 146304 KB Output is correct
104 Correct 310 ms 151792 KB Output is correct
105 Correct 324 ms 146708 KB Output is correct
106 Correct 277 ms 139216 KB Output is correct
107 Correct 290 ms 144848 KB Output is correct
108 Correct 290 ms 140660 KB Output is correct
109 Correct 267 ms 144612 KB Output is correct
110 Correct 85 ms 91688 KB Output is correct
111 Correct 60 ms 91452 KB Output is correct
112 Correct 370 ms 162640 KB Output is correct
113 Correct 212 ms 153088 KB Output is correct
114 Correct 344 ms 157988 KB Output is correct
115 Correct 135 ms 130312 KB Output is correct
116 Correct 229 ms 134888 KB Output is correct
117 Correct 851 ms 180424 KB Output is correct
118 Correct 170 ms 130132 KB Output is correct
119 Correct 168 ms 130128 KB Output is correct
120 Correct 32 ms 96592 KB Output is correct
121 Correct 299 ms 136036 KB Output is correct
122 Correct 282 ms 135876 KB Output is correct
123 Correct 220 ms 160028 KB Output is correct
124 Correct 219 ms 160080 KB Output is correct
125 Correct 235 ms 161104 KB Output is correct
126 Correct 594 ms 186148 KB Output is correct
127 Correct 364 ms 161392 KB Output is correct
128 Correct 263 ms 162212 KB Output is correct
129 Correct 267 ms 160564 KB Output is correct
130 Correct 276 ms 161992 KB Output is correct