QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#484244#8600. Футболgreen_gold_dog#22 31ms3944kbC++201.8kb2024-07-19 17:02:342024-07-19 17:02:34

Judging History

你现在查看的是最新测评结果

  • [2024-07-19 17:02:34]
  • 评测
  • 测评结果:22
  • 用时:31ms
  • 内存:3944kb
  • [2024-07-19 17:02:34]
  • 提交

answer

//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,sse,sse2,sse3,ssse3,sse4,abm,popcnt,mmx")
#include <bits/stdc++.h>

using namespace std;

typedef int ll;
typedef double db;
typedef long double ldb;
typedef complex<double> cd;

constexpr ll INF64 = 9'000'000'000'000'000'000, INF32 = 2'000'000'000, MOD = 1'000'000'007;
constexpr db PI = acos(-1);
constexpr bool IS_FILE = false, IS_TEST_CASES = false;

random_device rd;
mt19937 rnd32(rd());
mt19937_64 rnd64(rd());

template<typename T>
bool assign_max(T& a, T b) {
	if (b > a) {
		a = b;
		return true;
	}
	return false;
}

template<typename T>
bool assign_min(T& a, T b) {
	if (b < a) {
		a = b;
		return true;
	}
	return false;
}

template<typename T>
T square(T a) {
	return a * a;
}

template<>
struct std::hash<pair<ll, ll>> {
	ll operator() (pair<ll, ll> p) const {
		return ((__int128)p.first * MOD + p.second) % INF64;
	}
};

ll gcd(ll a, ll b) {
	return (min(a, b) == 0 ? max(a, b) : gcd(max(a, b) % min(a, b), min(a, b)));
}

void solve() {
	ll n, q;
	cin >> n >> q;
	vector<ll> c(n);
	for (ll i = 0; i < n; i++) {
		cin >> c[i];
	}
	vector<vector<ll>> dn;
	map<ll, ll> to;
	for (ll i = 1; i <= n; i++) {
		if (n % i == 0) {
			vector<ll> now(i, INF32);
			for (ll j = 0; j < n; j++) {
				assign_min(now[j % i], c[j]);
			}
			to[i] = dn.size();
			dn.push_back(now);
		}
	}
	vector<ll> ans(dn.size(), INF32);
	ll nsum = 0;
	ll a = -1;
	for (ll i = 0; i < q; i++) {
		ll x;
		cin >> x;
		nsum += x;
		for (ll j = 0; j < dn.size(); j++) {
			assign_min(ans[j], dn[j][nsum % dn[j].size()]);
		}
		cout << ans[to[gcd(n, nsum)]] << ' ';
	}
	cout << '\n';
}

int main() {
	if (IS_FILE) {
		freopen("", "r", stdin);
		freopen("", "w", stdout);
	}
    	ios_base::sync_with_stdio(false);
    	cin.tie(0);
    	cout.tie(0);
	ll t = 1;
	if (IS_TEST_CASES) {
		cin >> t;
	}
	for (ll i = 0; i < t; i++) {
		solve();
	}
}

詳細信息

Subtask #1:

score: 10
Accepted

Test #1:

score: 10
Accepted
time: 0ms
memory: 3600kb

input:

2 1
2 1
1

output:

1 

result:

ok 1 number(s): "1"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

2 100
1 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #3:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

90 100
61 83 44 52 58 27 36 57 2 68 74 47 38 13 76 28 48 78 75 67 89 80 1 6 72 3 29 54 88 87 73 81 71 51 59 25 37 46 33 9 11 70 45 49 69 17 53 32 42 18 64 24 22 23 31 90 5 55 79 41 12 8 82 63 20 26 85 21 66 60 10 7 77 4 34 62 14 16 35 39 86 30 65 43 56 19 50 40 84 15
28 88 7 31 86 8 16 72 81 32 89 8...

output:

1 1 1 1 5 1 1 1 1 1 1 2 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #4:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

78 100
22 23 11 24 55 42 34 21 52 2 38 49 43 48 8 40 17 31 46 74 7 29 47 77 68 63 39 15 70 18 35 27 64 60 19 41 62 5 37 66 4 78 33 16 65 56 67 58 28 30 57 54 12 69 36 76 53 44 9 59 13 71 20 10 75 1 61 51 50 3 72 26 32 45 14 73 6 25
12 70 21 5 5 20 15 65 70 47 21 29 52 59 25 76 14 12 42 33 10 32 65 4...

output:

13 4 1 4 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #5:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

72 100
46 37 10 44 70 55 42 38 9 13 23 1 2 52 64 56 26 11 71 65 27 4 22 53 7 35 12 5 31 49 30 68 6 60 61 66 18 57 43 32 58 48 24 72 20 14 45 21 41 40 28 16 17 33 25 62 29 67 50 47 3 19 69 8 36 59 51 39 63 54 15 34
22 49 6 43 56 63 46 23 61 21 25 57 70 51 7 28 47 10 61 3 18 14 60 42 20 14 19 16 68 58...

output:

2 1 1 7 4 1 1 1 1 1 1 2 1 1 4 1 1 1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #6:

score: 0
Accepted
time: 0ms
memory: 3456kb

input:

88 100
67 11 77 69 38 27 3 12 57 42 45 24 54 50 44 62 80 72 55 52 22 83 40 6 60 58 7 46 86 16 5 66 14 59 30 75 63 25 88 15 87 49 41 76 31 84 68 71 2 70 73 23 37 8 36 32 85 34 35 21 79 64 65 17 39 51 82 1 10 18 43 19 33 28 13 26 29 48 78 4 74 9 61 47 20 53 56 81
32 71 84 44 33 73 3 40 80 55 29 76 58 ...

output:

2 1 2 2 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #7:

score: 0
Accepted
time: 0ms
memory: 3468kb

input:

100 100
13 53 83 37 10 23 75 88 76 61 84 24 69 94 41 46 79 1 55 73 54 15 33 31 60 70 66 8 35 92 77 6 36 20 98 91 86 3 21 82 50 40 26 64 44 71 42 74 47 87 39 95 97 17 19 78 93 81 25 52 49 68 72 29 7 28 63 12 43 45 30 58 99 51 18 90 14 22 96 80 56 85 48 67 65 59 16 89 27 5 32 4 38 100 2 9 57 62 11 34
...

output:

1 1 5 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #8:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

72 100
70 25 7 71 58 31 53 39 27 1 34 36 51 23 33 65 60 18 12 50 67 69 28 32 35 64 13 49 54 15 52 3 55 20 59 11 72 30 43 57 10 29 46 9 26 4 48 22 63 21 42 37 41 62 17 61 45 24 2 44 38 40 8 6 16 47 66 68 5 19 14 56
59 16 39 6 63 6 23 30 45 66 8 30 15 21 15 71 7 58 64 17 53 46 24 40 60 31 66 15 22 61 ...

output:

1 1 1 11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #9:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

60 100
25 17 19 51 2 56 29 60 3 5 36 53 12 42 14 40 45 9 31 16 24 37 43 39 46 57 15 48 8 4 28 35 55 22 38 26 59 6 1 41 20 10 13 21 49 50 23 58 7 11 30 18 52 27 34 47 32 44 54 33
4 55 22 46 47 39 55 2 50 6 16 1 36 44 13 50 21 56 24 45 9 15 6 23 24 40 11 37 14 30 7 43 57 47 10 27 45 14 39 32 15 2 26 3...

output:

2 1 1 1 2 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #10:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

80 100
20 74 15 40 18 46 12 60 26 9 11 66 24 49 28 13 52 22 5 16 78 1 30 75 50 36 32 35 8 68 61 41 62 55 70 65 2 77 4 19 69 67 14 6 54 17 42 56 43 25 34 47 44 57 64 73 29 33 10 63 71 58 48 37 59 3 21 39 38 23 45 7 72 79 27 80 76 51 31 53
47 18 17 61 62 23 11 38 38 9 52 20 50 76 56 75 18 56 46 4 39 7...

output:

1 3 1 1 3 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #11:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

72 100
45 50 4 48 44 19 26 66 27 70 65 51 72 1 31 2 42 61 71 3 18 5 52 41 17 58 9 47 38 24 21 16 10 63 39 33 68 59 35 43 57 34 53 15 23 29 55 14 6 69 12 67 62 40 11 20 37 49 32 60 56 25 46 36 28 22 54 64 7 13 8 30
9 21 17 54 53 36 10 1 4 35 24 36 15 27 36 4 49 42 17 35 65 56 53 26 27 33 46 3 7 60 54...

output:

11 2 1 1 1 1 1 1 1 1 1 1 2 4 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #12:

score: 0
Accepted
time: 0ms
memory: 3712kb

input:

70 100
32 16 11 70 8 12 63 34 2 69 49 6 5 40 44 20 66 53 39 1 19 3 67 17 64 62 48 24 15 60 46 31 57 29 42 14 51 45 10 50 4 43 26 61 54 52 30 58 55 9 65 18 27 35 59 68 33 22 28 37 25 13 41 36 23 7 56 21 47 38
69 24 62 32 42 47 25 15 58 49 43 28 44 40 31 10 51 60 69 52 6 65 23 66 45 36 65 7 67 14 48 2...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #13:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

80 100
40 51 32 36 34 44 64 22 3 9 24 46 66 45 17 73 7 5 74 57 47 60 53 49 43 16 33 12 65 30 61 29 67 4 42 1 78 20 19 41 58 35 14 63 62 13 79 28 72 70 26 52 59 6 11 39 37 38 80 21 25 75 68 48 15 18 71 77 27 55 23 56 50 76 31 69 2 10 8 54
61 32 45 32 17 46 63 41 63 55 40 56 32 51 66 54 29 69 65 67 48...

output:

1 1 1 3 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #14:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

90 100
6 11 79 82 52 83 35 55 80 68 10 12 19 25 28 3 44 63 77 30 60 89 72 14 71 58 34 74 69 18 2 47 75 23 21 48 17 76 1 46 49 16 67 51 50 13 57 38 53 84 22 27 64 90 87 59 41 73 33 78 56 36 61 24 32 20 5 86 88 8 85 54 26 31 29 42 4 40 62 7 81 65 66 39 70 37 43 45 9 15
34 57 76 73 11 59 72 2 69 60 50 ...

output:

1 1 1 2 1 2 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #15:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

60 100
53 7 35 13 22 32 27 40 55 52 4 11 60 19 15 18 5 36 58 24 46 50 34 41 9 26 8 44 25 28 54 48 31 57 20 6 21 16 42 1 23 43 47 56 38 10 45 2 3 37 49 33 12 59 51 14 39 17 30 29
31 2 38 46 18 12 17 54 4 30 4 14 22 27 30 40 57 17 12 29 34 47 9 16 52 6 17 55 39 36 18 57 24 46 5 1 35 40 46 21 23 26 29 ...

output:

1 1 1 1 3 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #16:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

90 100
78 15 46 75 23 53 86 20 17 9 89 48 60 56 22 52 2 64 41 45 57 55 31 65 51 43 76 1 7 63 38 68 35 82 40 3 34 90 54 5 27 72 62 12 6 33 74 83 79 37 24 73 28 81 80 59 11 16 70 10 36 13 29 84 87 4 66 30 32 14 88 42 61 69 77 49 58 85 8 19 18 25 50 67 21 47 26 39 71 44
64 59 2 69 65 89 62 1 31 4 58 64...

output:

2 1 3 1 1 1 3 1 1 1 3 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #17:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

60 100
3 28 31 60 22 35 9 57 43 25 41 24 20 40 10 51 19 1 7 21 52 55 29 15 37 4 50 38 44 46 36 53 2 45 14 18 8 33 56 47 48 42 5 49 34 54 23 58 12 30 39 27 13 17 59 6 32 11 26 16
15 54 23 34 52 41 41 56 33 54 24 4 17 20 7 34 25 31 15 12 21 1 31 18 39 18 19 25 39 24 39 27 53 36 39 30 4 37 26 55 17 51 ...

output:

3 3 1 2 1 1 2 1 1 1 1 1 1 2 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #18:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

72 100
42 40 41 50 16 27 12 49 56 70 14 46 6 18 37 31 67 20 21 33 48 62 55 4 38 52 61 19 17 36 5 51 26 29 8 34 53 71 15 44 63 65 43 2 24 64 45 39 9 47 57 28 22 54 66 60 59 13 1 25 72 68 58 10 35 69 30 11 23 32 3 7
52 33 9 53 68 48 17 68 19 65 21 62 69 15 27 41 24 1 2 63 33 40 28 51 39 15 12 50 70 59...

output:

6 1 1 1 1 1 2 1 1 7 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #19:

score: 0
Accepted
time: 0ms
memory: 3784kb

input:

88 100
74 80 14 42 77 69 44 54 53 11 32 61 33 20 73 78 48 34 12 65 75 57 38 51 49 58 39 67 31 2 17 52 13 72 56 55 25 82 46 19 86 62 15 6 10 37 30 84 45 7 79 50 35 36 70 60 28 43 41 23 81 1 47 9 24 5 71 85 4 83 64 76 63 68 40 26 87 8 66 22 88 18 59 21 3 27 16 29
1 78 46 74 9 40 87 84 76 73 19 5 9 66 ...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #20:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

60 100
18 9 4 56 42 29 34 40 57 27 58 15 52 53 10 54 37 28 20 12 46 1 36 21 16 47 11 41 25 6 3 39 7 5 30 19 55 35 24 51 26 49 14 33 13 48 60 8 44 43 45 32 22 17 2 38 50 59 31 23
8 48 10 17 10 53 12 19 53 38 53 14 1 40 21 14 48 6 57 43 42 55 50 8 47 16 51 10 28 16 43 49 57 42 23 5 31 20 54 49 45 28 5...

output:

7 7 2 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #21:

score: 0
Accepted
time: 0ms
memory: 3460kb

input:

60 100
43 46 34 58 25 16 42 44 11 4 49 21 24 32 3 26 45 52 19 41 18 36 20 54 9 48 10 8 33 56 51 28 27 2 40 29 47 50 15 53 13 37 38 1 7 22 60 12 17 55 30 6 57 31 5 59 35 23 14 39
12 8 5 57 29 57 57 10 41 43 40 33 43 8 7 9 25 49 10 41 8 32 52 40 35 18 13 40 16 56 3 53 50 48 38 5 7 51 37 40 48 13 33 7 ...

output:

9 13 8 1 1 6 2 1 1 1 1 1 2 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #22:

score: 0
Accepted
time: 0ms
memory: 3736kb

input:

99 100
46 56 64 9 17 77 53 33 48 57 40 66 44 24 29 45 23 76 28 75 90 32 67 51 22 87 30 61 43 42 16 95 31 5 82 12 84 79 4 8 26 72 34 88 19 65 35 98 85 10 94 41 18 49 11 74 80 13 93 6 47 96 68 62 50 59 54 92 81 83 63 37 97 1 60 36 71 91 27 21 78 55 38 3 58 99 73 15 52 69 25 39 7 89 20 14 2 70 86
42 10...

output:

2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #23:

score: 0
Accepted
time: 0ms
memory: 3476kb

input:

90 100
35 68 2 52 3 81 14 86 29 82 39 60 61 78 72 41 34 18 15 37 31 62 65 70 50 6 56 20 46 21 69 42 67 77 87 12 25 57 47 80 36 17 75 30 24 23 84 83 64 8 49 73 43 40 38 22 45 19 76 53 13 26 11 1 74 48 33 10 54 44 5 28 9 85 63 88 58 59 89 51 66 27 79 90 32 16 71 4 55 7
12 15 41 53 64 73 7 44 26 24 11 ...

output:

9 1 1 1 1 1 1 1 1 1 2 2 1 2 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #24:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

84 100
61 66 43 47 79 51 45 41 49 78 28 84 34 75 9 39 68 40 19 26 73 80 76 2 57 22 58 15 83 5 64 37 42 48 4 35 23 54 8 69 81 62 67 17 11 6 38 44 55 12 24 46 56 29 16 14 32 33 18 59 72 77 71 65 36 82 31 63 70 25 53 50 7 74 30 27 3 52 1 20 13 10 21 60
15 37 66 81 4 31 4 2 79 15 11 50 3 54 60 15 35 82 ...

output:

1 2 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #25:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

54 100
38 34 21 35 40 15 28 22 16 5 6 2 8 48 47 9 31 33 29 7 39 45 3 17 44 49 20 11 43 50 25 10 26 42 30 23 24 46 14 18 41 12 53 27 37 54 4 51 32 36 13 1 52 19
46 52 28 13 10 30 5 13 40 7 33 41 33 50 6 45 29 13 48 12 41 3 41 21 20 8 17 31 9 21 44 47 37 33 29 32 51 12 35 27 32 15 11 53 6 27 9 28 52 2...

output:

3 3 4 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 3 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #26:

score: 0
Accepted
time: 0ms
memory: 3476kb

input:

100 100
21 30 90 1 4 50 89 55 14 99 48 76 59 97 73 26 93 19 74 92 62 5 98 40 8 47 16 32 78 94 20 7 41 35 2 44 61 68 49 34 91 23 45 38 17 13 87 56 25 79 96 6 52 54 57 58 36 53 69 75 42 9 85 72 46 51 80 15 66 22 84 67 24 100 64 43 27 63 10 28 29 81 65 83 3 77 88 95 12 60 86 70 18 31 39 37 82 11 33 71
...

output:

1 1 1 1 1 1 1 5 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #27:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

75 100
46 52 63 51 5 11 67 70 13 31 40 27 45 25 59 26 12 56 3 34 53 23 4 61 41 57 28 74 32 35 75 22 38 17 50 24 72 15 48 16 37 64 6 33 7 19 42 71 58 2 43 8 68 20 66 21 73 36 65 29 54 14 44 62 9 60 49 69 30 55 18 47 1 10 39
32 42 71 9 52 30 11 18 44 45 47 13 34 73 56 10 70 60 61 30 23 45 54 74 43 52 ...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #28:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

99 100
80 35 81 20 15 71 52 10 69 73 72 50 57 59 37 3 97 7 94 77 16 92 31 64 53 11 45 33 23 83 38 98 21 58 19 28 65 74 40 63 22 8 82 56 25 96 5 78 29 66 13 24 9 75 34 32 87 46 26 2 55 62 42 88 39 86 41 68 95 60 85 99 4 44 70 67 90 18 76 47 1 17 43 6 89 12 27 49 93 51 36 91 14 48 61 84 79 54 30
88 21...

output:

18 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #29:

score: 0
Accepted
time: 0ms
memory: 3452kb

input:

72 100
36 7 39 45 31 9 68 3 30 41 51 26 56 65 63 59 15 69 62 10 18 55 24 13 16 27 67 38 70 20 34 35 47 71 32 12 25 50 1 54 42 49 8 19 44 66 4 48 14 17 53 43 6 29 5 72 52 61 46 23 33 58 21 22 2 60 37 64 40 28 11 57
30 61 26 27 36 22 37 29 33 28 16 62 24 60 9 7 45 33 5 69 18 63 7 34 62 54 27 66 25 14 ...

output:

5 1 2 10 10 1 1 1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #30:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

56 100
27 42 53 43 49 12 18 23 38 26 6 25 33 28 44 5 50 52 39 3 9 55 4 14 16 17 51 35 21 20 13 15 29 10 36 30 22 7 56 19 8 32 46 48 47 41 54 24 40 37 34 45 2 31 1 11
18 8 37 13 8 42 51 38 7 50 54 22 48 41 19 7 24 40 34 28 12 34 25 12 35 24 24 45 26 54 13 41 49 30 45 39 22 12 25 16 28 38 43 29 3 7 45...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #31:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

96 100
54 42 72 15 33 38 37 69 56 88 25 93 91 57 34 4 59 85 92 2 71 86 52 39 48 63 77 80 68 43 31 65 61 11 89 55 60 19 12 45 95 10 18 50 13 76 82 67 83 70 94 6 24 96 17 58 36 47 23 62 22 41 44 35 74 64 46 53 87 84 75 32 21 40 20 73 16 8 7 1 28 9 3 14 51 90 26 81 66 49 27 79 78 30 29 5
95 9 44 25 29 ...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #32:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

90 100
68 75 76 50 2 67 34 87 12 70 60 9 18 38 82 28 33 8 5 55 39 20 46 7 42 47 27 57 81 44 59 52 69 86 11 1 56 16 79 65 30 62 31 84 64 78 13 77 45 74 36 10 24 54 15 51 53 25 26 88 14 58 73 72 49 48 3 29 89 80 37 21 19 22 4 90 85 17 41 61 35 43 66 71 40 23 83 32 6 63
67 61 51 87 59 22 31 18 25 29 4 ...

output:

1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #33:

score: 0
Accepted
time: 0ms
memory: 3468kb

input:

60 100
50 40 13 23 10 9 8 19 36 11 20 59 54 14 58 55 29 27 15 25 60 17 24 32 43 56 57 31 35 6 22 18 2 12 26 16 38 52 30 3 42 34 44 1 41 21 28 46 48 37 7 33 45 47 4 53 51 5 39 49
29 7 26 7 5 6 7 17 24 43 26 25 7 57 14 7 48 38 38 13 21 55 17 29 27 32 9 3 6 40 16 52 32 19 25 32 54 51 34 10 53 49 46 43 ...

output:

1 6 1 2 1 4 2 1 1 2 1 2 1 1 6 1 1 1 1 1 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #34:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

60 100
11 38 22 51 15 23 32 19 54 39 46 47 21 41 18 43 48 2 27 36 13 25 17 5 1 10 33 59 37 14 30 57 53 49 28 6 31 35 16 40 44 55 29 8 45 3 24 4 7 56 20 60 42 34 50 12 9 52 26 58
6 48 37 42 44 19 14 22 45 58 12 55 50 50 48 18 10 13 58 45 44 26 40 51 35 27 12 27 12 15 58 51 14 48 46 46 55 21 41 50 34 ...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #35:

score: 0
Accepted
time: 0ms
memory: 3532kb

input:

60 100
46 23 27 41 19 14 21 43 9 18 8 26 45 52 12 17 56 24 44 16 2 32 58 30 42 4 38 31 10 60 51 13 50 28 22 47 57 1 53 34 11 20 39 59 5 15 49 37 3 35 36 29 7 48 55 33 40 6 54 25
59 9 7 11 1 55 15 56 23 40 12 54 32 39 41 51 53 52 37 48 32 45 24 33 13 53 6 42 2 36 20 59 48 16 16 29 2 8 15 44 12 27 7 3...

output:

1 2 5 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #36:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

60 100
60 17 58 52 32 35 24 28 37 16 49 8 55 38 7 4 10 2 30 42 29 12 5 50 53 25 23 1 34 31 3 45 13 51 47 46 33 9 14 56 54 57 43 39 19 26 11 18 20 22 41 27 36 44 15 48 6 40 21 59
49 56 52 3 16 52 31 24 16 29 52 55 3 53 19 42 54 19 42 56 29 44 45 26 12 18 44 21 2 38 9 38 48 29 38 29 59 2 41 3 22 26 10...

output:

1 3 1 2 2 6 1 1 1 1 2 3 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Test #37:

score: 0
Accepted
time: 0ms
memory: 3720kb

input:

60 100
40 35 3 1 34 23 56 5 8 51 14 42 24 4 50 15 59 11 52 32 54 7 13 49 28 46 21 9 22 19 53 33 47 43 25 48 27 12 55 60 20 17 30 29 45 16 57 36 41 37 26 44 31 18 6 10 39 2 38 58
24 23 11 42 12 21 19 25 41 6 32 23 50 54 45 33 18 35 3 54 19 24 3 37 8 16 25 23 30 50 2 47 15 39 58 38 36 28 36 26 10 55 7...

output:

24 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

result:

ok 100 numbers

Subtask #2:

score: 0
Time Limit Exceeded

Test #38:

score: 0
Time Limit Exceeded

input:

147840 150000
51955 126047 19305 15169 98491 83561 117203 117454 128806 11992 121483 459 147794 90253 74660 36430 145671 95804 131911 2992 15875 98400 8460 42838 33469 140328 134827 18359 147461 133604 9654 131981 145644 85202 30317 25085 27990 11397 53520 142147 41480 126743 53905 49586 108298 6886...

output:

3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 ...

result:


Subtask #3:

score: 0
Time Limit Exceeded

Test #68:

score: 0
Time Limit Exceeded

input:

227561 300000
73189 67918 59157 26519 101740 188677 6268 205191 174583 176677 78190 126611 30812 65842 138072 18276 70837 103758 127302 2932 127000 49555 91327 7897 182706 108236 29655 56692 90510 215347 157427 104979 140920 184749 95668 45218 130382 120415 18647 165909 201803 36717 92674 209990 448...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:


Subtask #4:

score: 12
Accepted

Dependency #1:

100%
Accepted

Test #98:

score: 12
Accepted
time: 1ms
memory: 3616kb

input:

900 1000
43 860 256 252 850 780 424 883 290 746 669 61 846 257 388 764 105 851 243 834 733 492 867 327 160 775 427 45 272 766 628 133 714 23 30 700 477 554 161 104 22 240 679 106 42 711 235 396 357 174 818 408 316 773 301 291 640 144 495 426 732 845 622 126 345 516 561 612 414 87 412 79 879 101 750 ...

output:

9 2 1 3 1 1 1 5 1 3 7 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #99:

score: 0
Accepted
time: 0ms
memory: 3488kb

input:

960 1000
792 68 155 418 446 514 381 542 425 419 46 151 162 864 708 841 505 797 268 213 633 250 260 464 658 189 692 338 32 827 531 870 959 152 313 234 409 203 167 400 329 309 592 647 910 691 506 53 680 107 229 616 580 812 503 502 705 575 244 202 608 598 587 915 39 649 729 177 907 323 410 504 383 953 ...

output:

6 23 37 1 1 2 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #100:

score: 0
Accepted
time: 1ms
memory: 3748kb

input:

924 1000
364 835 883 81 367 140 624 791 80 478 804 523 15 707 88 751 849 383 657 19 687 464 910 549 611 426 136 303 913 304 811 300 588 58 172 613 882 660 151 516 787 608 425 52 816 373 371 781 161 35 391 116 656 610 76 113 617 325 921 338 915 693 276 366 392 345 668 815 618 902 757 117 726 868 852 ...

output:

48 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #101:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

960 1000
886 583 500 76 549 795 347 831 297 468 290 39 427 457 87 768 855 581 463 914 316 753 681 116 643 456 516 176 884 113 734 285 378 650 129 295 152 737 957 47 412 660 719 306 922 277 46 332 876 493 446 907 685 247 668 434 755 120 915 414 27 674 557 661 824 413 696 764 694 822 419 142 30 917 40...

output:

1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 57 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 4 1 3 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #102:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

936 1000
479 724 798 579 113 69 165 775 350 721 725 89 516 166 148 174 527 129 20 432 355 56 238 502 219 171 9 275 443 588 841 437 515 334 468 776 329 321 266 755 602 668 627 205 70 505 431 245 120 436 649 923 739 96 252 915 531 768 318 15 542 256 435 324 511 507 345 733 512 241 837 397 616 28 589 3...

output:

2 9 1 1 9 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 5 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 14 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #103:

score: 0
Accepted
time: 1ms
memory: 3500kb

input:

960 1000
773 789 3 422 700 149 295 343 785 88 951 248 499 416 937 548 418 920 503 941 202 692 755 472 58 960 924 842 876 668 117 122 341 844 630 350 333 647 411 653 56 892 570 94 351 900 830 296 898 204 265 218 180 915 667 633 4 731 796 43 619 543 657 55 716 101 604 18 196 263 65 825 832 742 745 358...

output:

1 2 1 1 2 2 2 8 1 1 2 1 7 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 2 2 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #104:

score: 0
Accepted
time: 1ms
memory: 3812kb

input:

900 1000
732 430 868 249 95 442 13 362 423 324 122 762 363 627 343 609 20 668 850 653 188 678 593 328 194 561 722 138 198 466 873 870 663 673 836 813 79 199 157 116 25 536 583 164 255 399 111 674 382 537 331 219 271 618 141 632 720 481 3 330 715 454 350 866 319 72 612 544 177 166 588 701 879 686 786...

output:

1 1 1 1 1 1 2 1 1 1 4 2 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #105:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

936 1000
741 123 181 433 30 59 812 876 717 839 391 702 586 820 920 859 451 465 108 345 112 858 474 27 258 840 675 763 151 242 887 125 155 75 649 751 430 244 24 425 248 782 692 528 312 165 589 445 915 393 732 513 285 32 214 502 74 376 512 47 247 252 292 644 163 620 842 353 410 607 556 158 93 590 505 ...

output:

7 1 1 1 1 1 4 1 4 1 4 1 4 1 1 1 4 1 1 2 1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #106:

score: 0
Accepted
time: 0ms
memory: 3488kb

input:

960 1000
617 220 64 406 373 956 437 472 465 892 898 816 43 921 60 868 453 846 146 642 653 51 332 430 367 709 178 450 773 897 423 22 837 170 265 215 7 37 177 154 660 699 402 219 144 747 342 509 95 611 88 374 657 948 857 347 591 151 689 548 719 908 301 449 258 831 543 830 825 677 115 866 143 139 285 9...

output:

4 49 1 4 5 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #107:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

924 1000
872 439 368 70 762 803 441 66 818 125 412 576 67 58 882 293 20 708 270 190 25 240 538 130 647 913 884 129 157 145 15 495 668 425 619 410 910 405 175 746 810 757 505 812 660 518 43 332 814 685 896 916 381 922 742 828 179 215 53 355 594 864 575 739 729 16 464 703 128 138 397 877 710 177 879 6...

output:

7 1 1 2 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 2 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #108:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

924 1000
100 234 869 27 538 7 478 885 758 206 866 535 783 319 910 247 795 489 17 414 707 205 433 601 623 883 523 170 387 855 625 404 371 167 117 733 706 527 114 669 223 710 378 35 318 261 528 878 683 865 37 428 757 180 45 576 399 567 539 550 494 158 416 487 464 876 425 86 473 690 532 633 349 221 192...

output:

1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #109:

score: 0
Accepted
time: 1ms
memory: 3560kb

input:

990 1000
727 58 213 244 728 724 662 717 906 867 609 916 354 620 261 796 821 197 553 71 633 322 46 912 964 718 323 714 977 899 886 572 59 310 352 602 667 888 844 871 797 829 260 272 550 690 223 214 648 268 329 855 936 738 878 445 227 198 897 65 358 863 142 651 356 744 588 348 676 297 246 409 483 813 ...

output:

1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #110:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

960 1000
943 758 273 836 97 809 90 645 348 561 756 897 642 875 699 520 638 277 721 358 883 776 703 787 747 263 695 465 731 184 550 245 438 94 53 158 331 166 470 455 504 493 274 330 876 37 543 74 752 601 723 662 930 286 688 941 365 934 182 587 566 378 698 48 476 923 284 67 521 663 81 505 105 343 46 3...

output:

7 7 2 57 2 2 1 1 2 1 12 1 1 5 1 1 2 1 1 1 1 1 1 1 2 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 8 1 1 1 1 1 22 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #111:

score: 0
Accepted
time: 1ms
memory: 3740kb

input:

960 1000
327 345 555 122 141 772 378 703 763 49 595 210 423 852 125 797 64 701 825 269 362 339 473 930 157 291 691 272 900 284 723 83 945 454 395 243 212 919 62 134 371 728 713 177 188 65 689 534 225 77 762 858 40 679 59 385 441 347 704 12 496 528 258 788 720 277 420 658 22 820 833 579 129 29 271 23...

output:

23 34 2 2 2 5 1 2 1 1 1 1 1 1 2 1 1 1 4 1 1 1 1 1 6 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #112:

score: 0
Accepted
time: 1ms
memory: 3560kb

input:

960 1000
550 770 783 641 684 942 80 344 158 165 579 272 432 382 498 767 937 935 645 134 853 53 557 26 2 70 167 443 777 561 859 452 136 849 25 754 424 351 75 678 756 539 556 85 437 94 843 542 620 400 146 251 940 211 427 566 137 262 609 43 923 936 526 639 4 196 832 768 627 613 879 554 461 325 619 954 ...

output:

2 1 1 1 2 7 5 1 1 1 1 1 1 1 1 1 2 1 7 1 1 1 2 1 1 1 4 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 2 1 2 1 1 7 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 22 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #113:

score: 0
Accepted
time: 1ms
memory: 3744kb

input:

960 1000
914 363 345 258 737 524 562 21 549 416 557 744 469 215 248 1 838 61 152 645 434 635 814 860 837 414 613 746 544 846 187 253 410 801 317 715 607 676 457 677 897 184 891 320 290 548 423 158 140 426 185 902 475 162 754 892 927 326 300 247 64 375 753 887 769 275 154 372 16 807 95 44 625 574 314...

output:

116 3 86 1 5 7 1 1 1 1 1 1 1 1 1 1 1 1 1 7 1 7 1 1 1 1 8 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #114:

score: 0
Accepted
time: 1ms
memory: 3504kb

input:

900 1000
700 400 848 72 642 865 799 606 445 14 397 695 146 772 364 850 356 4 598 499 346 174 160 126 742 83 148 134 205 645 101 639 560 271 760 284 369 575 886 314 98 27 664 224 254 864 96 118 371 553 194 661 304 491 164 727 833 5 824 321 128 563 683 462 483 801 240 743 534 785 429 450 610 763 758 3...

output:

3 3 3 1 1 1 1 3 3 1 26 1 1 1 1 7 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 26 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #115:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

900 1000
658 498 476 19 345 873 63 539 177 93 597 647 38 872 49 615 161 777 464 411 843 558 245 289 82 802 616 894 336 276 645 604 796 807 196 856 743 45 98 191 427 242 628 869 820 344 655 502 278 310 308 555 4 791 366 493 160 696 312 58 5 433 475 422 770 205 767 862 292 741 390 755 399 708 634 875 ...

output:

2 1 1 2 2 2 5 2 2 1 16 2 5 1 1 1 1 1 1 1 3 1 2 2 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #116:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

960 1000
893 943 479 357 493 173 164 692 612 850 39 469 537 155 736 662 396 709 440 127 498 334 451 1 599 773 454 95 388 556 722 468 529 176 530 90 235 914 307 495 324 632 903 845 345 672 434 564 704 559 359 10 900 389 884 477 650 146 80 888 93 330 380 86 286 586 265 150 348 5 232 168 461 116 936 79...

output:

2 13 2 2 2 1 1 2 1 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5...

result:

ok 1000 numbers

Test #117:

score: 0
Accepted
time: 1ms
memory: 3496kb

input:

936 1000
721 861 95 54 857 158 484 32 286 348 481 360 367 298 807 531 823 742 145 806 557 182 647 240 749 655 303 491 191 374 933 505 646 841 91 7 731 860 609 573 805 244 216 362 112 311 411 170 847 672 803 280 659 344 764 489 711 371 912 185 700 874 657 814 342 233 570 414 13 287 40 879 918 552 462...

output:

1 1 1 3 3 2 3 1 1 2 1 1 2 1 1 1 6 2 1 1 1 1 1 1 1 1 1 1 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 13 1 1 13 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 3 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #118:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

960 1000
870 33 685 82 746 49 676 830 770 642 342 431 744 330 929 356 165 41 186 806 957 156 210 590 688 605 12 410 692 203 578 358 359 29 933 283 666 114 649 606 407 214 137 813 854 307 737 547 204 530 579 734 193 684 367 448 944 719 823 260 718 281 654 219 341 817 901 655 275 395 434 940 218 501 7...

output:

6 6 2 1 1 1 1 2 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #119:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

960 1000
667 220 839 68 951 520 498 771 612 470 56 351 824 738 948 188 62 340 206 840 670 275 882 54 540 816 38 101 111 416 803 11 321 425 258 922 87 489 913 635 386 184 199 137 399 254 269 82 511 630 289 873 859 758 384 417 156 4 145 677 872 98 327 593 772 147 558 14 576 16 128 257 43 941 194 792 9...

output:

153 1 6 1 1 2 1 2 1 1 1 1 1 1 2 2 2 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #120:

score: 0
Accepted
time: 1ms
memory: 3492kb

input:

972 1000
604 692 243 728 779 663 120 193 48 651 697 306 659 477 503 784 804 89 350 180 463 823 893 917 895 903 909 301 533 71 846 376 811 767 94 883 574 564 507 34 928 500 752 680 709 849 844 592 812 192 128 923 160 834 208 961 821 148 112 364 643 861 536 227 336 530 261 84 32 610 24 753 69 661 855 ...

output:

9 3 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 17 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #121:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

960 1000
104 562 138 260 783 924 885 542 292 484 803 198 559 801 925 802 48 217 872 524 360 406 90 777 483 861 320 782 576 560 299 723 949 317 170 372 670 194 13 818 124 529 45 607 253 350 837 666 519 881 275 564 725 102 910 533 618 838 383 183 44 743 83 831 832 486 824 392 539 394 156 770 580 6 821...

output:

1 1 1 1 1 13 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #122:

score: 0
Accepted
time: 1ms
memory: 3612kb

input:

900 1000
740 642 275 678 486 886 266 815 515 695 595 723 492 496 587 340 291 63 30 369 257 28 702 736 447 827 238 440 555 700 883 825 779 521 685 865 891 117 593 5 728 701 864 252 681 801 84 451 206 617 691 70 103 577 785 245 320 882 55 889 510 805 98 250 293 803 879 313 97 167 458 207 876 414 13 1 ...

output:

8 1 1 1 1 3 1 3 1 3 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 16 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 9 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #123:

score: 0
Accepted
time: 1ms
memory: 3560kb

input:

990 1000
132 405 123 343 103 930 785 718 721 724 698 260 564 229 64 395 710 810 597 627 244 215 348 19 115 892 969 945 442 292 919 978 976 105 759 421 814 72 278 23 93 973 616 382 774 231 656 763 328 517 175 658 956 36 56 497 455 674 264 646 756 867 476 734 563 769 171 194 135 165 266 222 686 161 37...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #124:

score: 0
Accepted
time: 1ms
memory: 3500kb

input:

900 1000
880 837 178 4 297 211 460 506 649 285 721 881 690 853 288 104 56 44 134 552 114 795 811 683 107 883 39 615 355 789 522 606 679 149 539 41 45 93 263 103 467 34 588 439 893 803 638 820 459 760 352 874 876 321 430 628 54 221 666 94 57 675 625 575 567 427 225 823 573 158 899 735 2 543 550 631 7...

output:

1 2 1 2 2 1 1 1 1 1 3 2 1 1 1 1 1 1 2 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #125:

score: 0
Accepted
time: 1ms
memory: 3568kb

input:

910 1000
180 14 62 532 158 230 157 223 832 848 187 291 868 385 261 696 469 569 658 762 466 417 531 479 145 780 402 733 736 760 567 715 894 895 272 769 862 650 99 836 521 831 191 639 468 5 908 428 129 861 510 465 751 478 634 242 528 704 826 550 744 10 70 579 447 703 653 122 352 309 353 697 234 390 61...

output:

4 1 1 1 1 1 4 1 1 2 1 2 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 ...

result:

ok 1000 numbers

Test #126:

score: 0
Accepted
time: 1ms
memory: 3748kb

input:

960 1000
556 600 654 317 318 432 642 139 284 709 613 226 640 243 308 395 783 843 625 902 536 23 208 839 758 791 691 497 1 701 805 836 186 430 724 344 775 682 167 713 623 830 24 113 272 924 930 504 54 18 428 948 297 35 491 727 745 746 892 73 710 221 515 937 187 331 210 895 610 43 472 939 171 142 486 ...

output:

54 13 2 1 1 1 79 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 22 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #127:

score: 0
Accepted
time: 1ms
memory: 3576kb

input:

840 1000
596 835 215 424 497 122 150 707 468 515 510 756 456 697 250 543 67 151 443 49 203 199 572 829 644 228 87 179 268 791 99 739 788 592 579 314 351 831 743 422 672 640 18 237 64 111 724 213 542 481 340 350 717 455 523 251 737 284 601 121 46 368 83 59 790 317 108 768 262 725 38 577 277 568 741 2...

output:

1 6 14 1 18 1 27 3 1 1 1 1 1 3 3 1 1 1 3 1 3 1 3 1 1 1 1 1 3 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #128:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

840 1000
752 450 314 438 372 182 770 768 74 448 507 489 693 116 93 358 669 30 54 43 825 346 730 498 686 261 606 296 384 238 69 330 52 176 158 455 275 339 350 300 213 456 407 719 203 404 204 667 746 199 420 154 187 728 429 643 193 491 605 567 125 628 34 622 380 570 815 796 437 421 461 319 532 471 35 ...

output:

4 3 3 1 3 14 1 1 1 1 8 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1...

result:

ok 1000 numbers

Test #129:

score: 0
Accepted
time: 1ms
memory: 3576kb

input:

840 1000
53 840 198 692 163 466 416 170 522 228 424 128 711 648 575 219 695 348 540 565 454 57 67 337 153 654 625 451 180 836 160 106 148 651 773 158 737 76 322 516 135 738 703 704 238 96 221 267 787 448 559 111 794 670 362 732 450 65 97 431 18 505 723 712 286 26 557 600 241 436 220 137 776 708 486 ...

output:

53 1 1 6 1 1 2 1 1 1 2 1 1 1 1 1 1 1 2 1 1 3 1 2 1 1 1 1 1 1 2 3 1 1 3 1 1 5 1 1 1 1 1 1 6 1 1 1 1 1 2 1 1 5 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #130:

score: 0
Accepted
time: 1ms
memory: 3504kb

input:

840 1000
547 335 222 304 310 493 349 553 634 399 328 254 740 583 178 529 505 351 361 794 129 173 772 517 226 545 317 407 381 69 232 544 32 67 259 744 473 654 125 211 196 468 266 750 245 719 397 236 410 391 633 582 723 555 749 516 753 85 207 365 380 369 763 696 510 34 224 124 78 171 334 638 590 385 1...

output:

258 1 6 4 7 1 104 1 1 3 1 1 1 2 1 1 1 1 3 1 1 1 1 2 1 1 1 1 1 1 1 3 1 1 2 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Test #131:

score: 0
Accepted
time: 1ms
memory: 3560kb

input:

840 1000
363 271 153 448 567 237 118 837 154 501 818 514 576 243 469 464 710 230 820 81 147 253 102 181 761 344 84 300 733 285 462 57 288 758 24 422 17 548 633 726 185 218 366 551 433 675 93 205 135 654 373 372 25 581 483 303 652 751 554 600 283 262 168 406 529 715 682 465 172 724 516 618 412 198 45...

output:

1 1 1 3 2 1 1 1 1 27 1 1 1 1 1 1 1 4 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 1000 numbers

Test #132:

score: 0
Accepted
time: 1ms
memory: 3492kb

input:

990 1000
496 882 522 492 384 108 434 106 728 139 732 215 153 798 472 520 364 275 57 906 23 726 889 223 359 188 217 289 831 399 888 94 558 330 671 567 409 371 246 400 640 596 797 648 52 933 247 372 515 447 165 5 432 930 2 245 838 30 658 118 617 966 805 945 396 849 960 915 926 436 749 147 191 846 536 ...

output:

1 1 3 2 2 1 1 1 2 2 2 1 1 3 3 2 1 2 1 1 1 2 1 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 1000 numbers

Subtask #5:

score: 0
Time Limit Exceeded

Test #133:

score: 16
Accepted
time: 26ms
memory: 3504kb

input:

2048 150000
1369 1292 383 872 441 332 63 1307 1335 1731 24 261 1699 1215 1818 1136 560 358 211 1165 723 1514 1670 241 598 474 317 1182 658 1596 1352 1663 406 1326 1461 678 366 768 581 216 50 822 1746 1860 1403 1052 370 1413 1440 1559 1029 1575 512 713 377 821 1425 1868 1944 338 459 322 1799 96 874 6...

output:

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok 150000 numbers

Test #134:

score: 0
Accepted
time: 31ms
memory: 3944kb

input:

16384 150000
15392 9505 2237 11880 261 8536 772 5292 3644 4865 2000 7364 1516 4607 14501 5389 16197 3991 14951 4939 2338 3782 4915 5825 13455 2362 11280 7857 15066 9450 12053 8868 9275 2344 8631 9563 16118 5625 8623 14061 1125 12524 10163 6515 5378 13703 3534 3566 13274 11397 13919 14518 3063 15879 ...

output:

1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 34 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

result:

ok 150000 numbers

Test #135:

score: -16
Time Limit Exceeded

input:

65536 150000
39172 40521 55161 2079 61793 52678 23134 29303 55470 16330 65147 26352 36558 7807 24815 30139 39596 59302 45596 16523 9990 35180 19880 65162 59489 29183 62338 50093 11974 35574 44676 11218 6467 50457 13262 14446 45643 61964 24472 7602 56879 64476 61295 44984 9876 16217 8802 50800 44296 ...

output:

1 1 1 1 2 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:


Subtask #6:

score: 0
Time Limit Exceeded

Dependency #4:

100%
Accepted

Test #163:

score: 0
Time Limit Exceeded

input:

99792 100000
51390 66556 871 78039 87466 23484 32791 56052 58555 54489 14533 19663 20400 35462 29954 55337 32979 98923 59257 5167 95156 42178 51601 40124 13680 89665 30261 89599 54939 51288 14394 47009 35682 86540 34768 16039 79768 34931 99212 99093 35423 18137 6661 59765 23705 69585 82465 36865 544...

output:

1 42 1 1 1 5 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 25 1 9 1 1 1 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:


Subtask #7:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%