#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template<typename T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long int ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL)
#define pb push_back
#define endl '\n'
#define sz(a) (int)a.size()
#define setbits(x) __builtin_popcountll(x)
#define ff first
#define ss second
#define conts continue
#define ceil2(x,y) ((x+y-1)/(y))
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define yes cout << "Yes" << endl
#define no cout << "No" << endl
#define rep(i,n) for(int i = 0; i < n; ++i)
#define rep1(i,n) for(int i = 1; i <= n; ++i)
#define rev(i,s,e) for(int i = s; i >= e; --i)
#define trav(i,a) for(auto &i : a)
template<typename T>
void amin(T &a, T b) {
a = min(a,b);
}
template<typename T>
void amax(T &a, T b) {
a = max(a,b);
}
#ifdef LOCAL
#include "debug.h"
#else
#define debug(x) 42
#endif
/*
refs:
edi
*/
const int MOD = 1e9 + 7;
const int N = 1e5 + 5;
const int inf1 = int(1e9) + 5;
const ll inf2 = ll(1e18) + 5;
struct two_max{
pii a,b;
two_max(){
a = b = {-1,-1};
}
void insert(pii p){
if(p.ss == a.ss or p.ss == b.ss) return;
if(p > a){
b = a;
a = p;
}
else{
amax(b,p);
}
}
};
two_max merge(two_max tm1, two_max tm2){
tm1.insert(tm2.a);
tm1.insert(tm2.b);
return tm1;
}
void solve(int test_case)
{
int n,m; cin >> n >> m;
vector<int> a(n);
rep(i,n){
rep(j,m){
int x; cin >> x;
a[i] = (a[i]<<1)|x;
}
}
vector<int> ac(n); // complement of a[i]
rep(i,n){
ac[i] = ((1<<m)-1)^a[i];
}
vector<two_max> dp1(1<<m);
rep(i,n){
dp1[ac[i]].insert({1,i});
}
// pull from supermasks
rep(bit,m){
rep(mask,1<<m){
if(mask&(1<<bit)) conts;
dp1[mask] = merge(dp1[mask],dp1[mask^(1<<bit)]);
}
}
vector<two_max> dp2(1<<m);
rep(mask,1<<m){
pii p1 = dp1[mask].a;
pii p2 = dp1[mask].b;
int sb = setbits(mask);
if(p1.ff != -1){
p1.ff = sb;
dp2[mask].insert(p1);
}
if(p2.ff != -1){
p2.ff = sb;
dp2[mask].insert(p2);
}
}
// pull from submasks
rep(bit,m){
rep(mask,1<<m){
if(mask&(1<<bit)){
dp2[mask] = merge(dp2[mask],dp2[mask^(1<<bit)]);
}
}
}
vector<int> cnt(m);
rep(i,n){
rep(j,m){
if(a[i]&(1<<j)){
cnt[j]++;
}
}
}
// answer queries
int want = n/2;
rep(i,n){
int mask = 0;
int add = 0;
rep(j,m){
if(a[i]&(1<<j)){
cnt[j]--;
}
if(cnt[j] == want){
mask |= (1<<j);
}
else if(cnt[j] > want){
add++;
}
}
int mx = 0;
if(dp2[mask].a.ss != i){
amax(mx,dp2[mask].a.ff);
}
else{
amax(mx,dp2[mask].b.ff);
}
int ans = add+mx;
cout << ans << endl;
rep(j,m){
if(a[i]&(1<<j)){
cnt[j]++;
}
}
}
}
int main()
{
fastio;
int t = 1;
// cin >> t;
rep1(i, t) {
solve(i);
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
90 ms |
33284 KB |
Output is correct |
6 |
Correct |
81 ms |
33284 KB |
Output is correct |
7 |
Correct |
90 ms |
33108 KB |
Output is correct |
8 |
Correct |
103 ms |
33264 KB |
Output is correct |
9 |
Correct |
174 ms |
33260 KB |
Output is correct |
10 |
Correct |
90 ms |
33108 KB |
Output is correct |
11 |
Correct |
104 ms |
33108 KB |
Output is correct |
12 |
Correct |
158 ms |
33300 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
344 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
344 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
456 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
1 ms |
860 KB |
Output is correct |
42 |
Correct |
1 ms |
856 KB |
Output is correct |
43 |
Correct |
2 ms |
860 KB |
Output is correct |
44 |
Correct |
2 ms |
856 KB |
Output is correct |
45 |
Correct |
2 ms |
860 KB |
Output is correct |
46 |
Correct |
10 ms |
4572 KB |
Output is correct |
47 |
Correct |
10 ms |
4444 KB |
Output is correct |
48 |
Correct |
12 ms |
4444 KB |
Output is correct |
49 |
Correct |
10 ms |
4692 KB |
Output is correct |
50 |
Correct |
12 ms |
4576 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
90 ms |
33284 KB |
Output is correct |
6 |
Correct |
81 ms |
33284 KB |
Output is correct |
7 |
Correct |
90 ms |
33108 KB |
Output is correct |
8 |
Correct |
103 ms |
33264 KB |
Output is correct |
9 |
Correct |
174 ms |
33260 KB |
Output is correct |
10 |
Correct |
90 ms |
33108 KB |
Output is correct |
11 |
Correct |
104 ms |
33108 KB |
Output is correct |
12 |
Correct |
158 ms |
33300 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
344 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
344 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
456 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
1 ms |
860 KB |
Output is correct |
42 |
Correct |
1 ms |
856 KB |
Output is correct |
43 |
Correct |
2 ms |
860 KB |
Output is correct |
44 |
Correct |
2 ms |
856 KB |
Output is correct |
45 |
Correct |
2 ms |
860 KB |
Output is correct |
46 |
Correct |
10 ms |
4572 KB |
Output is correct |
47 |
Correct |
10 ms |
4444 KB |
Output is correct |
48 |
Correct |
12 ms |
4444 KB |
Output is correct |
49 |
Correct |
10 ms |
4692 KB |
Output is correct |
50 |
Correct |
12 ms |
4576 KB |
Output is correct |
51 |
Correct |
83 ms |
33428 KB |
Output is correct |
52 |
Correct |
91 ms |
33364 KB |
Output is correct |
53 |
Correct |
145 ms |
33408 KB |
Output is correct |
54 |
Correct |
184 ms |
33360 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
27 ms |
4700 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
43 ms |
4556 KB |
Output is correct |
3 |
Correct |
43 ms |
4440 KB |
Output is correct |
4 |
Correct |
34 ms |
3928 KB |
Output is correct |
5 |
Correct |
51 ms |
4436 KB |
Output is correct |
6 |
Correct |
35 ms |
3808 KB |
Output is correct |
7 |
Correct |
51 ms |
4436 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
600 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
43 ms |
4556 KB |
Output is correct |
3 |
Correct |
43 ms |
4440 KB |
Output is correct |
4 |
Correct |
34 ms |
3928 KB |
Output is correct |
5 |
Correct |
51 ms |
4436 KB |
Output is correct |
6 |
Correct |
35 ms |
3808 KB |
Output is correct |
7 |
Correct |
51 ms |
4436 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
600 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
187 ms |
9412 KB |
Output is correct |
21 |
Correct |
167 ms |
8528 KB |
Output is correct |
22 |
Correct |
168 ms |
8528 KB |
Output is correct |
23 |
Correct |
144 ms |
9552 KB |
Output is correct |
24 |
Correct |
140 ms |
9280 KB |
Output is correct |
25 |
Correct |
192 ms |
9220 KB |
Output is correct |
26 |
Correct |
198 ms |
9300 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
456 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
364 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
456 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
43 ms |
4556 KB |
Output is correct |
3 |
Correct |
43 ms |
4440 KB |
Output is correct |
4 |
Correct |
34 ms |
3928 KB |
Output is correct |
5 |
Correct |
51 ms |
4436 KB |
Output is correct |
6 |
Correct |
35 ms |
3808 KB |
Output is correct |
7 |
Correct |
51 ms |
4436 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
600 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
187 ms |
9412 KB |
Output is correct |
21 |
Correct |
167 ms |
8528 KB |
Output is correct |
22 |
Correct |
168 ms |
8528 KB |
Output is correct |
23 |
Correct |
144 ms |
9552 KB |
Output is correct |
24 |
Correct |
140 ms |
9280 KB |
Output is correct |
25 |
Correct |
192 ms |
9220 KB |
Output is correct |
26 |
Correct |
198 ms |
9300 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
456 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
364 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
456 KB |
Output is correct |
46 |
Correct |
1 ms |
348 KB |
Output is correct |
47 |
Correct |
260 ms |
12112 KB |
Output is correct |
48 |
Correct |
240 ms |
11092 KB |
Output is correct |
49 |
Correct |
239 ms |
11084 KB |
Output is correct |
50 |
Correct |
187 ms |
12368 KB |
Output is correct |
51 |
Correct |
189 ms |
12116 KB |
Output is correct |
52 |
Correct |
263 ms |
12048 KB |
Output is correct |
53 |
Correct |
265 ms |
12372 KB |
Output is correct |
54 |
Correct |
2 ms |
860 KB |
Output is correct |
55 |
Correct |
1 ms |
860 KB |
Output is correct |
56 |
Correct |
2 ms |
860 KB |
Output is correct |
57 |
Correct |
1 ms |
860 KB |
Output is correct |
58 |
Correct |
2 ms |
860 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
43 ms |
4556 KB |
Output is correct |
3 |
Correct |
43 ms |
4440 KB |
Output is correct |
4 |
Correct |
34 ms |
3928 KB |
Output is correct |
5 |
Correct |
51 ms |
4436 KB |
Output is correct |
6 |
Correct |
35 ms |
3808 KB |
Output is correct |
7 |
Correct |
51 ms |
4436 KB |
Output is correct |
8 |
Correct |
0 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
600 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
1 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
187 ms |
9412 KB |
Output is correct |
21 |
Correct |
167 ms |
8528 KB |
Output is correct |
22 |
Correct |
168 ms |
8528 KB |
Output is correct |
23 |
Correct |
144 ms |
9552 KB |
Output is correct |
24 |
Correct |
140 ms |
9280 KB |
Output is correct |
25 |
Correct |
192 ms |
9220 KB |
Output is correct |
26 |
Correct |
198 ms |
9300 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
348 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
456 KB |
Output is correct |
36 |
Correct |
1 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
348 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
0 ms |
364 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
348 KB |
Output is correct |
45 |
Correct |
1 ms |
456 KB |
Output is correct |
46 |
Correct |
1 ms |
348 KB |
Output is correct |
47 |
Correct |
260 ms |
12112 KB |
Output is correct |
48 |
Correct |
240 ms |
11092 KB |
Output is correct |
49 |
Correct |
239 ms |
11084 KB |
Output is correct |
50 |
Correct |
187 ms |
12368 KB |
Output is correct |
51 |
Correct |
189 ms |
12116 KB |
Output is correct |
52 |
Correct |
263 ms |
12048 KB |
Output is correct |
53 |
Correct |
265 ms |
12372 KB |
Output is correct |
54 |
Correct |
2 ms |
860 KB |
Output is correct |
55 |
Correct |
1 ms |
860 KB |
Output is correct |
56 |
Correct |
2 ms |
860 KB |
Output is correct |
57 |
Correct |
1 ms |
860 KB |
Output is correct |
58 |
Correct |
2 ms |
860 KB |
Output is correct |
59 |
Correct |
300 ms |
14932 KB |
Output is correct |
60 |
Correct |
154 ms |
9684 KB |
Output is correct |
61 |
Correct |
155 ms |
9808 KB |
Output is correct |
62 |
Correct |
160 ms |
10044 KB |
Output is correct |
63 |
Correct |
302 ms |
15052 KB |
Output is correct |
64 |
Correct |
331 ms |
17492 KB |
Output is correct |
65 |
Correct |
336 ms |
17332 KB |
Output is correct |
66 |
Correct |
234 ms |
17744 KB |
Output is correct |
67 |
Correct |
241 ms |
17356 KB |
Output is correct |
68 |
Correct |
332 ms |
17236 KB |
Output is correct |
69 |
Correct |
344 ms |
17748 KB |
Output is correct |
70 |
Correct |
10 ms |
4444 KB |
Output is correct |
71 |
Correct |
10 ms |
4424 KB |
Output is correct |
72 |
Correct |
11 ms |
4588 KB |
Output is correct |
73 |
Correct |
10 ms |
4580 KB |
Output is correct |
74 |
Correct |
12 ms |
4444 KB |
Output is correct |
75 |
Correct |
26 ms |
4700 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
90 ms |
33284 KB |
Output is correct |
6 |
Correct |
81 ms |
33284 KB |
Output is correct |
7 |
Correct |
90 ms |
33108 KB |
Output is correct |
8 |
Correct |
103 ms |
33264 KB |
Output is correct |
9 |
Correct |
174 ms |
33260 KB |
Output is correct |
10 |
Correct |
90 ms |
33108 KB |
Output is correct |
11 |
Correct |
104 ms |
33108 KB |
Output is correct |
12 |
Correct |
158 ms |
33300 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
344 KB |
Output is correct |
28 |
Correct |
1 ms |
344 KB |
Output is correct |
29 |
Correct |
1 ms |
348 KB |
Output is correct |
30 |
Correct |
1 ms |
344 KB |
Output is correct |
31 |
Correct |
1 ms |
344 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
0 ms |
456 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
1 ms |
348 KB |
Output is correct |
41 |
Correct |
1 ms |
860 KB |
Output is correct |
42 |
Correct |
1 ms |
856 KB |
Output is correct |
43 |
Correct |
2 ms |
860 KB |
Output is correct |
44 |
Correct |
2 ms |
856 KB |
Output is correct |
45 |
Correct |
2 ms |
860 KB |
Output is correct |
46 |
Correct |
10 ms |
4572 KB |
Output is correct |
47 |
Correct |
10 ms |
4444 KB |
Output is correct |
48 |
Correct |
12 ms |
4444 KB |
Output is correct |
49 |
Correct |
10 ms |
4692 KB |
Output is correct |
50 |
Correct |
12 ms |
4576 KB |
Output is correct |
51 |
Correct |
83 ms |
33428 KB |
Output is correct |
52 |
Correct |
91 ms |
33364 KB |
Output is correct |
53 |
Correct |
145 ms |
33408 KB |
Output is correct |
54 |
Correct |
184 ms |
33360 KB |
Output is correct |
55 |
Correct |
1 ms |
348 KB |
Output is correct |
56 |
Correct |
27 ms |
4700 KB |
Output is correct |
57 |
Correct |
0 ms |
348 KB |
Output is correct |
58 |
Correct |
43 ms |
4556 KB |
Output is correct |
59 |
Correct |
43 ms |
4440 KB |
Output is correct |
60 |
Correct |
34 ms |
3928 KB |
Output is correct |
61 |
Correct |
51 ms |
4436 KB |
Output is correct |
62 |
Correct |
35 ms |
3808 KB |
Output is correct |
63 |
Correct |
51 ms |
4436 KB |
Output is correct |
64 |
Correct |
0 ms |
344 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
0 ms |
348 KB |
Output is correct |
67 |
Correct |
0 ms |
348 KB |
Output is correct |
68 |
Correct |
0 ms |
348 KB |
Output is correct |
69 |
Correct |
0 ms |
600 KB |
Output is correct |
70 |
Correct |
0 ms |
348 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
1 ms |
348 KB |
Output is correct |
74 |
Correct |
0 ms |
348 KB |
Output is correct |
75 |
Correct |
0 ms |
348 KB |
Output is correct |
76 |
Correct |
187 ms |
9412 KB |
Output is correct |
77 |
Correct |
167 ms |
8528 KB |
Output is correct |
78 |
Correct |
168 ms |
8528 KB |
Output is correct |
79 |
Correct |
144 ms |
9552 KB |
Output is correct |
80 |
Correct |
140 ms |
9280 KB |
Output is correct |
81 |
Correct |
192 ms |
9220 KB |
Output is correct |
82 |
Correct |
198 ms |
9300 KB |
Output is correct |
83 |
Correct |
0 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
0 ms |
348 KB |
Output is correct |
86 |
Correct |
0 ms |
348 KB |
Output is correct |
87 |
Correct |
0 ms |
348 KB |
Output is correct |
88 |
Correct |
0 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
1 ms |
348 KB |
Output is correct |
91 |
Correct |
0 ms |
456 KB |
Output is correct |
92 |
Correct |
1 ms |
348 KB |
Output is correct |
93 |
Correct |
0 ms |
348 KB |
Output is correct |
94 |
Correct |
0 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
1 ms |
348 KB |
Output is correct |
97 |
Correct |
0 ms |
364 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
1 ms |
456 KB |
Output is correct |
102 |
Correct |
1 ms |
348 KB |
Output is correct |
103 |
Correct |
260 ms |
12112 KB |
Output is correct |
104 |
Correct |
240 ms |
11092 KB |
Output is correct |
105 |
Correct |
239 ms |
11084 KB |
Output is correct |
106 |
Correct |
187 ms |
12368 KB |
Output is correct |
107 |
Correct |
189 ms |
12116 KB |
Output is correct |
108 |
Correct |
263 ms |
12048 KB |
Output is correct |
109 |
Correct |
265 ms |
12372 KB |
Output is correct |
110 |
Correct |
2 ms |
860 KB |
Output is correct |
111 |
Correct |
1 ms |
860 KB |
Output is correct |
112 |
Correct |
2 ms |
860 KB |
Output is correct |
113 |
Correct |
1 ms |
860 KB |
Output is correct |
114 |
Correct |
2 ms |
860 KB |
Output is correct |
115 |
Correct |
300 ms |
14932 KB |
Output is correct |
116 |
Correct |
154 ms |
9684 KB |
Output is correct |
117 |
Correct |
155 ms |
9808 KB |
Output is correct |
118 |
Correct |
160 ms |
10044 KB |
Output is correct |
119 |
Correct |
302 ms |
15052 KB |
Output is correct |
120 |
Correct |
331 ms |
17492 KB |
Output is correct |
121 |
Correct |
336 ms |
17332 KB |
Output is correct |
122 |
Correct |
234 ms |
17744 KB |
Output is correct |
123 |
Correct |
241 ms |
17356 KB |
Output is correct |
124 |
Correct |
332 ms |
17236 KB |
Output is correct |
125 |
Correct |
344 ms |
17748 KB |
Output is correct |
126 |
Correct |
10 ms |
4444 KB |
Output is correct |
127 |
Correct |
10 ms |
4424 KB |
Output is correct |
128 |
Correct |
11 ms |
4588 KB |
Output is correct |
129 |
Correct |
10 ms |
4580 KB |
Output is correct |
130 |
Correct |
12 ms |
4444 KB |
Output is correct |
131 |
Correct |
26 ms |
4700 KB |
Output is correct |
132 |
Correct |
485 ms |
48328 KB |
Output is correct |
133 |
Correct |
464 ms |
48012 KB |
Output is correct |
134 |
Correct |
478 ms |
48208 KB |
Output is correct |
135 |
Correct |
582 ms |
48144 KB |
Output is correct |
136 |
Correct |
567 ms |
48212 KB |
Output is correct |
137 |
Correct |
426 ms |
31060 KB |
Output is correct |
138 |
Correct |
436 ms |
31564 KB |
Output is correct |
139 |
Correct |
339 ms |
48208 KB |
Output is correct |
140 |
Correct |
347 ms |
48156 KB |
Output is correct |
141 |
Correct |
593 ms |
47948 KB |
Output is correct |
142 |
Correct |
611 ms |
48212 KB |
Output is correct |