Submission #947623

# Submission time Handle Problem Language Result Execution time Memory
947623 2024-03-16T16:31:55 Z marvinthang Cookies (JOI23_cookies) C++17
70 / 100
585 ms 1048576 KB
/*************************************
*    author: marvinthang             *
*    created: 16.03.2024 22:48:39    *
*************************************/

#include <bits/stdc++.h>

using namespace std;

#define fi first
#define se second
#define left ___left
#define right ___right
#define TIME (1.0 * clock() / CLOCK_PERS_SEC)
#define MASK(i) (1LL << (i))
#define BIT(x, i) ((x) >> (i) & 1)
#define __builtin_popcount __builtin_popcountll
#define ALL(v) (v).begin(), (v).end()
#define REP(i, n) for (int i = 0, _n = (n); i < _n; ++i)
#define REPD(i, n) for (int i = (n); i-- > 0; )
#define FOR(i, a, b) for (int i = (a), _b = (b); i < _b; ++i)
#define FORD(i, b, a) for (int i = (b), _a = (a); i-- > _a; )
#define FORE(i, a, b) for (int i = (a), _b = (b); i <= _b; ++i)
#define FORDE(i, b, a) for (int i = (b), _a = (a); i >= _a; --i)
#define scan_op(...) istream & operator >> (istream &in, __VA_ARGS__ &u)
#define print_op(...) ostream & operator << (ostream &out, const __VA_ARGS__ &u) 
#define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
template <class U, class V> scan_op(pair <U, V>) { return in >> u.fi >> u.se; };
template <class T> scan_op(vector <T>) { for (T &x: u) in >> x; return in; }
template <class U, class V> print_op(pair <U, V>) { return out << '(' << u.fi << ", " << u.se << ')'; }
template <size_t i, class T> ostream &print_tuple_utils(ostream &out, const T &tup) { if constexpr(i == tuple_size<T>::value) return out << ')'; else return print_tuple_utils<i + 1, T>(out << (i ? ", "  : "(") << get<i>(tup), tup); }
template <class ...U> print_op(tuple <U...>) { return print_tuple_utils<0, tuple <U...>>(out, u); }
template <class Con, class = decltype(begin(declval<Con>()))> typename enable_if <!is_same<Con, string>::value, ostream &>::type operator << (ostream &out, const Con &con) {
	out << '{';
	for (auto it = con.begin(); it != con.end(); ++it) out << (it == con.begin() ? "" : ", ") << *it;
	return out << '}';
}

const int MAX = 15005;
#define Bitset bitset <MAX>

void process(void) {
	int n; cin >> n;
	vector <int> a(n); cin >> a;
	int m; cin >> m;
	vector <int> b(m); cin >> b;
	reverse(ALL(b));
	vector <int> c(a);
	sort(ALL(c));
	int sum = accumulate(ALL(a), 0);
	vector <int> max_cap(sum + 1);
	int j = 0, cur = 0;
	max_cap[0] = n;
	FORE(i, 1, sum) {
		while (j < n && c[j] < i) cur += c[j++];
		max_cap[i] = cur + (n - j) * i;
	}
	vector dp(m, vector<Bitset>(sum + 1));
	dp[0][0][0] = 1;
	Bitset all; all.set();
	REP(i, m) REP(j, sum + 1) {
		dp[i][j] &= all >> (MAX - max_cap[j] - 1);
		if (i + 1 < m) dp[i + 1][j] |= dp[i][j];
		if (j < sum) dp[i][j + 1] |= dp[i][j] << b[i];
	}
	int mi = -1;
	REP(j, sum + 1) if (dp[m - 1][j][sum]) {
		mi = j;
		break;
	}
	cout << mi << '\n';
	if (mi == -1) return;
	int k = sum;
	vector <int> boxes;
	REPD(i, m) {
		while (k >= b[i] && mi && dp[i][mi - 1][k - b[i]]) {
			boxes.push_back(b[i]);
			--mi;
			k -= b[i];
		}
	}
	priority_queue <pair <int, int>> pq;
	REP(i, n) pq.emplace(a[i], i);
	for (int sz: boxes) {
		vector <int> v;
		REP(love, sz) {
			v.push_back(pq.top().se);
			pq.pop();
		}
		cout << sz;
		for (int i: v) {
			cout << ' ' << i + 1;
			pq.emplace(--a[i], i);
		}
		cout << '\n';
	}
}

int main(void) {
	ios_base::sync_with_stdio(false); cin.tie(nullptr);
	file("cookies");
	process();
	return (0 ^ 0);
}

Compilation message

cookies.cpp: In function 'int main()':
cookies.cpp:27:57: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   27 | #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
      |                                                  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
cookies.cpp:101:2: note: in expansion of macro 'file'
  101 |  file("cookies");
      |  ^~~~
cookies.cpp:27:90: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   27 | #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
      |                                                                                   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
cookies.cpp:101:2: note: in expansion of macro 'file'
  101 |  file("cookies");
      |  ^~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 352 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 1 ms 2140 KB Output is correct
9 Correct 2 ms 2252 KB Output is correct
10 Correct 515 ms 461140 KB Output is correct
11 Correct 227 ms 230832 KB Output is correct
12 Correct 39 ms 42844 KB Output is correct
13 Correct 108 ms 117516 KB Output is correct
14 Correct 189 ms 208468 KB Output is correct
15 Correct 183 ms 203100 KB Output is correct
16 Correct 220 ms 228944 KB Output is correct
17 Correct 3 ms 3932 KB Output is correct
18 Correct 8 ms 7772 KB Output is correct
19 Correct 7 ms 7772 KB Output is correct
20 Correct 9 ms 10588 KB Output is correct
21 Correct 86 ms 93520 KB Output is correct
22 Correct 209 ms 230740 KB Output is correct
23 Correct 206 ms 230776 KB Output is correct
24 Correct 26 ms 28508 KB Output is correct
25 Correct 25 ms 27540 KB Output is correct
26 Correct 30 ms 28504 KB Output is correct
27 Correct 25 ms 27588 KB Output is correct
28 Correct 126 ms 135788 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 2140 KB Output is correct
6 Correct 1 ms 2140 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 2 ms 2148 KB Output is correct
9 Correct 5 ms 11356 KB Output is correct
10 Correct 24 ms 55700 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 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 1 ms 2140 KB Output is correct
17 Correct 1 ms 2292 KB Output is correct
18 Correct 24 ms 55644 KB Output is correct
19 Correct 24 ms 55644 KB Output is correct
20 Correct 23 ms 55644 KB Output is correct
21 Correct 23 ms 55644 KB Output is correct
22 Correct 21 ms 54620 KB Output is correct
23 Correct 3 ms 3932 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 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 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 0 ms 544 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 344 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 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 1 ms 348 KB Output is correct
18 Correct 1 ms 348 KB Output is correct
19 Correct 0 ms 348 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 1 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 1 ms 344 KB Output is correct
28 Correct 0 ms 604 KB Output is correct
29 Correct 0 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 1 ms 604 KB Output is correct
32 Correct 0 ms 348 KB Output is correct
33 Correct 0 ms 604 KB Output is correct
34 Correct 1 ms 600 KB Output is correct
35 Correct 1 ms 604 KB Output is correct
36 Correct 1 ms 860 KB Output is correct
37 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 352 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 1 ms 2140 KB Output is correct
9 Correct 2 ms 2252 KB Output is correct
10 Correct 515 ms 461140 KB Output is correct
11 Correct 227 ms 230832 KB Output is correct
12 Correct 39 ms 42844 KB Output is correct
13 Correct 108 ms 117516 KB Output is correct
14 Correct 189 ms 208468 KB Output is correct
15 Correct 183 ms 203100 KB Output is correct
16 Correct 220 ms 228944 KB Output is correct
17 Correct 3 ms 3932 KB Output is correct
18 Correct 8 ms 7772 KB Output is correct
19 Correct 7 ms 7772 KB Output is correct
20 Correct 9 ms 10588 KB Output is correct
21 Correct 86 ms 93520 KB Output is correct
22 Correct 209 ms 230740 KB Output is correct
23 Correct 206 ms 230776 KB Output is correct
24 Correct 26 ms 28508 KB Output is correct
25 Correct 25 ms 27540 KB Output is correct
26 Correct 30 ms 28504 KB Output is correct
27 Correct 25 ms 27588 KB Output is correct
28 Correct 126 ms 135788 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 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 0 ms 344 KB Output is correct
35 Correct 0 ms 544 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 344 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 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 348 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 1 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 1 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 1 ms 344 KB Output is correct
56 Correct 0 ms 604 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 1 ms 604 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 604 KB Output is correct
62 Correct 1 ms 600 KB Output is correct
63 Correct 1 ms 604 KB Output is correct
64 Correct 1 ms 860 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 344 KB Output is correct
67 Correct 2 ms 2140 KB Output is correct
68 Correct 1 ms 2140 KB Output is correct
69 Correct 1 ms 2136 KB Output is correct
70 Correct 18 ms 19804 KB Output is correct
71 Correct 14 ms 14988 KB Output is correct
72 Correct 17 ms 17756 KB Output is correct
73 Correct 9 ms 10444 KB Output is correct
74 Correct 10 ms 10588 KB Output is correct
75 Correct 15 ms 14236 KB Output is correct
76 Correct 14 ms 14196 KB Output is correct
77 Correct 8 ms 9564 KB Output is correct
78 Correct 8 ms 9564 KB Output is correct
79 Correct 6 ms 7004 KB Output is correct
80 Correct 4 ms 4956 KB Output is correct
81 Correct 5 ms 5828 KB Output is correct
82 Correct 12 ms 14172 KB Output is correct
83 Correct 7 ms 7772 KB Output is correct
84 Correct 39 ms 42776 KB Output is correct
85 Correct 8 ms 9564 KB Output is correct
86 Correct 18 ms 19624 KB Output is correct
87 Correct 17 ms 19800 KB Output is correct
88 Correct 18 ms 19588 KB Output is correct
89 Correct 18 ms 19804 KB Output is correct
90 Correct 17 ms 19804 KB Output is correct
91 Correct 18 ms 19688 KB Output is correct
92 Correct 42 ms 46412 KB Output is correct
93 Correct 404 ms 405300 KB Output is correct
94 Correct 223 ms 218708 KB Output is correct
95 Correct 13 ms 14936 KB Output is correct
96 Correct 8 ms 7772 KB Output is correct
97 Correct 8 ms 9564 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 352 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 1 ms 2140 KB Output is correct
9 Correct 2 ms 2252 KB Output is correct
10 Correct 515 ms 461140 KB Output is correct
11 Correct 227 ms 230832 KB Output is correct
12 Correct 39 ms 42844 KB Output is correct
13 Correct 108 ms 117516 KB Output is correct
14 Correct 189 ms 208468 KB Output is correct
15 Correct 183 ms 203100 KB Output is correct
16 Correct 220 ms 228944 KB Output is correct
17 Correct 3 ms 3932 KB Output is correct
18 Correct 8 ms 7772 KB Output is correct
19 Correct 7 ms 7772 KB Output is correct
20 Correct 9 ms 10588 KB Output is correct
21 Correct 86 ms 93520 KB Output is correct
22 Correct 209 ms 230740 KB Output is correct
23 Correct 206 ms 230776 KB Output is correct
24 Correct 26 ms 28508 KB Output is correct
25 Correct 25 ms 27540 KB Output is correct
26 Correct 30 ms 28504 KB Output is correct
27 Correct 25 ms 27588 KB Output is correct
28 Correct 126 ms 135788 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 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 0 ms 344 KB Output is correct
35 Correct 0 ms 544 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 344 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 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 348 KB Output is correct
46 Correct 1 ms 348 KB Output is correct
47 Correct 0 ms 348 KB Output is correct
48 Correct 1 ms 348 KB Output is correct
49 Correct 0 ms 348 KB Output is correct
50 Correct 1 ms 348 KB Output is correct
51 Correct 1 ms 348 KB Output is correct
52 Correct 0 ms 348 KB Output is correct
53 Correct 0 ms 348 KB Output is correct
54 Correct 0 ms 348 KB Output is correct
55 Correct 1 ms 344 KB Output is correct
56 Correct 0 ms 604 KB Output is correct
57 Correct 0 ms 348 KB Output is correct
58 Correct 0 ms 348 KB Output is correct
59 Correct 1 ms 604 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 604 KB Output is correct
62 Correct 1 ms 600 KB Output is correct
63 Correct 1 ms 604 KB Output is correct
64 Correct 1 ms 860 KB Output is correct
65 Correct 0 ms 348 KB Output is correct
66 Correct 0 ms 344 KB Output is correct
67 Correct 2 ms 2140 KB Output is correct
68 Correct 1 ms 2140 KB Output is correct
69 Correct 1 ms 2136 KB Output is correct
70 Correct 18 ms 19804 KB Output is correct
71 Correct 14 ms 14988 KB Output is correct
72 Correct 17 ms 17756 KB Output is correct
73 Correct 9 ms 10444 KB Output is correct
74 Correct 10 ms 10588 KB Output is correct
75 Correct 15 ms 14236 KB Output is correct
76 Correct 14 ms 14196 KB Output is correct
77 Correct 8 ms 9564 KB Output is correct
78 Correct 8 ms 9564 KB Output is correct
79 Correct 6 ms 7004 KB Output is correct
80 Correct 4 ms 4956 KB Output is correct
81 Correct 5 ms 5828 KB Output is correct
82 Correct 12 ms 14172 KB Output is correct
83 Correct 7 ms 7772 KB Output is correct
84 Correct 39 ms 42776 KB Output is correct
85 Correct 8 ms 9564 KB Output is correct
86 Correct 18 ms 19624 KB Output is correct
87 Correct 17 ms 19800 KB Output is correct
88 Correct 18 ms 19588 KB Output is correct
89 Correct 18 ms 19804 KB Output is correct
90 Correct 17 ms 19804 KB Output is correct
91 Correct 18 ms 19688 KB Output is correct
92 Correct 42 ms 46412 KB Output is correct
93 Correct 404 ms 405300 KB Output is correct
94 Correct 223 ms 218708 KB Output is correct
95 Correct 13 ms 14936 KB Output is correct
96 Correct 8 ms 7772 KB Output is correct
97 Correct 8 ms 9564 KB Output is correct
98 Correct 5 ms 11356 KB Output is correct
99 Correct 3 ms 3932 KB Output is correct
100 Correct 27 ms 39004 KB Output is correct
101 Correct 47 ms 66648 KB Output is correct
102 Correct 49 ms 66640 KB Output is correct
103 Correct 135 ms 155000 KB Output is correct
104 Correct 127 ms 155080 KB Output is correct
105 Runtime error 585 ms 1048576 KB Execution killed with signal 9
106 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 352 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 0 ms 344 KB Output is correct
8 Correct 1 ms 2140 KB Output is correct
9 Correct 2 ms 2252 KB Output is correct
10 Correct 515 ms 461140 KB Output is correct
11 Correct 227 ms 230832 KB Output is correct
12 Correct 39 ms 42844 KB Output is correct
13 Correct 108 ms 117516 KB Output is correct
14 Correct 189 ms 208468 KB Output is correct
15 Correct 183 ms 203100 KB Output is correct
16 Correct 220 ms 228944 KB Output is correct
17 Correct 3 ms 3932 KB Output is correct
18 Correct 8 ms 7772 KB Output is correct
19 Correct 7 ms 7772 KB Output is correct
20 Correct 9 ms 10588 KB Output is correct
21 Correct 86 ms 93520 KB Output is correct
22 Correct 209 ms 230740 KB Output is correct
23 Correct 206 ms 230776 KB Output is correct
24 Correct 26 ms 28508 KB Output is correct
25 Correct 25 ms 27540 KB Output is correct
26 Correct 30 ms 28504 KB Output is correct
27 Correct 25 ms 27588 KB Output is correct
28 Correct 126 ms 135788 KB Output is correct
29 Correct 0 ms 344 KB Output is correct
30 Correct 1 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 1 ms 2140 KB Output is correct
34 Correct 1 ms 2140 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 2 ms 2148 KB Output is correct
37 Correct 5 ms 11356 KB Output is correct
38 Correct 24 ms 55700 KB Output is correct
39 Correct 0 ms 348 KB Output is correct
40 Correct 0 ms 348 KB Output is correct
41 Correct 0 ms 348 KB Output is correct
42 Correct 0 ms 348 KB Output is correct
43 Correct 0 ms 348 KB Output is correct
44 Correct 1 ms 2140 KB Output is correct
45 Correct 1 ms 2292 KB Output is correct
46 Correct 24 ms 55644 KB Output is correct
47 Correct 24 ms 55644 KB Output is correct
48 Correct 23 ms 55644 KB Output is correct
49 Correct 23 ms 55644 KB Output is correct
50 Correct 21 ms 54620 KB Output is correct
51 Correct 3 ms 3932 KB Output is correct
52 Correct 1 ms 348 KB Output is correct
53 Correct 1 ms 348 KB Output is correct
54 Correct 1 ms 348 KB Output is correct
55 Correct 0 ms 348 KB Output is correct
56 Correct 0 ms 348 KB Output is correct
57 Correct 0 ms 344 KB Output is correct
58 Correct 0 ms 544 KB Output is correct
59 Correct 0 ms 348 KB Output is correct
60 Correct 0 ms 348 KB Output is correct
61 Correct 0 ms 344 KB Output is correct
62 Correct 0 ms 348 KB Output is correct
63 Correct 0 ms 348 KB Output is correct
64 Correct 0 ms 348 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 1 ms 348 KB Output is correct
69 Correct 1 ms 348 KB Output is correct
70 Correct 0 ms 348 KB Output is correct
71 Correct 1 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 1 ms 348 KB Output is correct
75 Correct 0 ms 348 KB Output is correct
76 Correct 0 ms 348 KB Output is correct
77 Correct 0 ms 348 KB Output is correct
78 Correct 1 ms 344 KB Output is correct
79 Correct 0 ms 604 KB Output is correct
80 Correct 0 ms 348 KB Output is correct
81 Correct 0 ms 348 KB Output is correct
82 Correct 1 ms 604 KB Output is correct
83 Correct 0 ms 348 KB Output is correct
84 Correct 0 ms 604 KB Output is correct
85 Correct 1 ms 600 KB Output is correct
86 Correct 1 ms 604 KB Output is correct
87 Correct 1 ms 860 KB Output is correct
88 Correct 0 ms 348 KB Output is correct
89 Correct 0 ms 344 KB Output is correct
90 Correct 2 ms 2140 KB Output is correct
91 Correct 1 ms 2140 KB Output is correct
92 Correct 1 ms 2136 KB Output is correct
93 Correct 18 ms 19804 KB Output is correct
94 Correct 14 ms 14988 KB Output is correct
95 Correct 17 ms 17756 KB Output is correct
96 Correct 9 ms 10444 KB Output is correct
97 Correct 10 ms 10588 KB Output is correct
98 Correct 15 ms 14236 KB Output is correct
99 Correct 14 ms 14196 KB Output is correct
100 Correct 8 ms 9564 KB Output is correct
101 Correct 8 ms 9564 KB Output is correct
102 Correct 6 ms 7004 KB Output is correct
103 Correct 4 ms 4956 KB Output is correct
104 Correct 5 ms 5828 KB Output is correct
105 Correct 12 ms 14172 KB Output is correct
106 Correct 7 ms 7772 KB Output is correct
107 Correct 39 ms 42776 KB Output is correct
108 Correct 8 ms 9564 KB Output is correct
109 Correct 18 ms 19624 KB Output is correct
110 Correct 17 ms 19800 KB Output is correct
111 Correct 18 ms 19588 KB Output is correct
112 Correct 18 ms 19804 KB Output is correct
113 Correct 17 ms 19804 KB Output is correct
114 Correct 18 ms 19688 KB Output is correct
115 Correct 42 ms 46412 KB Output is correct
116 Correct 404 ms 405300 KB Output is correct
117 Correct 223 ms 218708 KB Output is correct
118 Correct 13 ms 14936 KB Output is correct
119 Correct 8 ms 7772 KB Output is correct
120 Correct 8 ms 9564 KB Output is correct
121 Correct 5 ms 11356 KB Output is correct
122 Correct 3 ms 3932 KB Output is correct
123 Correct 27 ms 39004 KB Output is correct
124 Correct 47 ms 66648 KB Output is correct
125 Correct 49 ms 66640 KB Output is correct
126 Correct 135 ms 155000 KB Output is correct
127 Correct 127 ms 155080 KB Output is correct
128 Runtime error 585 ms 1048576 KB Execution killed with signal 9
129 Halted 0 ms 0 KB -