Submission #540853

# Submission time Handle Problem Language Result Execution time Memory
540853 2022-03-21T20:53:15 Z chonka Food Court (JOI21_foodcourt) C++
100 / 100
437 ms 55036 KB
#include<bits/stdc++.h>
using namespace std ;

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

#define MAXN 250007
int n , m , q ;

vector < pair < int , int > > v[ MAXN ] ;
vector < pair < int , long long > > to_query[ MAXN ] ;

int gr_col[ MAXN ] ;
bool qtype[ MAXN ] ;
long long ans[ MAXN ] ;

struct node {
    long long sm , mn ;
    node ( ) { sm = mn = 0 ; }
};

node unite ( node p1 , node p2 ) {
    node ret = node ( ) ;
    ret.sm = p1.sm + p2.sm ;
    ret.mn = min ( p1.mn , p1.sm + p2.mn ) ;
    return ret ;
}

class Tree {
public :
    node tr[ 4 * MAXN ] ;
    long long aux[ 4 * MAXN ] ;
    long long neg[ 4 * MAXN ] ;
    void init ( int where , int IL , int IR ) {
        tr[ where ] = node ( ) ;
        if ( IL == IR ) { return ; }
        int mid = ( IL + IR ) / 2 ;
        init ( 2 * where , IL , mid ) ;
        init ( 2 * where + 1 , mid + 1 , IR ) ;
    }
    void update ( int where , int IL , int IR , int pos , int add ) {
        if ( IR < pos || pos < IL ) { return ; }
        if ( IL == IR ) {
            tr[ where ].sm += add ;
            tr[ where ].mn = min ( 0LL , tr[ where ].sm ) ;
            aux[ where ] = max ( tr[ where ].sm , 0LL ) ;
            neg[ where ] = -tr[ where ].mn ;
            return ;
        }
        int mid = ( IL + IR ) / 2 ;
        if ( pos <= mid ) {
            update ( 2 * where , IL , mid , pos , add ) ;
        }
        else {
            update ( 2 * where + 1 , mid + 1 , IR , pos , add ) ;
        }
        tr[ where ] = unite ( tr[ 2 * where ] , tr[ 2 * where + 1 ] ) ;
        aux[ where ] = aux[ 2 * where ] + aux[ 2 * where + 1 ] ;
        neg[ where ] = neg[ 2 * where ] + neg[ 2 * where + 1 ] ;
    }
    node query ( int where , int IL , int IR , int CURL , int CURR ) {
        if ( IL > IR || CURL > CURR ) { return node ( ) ; }
        if ( IR < CURL || CURR < IL ) { return node ( ) ; }
        if ( CURL <= IL && IR <= CURR ) { return tr[ where ] ; }
        int mid = ( IL + IR ) / 2 ;
        return unite ( query ( 2 * where , IL , mid , CURL , CURR ) , query ( 2 * where + 1 , mid + 1 , IR , CURL , CURR ) ) ;
    }
    long long get_neg ( int where , int IL , int IR , int CURL , int CURR ) {
        if ( IL > IR || CURL > CURR ) { return 0 ; }
        if ( IR < CURL || CURR < IL ) { return 0 ; }
        if ( CURL <= IL && IR <= CURR ) { return neg[ where ] ; }
        int mid = ( IL + IR ) / 2 ;
        return get_neg ( 2 * where , IL , mid , CURL , CURR ) + get_neg ( 2 * where + 1 , mid + 1 , IR , CURL , CURR ) ;
    }
    int get ( int where , int IL , int IR , long long cnt ) {
        if ( IL == IR ) { return gr_col[ IL ] ; }
        int mid = ( IL + IR ) / 2 ;
        if ( aux[ 2 * where ] >= cnt ) {
            return get ( 2 * where , IL , mid , cnt ) ;
        }
        else {
            return get ( 2 * where + 1 , mid + 1 , IR , cnt - aux[ 2 * where ] ) ;
        }
    }
};
Tree w ;

void input ( ) {
    cin >> n >> m >> q ;
    for ( int i = 1 ; i <= q ; ++ i ) {
        int type ;
        cin >> type ;
        if ( type == 1 ) {
            int l , r , k , c ;
            cin >> l >> r >> c >> k ;
            v[ l ].push_back ( { i , k } ) ;
            v[ r + 1 ].push_back ( { i , -k } ) ;
            gr_col[ i ] = c ;
        }
        else if ( type == 2 ) {
            int l , r , k ;
            cin >> l >> r >> k ;
            v[ l ].push_back ( { i , -k } ) ;
            v[ r + 1 ].push_back ( { i , k } ) ;
        }
        else {
            int l ;
            long long pos ;
            cin >> l >> pos ;
            to_query[ l ].push_back ( { i , pos } ) ;
            qtype[ i ] = true ;
        }
    }
}

void solve ( ) {
    w.init ( 1 , 1 , q ) ;
    for ( int i = 1 ; i <= n ; ++ i ) {
        for ( auto [ wh , add ] : v[ i ] ) {
            w.update ( 1 , 1 , q , wh , add ) ;
        }
        for ( auto [ wh , cnt ] : to_query[ i ] ) {
            node ret = w.query ( 1 , 1 , q , 1 , wh ) ;
            if ( ret.sm - ret.mn < cnt ) {
                ans[ wh ] = 0 ;
            }
            else {
                ans[ wh ] = w.get ( 1 , 1 , q , cnt + w.get_neg ( 1 , 1 , q , 1 , wh ) + ret.mn ) ;
            }
        }
    }
    for ( int i = 1 ; i <= q ; ++ i ) {
        if ( qtype[ i ] == true ) {
            cout << ans[ i ] << "\n" ;
        }
    }
}

int main ( ) {
    ios_base :: sync_with_stdio ( false ) ;
    cin.tie ( NULL ) ;
    int t = 1 ;
    // cin >> t ;
    while ( t -- ) {
        input ( ) ;
        solve ( ) ;
    }
    return 0 ;
}

Compilation message

foodcourt.cpp: In function 'void solve()':
foodcourt.cpp:118:20: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  118 |         for ( auto [ wh , add ] : v[ i ] ) {
      |                    ^
foodcourt.cpp:121:20: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  121 |         for ( auto [ wh , cnt ] : to_query[ i ] ) {
      |                    ^
# Verdict Execution time Memory Grader output
1 Correct 14 ms 27860 KB Output is correct
2 Correct 14 ms 27860 KB Output is correct
3 Correct 15 ms 27852 KB Output is correct
4 Correct 14 ms 27876 KB Output is correct
5 Correct 13 ms 27860 KB Output is correct
6 Correct 14 ms 27920 KB Output is correct
7 Correct 14 ms 27932 KB Output is correct
8 Correct 17 ms 27872 KB Output is correct
9 Correct 14 ms 27860 KB Output is correct
10 Correct 14 ms 27860 KB Output is correct
11 Correct 17 ms 27888 KB Output is correct
12 Correct 18 ms 27868 KB Output is correct
13 Correct 14 ms 27860 KB Output is correct
14 Correct 14 ms 27860 KB Output is correct
15 Correct 14 ms 27820 KB Output is correct
16 Correct 14 ms 27864 KB Output is correct
17 Correct 14 ms 27872 KB Output is correct
18 Correct 14 ms 27860 KB Output is correct
19 Correct 13 ms 27872 KB Output is correct
20 Correct 14 ms 27940 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 14 ms 27860 KB Output is correct
2 Correct 14 ms 27860 KB Output is correct
3 Correct 15 ms 27852 KB Output is correct
4 Correct 14 ms 27876 KB Output is correct
5 Correct 13 ms 27860 KB Output is correct
6 Correct 14 ms 27920 KB Output is correct
7 Correct 14 ms 27932 KB Output is correct
8 Correct 17 ms 27872 KB Output is correct
9 Correct 14 ms 27860 KB Output is correct
10 Correct 14 ms 27860 KB Output is correct
11 Correct 17 ms 27888 KB Output is correct
12 Correct 18 ms 27868 KB Output is correct
13 Correct 14 ms 27860 KB Output is correct
14 Correct 14 ms 27860 KB Output is correct
15 Correct 14 ms 27820 KB Output is correct
16 Correct 14 ms 27864 KB Output is correct
17 Correct 14 ms 27872 KB Output is correct
18 Correct 14 ms 27860 KB Output is correct
19 Correct 13 ms 27872 KB Output is correct
20 Correct 14 ms 27940 KB Output is correct
21 Correct 14 ms 27952 KB Output is correct
22 Correct 15 ms 27872 KB Output is correct
23 Correct 15 ms 27860 KB Output is correct
24 Correct 16 ms 27944 KB Output is correct
25 Correct 14 ms 27872 KB Output is correct
26 Correct 14 ms 27884 KB Output is correct
27 Correct 16 ms 27860 KB Output is correct
28 Correct 16 ms 27856 KB Output is correct
29 Correct 14 ms 27872 KB Output is correct
30 Correct 16 ms 27876 KB Output is correct
31 Correct 15 ms 27860 KB Output is correct
32 Correct 15 ms 27868 KB Output is correct
33 Correct 14 ms 27876 KB Output is correct
34 Correct 15 ms 27928 KB Output is correct
35 Correct 18 ms 27928 KB Output is correct
36 Correct 15 ms 27924 KB Output is correct
37 Correct 14 ms 27788 KB Output is correct
38 Correct 14 ms 27924 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 72 ms 34112 KB Output is correct
2 Correct 91 ms 34084 KB Output is correct
3 Correct 87 ms 34056 KB Output is correct
4 Correct 77 ms 34104 KB Output is correct
5 Correct 72 ms 34096 KB Output is correct
6 Correct 74 ms 34080 KB Output is correct
7 Correct 49 ms 32716 KB Output is correct
8 Correct 50 ms 32580 KB Output is correct
9 Correct 87 ms 33996 KB Output is correct
10 Correct 73 ms 34140 KB Output is correct
11 Correct 79 ms 34160 KB Output is correct
12 Correct 89 ms 34104 KB Output is correct
13 Correct 68 ms 33416 KB Output is correct
14 Correct 68 ms 33996 KB Output is correct
15 Correct 70 ms 33944 KB Output is correct
16 Correct 77 ms 34264 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 358 ms 52404 KB Output is correct
2 Correct 270 ms 49276 KB Output is correct
3 Correct 371 ms 54028 KB Output is correct
4 Correct 314 ms 49556 KB Output is correct
5 Correct 276 ms 49412 KB Output is correct
6 Correct 437 ms 54120 KB Output is correct
7 Correct 149 ms 47672 KB Output is correct
8 Correct 145 ms 47576 KB Output is correct
9 Correct 384 ms 54132 KB Output is correct
10 Correct 387 ms 54052 KB Output is correct
11 Correct 369 ms 53596 KB Output is correct
12 Correct 396 ms 54048 KB Output is correct
13 Correct 378 ms 53584 KB Output is correct
14 Correct 365 ms 54032 KB Output is correct
15 Correct 377 ms 53960 KB Output is correct
16 Correct 385 ms 53956 KB Output is correct
17 Correct 384 ms 53960 KB Output is correct
18 Correct 400 ms 53804 KB Output is correct
19 Correct 391 ms 54084 KB Output is correct
20 Correct 420 ms 53792 KB Output is correct
21 Correct 390 ms 53988 KB Output is correct
22 Correct 379 ms 53968 KB Output is correct
23 Correct 379 ms 54064 KB Output is correct
24 Correct 381 ms 53952 KB Output is correct
25 Correct 299 ms 51668 KB Output is correct
26 Correct 305 ms 51948 KB Output is correct
27 Correct 288 ms 51984 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 14 ms 27860 KB Output is correct
2 Correct 14 ms 27860 KB Output is correct
3 Correct 15 ms 27852 KB Output is correct
4 Correct 14 ms 27876 KB Output is correct
5 Correct 13 ms 27860 KB Output is correct
6 Correct 14 ms 27920 KB Output is correct
7 Correct 14 ms 27932 KB Output is correct
8 Correct 17 ms 27872 KB Output is correct
9 Correct 14 ms 27860 KB Output is correct
10 Correct 14 ms 27860 KB Output is correct
11 Correct 17 ms 27888 KB Output is correct
12 Correct 18 ms 27868 KB Output is correct
13 Correct 14 ms 27860 KB Output is correct
14 Correct 14 ms 27860 KB Output is correct
15 Correct 14 ms 27820 KB Output is correct
16 Correct 14 ms 27864 KB Output is correct
17 Correct 14 ms 27872 KB Output is correct
18 Correct 14 ms 27860 KB Output is correct
19 Correct 13 ms 27872 KB Output is correct
20 Correct 14 ms 27940 KB Output is correct
21 Correct 72 ms 34112 KB Output is correct
22 Correct 91 ms 34084 KB Output is correct
23 Correct 87 ms 34056 KB Output is correct
24 Correct 77 ms 34104 KB Output is correct
25 Correct 72 ms 34096 KB Output is correct
26 Correct 74 ms 34080 KB Output is correct
27 Correct 49 ms 32716 KB Output is correct
28 Correct 50 ms 32580 KB Output is correct
29 Correct 87 ms 33996 KB Output is correct
30 Correct 73 ms 34140 KB Output is correct
31 Correct 79 ms 34160 KB Output is correct
32 Correct 89 ms 34104 KB Output is correct
33 Correct 68 ms 33416 KB Output is correct
34 Correct 68 ms 33996 KB Output is correct
35 Correct 70 ms 33944 KB Output is correct
36 Correct 77 ms 34264 KB Output is correct
37 Correct 79 ms 33496 KB Output is correct
38 Correct 61 ms 33236 KB Output is correct
39 Correct 35 ms 32040 KB Output is correct
40 Correct 43 ms 32352 KB Output is correct
41 Correct 76 ms 33880 KB Output is correct
42 Correct 82 ms 34028 KB Output is correct
43 Correct 77 ms 33968 KB Output is correct
44 Correct 79 ms 33908 KB Output is correct
45 Correct 83 ms 33972 KB Output is correct
46 Correct 83 ms 33916 KB Output is correct
47 Correct 52 ms 32852 KB Output is correct
48 Correct 96 ms 33484 KB Output is correct
49 Correct 73 ms 32716 KB Output is correct
50 Correct 76 ms 33352 KB Output is correct
51 Correct 95 ms 33980 KB Output is correct
52 Correct 129 ms 34016 KB Output is correct
53 Correct 71 ms 33264 KB Output is correct
54 Correct 107 ms 34272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 101 ms 34184 KB Output is correct
2 Correct 106 ms 34528 KB Output is correct
3 Correct 96 ms 34600 KB Output is correct
4 Correct 81 ms 33204 KB Output is correct
5 Correct 93 ms 34004 KB Output is correct
6 Correct 91 ms 34568 KB Output is correct
7 Correct 53 ms 32972 KB Output is correct
8 Correct 55 ms 32836 KB Output is correct
9 Correct 74 ms 33660 KB Output is correct
10 Correct 70 ms 32780 KB Output is correct
11 Correct 99 ms 33968 KB Output is correct
12 Correct 95 ms 33900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 14 ms 27860 KB Output is correct
2 Correct 14 ms 27860 KB Output is correct
3 Correct 15 ms 27852 KB Output is correct
4 Correct 14 ms 27876 KB Output is correct
5 Correct 13 ms 27860 KB Output is correct
6 Correct 14 ms 27920 KB Output is correct
7 Correct 14 ms 27932 KB Output is correct
8 Correct 17 ms 27872 KB Output is correct
9 Correct 14 ms 27860 KB Output is correct
10 Correct 14 ms 27860 KB Output is correct
11 Correct 17 ms 27888 KB Output is correct
12 Correct 18 ms 27868 KB Output is correct
13 Correct 14 ms 27860 KB Output is correct
14 Correct 14 ms 27860 KB Output is correct
15 Correct 14 ms 27820 KB Output is correct
16 Correct 14 ms 27864 KB Output is correct
17 Correct 14 ms 27872 KB Output is correct
18 Correct 14 ms 27860 KB Output is correct
19 Correct 13 ms 27872 KB Output is correct
20 Correct 14 ms 27940 KB Output is correct
21 Correct 14 ms 27952 KB Output is correct
22 Correct 15 ms 27872 KB Output is correct
23 Correct 15 ms 27860 KB Output is correct
24 Correct 16 ms 27944 KB Output is correct
25 Correct 14 ms 27872 KB Output is correct
26 Correct 14 ms 27884 KB Output is correct
27 Correct 16 ms 27860 KB Output is correct
28 Correct 16 ms 27856 KB Output is correct
29 Correct 14 ms 27872 KB Output is correct
30 Correct 16 ms 27876 KB Output is correct
31 Correct 15 ms 27860 KB Output is correct
32 Correct 15 ms 27868 KB Output is correct
33 Correct 14 ms 27876 KB Output is correct
34 Correct 15 ms 27928 KB Output is correct
35 Correct 18 ms 27928 KB Output is correct
36 Correct 15 ms 27924 KB Output is correct
37 Correct 14 ms 27788 KB Output is correct
38 Correct 14 ms 27924 KB Output is correct
39 Correct 72 ms 34112 KB Output is correct
40 Correct 91 ms 34084 KB Output is correct
41 Correct 87 ms 34056 KB Output is correct
42 Correct 77 ms 34104 KB Output is correct
43 Correct 72 ms 34096 KB Output is correct
44 Correct 74 ms 34080 KB Output is correct
45 Correct 49 ms 32716 KB Output is correct
46 Correct 50 ms 32580 KB Output is correct
47 Correct 87 ms 33996 KB Output is correct
48 Correct 73 ms 34140 KB Output is correct
49 Correct 79 ms 34160 KB Output is correct
50 Correct 89 ms 34104 KB Output is correct
51 Correct 68 ms 33416 KB Output is correct
52 Correct 68 ms 33996 KB Output is correct
53 Correct 70 ms 33944 KB Output is correct
54 Correct 77 ms 34264 KB Output is correct
55 Correct 79 ms 33496 KB Output is correct
56 Correct 61 ms 33236 KB Output is correct
57 Correct 35 ms 32040 KB Output is correct
58 Correct 43 ms 32352 KB Output is correct
59 Correct 76 ms 33880 KB Output is correct
60 Correct 82 ms 34028 KB Output is correct
61 Correct 77 ms 33968 KB Output is correct
62 Correct 79 ms 33908 KB Output is correct
63 Correct 83 ms 33972 KB Output is correct
64 Correct 83 ms 33916 KB Output is correct
65 Correct 52 ms 32852 KB Output is correct
66 Correct 96 ms 33484 KB Output is correct
67 Correct 73 ms 32716 KB Output is correct
68 Correct 76 ms 33352 KB Output is correct
69 Correct 95 ms 33980 KB Output is correct
70 Correct 129 ms 34016 KB Output is correct
71 Correct 71 ms 33264 KB Output is correct
72 Correct 107 ms 34272 KB Output is correct
73 Correct 101 ms 34184 KB Output is correct
74 Correct 106 ms 34528 KB Output is correct
75 Correct 96 ms 34600 KB Output is correct
76 Correct 81 ms 33204 KB Output is correct
77 Correct 93 ms 34004 KB Output is correct
78 Correct 91 ms 34568 KB Output is correct
79 Correct 53 ms 32972 KB Output is correct
80 Correct 55 ms 32836 KB Output is correct
81 Correct 74 ms 33660 KB Output is correct
82 Correct 70 ms 32780 KB Output is correct
83 Correct 99 ms 33968 KB Output is correct
84 Correct 95 ms 33900 KB Output is correct
85 Correct 93 ms 34068 KB Output is correct
86 Correct 122 ms 34472 KB Output is correct
87 Correct 101 ms 34056 KB Output is correct
88 Correct 101 ms 34568 KB Output is correct
89 Correct 67 ms 32992 KB Output is correct
90 Correct 101 ms 34484 KB Output is correct
91 Correct 96 ms 33548 KB Output is correct
92 Correct 89 ms 33328 KB Output is correct
93 Correct 97 ms 34516 KB Output is correct
94 Correct 93 ms 34476 KB Output is correct
95 Correct 95 ms 34312 KB Output is correct
96 Correct 95 ms 34516 KB Output is correct
97 Correct 86 ms 34480 KB Output is correct
98 Correct 70 ms 33752 KB Output is correct
99 Correct 55 ms 33340 KB Output is correct
100 Correct 67 ms 33092 KB Output is correct
101 Correct 74 ms 34044 KB Output is correct
102 Correct 82 ms 34080 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 14 ms 27860 KB Output is correct
2 Correct 14 ms 27860 KB Output is correct
3 Correct 15 ms 27852 KB Output is correct
4 Correct 14 ms 27876 KB Output is correct
5 Correct 13 ms 27860 KB Output is correct
6 Correct 14 ms 27920 KB Output is correct
7 Correct 14 ms 27932 KB Output is correct
8 Correct 17 ms 27872 KB Output is correct
9 Correct 14 ms 27860 KB Output is correct
10 Correct 14 ms 27860 KB Output is correct
11 Correct 17 ms 27888 KB Output is correct
12 Correct 18 ms 27868 KB Output is correct
13 Correct 14 ms 27860 KB Output is correct
14 Correct 14 ms 27860 KB Output is correct
15 Correct 14 ms 27820 KB Output is correct
16 Correct 14 ms 27864 KB Output is correct
17 Correct 14 ms 27872 KB Output is correct
18 Correct 14 ms 27860 KB Output is correct
19 Correct 13 ms 27872 KB Output is correct
20 Correct 14 ms 27940 KB Output is correct
21 Correct 14 ms 27952 KB Output is correct
22 Correct 15 ms 27872 KB Output is correct
23 Correct 15 ms 27860 KB Output is correct
24 Correct 16 ms 27944 KB Output is correct
25 Correct 14 ms 27872 KB Output is correct
26 Correct 14 ms 27884 KB Output is correct
27 Correct 16 ms 27860 KB Output is correct
28 Correct 16 ms 27856 KB Output is correct
29 Correct 14 ms 27872 KB Output is correct
30 Correct 16 ms 27876 KB Output is correct
31 Correct 15 ms 27860 KB Output is correct
32 Correct 15 ms 27868 KB Output is correct
33 Correct 14 ms 27876 KB Output is correct
34 Correct 15 ms 27928 KB Output is correct
35 Correct 18 ms 27928 KB Output is correct
36 Correct 15 ms 27924 KB Output is correct
37 Correct 14 ms 27788 KB Output is correct
38 Correct 14 ms 27924 KB Output is correct
39 Correct 72 ms 34112 KB Output is correct
40 Correct 91 ms 34084 KB Output is correct
41 Correct 87 ms 34056 KB Output is correct
42 Correct 77 ms 34104 KB Output is correct
43 Correct 72 ms 34096 KB Output is correct
44 Correct 74 ms 34080 KB Output is correct
45 Correct 49 ms 32716 KB Output is correct
46 Correct 50 ms 32580 KB Output is correct
47 Correct 87 ms 33996 KB Output is correct
48 Correct 73 ms 34140 KB Output is correct
49 Correct 79 ms 34160 KB Output is correct
50 Correct 89 ms 34104 KB Output is correct
51 Correct 68 ms 33416 KB Output is correct
52 Correct 68 ms 33996 KB Output is correct
53 Correct 70 ms 33944 KB Output is correct
54 Correct 77 ms 34264 KB Output is correct
55 Correct 358 ms 52404 KB Output is correct
56 Correct 270 ms 49276 KB Output is correct
57 Correct 371 ms 54028 KB Output is correct
58 Correct 314 ms 49556 KB Output is correct
59 Correct 276 ms 49412 KB Output is correct
60 Correct 437 ms 54120 KB Output is correct
61 Correct 149 ms 47672 KB Output is correct
62 Correct 145 ms 47576 KB Output is correct
63 Correct 384 ms 54132 KB Output is correct
64 Correct 387 ms 54052 KB Output is correct
65 Correct 369 ms 53596 KB Output is correct
66 Correct 396 ms 54048 KB Output is correct
67 Correct 378 ms 53584 KB Output is correct
68 Correct 365 ms 54032 KB Output is correct
69 Correct 377 ms 53960 KB Output is correct
70 Correct 385 ms 53956 KB Output is correct
71 Correct 384 ms 53960 KB Output is correct
72 Correct 400 ms 53804 KB Output is correct
73 Correct 391 ms 54084 KB Output is correct
74 Correct 420 ms 53792 KB Output is correct
75 Correct 390 ms 53988 KB Output is correct
76 Correct 379 ms 53968 KB Output is correct
77 Correct 379 ms 54064 KB Output is correct
78 Correct 381 ms 53952 KB Output is correct
79 Correct 299 ms 51668 KB Output is correct
80 Correct 305 ms 51948 KB Output is correct
81 Correct 288 ms 51984 KB Output is correct
82 Correct 79 ms 33496 KB Output is correct
83 Correct 61 ms 33236 KB Output is correct
84 Correct 35 ms 32040 KB Output is correct
85 Correct 43 ms 32352 KB Output is correct
86 Correct 76 ms 33880 KB Output is correct
87 Correct 82 ms 34028 KB Output is correct
88 Correct 77 ms 33968 KB Output is correct
89 Correct 79 ms 33908 KB Output is correct
90 Correct 83 ms 33972 KB Output is correct
91 Correct 83 ms 33916 KB Output is correct
92 Correct 52 ms 32852 KB Output is correct
93 Correct 96 ms 33484 KB Output is correct
94 Correct 73 ms 32716 KB Output is correct
95 Correct 76 ms 33352 KB Output is correct
96 Correct 95 ms 33980 KB Output is correct
97 Correct 129 ms 34016 KB Output is correct
98 Correct 71 ms 33264 KB Output is correct
99 Correct 107 ms 34272 KB Output is correct
100 Correct 101 ms 34184 KB Output is correct
101 Correct 106 ms 34528 KB Output is correct
102 Correct 96 ms 34600 KB Output is correct
103 Correct 81 ms 33204 KB Output is correct
104 Correct 93 ms 34004 KB Output is correct
105 Correct 91 ms 34568 KB Output is correct
106 Correct 53 ms 32972 KB Output is correct
107 Correct 55 ms 32836 KB Output is correct
108 Correct 74 ms 33660 KB Output is correct
109 Correct 70 ms 32780 KB Output is correct
110 Correct 99 ms 33968 KB Output is correct
111 Correct 95 ms 33900 KB Output is correct
112 Correct 93 ms 34068 KB Output is correct
113 Correct 122 ms 34472 KB Output is correct
114 Correct 101 ms 34056 KB Output is correct
115 Correct 101 ms 34568 KB Output is correct
116 Correct 67 ms 32992 KB Output is correct
117 Correct 101 ms 34484 KB Output is correct
118 Correct 96 ms 33548 KB Output is correct
119 Correct 89 ms 33328 KB Output is correct
120 Correct 97 ms 34516 KB Output is correct
121 Correct 93 ms 34476 KB Output is correct
122 Correct 95 ms 34312 KB Output is correct
123 Correct 95 ms 34516 KB Output is correct
124 Correct 86 ms 34480 KB Output is correct
125 Correct 70 ms 33752 KB Output is correct
126 Correct 55 ms 33340 KB Output is correct
127 Correct 67 ms 33092 KB Output is correct
128 Correct 74 ms 34044 KB Output is correct
129 Correct 82 ms 34080 KB Output is correct
130 Correct 397 ms 54660 KB Output is correct
131 Correct 279 ms 49520 KB Output is correct
132 Correct 393 ms 54664 KB Output is correct
133 Correct 382 ms 54136 KB Output is correct
134 Correct 334 ms 52332 KB Output is correct
135 Correct 425 ms 54992 KB Output is correct
136 Correct 370 ms 54992 KB Output is correct
137 Correct 394 ms 55036 KB Output is correct
138 Correct 402 ms 54216 KB Output is correct
139 Correct 395 ms 54604 KB Output is correct
140 Correct 381 ms 54176 KB Output is correct
141 Correct 386 ms 54596 KB Output is correct
142 Correct 385 ms 54524 KB Output is correct
143 Correct 388 ms 54536 KB Output is correct
144 Correct 382 ms 54348 KB Output is correct
145 Correct 368 ms 54576 KB Output is correct
146 Correct 374 ms 54492 KB Output is correct
147 Correct 373 ms 54520 KB Output is correct
148 Correct 402 ms 54656 KB Output is correct
149 Correct 386 ms 54548 KB Output is correct
150 Correct 200 ms 50164 KB Output is correct
151 Correct 300 ms 52560 KB Output is correct
152 Correct 302 ms 52644 KB Output is correct
153 Correct 294 ms 52960 KB Output is correct