Submission #367367

# Submission time Handle Problem Language Result Execution time Memory
367367 2021-02-17T01:20:58 Z 534351 Arcade (NOI20_arcade) C++17
85 / 100
1000 ms 11076 KB
#include <bits/stdc++.h>

using namespace std;

template<class T, class U>
void ckmin(T &a, U b)
{
    if (a > b) a = b;
}

template<class T, class U>
void ckmax(T &a, U b)
{
    if (a < b) a = b;
}

#define MP make_pair
#define PB push_back
#define LB lower_bound
#define UB upper_bound
#define fi first
#define se second
#define SZ(x) ((int) (x).size())
#define ALL(x) (x).begin(), (x).end()
#define FOR(i, a, b) for (auto i = (a); i < (b); i++)
#define FORD(i, a, b) for (auto i = (a) - 1; i >= (b); i--)

const int MAXN = 1e6 + 13;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpi;
typedef vector<pll> vpl;

int N;
pii arr[MAXN];
multiset<int> vals;
int ans;

int32_t main()
{
    cout << fixed << setprecision(12);
    cerr << fixed << setprecision(4);
    ios_base::sync_with_stdio(false); cin.tie(0);
    cin >> N >> N;
    FOR(i, 0, N)
    {
        cin >> arr[i].fi;
    }
    FOR(i, 0, N)
    {
        cin >> arr[i].se;
    }
    FOR(i, 0, N)
    {
        arr[i] = {arr[i].fi + arr[i].se, arr[i].fi - arr[i].se};
        cerr << arr[i].fi << ',' << arr[i].se << endl;
    }
    sort(arr, arr + N);
    FOR(i, 0, N)
    {
        int c = arr[i].se;
        if (vals.empty() || c < *vals.begin())
        {
            vals.insert(c);
            ans++;
        }
        else
        {
            auto it = prev(vals.UB(c));
            vals.erase(it);
            vals.insert(c);
        }
    }
    cout << ans << '\n';
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 424 KB Output is correct
4 Correct 2 ms 364 KB Output is correct
5 Correct 2 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 384 KB Output is correct
13 Correct 2 ms 492 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 2 ms 380 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 424 KB Output is correct
4 Correct 2 ms 364 KB Output is correct
5 Correct 2 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 384 KB Output is correct
13 Correct 2 ms 492 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 2 ms 380 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
34 Correct 1 ms 364 KB Output is correct
35 Correct 1 ms 384 KB Output is correct
36 Correct 1 ms 364 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 1 ms 364 KB Output is correct
39 Correct 1 ms 364 KB Output is correct
40 Correct 1 ms 364 KB Output is correct
41 Correct 1 ms 364 KB Output is correct
42 Correct 1 ms 364 KB Output is correct
43 Correct 1 ms 364 KB Output is correct
44 Correct 1 ms 364 KB Output is correct
45 Correct 1 ms 364 KB Output is correct
46 Correct 2 ms 364 KB Output is correct
47 Correct 1 ms 364 KB Output is correct
48 Correct 1 ms 364 KB Output is correct
49 Correct 1 ms 364 KB Output is correct
50 Correct 1 ms 364 KB Output is correct
51 Correct 1 ms 364 KB Output is correct
52 Correct 1 ms 364 KB Output is correct
53 Correct 1 ms 364 KB Output is correct
54 Correct 1 ms 364 KB Output is correct
55 Correct 1 ms 364 KB Output is correct
56 Correct 1 ms 364 KB Output is correct
57 Correct 1 ms 384 KB Output is correct
58 Correct 1 ms 364 KB Output is correct
59 Correct 1 ms 364 KB Output is correct
60 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 424 KB Output is correct
4 Correct 2 ms 364 KB Output is correct
5 Correct 2 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 384 KB Output is correct
13 Correct 2 ms 492 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 2 ms 380 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
34 Correct 1 ms 364 KB Output is correct
35 Correct 1 ms 384 KB Output is correct
36 Correct 1 ms 364 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 1 ms 364 KB Output is correct
39 Correct 1 ms 364 KB Output is correct
40 Correct 1 ms 364 KB Output is correct
41 Correct 1 ms 364 KB Output is correct
42 Correct 1 ms 364 KB Output is correct
43 Correct 1 ms 364 KB Output is correct
44 Correct 1 ms 364 KB Output is correct
45 Correct 1 ms 364 KB Output is correct
46 Correct 2 ms 364 KB Output is correct
47 Correct 1 ms 364 KB Output is correct
48 Correct 1 ms 364 KB Output is correct
49 Correct 1 ms 364 KB Output is correct
50 Correct 1 ms 364 KB Output is correct
51 Correct 1 ms 364 KB Output is correct
52 Correct 1 ms 364 KB Output is correct
53 Correct 1 ms 364 KB Output is correct
54 Correct 1 ms 364 KB Output is correct
55 Correct 1 ms 364 KB Output is correct
56 Correct 1 ms 364 KB Output is correct
57 Correct 1 ms 384 KB Output is correct
58 Correct 1 ms 364 KB Output is correct
59 Correct 1 ms 364 KB Output is correct
60 Correct 1 ms 364 KB Output is correct
61 Correct 2 ms 364 KB Output is correct
62 Correct 1 ms 364 KB Output is correct
63 Correct 1 ms 364 KB Output is correct
64 Correct 1 ms 364 KB Output is correct
65 Correct 1 ms 364 KB Output is correct
66 Correct 1 ms 364 KB Output is correct
67 Correct 1 ms 364 KB Output is correct
68 Correct 1 ms 364 KB Output is correct
69 Correct 1 ms 364 KB Output is correct
70 Correct 1 ms 364 KB Output is correct
71 Correct 1 ms 364 KB Output is correct
72 Correct 1 ms 364 KB Output is correct
73 Correct 1 ms 364 KB Output is correct
74 Correct 1 ms 364 KB Output is correct
75 Correct 1 ms 364 KB Output is correct
76 Correct 1 ms 364 KB Output is correct
77 Correct 1 ms 364 KB Output is correct
78 Correct 1 ms 364 KB Output is correct
79 Correct 1 ms 364 KB Output is correct
80 Correct 1 ms 364 KB Output is correct
81 Correct 1 ms 364 KB Output is correct
82 Correct 1 ms 364 KB Output is correct
83 Correct 1 ms 364 KB Output is correct
84 Correct 1 ms 364 KB Output is correct
85 Correct 1 ms 364 KB Output is correct
86 Correct 2 ms 364 KB Output is correct
87 Correct 1 ms 364 KB Output is correct
88 Correct 1 ms 364 KB Output is correct
89 Correct 1 ms 364 KB Output is correct
90 Correct 1 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 424 KB Output is correct
4 Correct 2 ms 364 KB Output is correct
5 Correct 2 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 384 KB Output is correct
13 Correct 2 ms 492 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 2 ms 380 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
34 Correct 1 ms 364 KB Output is correct
35 Correct 1 ms 384 KB Output is correct
36 Correct 1 ms 364 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 1 ms 364 KB Output is correct
39 Correct 1 ms 364 KB Output is correct
40 Correct 1 ms 364 KB Output is correct
41 Correct 1 ms 364 KB Output is correct
42 Correct 1 ms 364 KB Output is correct
43 Correct 1 ms 364 KB Output is correct
44 Correct 1 ms 364 KB Output is correct
45 Correct 1 ms 364 KB Output is correct
46 Correct 2 ms 364 KB Output is correct
47 Correct 1 ms 364 KB Output is correct
48 Correct 1 ms 364 KB Output is correct
49 Correct 1 ms 364 KB Output is correct
50 Correct 1 ms 364 KB Output is correct
51 Correct 1 ms 364 KB Output is correct
52 Correct 1 ms 364 KB Output is correct
53 Correct 1 ms 364 KB Output is correct
54 Correct 1 ms 364 KB Output is correct
55 Correct 1 ms 364 KB Output is correct
56 Correct 1 ms 364 KB Output is correct
57 Correct 1 ms 384 KB Output is correct
58 Correct 1 ms 364 KB Output is correct
59 Correct 1 ms 364 KB Output is correct
60 Correct 1 ms 364 KB Output is correct
61 Correct 2 ms 364 KB Output is correct
62 Correct 1 ms 364 KB Output is correct
63 Correct 1 ms 364 KB Output is correct
64 Correct 1 ms 364 KB Output is correct
65 Correct 1 ms 364 KB Output is correct
66 Correct 1 ms 364 KB Output is correct
67 Correct 1 ms 364 KB Output is correct
68 Correct 1 ms 364 KB Output is correct
69 Correct 1 ms 364 KB Output is correct
70 Correct 1 ms 364 KB Output is correct
71 Correct 1 ms 364 KB Output is correct
72 Correct 1 ms 364 KB Output is correct
73 Correct 1 ms 364 KB Output is correct
74 Correct 1 ms 364 KB Output is correct
75 Correct 1 ms 364 KB Output is correct
76 Correct 1 ms 364 KB Output is correct
77 Correct 1 ms 364 KB Output is correct
78 Correct 1 ms 364 KB Output is correct
79 Correct 1 ms 364 KB Output is correct
80 Correct 1 ms 364 KB Output is correct
81 Correct 1 ms 364 KB Output is correct
82 Correct 1 ms 364 KB Output is correct
83 Correct 1 ms 364 KB Output is correct
84 Correct 1 ms 364 KB Output is correct
85 Correct 1 ms 364 KB Output is correct
86 Correct 2 ms 364 KB Output is correct
87 Correct 1 ms 364 KB Output is correct
88 Correct 1 ms 364 KB Output is correct
89 Correct 1 ms 364 KB Output is correct
90 Correct 1 ms 364 KB Output is correct
91 Correct 3 ms 364 KB Output is correct
92 Correct 3 ms 364 KB Output is correct
93 Correct 3 ms 364 KB Output is correct
94 Correct 3 ms 364 KB Output is correct
95 Correct 5 ms 364 KB Output is correct
96 Correct 3 ms 364 KB Output is correct
97 Correct 3 ms 364 KB Output is correct
98 Correct 2 ms 364 KB Output is correct
99 Correct 2 ms 364 KB Output is correct
100 Correct 2 ms 364 KB Output is correct
101 Correct 2 ms 364 KB Output is correct
102 Correct 3 ms 364 KB Output is correct
103 Correct 1 ms 364 KB Output is correct
104 Correct 3 ms 364 KB Output is correct
105 Correct 3 ms 364 KB Output is correct
106 Correct 3 ms 364 KB Output is correct
107 Correct 4 ms 364 KB Output is correct
108 Correct 3 ms 364 KB Output is correct
109 Correct 3 ms 364 KB Output is correct
110 Correct 3 ms 364 KB Output is correct
111 Correct 3 ms 364 KB Output is correct
112 Correct 3 ms 364 KB Output is correct
113 Correct 3 ms 364 KB Output is correct
114 Correct 3 ms 364 KB Output is correct
115 Correct 3 ms 364 KB Output is correct
116 Correct 3 ms 492 KB Output is correct
117 Correct 3 ms 364 KB Output is correct
118 Correct 3 ms 364 KB Output is correct
119 Correct 3 ms 364 KB Output is correct
120 Correct 3 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 424 KB Output is correct
4 Correct 2 ms 364 KB Output is correct
5 Correct 2 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 384 KB Output is correct
13 Correct 2 ms 492 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 2 ms 380 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
34 Correct 1 ms 364 KB Output is correct
35 Correct 1 ms 384 KB Output is correct
36 Correct 1 ms 364 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 1 ms 364 KB Output is correct
39 Correct 1 ms 364 KB Output is correct
40 Correct 1 ms 364 KB Output is correct
41 Correct 1 ms 364 KB Output is correct
42 Correct 1 ms 364 KB Output is correct
43 Correct 1 ms 364 KB Output is correct
44 Correct 1 ms 364 KB Output is correct
45 Correct 1 ms 364 KB Output is correct
46 Correct 2 ms 364 KB Output is correct
47 Correct 1 ms 364 KB Output is correct
48 Correct 1 ms 364 KB Output is correct
49 Correct 1 ms 364 KB Output is correct
50 Correct 1 ms 364 KB Output is correct
51 Correct 1 ms 364 KB Output is correct
52 Correct 1 ms 364 KB Output is correct
53 Correct 1 ms 364 KB Output is correct
54 Correct 1 ms 364 KB Output is correct
55 Correct 1 ms 364 KB Output is correct
56 Correct 1 ms 364 KB Output is correct
57 Correct 1 ms 384 KB Output is correct
58 Correct 1 ms 364 KB Output is correct
59 Correct 1 ms 364 KB Output is correct
60 Correct 1 ms 364 KB Output is correct
61 Correct 2 ms 364 KB Output is correct
62 Correct 1 ms 364 KB Output is correct
63 Correct 1 ms 364 KB Output is correct
64 Correct 1 ms 364 KB Output is correct
65 Correct 1 ms 364 KB Output is correct
66 Correct 1 ms 364 KB Output is correct
67 Correct 1 ms 364 KB Output is correct
68 Correct 1 ms 364 KB Output is correct
69 Correct 1 ms 364 KB Output is correct
70 Correct 1 ms 364 KB Output is correct
71 Correct 1 ms 364 KB Output is correct
72 Correct 1 ms 364 KB Output is correct
73 Correct 1 ms 364 KB Output is correct
74 Correct 1 ms 364 KB Output is correct
75 Correct 1 ms 364 KB Output is correct
76 Correct 1 ms 364 KB Output is correct
77 Correct 1 ms 364 KB Output is correct
78 Correct 1 ms 364 KB Output is correct
79 Correct 1 ms 364 KB Output is correct
80 Correct 1 ms 364 KB Output is correct
81 Correct 1 ms 364 KB Output is correct
82 Correct 1 ms 364 KB Output is correct
83 Correct 1 ms 364 KB Output is correct
84 Correct 1 ms 364 KB Output is correct
85 Correct 1 ms 364 KB Output is correct
86 Correct 2 ms 364 KB Output is correct
87 Correct 1 ms 364 KB Output is correct
88 Correct 1 ms 364 KB Output is correct
89 Correct 1 ms 364 KB Output is correct
90 Correct 1 ms 364 KB Output is correct
91 Correct 3 ms 364 KB Output is correct
92 Correct 3 ms 364 KB Output is correct
93 Correct 3 ms 364 KB Output is correct
94 Correct 3 ms 364 KB Output is correct
95 Correct 5 ms 364 KB Output is correct
96 Correct 3 ms 364 KB Output is correct
97 Correct 3 ms 364 KB Output is correct
98 Correct 2 ms 364 KB Output is correct
99 Correct 2 ms 364 KB Output is correct
100 Correct 2 ms 364 KB Output is correct
101 Correct 2 ms 364 KB Output is correct
102 Correct 3 ms 364 KB Output is correct
103 Correct 1 ms 364 KB Output is correct
104 Correct 3 ms 364 KB Output is correct
105 Correct 3 ms 364 KB Output is correct
106 Correct 3 ms 364 KB Output is correct
107 Correct 4 ms 364 KB Output is correct
108 Correct 3 ms 364 KB Output is correct
109 Correct 3 ms 364 KB Output is correct
110 Correct 3 ms 364 KB Output is correct
111 Correct 3 ms 364 KB Output is correct
112 Correct 3 ms 364 KB Output is correct
113 Correct 3 ms 364 KB Output is correct
114 Correct 3 ms 364 KB Output is correct
115 Correct 3 ms 364 KB Output is correct
116 Correct 3 ms 492 KB Output is correct
117 Correct 3 ms 364 KB Output is correct
118 Correct 3 ms 364 KB Output is correct
119 Correct 3 ms 364 KB Output is correct
120 Correct 3 ms 364 KB Output is correct
121 Correct 139 ms 876 KB Output is correct
122 Correct 141 ms 864 KB Output is correct
123 Correct 123 ms 748 KB Output is correct
124 Correct 127 ms 748 KB Output is correct
125 Correct 135 ms 876 KB Output is correct
126 Correct 139 ms 748 KB Output is correct
127 Correct 127 ms 876 KB Output is correct
128 Correct 104 ms 876 KB Output is correct
129 Correct 60 ms 620 KB Output is correct
130 Correct 1 ms 364 KB Output is correct
131 Correct 104 ms 876 KB Output is correct
132 Correct 126 ms 876 KB Output is correct
133 Correct 14 ms 364 KB Output is correct
134 Correct 128 ms 1132 KB Output is correct
135 Correct 13 ms 364 KB Output is correct
136 Correct 126 ms 1440 KB Output is correct
137 Correct 130 ms 1516 KB Output is correct
138 Correct 132 ms 1516 KB Output is correct
139 Correct 134 ms 1516 KB Output is correct
140 Correct 129 ms 1516 KB Output is correct
141 Correct 132 ms 1792 KB Output is correct
142 Correct 135 ms 1516 KB Output is correct
143 Correct 127 ms 968 KB Output is correct
144 Correct 134 ms 1516 KB Output is correct
145 Correct 139 ms 876 KB Output is correct
146 Correct 133 ms 876 KB Output is correct
147 Correct 127 ms 876 KB Output is correct
148 Correct 128 ms 748 KB Output is correct
149 Correct 133 ms 892 KB Output is correct
150 Correct 122 ms 748 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 424 KB Output is correct
4 Correct 2 ms 364 KB Output is correct
5 Correct 2 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 384 KB Output is correct
13 Correct 2 ms 492 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 2 ms 380 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
34 Correct 1 ms 364 KB Output is correct
35 Correct 1 ms 384 KB Output is correct
36 Correct 1 ms 364 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 1 ms 364 KB Output is correct
39 Correct 1 ms 364 KB Output is correct
40 Correct 1 ms 364 KB Output is correct
41 Correct 1 ms 364 KB Output is correct
42 Correct 1 ms 364 KB Output is correct
43 Correct 1 ms 364 KB Output is correct
44 Correct 1 ms 364 KB Output is correct
45 Correct 1 ms 364 KB Output is correct
46 Correct 2 ms 364 KB Output is correct
47 Correct 1 ms 364 KB Output is correct
48 Correct 1 ms 364 KB Output is correct
49 Correct 1 ms 364 KB Output is correct
50 Correct 1 ms 364 KB Output is correct
51 Correct 1 ms 364 KB Output is correct
52 Correct 1 ms 364 KB Output is correct
53 Correct 1 ms 364 KB Output is correct
54 Correct 1 ms 364 KB Output is correct
55 Correct 1 ms 364 KB Output is correct
56 Correct 1 ms 364 KB Output is correct
57 Correct 1 ms 384 KB Output is correct
58 Correct 1 ms 364 KB Output is correct
59 Correct 1 ms 364 KB Output is correct
60 Correct 1 ms 364 KB Output is correct
61 Correct 2 ms 364 KB Output is correct
62 Correct 1 ms 364 KB Output is correct
63 Correct 1 ms 364 KB Output is correct
64 Correct 1 ms 364 KB Output is correct
65 Correct 1 ms 364 KB Output is correct
66 Correct 1 ms 364 KB Output is correct
67 Correct 1 ms 364 KB Output is correct
68 Correct 1 ms 364 KB Output is correct
69 Correct 1 ms 364 KB Output is correct
70 Correct 1 ms 364 KB Output is correct
71 Correct 1 ms 364 KB Output is correct
72 Correct 1 ms 364 KB Output is correct
73 Correct 1 ms 364 KB Output is correct
74 Correct 1 ms 364 KB Output is correct
75 Correct 1 ms 364 KB Output is correct
76 Correct 1 ms 364 KB Output is correct
77 Correct 1 ms 364 KB Output is correct
78 Correct 1 ms 364 KB Output is correct
79 Correct 1 ms 364 KB Output is correct
80 Correct 1 ms 364 KB Output is correct
81 Correct 1 ms 364 KB Output is correct
82 Correct 1 ms 364 KB Output is correct
83 Correct 1 ms 364 KB Output is correct
84 Correct 1 ms 364 KB Output is correct
85 Correct 1 ms 364 KB Output is correct
86 Correct 2 ms 364 KB Output is correct
87 Correct 1 ms 364 KB Output is correct
88 Correct 1 ms 364 KB Output is correct
89 Correct 1 ms 364 KB Output is correct
90 Correct 1 ms 364 KB Output is correct
91 Correct 3 ms 364 KB Output is correct
92 Correct 3 ms 364 KB Output is correct
93 Correct 3 ms 364 KB Output is correct
94 Correct 3 ms 364 KB Output is correct
95 Correct 5 ms 364 KB Output is correct
96 Correct 3 ms 364 KB Output is correct
97 Correct 3 ms 364 KB Output is correct
98 Correct 2 ms 364 KB Output is correct
99 Correct 2 ms 364 KB Output is correct
100 Correct 2 ms 364 KB Output is correct
101 Correct 2 ms 364 KB Output is correct
102 Correct 3 ms 364 KB Output is correct
103 Correct 1 ms 364 KB Output is correct
104 Correct 3 ms 364 KB Output is correct
105 Correct 3 ms 364 KB Output is correct
106 Correct 3 ms 364 KB Output is correct
107 Correct 4 ms 364 KB Output is correct
108 Correct 3 ms 364 KB Output is correct
109 Correct 3 ms 364 KB Output is correct
110 Correct 3 ms 364 KB Output is correct
111 Correct 3 ms 364 KB Output is correct
112 Correct 3 ms 364 KB Output is correct
113 Correct 3 ms 364 KB Output is correct
114 Correct 3 ms 364 KB Output is correct
115 Correct 3 ms 364 KB Output is correct
116 Correct 3 ms 492 KB Output is correct
117 Correct 3 ms 364 KB Output is correct
118 Correct 3 ms 364 KB Output is correct
119 Correct 3 ms 364 KB Output is correct
120 Correct 3 ms 364 KB Output is correct
121 Correct 139 ms 876 KB Output is correct
122 Correct 141 ms 864 KB Output is correct
123 Correct 123 ms 748 KB Output is correct
124 Correct 127 ms 748 KB Output is correct
125 Correct 135 ms 876 KB Output is correct
126 Correct 139 ms 748 KB Output is correct
127 Correct 127 ms 876 KB Output is correct
128 Correct 104 ms 876 KB Output is correct
129 Correct 60 ms 620 KB Output is correct
130 Correct 1 ms 364 KB Output is correct
131 Correct 104 ms 876 KB Output is correct
132 Correct 126 ms 876 KB Output is correct
133 Correct 14 ms 364 KB Output is correct
134 Correct 128 ms 1132 KB Output is correct
135 Correct 13 ms 364 KB Output is correct
136 Correct 126 ms 1440 KB Output is correct
137 Correct 130 ms 1516 KB Output is correct
138 Correct 132 ms 1516 KB Output is correct
139 Correct 134 ms 1516 KB Output is correct
140 Correct 129 ms 1516 KB Output is correct
141 Correct 132 ms 1792 KB Output is correct
142 Correct 135 ms 1516 KB Output is correct
143 Correct 127 ms 968 KB Output is correct
144 Correct 134 ms 1516 KB Output is correct
145 Correct 139 ms 876 KB Output is correct
146 Correct 133 ms 876 KB Output is correct
147 Correct 127 ms 876 KB Output is correct
148 Correct 128 ms 748 KB Output is correct
149 Correct 133 ms 892 KB Output is correct
150 Correct 122 ms 748 KB Output is correct
151 Correct 888 ms 4844 KB Output is correct
152 Correct 822 ms 4716 KB Output is correct
153 Correct 875 ms 4972 KB Output is correct
154 Correct 900 ms 5192 KB Output is correct
155 Correct 888 ms 4948 KB Output is correct
156 Correct 909 ms 4972 KB Output is correct
157 Correct 912 ms 5356 KB Output is correct
158 Correct 26 ms 492 KB Output is correct
159 Correct 679 ms 3948 KB Output is correct
160 Correct 770 ms 4460 KB Output is correct
161 Correct 486 ms 2924 KB Output is correct
162 Correct 897 ms 5216 KB Output is correct
163 Correct 436 ms 2544 KB Output is correct
164 Correct 258 ms 1772 KB Output is correct
165 Correct 449 ms 2796 KB Output is correct
166 Correct 891 ms 9324 KB Output is correct
167 Correct 948 ms 9708 KB Output is correct
168 Correct 917 ms 9752 KB Output is correct
169 Correct 890 ms 9452 KB Output is correct
170 Correct 901 ms 9452 KB Output is correct
171 Correct 885 ms 9580 KB Output is correct
172 Correct 927 ms 9580 KB Output is correct
173 Correct 926 ms 5228 KB Output is correct
174 Correct 897 ms 9388 KB Output is correct
175 Correct 918 ms 5228 KB Output is correct
176 Correct 905 ms 5228 KB Output is correct
177 Correct 827 ms 4716 KB Output is correct
178 Correct 814 ms 4992 KB Output is correct
179 Correct 864 ms 4920 KB Output is correct
180 Correct 912 ms 5228 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 424 KB Output is correct
4 Correct 2 ms 364 KB Output is correct
5 Correct 2 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 1 ms 364 KB Output is correct
12 Correct 1 ms 384 KB Output is correct
13 Correct 2 ms 492 KB Output is correct
14 Correct 2 ms 376 KB Output is correct
15 Correct 1 ms 364 KB Output is correct
16 Correct 1 ms 364 KB Output is correct
17 Correct 1 ms 364 KB Output is correct
18 Correct 1 ms 364 KB Output is correct
19 Correct 1 ms 364 KB Output is correct
20 Correct 1 ms 364 KB Output is correct
21 Correct 1 ms 364 KB Output is correct
22 Correct 1 ms 364 KB Output is correct
23 Correct 1 ms 364 KB Output is correct
24 Correct 2 ms 380 KB Output is correct
25 Correct 1 ms 364 KB Output is correct
26 Correct 1 ms 364 KB Output is correct
27 Correct 1 ms 364 KB Output is correct
28 Correct 1 ms 364 KB Output is correct
29 Correct 1 ms 364 KB Output is correct
30 Correct 1 ms 364 KB Output is correct
31 Correct 1 ms 364 KB Output is correct
32 Correct 1 ms 364 KB Output is correct
33 Correct 1 ms 364 KB Output is correct
34 Correct 1 ms 364 KB Output is correct
35 Correct 1 ms 384 KB Output is correct
36 Correct 1 ms 364 KB Output is correct
37 Correct 1 ms 364 KB Output is correct
38 Correct 1 ms 364 KB Output is correct
39 Correct 1 ms 364 KB Output is correct
40 Correct 1 ms 364 KB Output is correct
41 Correct 1 ms 364 KB Output is correct
42 Correct 1 ms 364 KB Output is correct
43 Correct 1 ms 364 KB Output is correct
44 Correct 1 ms 364 KB Output is correct
45 Correct 1 ms 364 KB Output is correct
46 Correct 2 ms 364 KB Output is correct
47 Correct 1 ms 364 KB Output is correct
48 Correct 1 ms 364 KB Output is correct
49 Correct 1 ms 364 KB Output is correct
50 Correct 1 ms 364 KB Output is correct
51 Correct 1 ms 364 KB Output is correct
52 Correct 1 ms 364 KB Output is correct
53 Correct 1 ms 364 KB Output is correct
54 Correct 1 ms 364 KB Output is correct
55 Correct 1 ms 364 KB Output is correct
56 Correct 1 ms 364 KB Output is correct
57 Correct 1 ms 384 KB Output is correct
58 Correct 1 ms 364 KB Output is correct
59 Correct 1 ms 364 KB Output is correct
60 Correct 1 ms 364 KB Output is correct
61 Correct 2 ms 364 KB Output is correct
62 Correct 1 ms 364 KB Output is correct
63 Correct 1 ms 364 KB Output is correct
64 Correct 1 ms 364 KB Output is correct
65 Correct 1 ms 364 KB Output is correct
66 Correct 1 ms 364 KB Output is correct
67 Correct 1 ms 364 KB Output is correct
68 Correct 1 ms 364 KB Output is correct
69 Correct 1 ms 364 KB Output is correct
70 Correct 1 ms 364 KB Output is correct
71 Correct 1 ms 364 KB Output is correct
72 Correct 1 ms 364 KB Output is correct
73 Correct 1 ms 364 KB Output is correct
74 Correct 1 ms 364 KB Output is correct
75 Correct 1 ms 364 KB Output is correct
76 Correct 1 ms 364 KB Output is correct
77 Correct 1 ms 364 KB Output is correct
78 Correct 1 ms 364 KB Output is correct
79 Correct 1 ms 364 KB Output is correct
80 Correct 1 ms 364 KB Output is correct
81 Correct 1 ms 364 KB Output is correct
82 Correct 1 ms 364 KB Output is correct
83 Correct 1 ms 364 KB Output is correct
84 Correct 1 ms 364 KB Output is correct
85 Correct 1 ms 364 KB Output is correct
86 Correct 2 ms 364 KB Output is correct
87 Correct 1 ms 364 KB Output is correct
88 Correct 1 ms 364 KB Output is correct
89 Correct 1 ms 364 KB Output is correct
90 Correct 1 ms 364 KB Output is correct
91 Correct 3 ms 364 KB Output is correct
92 Correct 3 ms 364 KB Output is correct
93 Correct 3 ms 364 KB Output is correct
94 Correct 3 ms 364 KB Output is correct
95 Correct 5 ms 364 KB Output is correct
96 Correct 3 ms 364 KB Output is correct
97 Correct 3 ms 364 KB Output is correct
98 Correct 2 ms 364 KB Output is correct
99 Correct 2 ms 364 KB Output is correct
100 Correct 2 ms 364 KB Output is correct
101 Correct 2 ms 364 KB Output is correct
102 Correct 3 ms 364 KB Output is correct
103 Correct 1 ms 364 KB Output is correct
104 Correct 3 ms 364 KB Output is correct
105 Correct 3 ms 364 KB Output is correct
106 Correct 3 ms 364 KB Output is correct
107 Correct 4 ms 364 KB Output is correct
108 Correct 3 ms 364 KB Output is correct
109 Correct 3 ms 364 KB Output is correct
110 Correct 3 ms 364 KB Output is correct
111 Correct 3 ms 364 KB Output is correct
112 Correct 3 ms 364 KB Output is correct
113 Correct 3 ms 364 KB Output is correct
114 Correct 3 ms 364 KB Output is correct
115 Correct 3 ms 364 KB Output is correct
116 Correct 3 ms 492 KB Output is correct
117 Correct 3 ms 364 KB Output is correct
118 Correct 3 ms 364 KB Output is correct
119 Correct 3 ms 364 KB Output is correct
120 Correct 3 ms 364 KB Output is correct
121 Correct 139 ms 876 KB Output is correct
122 Correct 141 ms 864 KB Output is correct
123 Correct 123 ms 748 KB Output is correct
124 Correct 127 ms 748 KB Output is correct
125 Correct 135 ms 876 KB Output is correct
126 Correct 139 ms 748 KB Output is correct
127 Correct 127 ms 876 KB Output is correct
128 Correct 104 ms 876 KB Output is correct
129 Correct 60 ms 620 KB Output is correct
130 Correct 1 ms 364 KB Output is correct
131 Correct 104 ms 876 KB Output is correct
132 Correct 126 ms 876 KB Output is correct
133 Correct 14 ms 364 KB Output is correct
134 Correct 128 ms 1132 KB Output is correct
135 Correct 13 ms 364 KB Output is correct
136 Correct 126 ms 1440 KB Output is correct
137 Correct 130 ms 1516 KB Output is correct
138 Correct 132 ms 1516 KB Output is correct
139 Correct 134 ms 1516 KB Output is correct
140 Correct 129 ms 1516 KB Output is correct
141 Correct 132 ms 1792 KB Output is correct
142 Correct 135 ms 1516 KB Output is correct
143 Correct 127 ms 968 KB Output is correct
144 Correct 134 ms 1516 KB Output is correct
145 Correct 139 ms 876 KB Output is correct
146 Correct 133 ms 876 KB Output is correct
147 Correct 127 ms 876 KB Output is correct
148 Correct 128 ms 748 KB Output is correct
149 Correct 133 ms 892 KB Output is correct
150 Correct 122 ms 748 KB Output is correct
151 Correct 888 ms 4844 KB Output is correct
152 Correct 822 ms 4716 KB Output is correct
153 Correct 875 ms 4972 KB Output is correct
154 Correct 900 ms 5192 KB Output is correct
155 Correct 888 ms 4948 KB Output is correct
156 Correct 909 ms 4972 KB Output is correct
157 Correct 912 ms 5356 KB Output is correct
158 Correct 26 ms 492 KB Output is correct
159 Correct 679 ms 3948 KB Output is correct
160 Correct 770 ms 4460 KB Output is correct
161 Correct 486 ms 2924 KB Output is correct
162 Correct 897 ms 5216 KB Output is correct
163 Correct 436 ms 2544 KB Output is correct
164 Correct 258 ms 1772 KB Output is correct
165 Correct 449 ms 2796 KB Output is correct
166 Correct 891 ms 9324 KB Output is correct
167 Correct 948 ms 9708 KB Output is correct
168 Correct 917 ms 9752 KB Output is correct
169 Correct 890 ms 9452 KB Output is correct
170 Correct 901 ms 9452 KB Output is correct
171 Correct 885 ms 9580 KB Output is correct
172 Correct 927 ms 9580 KB Output is correct
173 Correct 926 ms 5228 KB Output is correct
174 Correct 897 ms 9388 KB Output is correct
175 Correct 918 ms 5228 KB Output is correct
176 Correct 905 ms 5228 KB Output is correct
177 Correct 827 ms 4716 KB Output is correct
178 Correct 814 ms 4992 KB Output is correct
179 Correct 864 ms 4920 KB Output is correct
180 Correct 912 ms 5228 KB Output is correct
181 Execution timed out 1084 ms 11076 KB Time limit exceeded
182 Halted 0 ms 0 KB -