inst_id stringlengths 3 46 | split stringclasses 1
value | description stringlengths 224 7.95k | time_limit_ms int64 500 10k | memory_limit_mb int64 16 1.07k | solution_a dict | solution_b dict | selection dict | judgement dict | source_batch stringclasses 2
values |
|---|---|---|---|---|---|---|---|---|---|
1003_A | train | Polycarp has n coins, the value of the i-th coin is a_i. Polycarp wants to distribute all the coins between his pockets, but he cannot put two coins with the same value into the same pocket.
For example, if Polycarp has got six coins represented as an array a = [1, 2, 4, 3, 3, 2], he can distribute the coins into two ... | 1,000 | 256 | {
"solution_idx": 109,
"prog_id": 713,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nint p[100];\nint main() {\n int n, a[100], cnt = 1, max = 0;\n scanf(\"%d\", &n);\n for (int i = 0; i < n; i++) scanf(\"%d\", &a[i]);\n for (int i = 1; i < n; i++) {\n for (int j = 0; j < n - i; j++) {\n if ... | {
"solution_idx": 232,
"prog_id": 1619,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nusing ll = long long;\nconst int MOD = 1000000007;\nvoid scan(int& a) { scanf(\"%d\", &a); }\nvoid scan(long long& a) { scanf(\"%lld\", &a); }\ntemplate <class T>\nvoid scan(T& a) {\n cin >> a;\n... | {
"funnel_score": 0.9449760765550239,
"n_pool": 233,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1003_C | train | The heat during the last few days has been really intense. Scientists from all over the Berland study how the temperatures and weather change, and they claim that this summer is abnormally hot. But any scientific claim sounds a lot more reasonable if there are some numbers involved, so they have decided to actually cal... | 4,000 | 256 | {
"solution_idx": 58,
"prog_id": 178,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int INF = 1e9;\nconst int MAXN = 5000;\nstruct Point {\n int x, y;\n Point operator-(const Point &p) const { return {x - p.x, y - p.y}; }\n long long cross(const Point &p) const {\n ret... | {
"solution_idx": 144,
"prog_id": 388,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nusing namespace std::chrono;\nvoid solve() {\n long long int n, i, m = 0, q = 0, mx = -20000000000000000,\n mn = 20000000000000000, k = 0, j = 0, c = 0, d = 0, t = 0,\n ... | {
"funnel_score": 0.9555555555555556,
"n_pool": 176,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1003_D | train | Polycarp has n coins, the value of the i-th coin is a_i. It is guaranteed that all the values are integer powers of 2 (i.e. a_i = 2^d for some non-negative integer number d).
Polycarp wants to know answers on q queries. The j-th query is described as integer number b_j. The answer to the query is the minimum number of... | 2,000 | 256 | {
"solution_idx": 22,
"prog_id": 38,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvoid __print(int x) { cerr << x; }\nvoid __print(long x) { cerr << x; }\nvoid __print(long long x) { cerr << x; }\nvoid __print(unsigned x) { cerr << x; }\nvoid __print(unsigned long x) { cerr << x;... | {
"solution_idx": 64,
"prog_id": 120,
"provenance": "R",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n, k;\n cin >> n >> k;\n vector<int> v, u;\n unordered_map<int, int> m;\n for (int i = 0; i < n; i++) {\n int a;\n cin >> a;\n if (m.find(a) == m.end()) {\n v.p... | {
"funnel_score": 0.9676470588235294,
"n_pool": 184,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "identical",
"different": false
},
{
"judge": "haiku",
... | build-10k |
1003_E | train | You are given three integers n, d and k.
Your task is to construct an undirected tree on n vertices with diameter d and degree of each vertex at most k, or say that it is impossible.
An undirected tree is a connected undirected graph with n - 1 edges.
Diameter of a tree is the maximum length of a simple path (a path... | 4,000 | 256 | {
"solution_idx": 6,
"prog_id": 7,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, d, k;\nint tot, cnt;\nvoid dfs(int u, int lev, int ch) {\n if (!lev) return;\n for (int i = (1); i <= (ch); i += (1)) {\n int v = ++cnt;\n printf(\"%d %d\\n\", u, v);\n if (cnt == tot... | {
"solution_idx": 23,
"prog_id": 37,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nusing lint = long long;\nconst int inf = 1000000007;\nconst int MOD = 1000000007;\nstruct Node {\n int no;\n int par;\n int dist;\n bool flag;\n vector<Node*> child;\n void build(int i) {\n ... | {
"funnel_score": 0.9823529411764707,
"n_pool": 178,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1003_F | train | You are given a text consisting of n space-separated words. There is exactly one space character between any pair of adjacent words. There are no spaces before the first word and no spaces after the last word. The length of text is the number of letters and spaces in it. w_i is the i-th word of text. All words consist ... | 1,000 | 256 | {
"solution_idx": 37,
"prog_id": 49,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long BASE1 = 123456789;\nconst long long BASE2 = 987654321;\nconst long long MOD = 998244353;\nconst int INF = 1000000;\nlong long modpow(long long a, long long b) {\n long long ans = 1;\... | {
"solution_idx": 100,
"prog_id": 134,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nclass Solution {\n public:\n Solution() : _idx(), _a(), _c(), _len(), _total(-1) {}\n void add_word(const string& s) {\n _total += s.size() + 1;\n int i = get_idx(s);\n _a.push_back(i);... | {
"funnel_score": 0.9747899159663865,
"n_pool": 159,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1004_A | train | Sonya decided that having her own hotel business is the best way of earning money because she can profit and rest wherever she wants.
The country where Sonya lives is an endless line. There is a city in each integer coordinate on this line. She has n hotels, where the i-th hotel is located in the city with coordinate ... | 1,000 | 256 | {
"solution_idx": 32,
"prog_id": 131,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\ntemplate <typename A, typename B>\nstring to_string(pair<A, B> p);\ntemplate <typename A, typename B, typename C>\nstring to_string(tuple<A, B, C> p);\ntemplate <typename A, typename B, typename C, ... | {
"solution_idx": 185,
"prog_id": 698,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long dx[4] = {-1, 0, 1, 0};\nlong long dy[4] = {0, 1, 0, -1};\nint main() {\n long long a[100005], t, i = 0, j, k, p, q, n, m, count = 0, flag = 0, ans = 0,\n sum = 0... | {
"funnel_score": 0.9555555555555555,
"n_pool": 230,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1004_B | train | Sonya decided to organize an exhibition of flowers. Since the girl likes only roses and lilies, she decided that only these two kinds of flowers should be in this exhibition.
There are n flowers in a row in the exhibition. Sonya can put either a rose or a lily in the i-th position. Thus each of n positions should cont... | 1,000 | 256 | {
"solution_idx": 205,
"prog_id": 594,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main(int argc, char const *argv[]) {\n ios_base::sync_with_stdio(false);\n cin.tie(NULL);\n int n, m;\n cin >> n >> m;\n vector<vector<int> > G(n + 5, vector<int>(0));\n int c[m + 5][2];\... | {
"solution_idx": 223,
"prog_id": 660,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nlong long dx[4] = {0, -1, 0, 1};\nlong long dy[4] = {1, 0, -1, 0};\nusing namespace std;\nclass pa3 {\n public:\n long long x, y, z;\n pa3(long long x = 0, long long y = 0, long long z = 0) : x(x), y(y), z(z) {}\n bo... | {
"funnel_score": 0.95,
"n_pool": 228,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1004_C | train | Since Sonya is interested in robotics too, she decided to construct robots that will read and recognize numbers.
Sonya has drawn n numbers in a row, a_i is located in the i-th position. She also has put a robot at each end of the row (to the left of the first number and to the right of the last number). Sonya will giv... | 1,000 | 256 | {
"solution_idx": 83,
"prog_id": 183,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n, temp;\n long long cou = 0;\n cin >> n;\n multiset<int> b;\n set<int> a;\n set<int> d;\n map<int, int> t;\n vector<int> r;\n for (int i = 0; i < n; i++) {\n cin >> t... | {
"solution_idx": 189,
"prog_id": 445,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long Set(long long n, long long pos) { return n | (1LL << pos); }\nbool Check(long long n, long long pos) { return (bool)(n & (1LL << pos)); }\nlong long ar[100010];\nlong long tree[400010];\... | {
"funnel_score": 0.9539473684210527,
"n_pool": 223,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1004_D | train | Since Sonya has just learned the basics of matrices, she decided to play with them a little bit.
Sonya imagined a new type of matrices that she called rhombic matrices. These matrices have exactly one zero, while all other cells have the Manhattan distance to the cell containing the zero. The cells with equal numbers ... | 2,000 | 256 | {
"solution_idx": 83,
"prog_id": 99,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint a[1000000];\nint main() {\n int i, f, m;\n bool z;\n int x, y, lx, ly, rx, ry;\n int t;\n scanf(\"%i\", &t);\n memset(a, 0, sizeof(int) * 1000000);\n m = 0;\n for (i = 0; i < t; i++) {\n ... | {
"solution_idx": 155,
"prog_id": 185,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvector<long long> v;\nlong long t;\nvoid test(long long up, long long lf, long long dn, long long rg) {\n long long w, h;\n if (dn == -1) {\n w = lf + rg + 1;\n if (t % w != 0) return;\n ... | {
"funnel_score": 0.8492063492063492,
"n_pool": 175,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1004_E | train | Sonya likes ice cream very much. She eats it even during programming competitions. That is why the girl decided that she wants to open her own ice cream shops.
Sonya lives in a city with n junctions and n-1 streets between them. All streets are two-way and connect two junctions. It is possible to travel from any junct... | 2,000 | 256 | {
"solution_idx": 71,
"prog_id": 86,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long N, K;\nlong long sz[100010], U[100010], D[100010];\nvector<pair<int, int>> adjlist[100010];\nbool check_diam(int x) {\n queue<int> q;\n long long s = 0, counter = N;\n for (int i = 1; i ... | {
"solution_idx": 157,
"prog_id": 182,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, m, first[100100], bb, mx[100100], m2[100100], up[100100], son[100100],\n fa[100100], need[100100], gen, t, t2, l, r, lx, rx, lt, rt, ans;\nbool use[100100];\npair<int, int> tmp;\nstruct ... | {
"funnel_score": 0.9323529411764706,
"n_pool": 169,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1004_F | train | Sonya has an array a_1, a_2, …, a_n consisting of n integers and also one non-negative integer x. She has to perform m queries of two types:
* 1 i y: replace i-th element by value y, i.e. to perform an operation a_{i} := y;
* 2 l r: find the number of pairs (L, R) that l≤ L≤ R≤ r and bitwise OR of all integers in... | 4,000 | 512 | {
"solution_idx": 117,
"prog_id": 122,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long N, M, X;\ntemplate <typename T, typename F>\nstruct SEGMENT_TREE {\n long long Li, Ri;\n long long pt = 0;\n vector<T> ST;\n vector<long long> L;\n vector<long long> R;\n vector<boo... | {
"solution_idx": 141,
"prog_id": 147,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long N = 1e6 + 5;\nlong long n, m, val, a[N], tree[N * 4], tree2[N * 4], lazy[N * 4];\ninline long long read() {\n long long res = 0, f = 1;\n char c = getchar();\n while (!isdigit(c)... | {
"funnel_score": 0.9769736842105263,
"n_pool": 151,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1005_A | train | Little girl Tanya climbs the stairs inside a multi-storey building. Every time Tanya climbs a stairway, she starts counting steps from 1 to the number of steps in this stairway. She speaks every number aloud. For example, if she climbs two stairways, the first of which contains 3 steps, and the second contains 4 steps,... | 1,000 | 256 | {
"solution_idx": 69,
"prog_id": 400,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nint main() {\n int num, i, j, c = 0, d = 0, e;\n scanf(\"%d\", &num);\n int a[num];\n for (i = 0; i < num; i++) {\n scanf(\"%d\", &a[i]);\n if (a[i] == 1) {\n c++;\n }\n }\n int b[c];\n for (i = 0; i... | {
"solution_idx": 86,
"prog_id": 469,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n ios_base::sync_with_stdio(false);\n cin.tie(0);\n cout.tie(0);\n int TESTS = 1;\n while (TESTS--) {\n long long n;\n cin >> n;\n vector<long long int> a(n);\n for (lo... | {
"funnel_score": 0.861764705882353,
"n_pool": 254,
"pair_rank": 1
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "variation",
"different": false
},
{
"judge": "haiku",
... | build-10k |
1005_D | train | Polycarp likes numbers that are divisible by 3.
He has a huge number s. Polycarp wants to cut from it the maximum number of numbers that are divisible by 3. To do this, he makes an arbitrary number of vertical cuts between pairs of adjacent digits. As a result, after m such cuts, there will be m+1 parts in total. Poly... | 3,000 | 256 | {
"solution_idx": 55,
"prog_id": 140,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint sif(char c) { return c - '0'; }\nchar s[200005];\nint c[200005];\nbool zauz[200005];\nint main() {\n int i, n, br = 0;\n scanf(\"%s\", s);\n n = strlen(s);\n for (i = 0; i < n; i++) {\n c... | {
"solution_idx": 180,
"prog_id": 531,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvoid Fast() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); }\nvoid File() {}\nint gcd(int a, int b) {\n if (b == 0) return a;\n return gcd(b, a % b);\n}\nint lcm(int a, int b) { return ... | {
"funnel_score": 0.9576719576719577,
"n_pool": 185,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1005_E1 | train | You are given a permutation p_1, p_2, ..., p_n. A permutation of length n is a sequence such that each integer between 1 and n occurs exactly once in the sequence.
Find the number of pairs of indices (l, r) (1 ≤ l ≤ r ≤ n) such that the value of the median of p_l, p_{l+1}, ..., p_r is exactly the given number m.
The ... | 3,000 | 256 | {
"solution_idx": 111,
"prog_id": 170,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n ios::sync_with_stdio(false);\n cin.tie(0);\n long long int n, m, ind = -1;\n cin >> n >> m;\n map<long long int, long long int> premp, sufmp;\n vector<long long int> a(n);\n v... | {
"solution_idx": 279,
"prog_id": 460,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std::chrono;\nusing namespace std;\nbool IOerror = 0;\ninline char nc() {\n static char buf[1000000], *p1 = buf + 1000000, *pend = buf + 1000000;\n if (p1 == pend) {\n p1 = buf;\n pend = buf + f... | {
"funnel_score": 0.9481481481481482,
"n_pool": 282,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1005_E2 | train | You are given an integer sequence a_1, a_2, ..., a_n.
Find the number of pairs of indices (l, r) (1 ≤ l ≤ r ≤ n) such that the value of median of a_l, a_{l+1}, ..., a_r is exactly the given number m.
The median of a sequence is the value of an element which is in the middle of the sequence after sorting it in non-dec... | 3,000 | 256 | {
"solution_idx": 110,
"prog_id": 137,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvoid toFile(string name) {\n freopen((name + \".inp\").c_str(), \"r\", stdin);\n freopen((name + \".out\").c_str(), \"w\", stdout);\n}\nlong long ceil(long long a, long long x) {\n return (a % x... | {
"solution_idx": 114,
"prog_id": 141,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std::chrono;\nusing namespace std;\nbool IOerror = 0;\ninline char nc() {\n static char buf[1000000], *p1 = buf + 1000000, *pend = buf + 1000000;\n if (p1 == pend) {\n p1 = buf;\n pend = buf + f... | {
"funnel_score": 0.7962962962962963,
"n_pool": 137,
"pair_rank": 1
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1005_F | train | There are n cities in Berland. Some pairs of cities are connected by roads. All roads are bidirectional. Each road connects two different cities. There is at most one road between a pair of cities. The cities are numbered from 1 to n.
It is known that, from the capital (the city with the number 1), you can reach any o... | 5,000 | 256 | {
"solution_idx": 66,
"prog_id": 76,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, m, k;\nstruct Edge {\n int a, b;\n};\nEdge edges[200010];\nstruct Node {\n std::vector<int> connectEdges;\n std::vector<int> connectNodes;\n int depth;\n std::vector<int> parentEdges;\n ... | {
"solution_idx": 89,
"prog_id": 110,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nusing ll = long long;\nusing pii = pair<int, int>;\nusing vi = vector<int>;\nusing vll = vector<ll>;\nint N, M, K;\nvector<string> ans;\nvoid f(int u, vector<vi> &cand, string &re, vi &U, vi &V) {\n... | {
"funnel_score": 0.9603174603174602,
"n_pool": 176,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1006_A | train | Mishka got an integer array a of length n as a birthday present (what a surprise!).
Mishka doesn't like this present and wants to change it somehow. He has invented an algorithm and called it "Mishka's Adjacent Replacements Algorithm". This algorithm can be represented as a sequence of steps:
* Replace each occurre... | 1,000 | 256 | {
"solution_idx": 35,
"prog_id": 203,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int tc;\n cin >> tc;\n while (tc--) {\n int n;\n cin >> n;\n if (n % 2 == 0)\n cout << n - 1 << \" \";\n else\n cout << n << \" \";\n }\n return 0;\n}\n",
... | {
"solution_idx": 262,
"prog_id": 1399,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvector<int> rep(vector<int>& y) {\n int x, yy, firstdec, firstdig, removed;\n for (int i = 0; i < y.size(); i++) {\n x = y[i] % 10;\n yy = (y[i] - x) / 10;\n if (yy == 0) {\n if (y... | {
"funnel_score": 0.9814814814814814,
"n_pool": 267,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1006_B | train | Polycarp is practicing his problem solving skill. He has a list of n problems with difficulties a_1, a_2, ..., a_n, respectively. His plan is to practice for exactly k days. Each day he has to solve at least one problem from his list. Polycarp solves the problems in the order they are given in his list, he cannot skip ... | 2,000 | 256 | {
"solution_idx": 11,
"prog_id": 59,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvector<int> resp;\nvector<int> der_2;\nvector<int> izq_2;\nvector<int> vec;\nvector<int> der;\nvector<int> izq;\nvector<int> sol;\nvoid Merge(int p, int q, int r) {\n der.resize(q - p + 1);\n izq.r... | {
"solution_idx": 40,
"prog_id": 163,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint N, K;\nint arr[2000][2] = {0};\nint profit[2000][2] = {0};\nint minInfo[2] = {0};\nvoid getMin() {\n int temp;\n int idx;\n for (int i = 0; i < K; i++) {\n if (i == 0) {\n temp = prof... | {
"funnel_score": 0.9206349206349207,
"n_pool": 201,
"pair_rank": 1
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
1006_C | train | You are given an array d_1, d_2, ..., d_n consisting of n integer numbers.
Your task is to split this array into three parts (some of which may be empty) in such a way that each element of the array belongs to exactly one of the three parts, and each of the parts forms a consecutive contiguous subsegment (possibly, em... | 1,000 | 256 | {
"solution_idx": 32,
"prog_id": 164,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nconst int M = 1e9 + 7;\nusing namespace std;\nlong long power(long long a, long long b) {\n int result = 1;\n while (b > 0) {\n if (b % 2 == 1) {\n result *= a;\n }\n a *= a;\n b /= 2;\n }\n return r... | {
"solution_idx": 86,
"prog_id": 374,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n;\n deque<long> dq;\n long a;\n long long s1 = 0, s2 = 0, s3 = 0;\n cin >> n;\n for (int i = 0; i < n; i++) {\n cin >> a;\n dq.push_back(a);\n }\n int l = dq.size()... | {
"funnel_score": 0.9391534391534391,
"n_pool": 198,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1006_E | train | In this problem you will have to help Berland army with organizing their command delivery system.
There are n officers in Berland army. The first officer is the commander of the army, and he does not have any superiors. Every other officer has exactly one direct superior. If officer a is the direct superior of officer... | 3,000 | 256 | {
"solution_idx": 127,
"prog_id": 246,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n map<int, set<int> > mymap;\n stack<int> s;\n map<int, int> visit;\n vector<int> ans;\n map<int, int> index;\n map<int, int> co;\n int n, q;\n scanf(\"%d %d\", &n, &q);\n int... | {
"solution_idx": 202,
"prog_id": 413,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nusing pi = pair<long long, long long>;\nusing vi = vector<long long>;\nusing vvi = vector<vector<long long> >;\nconst long long NUM = 1000030;\nconst long long N = 10000000;\nvector<long long> lp, ... | {
"funnel_score": 0.9312169312169312,
"n_pool": 206,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1006_F | train | There is a rectangular grid of size n × m. Each cell has a number written on it; the number on the cell (i, j) is a_{i, j}. Your task is to calculate the number of paths from the upper-left cell (1, 1) to the bottom-right cell (n, m) meeting the following constraints:
* You can move to the right or to the bottom onl... | 3,000 | 256 | {
"solution_idx": 107,
"prog_id": 153,
"provenance": "PR",
"code": "#include <bits/stdc++.h>\nusing namespace std;\n#pragma comment(linker, \"/stack:200000000\")\n#pragma GCC optimize(\"Ofast\")\n#pragma GCC target(\"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native\")\ntemplate <typename T>\nbool mmax(T ... | {
"solution_idx": 169,
"prog_id": 249,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nusing ll = long long;\nusing ld = double;\nusing pll = pair<ll, ll>;\nusing vll = vector<ll>;\nusing vpll = vector<pll>;\nusing vvll = vector<vll>;\nset<ll> mtx[21][21];\nmap<ll, ll> cnts[21][21];... | {
"funnel_score": 0.8111111111111111,
"n_pool": 185,
"pair_rank": 2
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
1007_D | train | There is a tree with n vertices. There are also m ants living on it. Each ant has its own color. The i-th ant has two favorite pairs of vertices: (a_i, b_i) and (c_i, d_i). You need to tell if it is possible to paint the edges of the tree in m colors so that every ant will be able to walk between vertices from one of i... | 3,000 | 768 | {
"solution_idx": 40,
"prog_id": 40,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }\nstruct ImplicitKosaraju {\n int n;\n int (*unmarkedadj)(int, bool);\n void (*mark)(int, bool);\n void (*reset)();\... | {
"solution_idx": 48,
"prog_id": 48,
"provenance": "P",
"code": "#include <bits/stdc++.h>\ntemplate <class T>\nstruct _iter_wrapper {\n T begin_, end_;\n T begin() { return begin_; }\n T end() { return end_; }\n};\ntemplate <class T>\n_iter_wrapper<const T*> span(const T* arr, int n) {\n return _iter_wrappe... | {
"funnel_score": 0.75,
"n_pool": 65,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1007_E | train | In a simplified version of a "Mini Metro" game, there is only one subway line, and all the trains go in the same direction. There are n stations on the line, a_i people are waiting for the train at the i-th station at the beginning of the game. The game starts at the beginning of the 0-th hour. At the end of each hour ... | 2,000 | 256 | {
"solution_idx": 7,
"prog_id": 7,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nstruct station_t {\n long long a, b, c;\n};\nstruct solver_t {\n vector<station_t> st;\n int total_ns, total_nt, k;\n solver_t(const vector<station_t> &_stations, int _nt, int _k)\n : st(_stat... | {
"solution_idx": 58,
"prog_id": 58,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int N = 207;\nint n, t, k, ft[N];\nlong long a[N], w[N], b[N], c[N], g1[N][N][N], g2[N][N], g3[N], g4[N], dp[N][N];\ninline int read() {\n int num = 0;\n char g = getchar();\n while (g < 48 ... | {
"funnel_score": 0.9671052631578947,
"n_pool": 83,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1008_B | train | There are n rectangles in a row. You can either turn each rectangle by 90 degrees or leave it as it is. If you turn a rectangle, its width will be height, and its height will be width. Notice that you can turn any number of rectangles, you also can turn all or none of them. You can not change the order of the rectangle... | 2,000 | 256 | {
"solution_idx": 47,
"prog_id": 170,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long kol;\nint main() {\n long long n, w, h, back;\n cin >> n >> w >> h;\n back = max(w, h);\n for (int i = 2; i <= n; i++) {\n long long w, h;\n cin >> w >> h;\n if (kol == 0 && w... | {
"solution_idx": 54,
"prog_id": 195,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nbool f(vector<vector<int>> arr, int n) {\n int curr = arr[0][0], i = 1;\n for (i = 1; i < n; i++) {\n if (curr >= arr[i][0] && curr >= arr[i][1]) {\n curr = max(arr[i][0], arr[i][1]);\n ... | {
"funnel_score": 0.9043062200956937,
"n_pool": 218,
"pair_rank": 2
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1008_C | train | You are given an array of integers. Vasya can permute (change order) its integers. He wants to do it so that as many as possible integers will become on a place where a smaller integer used to stand. Help Vasya find the maximal number of such integers.
For instance, if we are given an array [10, 20, 30, 40], we can pe... | 2,000 | 256 | {
"solution_idx": 67,
"prog_id": 156,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\ntemplate <typename T1, typename T2>\ninline void chkmin(T1 &x, T2 y) {\n if (x > y) x = y;\n}\ntemplate <typename T1, typename T2>\ninline void chkopt(T1 &x, T2 y) {\n if (x < y) x = y;\n}\ntempla... | {
"solution_idx": 159,
"prog_id": 396,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint vov(char c) {\n if (c == 'a' || c == 'u' || c == 'o' || c == 'i' || c == 'e') return 1;\n return 0;\n}\nint main() {\n ios::sync_with_stdio(0);\n cin.tie(0);\n cout.tie(0);\n int t = 1;\n... | {
"funnel_score": 0.9641148325358851,
"n_pool": 297,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | late-fill |
1008_D | train | You are given a rectangular parallelepiped with sides of positive integer lengths A, B and C.
Find the number of different groups of three integers (a, b, c) such that 1≤ a≤ b≤ c and parallelepiped A× B× C can be paved with parallelepipeds a× b× c. Note, that all small parallelepipeds have to be rotated in the same d... | 2,000 | 256 | {
"solution_idx": 79,
"prog_id": 86,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nlong long dx[4] = {0, -1, 0, 1};\nlong long dy[4] = {1, 0, -1, 0};\nusing namespace std;\nclass pa3 {\n public:\n long long x, y, z;\n pa3(long long x = 0, long long y = 0, long long z = 0) : x(x), y(y), z(z) {}\n bool... | {
"solution_idx": 115,
"prog_id": 128,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long ans;\nint have[10][10], len[10];\nint id[10][10];\nint g[100010][8];\nshort f[100010][8];\nint h4[100010], h5[100010], h6[100010], t4, t5, t6;\nint h1[100010], h2[100010], h3[100010], h[1... | {
"funnel_score": 0.9352941176470588,
"n_pool": 160,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1009_A | train | Maxim wants to buy some games at the local game shop. There are n games in the shop, the i-th game costs c_i.
Maxim has a wallet which can be represented as an array of integers. His wallet contains m bills, the j-th bill has value a_j.
Games in the shop are ordered from left to right, Maxim tries to buy every game i... | 1,000 | 256 | {
"solution_idx": 14,
"prog_id": 43,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int base = 1000000000;\nconst int base_digits = 9;\nstruct bigint {\n vector<int> a;\n int sign;\n int size() {\n if (a.empty()) return 0;\n int ans = (a.size() - 1) * base_digits;\n ... | {
"solution_idx": 16,
"prog_id": 48,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int g, w, gv[1001] = {}, wv[1001] = {}, s = 0, min;\n scanf(\"%d%d\", &g, &w);\n for (int i = 1; i <= g; i++) scanf(\"%d\", &gv[i]);\n for (int j = 1; j <= w; j++) scanf(\"%d\", &... | {
"funnel_score": 0.9777777777777777,
"n_pool": 239,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "identical",
"different": false
},
{
"judge": "haiku... | build-10k |
1009_B | train | You are given a ternary string (it is a string which consists only of characters '0', '1' and '2').
You can swap any two adjacent (consecutive) characters '0' and '1' (i.e. replace "01" with "10" or vice versa) or any two adjacent (consecutive) characters '1' and '2' (i.e. replace "12" with "21" or vice versa).
For e... | 1,000 | 256 | {
"solution_idx": 103,
"prog_id": 342,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nchar buf[100010];\nstruct node {\n char x;\n int cnt;\n} IN[100010], TMP[100010], *in, *tmp;\nint len;\nvoid zip() {\n int bak = 0;\n tmp[0] = in[0];\n for (int i = 1; i < len; ++i)\n if (in[i].x == tmp[bak].x)... | {
"solution_idx": 166,
"prog_id": 556,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nclass A {\n public:\n void solve() {\n int n, m;\n cin >> n >> m;\n vector<int> c(n), a(m);\n for (int i = 0; i < n; i++) cin >> c[i];\n for (int i = 0; i < m; i++) cin >> a[i];\n ... | {
"funnel_score": 0.9407407407407408,
"n_pool": 188,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1009_C | train | Alice got an array of length n as a birthday present once again! This is the third year in a row!
And what is more disappointing, it is overwhelmengly boring, filled entirely with zeros. Bob decided to apply some changes to the array to cheer up Alice.
Bob has chosen m changes of the following form. For some integer... | 2,000 | 256 | {
"solution_idx": 68,
"prog_id": 137,
"provenance": "R",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int mod = 1e9 + 7;\nconst int inf = 1e9 + 9;\nconst int N = 1e5 + 5;\nint n, m;\nint main() {\n cin >> n >> m;\n long long mid = n / 2;\n long long mn = 0;\n for (int i = 0; i < n; ++i) {\... | {
"solution_idx": 133,
"prog_id": 302,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nstruct big_integer {\n static const int base = 1000;\n static const int width = 3;\n vector<int> v;\n bool is_negative;\n big_integer(long long num = 0) {\n *this = num;\n is_negative =... | {
"funnel_score": 0.9671052631578947,
"n_pool": 176,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
1009_D | train | Let's call an undirected graph G = (V, E) relatively prime if and only if for each edge (v, u) ∈ E GCD(v, u) = 1 (the greatest common divisor of v and u is 1). If there is no edge between some pair of vertices v and u then the value of GCD(v, u) doesn't matter. The vertices are numbered from 1 to |V|.
Construct a rela... | 2,000 | 256 | {
"solution_idx": 55,
"prog_id": 181,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, m, num;\nstruct xp {\n int u, v;\n} ans[100000 + 5];\nint gcd(int m1, int n1) {\n while (m1 > 0) {\n int c = n1 % m1;\n n1 = m1, m1 = c;\n }\n return n1;\n}\nvoid print() {\n print... | {
"solution_idx": 65,
"prog_id": 232,
"provenance": "PR",
"code": "#include <bits/stdc++.h>\nusing namespace std;\ntemplate <typename T>\nusing min_priority_queue = priority_queue<T, vector<T>, greater<T>>;\ntemplate <class T>\ninline bool chmax(T& a, T b) {\n if (a < b) {\n a = b;\n return 1;\n }\n re... | {
"funnel_score": 0.8,
"n_pool": 77,
"pair_rank": 1
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "variation",
"different": false
},
{
"judge": "haiku",
... | late-fill |
1009_E | train | Leha is planning his journey from Moscow to Saratov. He hates trains, so he has decided to get from one city to another by car.
The path from Moscow to Saratov can be represented as a straight line (well, it's not that straight in reality, but in this problem we will consider it to be straight), and the distance betwe... | 1,500 | 256 | {
"solution_idx": 151,
"prog_id": 204,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long MOD = 1000000007;\nconst long long MOD2 = 998244353;\nconst long long BIG = 1197423052705914509LL;\nmt19937 rng(\n (long long)std::chrono::steady_clock::now().time_since_epoch()... | {
"solution_idx": 177,
"prog_id": 237,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint a, b, c, d, n, x;\nint main() {\n scanf(\"%d\", &n);\n while (n--) {\n scanf(\"%d\", &x);\n a = ((a + a) % 998244353 + c) % 998244353;\n c = (c + x) % 998244353;\n d = (c + (b + ... | {
"funnel_score": 0.9925925925925926,
"n_pool": 212,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1009_F | train | You are given a rooted undirected tree consisting of n vertices. Vertex 1 is the root.
Let's denote a depth array of vertex x as an infinite sequence [d_{x, 0}, d_{x, 1}, d_{x, 2}, ...], where d_{x, i} is the number of vertices y such that both conditions hold:
* x is an ancestor of y;
* the simple path from x t... | 4,500 | 512 | {
"solution_idx": 12,
"prog_id": 15,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int MAXN = 1010101, d = 0;\nint N, par[MAXN], answer[MAXN], use[MAXN], order[MAXN], order_idx = 0,\n final_size[MAXN];\nvector<int> adj[MA... | {
"solution_idx": 146,
"prog_id": 158,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nint dx[4] = {0, -1, 0, 1};\nint dy[4] = {1, 0, -1, 0};\nusing namespace std;\nclass pa3 {\n public:\n int x, y, z;\n pa3(int x = 0, int y = 0, int z = 0) : x(x), y(y), z(z) {}\n bool operator<(const pa3 &p) const {\n... | {
"funnel_score": 0.9641148325358851,
"n_pool": 186,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1009_G | train | Polycarp has just launched his new startup idea. The niche is pretty free and the key vector of development sounds really promising, so he easily found himself some investors ready to sponsor the company. However, he is yet to name the startup!
Actually, Polycarp has already came up with the name but some improvement ... | 2,000 | 256 | {
"solution_idx": 50,
"prog_id": 57,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, m, tot, x, t, fw, rt, ans;\nchar str[200010];\nint s[200010], st[200010], ed[200010], nt[200010], p[200010], w[200010],\n v[200010], pr[200010], fl[200010], q[200010], ss[200010];\nvoid lk... | {
"solution_idx": 55,
"prog_id": 62,
"provenance": "PR",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nclass Edge {\n public:\n Edge(int i, int u, int v, int f, int c, bool b = false)\n : id(i), from(u), to(v), flow(f), capacity(c), rid(-1), bReverse(b) {}\n int id;\n int rid;\n int from;\n ... | {
"funnel_score": 0.9868421052631579,
"n_pool": 186,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
1011_A | train | Natasha is going to fly to Mars. She needs to build a rocket, which consists of several stages in some order. Each of the stages is defined by a lowercase Latin letter. This way, the rocket can be described by the string — concatenation of letters, which correspond to the stages.
There are n stages available. The rock... | 1,000 | 256 | {
"solution_idx": 150,
"prog_id": 538,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint get(string s, int n, int k) {\n int dp[3][n + 2];\n sort(s.begin(), s.end());\n dp[0][0] = 1;\n dp[1][0] = s[0] - 'a' + 1;\n for (int i = 1; i < n; i++) {\n dp[0][i] = 1;\n dp[1][i] ... | {
"solution_idx": 207,
"prog_id": 790,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n = 0;\n int k = 0;\n char s[51];\n cin >> n >> k;\n for (int i = 0; i < n; i++) {\n cin >> s[i];\n }\n map<char, int> mymap;\n mymap['a'] = 1;\n mymap['b'] = 2;\n m... | {
"funnel_score": 0.9521531100478469,
"n_pool": 212,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1011_B | train | Natasha is planning an expedition to Mars for n people. One of the important tasks is to provide food for each participant.
The warehouse has m daily food packages. Each package has some food type a_i.
Each participant must eat exactly one food package each day. Due to extreme loads, each participant must eat the sam... | 1,000 | 256 | {
"solution_idx": 111,
"prog_id": 356,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\n#pragma GCC optimize(\"O3\")\n#pragma GCC target(\"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx\")\n#pragma GCC optimize(\"unroll-loops\")\nusing namespace std;\nusing ll = long long;\nusing ld = long double;\nusing db = do... | {
"solution_idx": 211,
"prog_id": 631,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\ntypedef pair<int, string> pis;\ntypedef pair<int, int> pii;\ntypedef map<string, int> msi;\ntypedef map<int, string> mis;\ntypedef multimap<int, string> mmis;\ntypedef list<int> li;\ntypedef queue<... | {
"funnel_score": 1,
"n_pool": 222,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1013_A | train | There is a beautiful garden of stones in Innopolis.
Its most beautiful place is the n piles with stones numbered from 1 to n.
EJOI participants have visited this place twice.
When they first visited it, the number of stones in piles was x_1, x_2, …, x_n, correspondingly. One of the participants wrote down this sequ... | 1,000 | 256 | {
"solution_idx": 32,
"prog_id": 125,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n, a[55], b[55], flag;\n scanf(\"%d\", &n);\n for (int i = 0; i < n; i++) {\n scanf(\"%d\", &a[i]);\n }\n for (int i = 0; i < n; i++) {\n scanf(\"%d\", &b[i]);\n }\n ... | {
"solution_idx": 222,
"prog_id": 882,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\ntemplate <class T>\nusing uset = unordered_set<T>;\ntemplate <class T>\nusing mset = multiset<T>;\ntemplate <class T>\nusing umset = unordered_multiset<T>;\ntemplate <class A, class B>\nusing umap ... | {
"funnel_score": 0.9823529411764707,
"n_pool": 224,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
1013_B | train | There is an array with n elements a1, a2, ..., an and the number x.
In one operation you can select some i (1 ≤ i ≤ n) and replace element ai with ai & x, where & denotes the [bitwise and](https://en.wikipedia.org/wiki/Bitwise_operation#AND) operation.
You want the array to have at least two equal elements after appl... | 1,000 | 256 | {
"solution_idx": 62,
"prog_id": 131,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n, i, y, x;\n cin >> n >> y;\n map<int, vector<int> > pa;\n for (i = 0; i < n; i++) {\n cin >> x;\n pa[x].push_back(0);\n int cou = 0, prev = -1;\n while (x > 0) ... | {
"solution_idx": 178,
"prog_id": 501,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, m, x, sum, ans = 99999;\nint a[100005], b[100005];\nbool vis[100005][5], vis1[100005], flag = 0;\nint main() {\n memset(vis1, 0, sizeof(vis1));\n memset(vis, 0, sizeof(vis));\n scanf(\"%d... | {
"funnel_score": 0.9703947368421053,
"n_pool": 187,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "variation",
"different": false
},
{
"judge": "haiku",
... | build-10k |
1016_B | train | You are given two strings s and t, both consisting only of lowercase Latin letters.
The substring s[l..r] is the string which is obtained by taking characters s_l, s_{l + 1}, ..., s_r without changing the order.
Each of the occurrences of string a in a string b is a position i (1 ≤ i ≤ |b| - |a| + 1) such that b[i..i... | 2,000 | 256 | {
"solution_idx": 86,
"prog_id": 251,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long INF = (1LL << 45LL);\nconst long long MAXLL = 9223372036854775807LL;\nconst unsigned long long MAXULL = 18446744073709551615LLU;\nconst long long MOD = 1000000007;\nconst long double... | {
"solution_idx": 94,
"prog_id": 274,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n vector<int> left, right;\n int n, m, s, l, r;\n string kata, q;\n cin >> n >> m >> s;\n cin >> kata >> q;\n size_t pos = kata.find(q, 0);\n while (pos != string::npos) {\n l... | {
"funnel_score": 0.9703947368421053,
"n_pool": 178,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "variation",
"different": false
},
{
"judge": "haiku... | build-10k |
1016_C | train | Vasya's house is situated in a forest, and there is a mushroom glade near it. The glade consists of two rows, each of which can be divided into n consecutive cells. For each cell Vasya knows how fast the mushrooms grow in this cell (more formally, how many grams of mushrooms grow in this cell each minute). Vasya spends... | 2,000 | 256 | {
"solution_idx": 17,
"prog_id": 31,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long func(int i, int j, int time, vector<long long>& arr1,\n vector<long long>& arr2, vector<long long>& arr3,\n vector<long long>& a, vector<long long>& b) {\n if (... | {
"solution_idx": 156,
"prog_id": 264,
"provenance": "R",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int N = 300500;\nconst int mod = 1e9 + 7;\nconst long long inf = 1e18;\nlong long n, m, q;\nlong long a[3][N];\nlong long f[3][N];\nint main() {\n ios::sync_with_stdio(0);\n cin.tie(0);\n ... | {
"funnel_score": 0.8111111111111111,
"n_pool": 174,
"pair_rank": 1
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1016_D | train | Now Vasya is taking an exam in mathematics. In order to get a good mark, Vasya needs to guess the matrix that the teacher has constructed!
Vasya knows that the matrix consists of n rows and m columns. For each row, he knows the xor (bitwise excluding or) of the elements in this row. The sequence a1, a2, ..., an denote... | 2,000 | 256 | {
"solution_idx": 91,
"prog_id": 175,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int N = 105;\nint mat[N][N], b1[N][N], a[N], b[N], c[N], d[N], n, m;\nvoid solve() {\n memset(b1, 0, sizeof(b1));\n int sumc = 0, sumd = 0, last1c = -1, last1d = -1, last0c = -1, last0d = -1... | {
"solution_idx": 115,
"prog_id": 213,
"provenance": "R",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, m;\nint g[105][105] = {};\nint main() {\n while (cin >> n >> m) {\n int t1, t2;\n int res1 = 0, res2 = 0;\n for (int i = 0; i < n - 1; i++) {\n cin >> g[i][m - 1];\n res1... | {
"funnel_score": 0.9593301435406698,
"n_pool": 205,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1016_E | train | There is a light source on the plane. This source is so small that it can be represented as point. The light source is moving from point (a, s_y) to the (b, s_y) (s_y < 0) with speed equal to 1 unit per second. The trajectory of this light source is a straight segment connecting these two points.
There is also a fenc... | 2,000 | 256 | {
"solution_idx": 6,
"prog_id": 13,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\ntemplate <class T = int>\ninline T readInt();\ninline double readDouble();\ninline int readUInt();\ninline int readChar();\ninline void readWord(char *s);\ninline bool readLine(char *s);\ninline bool isEof();\ninline int ... | {
"solution_idx": 92,
"prog_id": 110,
"provenance": "R",
"code": "#include <bits/stdc++.h>\n#pragma GCC target(\"avx\")\n#pragma GCC optimize(3)\n#pragma GCC optimize(\"Ofast\")\n#pragma GCC optimize(\"inline\")\n#pragma GCC optimize(\"-fgcse\")\n#pragma GCC optimize(\"-fgcse-lm\")\n#pragma GCC optimize(\"-fipa... | {
"funnel_score": 0.9588235294117647,
"n_pool": 157,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "identical",
"different": false
},
{
"judge": "haiku",
... | build-10k |
1016_F | train | There are n cities in the country of Berland. Some of them are connected by bidirectional roads in such a way that there exists exactly one path, which visits each road no more than once, between every pair of cities. Each road has its own length. Cities are numbered from 1 to n.
The travelling time between some citie... | 2,000 | 256 | {
"solution_idx": 27,
"prog_id": 27,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);\n long long n, q;\n cin >> n >> q;\n vector<pair<long long, long long>> adj[n + 1];\n for (long long i = 1; i < n; i++) ... | {
"solution_idx": 58,
"prog_id": 62,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\ntemplate <typename T>\ninline T max(T a, T b) {\n return a > b ? a : b;\n}\ntemplate <typename T>\ninline T min(T a, T b) {\n return a < b ? a : b;\n}\ntemplate <typename T>\ninline T abs(T a) {\n return a > 0 ? a : -... | {
"funnel_score": 0.9375,
"n_pool": 145,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1016_G | train | Since next season are coming, you'd like to form a team from two or three participants. There are n candidates, the i-th candidate has rank a_i. But you have weird requirements for your teammates: if you have rank v and have chosen the i-th and j-th candidate, then GCD(v, a_i) = X and LCM(v, a_j) = Y must be met.
You ... | 2,000 | 256 | {
"solution_idx": 23,
"prog_id": 23,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing ll = long long;\nconst int C = 1000001, D = 18, F = 200001;\nll gcd(ll a, ll b) {\n if (b == 0) return a;\n ll c;\n while (b > 0) c = a % b, a = b, b = c;\n return a;\n}\ninline ll mul(ll a, ll b, ll M) {\n if ... | {
"solution_idx": 68,
"prog_id": 69,
"provenance": "ER",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nclass Solution {\n public:\n Solution(long long x, long long y) : X(x), Y(y) { preprocess(); }\n long long count(vector<long long>& nums) {\n long long res = 0;\n if (X <= 0 || Y <= 0 || Y %... | {
"funnel_score": 0.9307692307692308,
"n_pool": 85,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
1017_A | train | John Smith knows that his son, Thomas Smith, is among the best students in his class and even in his school. After the students of the school took the exams in English, German, Math, and History, a table of results was formed.
There are n students, each of them has a unique id (from 1 to n). Thomas's id is 1. Every st... | 1,000 | 256 | {
"solution_idx": 77,
"prog_id": 402,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nint sum(int n) {\n int c = 1, m, s = 0;\n while (c <= n) {\n scanf(\"%d\", &m);\n s = s + m;\n c++;\n }\n return s;\n}\nint main() {\n int n, tmark, trank = 1, cnt = 2;\n scanf(\"%d\", &n);\n tmark = sum(... | {
"solution_idx": 82,
"prog_id": 447,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nstruct node {\n int a, b, c, d, sum;\n} stu[1005];\nint cmp(node a, node b) { return a.sum > b.sum; }\nint main() {\n int n;\n while (cin >> n) {\n if (n == 1) {\n cin >> stu[0].a >> stu[... | {
"funnel_score": 0.9629629629629629,
"n_pool": 214,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1017_B | train | Rudolf is on his way to the castle. Before getting into the castle, the security staff asked him a question:
Given two binary numbers a and b of length n. How many different ways of swapping two digits in a (only in a, not b) so that bitwise OR of these two numbers will be changed? In other words, let c be the bitwise... | 2,000 | 256 | {
"solution_idx": 105,
"prog_id": 316,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nusing ll = long long;\nusing VI = vector<int>;\nusing VL = vector<ll>;\nusing VS = vector<string>;\nusing VB = vector<bool>;\nusing VVI = vector<VI>;\nusing VVL = vector<VL>;\nusing PII = std::pai... | {
"solution_idx": 181,
"prog_id": 552,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int i, n;\n string a, b;\n long long count, count1, count2, count3, res;\n count = count1 = count2 = count3 = 0LL;\n cin >> n;\n cin >> a;\n cin >> b;\n for (i = 1; i <= n; i... | {
"funnel_score": 0.8970588235294117,
"n_pool": 205,
"pair_rank": 1
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "variation",
"different": false
},
{
"judge": "haiku",
... | build-10k |
1017_C | train | Mrs. Smith is trying to contact her husband, John Smith, but she forgot the secret phone number!
The only thing Mrs. Smith remembered was that any permutation of n can be a secret phone number. Only those permutations that minimize secret value might be the phone of her husband.
The sequence of n integers is called a... | 1,000 | 256 | {
"solution_idx": 35,
"prog_id": 65,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int md = 1000000007;\nint main() {\n ios_base::sync_with_stdio(false);\n cin.tie(NULL);\n int tt{}, T{};\n tt = 1;\n while (tt--) {\n int n{}, m{}, ans{}, k{}, a{}, b{}, c{}, f{};\n ... | {
"solution_idx": 182,
"prog_id": 400,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvoid solve() {\n int n;\n cin >> n;\n int m = 1;\n while ((m + 1) * (m + 1) <= n) m++;\n vector<int> a;\n for (int i = 1; i <= n; i++) {\n a.push_back(i);\n }\n for (int i = 0; i < n; i ... | {
"funnel_score": 0.9021164021164021,
"n_pool": 188,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1017_D | train | Childan is making up a legendary story and trying to sell his forgery — a necklace with a strong sense of "Wu" to the Kasouras. But Mr. Kasoura is challenging the truth of Childan's story. So he is going to ask a few questions about Childan's so-called "personal treasure" necklace.
This "personal treasure" is a multis... | 2,000 | 256 | {
"solution_idx": 87,
"prog_id": 126,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int N = 1e5 + 5;\nconst int maxn = 2e6 + 5;\nint tree[maxn][3];\nint sz[maxn];\nbool flagg[maxn];\nint tot;\nint w[20], sum[20];\nchar ch[20];\nint ans, k;\nint n, m, q;\nstruct node {\n int... | {
"solution_idx": 183,
"prog_id": 247,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long int inf = 2222222222222222222LL;\nconst long long int mod = 1000000007LL;\nlong long int n = 0, m = 0, ans = 0, cnt = 0, tmp = 0, ma = -inf, mi = inf;\nstring s;\nbool ok, flag;\nlo... | {
"funnel_score": 0.9365079365079365,
"n_pool": 235,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1017_E | train | After the war, the supersonic rocket became the most common public transportation.
Each supersonic rocket consists of two "engines". Each engine is a set of "power sources". The first engine has n power sources, and the second one has m power sources. A power source can be described as a point (x_i, y_i) on a 2-D plan... | 1,000 | 256 | {
"solution_idx": 42,
"prog_id": 48,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int MAXN = 1e5 + 10;\nconst double eps = 1e-8;\nconst double pi = acos(-1.0);\nconst long long INF = 0x3f3f3f3f3f3f3f3f;\nint dcmp(double x) {\n if (fabs(x) < eps) return 0;\n return (x > 0 ... | {
"solution_idx": 108,
"prog_id": 123,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int INF = 1e9 + 7;\nconst long long INFL = 1e18 + 123;\nconst double PI = atan2(0, -1);\nmt19937 tw(960172);\nlong long rnd(long long x, long long y) {\n static uniform_int_distribution<long... | {
"funnel_score": 0.9835526315789473,
"n_pool": 126,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1017_F | train | Notice: unusual memory limit!
After the war, destroyed cities in the neutral zone were restored. And children went back to school.
The war changed the world, as well as education. In those hard days, a new math concept was created.
As we all know, logarithm function can be described as: $$$ log(p_1^{a_1}p_2^{a_2}...... | 5,000 | 16 | {
"solution_idx": 61,
"prog_id": 62,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nchar prime[15000016];\nunsigned int n;\nint32_t main() {\n ios::sync_with_stdio(false);\n cin.tie(0);\n cin >> n;\n unsigned int a, b, c, d;\n cin >> a >> b >> c >> d;\n unsigned int ans = 0;\n... | {
"solution_idx": 68,
"prog_id": 69,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nunsigned int tab0[] = {\n 0, 1059501, 2152465, 3256790, 4368256, 5484949,\n 6605707, 7729832, 8856766, 9986203, 11117795, 12251315,\n 13386601, 14523448,... | {
"funnel_score": 0.9166666666666667,
"n_pool": 167,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1017_G | train | Abendsen assigned a mission to Juliana. In this mission, Juliana has a rooted tree with n vertices. Vertex number 1 is the root of this tree. Each vertex can be either black or white. At first, all vertices are white. Juliana is asked to process q queries. Each query is one of three types:
1. If vertex v is white, m... | 3,000 | 256 | {
"solution_idx": 6,
"prog_id": 6,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\ntemplate <typename T>\ninline T max(T a, T b) {\n return a > b ? a : b;\n}\ntemplate <typename T>\ninline T min(T a, T b) {\n return a < b ? a : b;\n}\ntemplate <typename T>\ninline T abs(T a) {\n return a > 0 ? a : -a;... | {
"solution_idx": 53,
"prog_id": 53,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, q, num = 0, fst[100010], en = 0;\nstruct pnt {\n int f, s, tp, dp, sz, l, r;\n} p[100010];\nstruct edge {\n int x, y, n;\n} e[100010];\nstruct th {\n int rs, sum;\n th() { rs = sum = -1; }... | {
"funnel_score": 0.9230769230769231,
"n_pool": 149,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1017_H | train | In "The Man in the High Castle" world, there are m different film endings.
Abendsen owns a storage and a shelf. At first, he has n ordered films on the shelf. In the i-th month he will do:
1. Empty the storage.
2. Put k_i ⋅ m films into the storage, k_i films for each ending.
3. He will think about a question:... | 5,000 | 512 | {
"solution_idx": 1,
"prog_id": 1,
"provenance": "R",
"code": "#include <bits/stdc++.h>\n#pragma GCC optimize(\"Ofast,unroll-loops,no-stack-protector\")\n#pragma GCC target(\"avx\")\nusing namespace std;\nusing namespace rel_ops;\nusing ll = int64_t;\nusing Pii = pair<int, int>;\nusing ull = uint64_t;\nusing Vi... | {
"solution_idx": 43,
"prog_id": 43,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }\nconst int MAXN = 100000;\nconst int MAXZ = 447;\nconst int MAXTYPE = 100000;\nconst int MAXQ = 100000;\nconst int MAXK... | {
"funnel_score": 0.9705882352941176,
"n_pool": 61,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1019_A | train | As you know, majority of students and teachers of Summer Informatics School live in Berland for the most part of the year. Since corruption there is quite widespread, the following story is not uncommon.
Elections are coming. You know the number of voters and the number of parties — n and m respectively. For each vote... | 2,000 | 256 | {
"solution_idx": 155,
"prog_id": 222,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\n#pragma warning(disable : 4996)\nusing namespace std;\nnamespace Xrocks {}\nusing namespace Xrocks;\nnamespace Xrocks {\nclass in {\n} user_input;\nclass out {\n} output;\nin& operator>>(in& X, int& Y) {\n scanf(\"%d\... | {
"solution_idx": 246,
"prog_id": 370,
"provenance": "R",
"code": "#include <bits/stdc++.h>\nbool greater(int a, int b) { return a > b; }\nint main() {\n int voters, parties;\n std::cin >> voters >> parties;\n std::vector<int> Costs[parties - 1];\n int rightVotes = 0;\n long long int sum = 0;\n int maxVot... | {
"funnel_score": 0.9411764705882353,
"n_pool": 263,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1019_C | train | Sergey just turned five years old! When he was one year old, his parents gave him a number; when he was two years old, his parents gave him an array of integers. On his third birthday he received a string. When he was four, his mother woke him up in a quiet voice, wished him to be a good boy and gave him a rooted tree.... | 2,000 | 256 | {
"solution_idx": 160,
"prog_id": 168,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\ntemplate <typename T1, typename T2>\ninline void chkmin(T1 &x, T2 y) {\n if (x > y) x = y;\n}\ntemplate <typename T1, typename T2>\ninline void chkmax(T1 &x, T2 y) {\n if (x < y) x = y;\n}\ntempl... | {
"solution_idx": 213,
"prog_id": 226,
"provenance": "ER",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int inf = 2e8;\nconst int N = 6e6 + 10;\nconst int maxn = 1000020;\nvector<int> in[maxn], out[maxn];\nint tag[maxn], n, m, del[maxn], cnt;\nint fa[maxn];\nint getfa(int x) { return x == fa[x... | {
"funnel_score": 0.9736842105263157,
"n_pool": 250,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1019_E | train | By the year 3018, Summer Informatics School has greatly grown. Hotel «Berendeetronik» has been chosen as a location of the school. The camp consists of n houses with n-1 pathways between them. It is possible to reach every house from each other using the pathways.
Everything had been perfect until the rains started. T... | 3,000 | 256 | {
"solution_idx": 16,
"prog_id": 16,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nlong long read() {\n char last = '+', ch = getchar();\n while (ch < '0' || ch > '9') last = ch, ch = getchar();\n long long tmp = 0;\n while (ch >= '0' && ch <= '9') tmp = tmp * 10 + ch - 48, ch = getchar();\n if (la... | {
"solution_idx": 94,
"prog_id": 107,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nconst int maxn = 200010;\nint n, m;\nstruct Edge {\n int to, a, b;\n bool d;\n Edge *rev, *next;\n void del() { d = rev->d = 1; }\n};\nstruct Tree {\n Edge E[maxn * 2], *ne, *fir[maxn];\n Tree() { ne = E; }\n void... | {
"funnel_score": 0.9444444444444444,
"n_pool": 123,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
},
{
"judge": "haiku... | build-10k |
101_B | train | Little boy Gerald studies at school which is quite far from his house. That's why he has to go there by bus every day. The way from home to school is represented by a segment of a straight line; the segment contains exactly n + 1 bus stops. All of them are numbered with integers from 0 to n in the order in which they f... | 2,000 | 265 | {
"solution_idx": 47,
"prog_id": 58,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint comp(pair<int, int> a, pair<int, int> b) {\n if (a.second < b.second)\n return 1;\n else\n return 0;\n}\nlong long int arr[100001];\nint main() {\n int n, m, count, l, r, c = 1000000007... | {
"solution_idx": 231,
"prog_id": 286,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nstruct fastIO {\n inline fastIO operator>>(int& num) {\n num = 0;\n char c = getchar();\n while (c != '-' && (c < '0' || c > '9')) c = getchar();\n bool foo = 0;\n if (c == '-') {\n... | {
"funnel_score": 0.9444444444444444,
"n_pool": 260,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
101_C | train | At a geometry lesson Gerald was given a task: to get vector B out of vector A. Besides, the teacher permitted him to perform the following operations with vector А:
* Turn the vector by 90 degrees clockwise.
* Add to the vector a certain vector C.
Operations could be performed in any order any number of times.
... | 1,000 | 256 | {
"solution_idx": 21,
"prog_id": 27,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint IsMultiplyOverflow(long long multiplicant1, long long multiplicant2,\n long long overflow_limit) {\n if (multiplicant2 == 0LL) return overflow_limit < 0LL;\n return multip... | {
"solution_idx": 105,
"prog_id": 123,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n double i, k, l, j, x1, y1, x2, y2, x3, y3, a, b, c, d;\n cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;\n if (x3 == 0 && y3 == 0) {\n if ((x1 + x2) == 0 && (y2 + y1) == 0) {\n c... | {
"funnel_score": 0.907563025210084,
"n_pool": 214,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
101_D | train | Gerald is positioned in an old castle which consists of n halls connected with n - 1 corridors. It is exactly one way to go from any hall to any other one. Thus, the graph is a tree. Initially, at the moment of time 0, Gerald is positioned in hall 1. Besides, some other hall of the castle contains the treasure Gerald i... | 2,000 | 256 | {
"solution_idx": 2,
"prog_id": 2,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long N = 1e5 + 10;\nlong long n, ans = 0, tot = 0, lll = 0, dotot = 0, tp = 1, lis[N];\nlong long fa[N], top[N], son[N], id[N], gap[N];\nlong long dep[N], dfn[N], siz[N], dis[N];\nstruct A {... | {
"solution_idx": 16,
"prog_id": 21,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long _1e5 = 100000;\nconst long long _1e7 = 10000000;\nconst long long _1e9 = 1000000000;\ntemplate <typename A, typename B>\nostream& operator<<(ostream& str, const pair<A, B>& p) {\n s... | {
"funnel_score": 0.9111111111111112,
"n_pool": 138,
"pair_rank": 1
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
101_E | train | Little Gerald and his coach Mike play an interesting game. At the beginning of the game there is a pile consisting of n candies and a pile consisting of m stones. Gerald and Mike move in turns, Mike goes first. During his move Mike checks how many candies and stones Gerald has eaten. Let Gerald eat a candies and b ston... | 7,500 | 45 | {
"solution_idx": 49,
"prog_id": 49,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, m, modulo;\nint x[20000];\nint y[20000];\nvector<bool> e[10000];\nint maximo[20000];\nint nextmaximo[20000];\nint main() {\n cin >> n >> m >> modulo;\n for (int i = 0; i < n; i++) cin >> x[i... | {
"solution_idx": 77,
"prog_id": 83,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nconst int N = 20000;\nconst long long INF = 1000000000000000000LL;\nint n, m, p, x[N], y[N];\nlong long maximum[2][N];\ninline int weight(int i, int j) { return (x[i] + y[j]) % p; }\nvoid construct(int x_0, int y_0, int x... | {
"funnel_score": 0.9259259259259259,
"n_pool": 146,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1020_B | train | In Summer Informatics School, if a student doesn't behave well, teachers make a hole in his badge. And today one of the teachers caught a group of n students doing yet another trick.
Let's assume that all these students are numbered from 1 to n. The teacher came to student a and put a hole in his badge. The student, ... | 1,000 | 256 | {
"solution_idx": 182,
"prog_id": 722,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint visited[1000], ans[1000], a[1000], visited2[1000];\nvoid dfs(int i, int *c) {\n if (visited[i - 1] == 0) {\n visited[i - 1] = 1;\n if (visited2[a[i - 1] - 1] != 0) {\n if (*c == -1)... | {
"solution_idx": 195,
"prog_id": 777,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n;\n cin >> n;\n int arr[10005];\n int ct = 0;\n for (int i = 1; i <= n; i++) {\n cin >> arr[i];\n }\n for (int i = 1; i < n; i++) {\n if (arr[i] < arr[i + 1]) ct++;... | {
"funnel_score": 0.8677248677248677,
"n_pool": 216,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1023_A | train | You are given two strings s and t. The string s consists of lowercase Latin letters and at most one wildcard character '*', the string t consists only of lowercase Latin letters. The length of the string s equals n, the length of the string t equals m.
The wildcard character '*' in the string s (if any) can be replace... | 1,000 | 256 | {
"solution_idx": 80,
"prog_id": 244,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int maxn = 2 * 1e5 + 10;\nchar a[maxn], b[maxn], c[maxn];\nint n, m;\nint find() {\n int i, j = -1;\n for (i = 0; i < n; i++)\n if (a[i] == '*') {\n j = i;\n break;\n }\n re... | {
"solution_idx": 167,
"prog_id": 628,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nbool doCheck(string s, string t) {\n for (int q = 0; q < 2; q++) {\n while (s.length() > 0) {\n if (s.back() == '*') {\n break;\n }\n if (t.length() == 0 || s.back() != t.... | {
"funnel_score": 0.825657894736842,
"n_pool": 191,
"pair_rank": 1
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "variation",
"different": false
},
{
"judge": "haiku",
... | build-10k |
1023_B | train | Tanechka is shopping in the toy shop. There are exactly n toys in the shop for sale, the cost of the i-th toy is i burles. She wants to choose two toys in such a way that their total cost is k burles. How many ways to do that does she have?
Each toy appears in the shop exactly once. Pairs (a, b) and (b, a) are conside... | 1,000 | 256 | {
"solution_idx": 68,
"prog_id": 241,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n long long m, n;\n while (cin >> m >> n) {\n int flag;\n if (n & 1)\n flag = 1;\n else\n flag = 0;\n if (flag) {\n long long k = (n - 1) / 2;\n long l... | {
"solution_idx": 152,
"prog_id": 576,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst double EPS = 1e-9;\ntemplate <class T1>\nvoid deb(T1 e1) {\n cout << e1 << endl;\n}\ntemplate <class T1, class T2>\nvoid deb(T1 e1, T2 e2) {\n cout << e1 << \" \" << e2 << endl;\n}\ntemplat... | {
"funnel_score": 0.8558823529411765,
"n_pool": 186,
"pair_rank": 1
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1023_C | train | A bracket sequence is a string containing only characters "(" and ")". A regular bracket sequence is a bracket sequence that can be transformed into a correct arithmetic expression by inserting characters "1" and "+" between the original characters of the sequence. For example, bracket sequences "()()" and "(())" are r... | 2,000 | 256 | {
"solution_idx": 57,
"prog_id": 136,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvoid A() {\n int n, m;\n cin >> n >> m;\n string s, t;\n cin >> s >> t;\n bool zir = false;\n for (auto i : s)\n if (i == '*') zir = true;\n if (!zir) {\n if (n != m) {\n cout << \... | {
"solution_idx": 209,
"prog_id": 546,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nbool ok[200007];\nchar s[200007];\nstruct node {\n int l, r;\n} a[200007];\nint main() {\n int n, k;\n scanf(\"%d%d %s\", &n, &k, s + 1);\n s[0] = s[n + 1] = '#';\n for (int i = 1; i <= n; i++... | {
"funnel_score": 0.947089947089947,
"n_pool": 225,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1023_D | train | Initially there was an array a consisting of n integers. Positions in it are numbered from 1 to n.
Exactly q queries were performed on the array. During the i-th query some segment (l_i, r_i) (1 ≤ l_i ≤ r_i ≤ n) was selected and values of elements on positions from l_i to r_i inclusive got changed to i. The order of t... | 1,000 | 256 | {
"solution_idx": 9,
"prog_id": 41,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n, k;\n cin >> n >> k;\n map<int, int> a;\n int b = 0, c = 0;\n for (int i = 0; i < n; i++) {\n cin >> a[i];\n if (a[i] == 0) c++;\n if (a[i] == k) b++;\n }\n if (b ... | {
"solution_idx": 76,
"prog_id": 144,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, q;\nint L[200010], R[200010], to[200010], a[200010];\nstruct node {\n int l, r;\n long long sum, tag1, tag2;\n} tree[200010 << 2];\nlong long ans[200010];\nbool flag;\ninline void build(int... | {
"funnel_score": 0.9576719576719577,
"n_pool": 177,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1023_F | train | You are managing a mobile phone network, and want to offer competitive prices to connect a network.
The network has n nodes.
Your competitor has already offered some connections between some nodes, with some fixed prices. These connections are bidirectional. There are initially m connections the competitor is offerin... | 3,000 | 256 | {
"solution_idx": 67,
"prog_id": 77,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nstruct NodeInit {\n long long l;\n NodeInit(long long l = 2000000000) { this->l = l; }\n};\nstruct Node {\n long long mi, carry, sz;\n bool HasCarry;\n Node() {\n mi = 2000000000;\n this->... | {
"solution_idx": 97,
"prog_id": 112,
"provenance": "ER",
"code": "#include <bits/stdc++.h>\nconst int INF = 0x3f3f3f3f;\nint n, k, m;\nstruct Edge {\n int u, v, w;\n Edge(int _u = 0, int _v = 0, int _w = 0) : u(_u), v(_v), w(_w) {}\n};\nstd::vector<Edge> G[500123];\nstd::vector<Edge> F;\nint pre[500123];\nin... | {
"funnel_score": 0.888157894736842,
"n_pool": 154,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
1025_A | train | Panic is rising in the committee for doggo standardization — the puppies of the new brood have been born multi-colored! In total there are 26 possible colors of puppies in the nature and they are denoted by letters from 'a' to 'z' inclusive.
The committee rules strictly prohibit even the smallest diversity between dog... | 1,000 | 256 | {
"solution_idx": 173,
"prog_id": 728,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nclass abio {\n static const unsigned BUF_SZ = 65536;\n FILE *istream, *ostream;\n char ibuf[BUF_SZ], obuf[BUF_SZ];\n bool reached_eof;\n size_t ip, isz;\n size_t op, osz;\n inline void clear... | {
"solution_idx": 191,
"prog_id": 809,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint rnk[1001];\nint parnt[1001];\nbool prim[100001];\nvoid seive() {\n prim[0] = prim[1] = 1;\n for (unsigned long long i = 2; i < 100001; i++) {\n if (prim[i] == 0) {\n for (unsigned lo... | {
"funnel_score": 0.8588235294117648,
"n_pool": 196,
"pair_rank": 2
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1025_B | train | During the research on properties of the greatest common divisor (GCD) of a set of numbers, Ildar, a famous mathematician, introduced a brand new concept of the weakened common divisor (WCD) of a list of pairs of integers.
For a given list of pairs of integers (a_1, b_1), (a_2, b_2), ..., (a_n, b_n) their WCD is arbit... | 1,500 | 256 | {
"solution_idx": 22,
"prog_id": 38,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nbool Debug;\nconst int mod = 1e9 + 7, MAXN = 1e5 + 7;\ntemplate <class A, class B>\nvoid chmax(A &x, B y) {\n if (x < y) x = y;\n}\ntemplate <class A, class B>\nvoid chmin(A &x, B y) {\n if (x > y... | {
"solution_idx": 84,
"prog_id": 230,
"provenance": "PR",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n ios_base::sync_with_stdio(false);\n cin.tie(NULL);\n long long int t, n, i, j, k, h = 0;\n cin >> n;\n long long int a[n], b[n];\n for (i = 0; i < n; ++i) {\n cin >> a[i] >>... | {
"funnel_score": 0.8781512605042017,
"n_pool": 140,
"pair_rank": 1
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1025_C | train | Is there anything better than going to the zoo after a tiresome week at work? No wonder Grisha feels the same while spending the entire weekend accompanied by pretty striped zebras.
Inspired by this adventure and an accidentally found plasticine pack (represented as a sequence of black and white stripes), Grisha now ... | 1,000 | 256 | {
"solution_idx": 67,
"prog_id": 155,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvoid read(int &x) {\n int v = 0, f = 1;\n char c = getchar();\n while (!isdigit(c) && c != '-') c = getchar();\n if (c == '-')\n f = -1;\n else\n v = v * 10 + c - '0';\n while (isdigit(c... | {
"solution_idx": 86,
"prog_id": 194,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n string s;\n int beingl = 0, endll = 0, maxl = 0, nowl = 0, len = 0;\n bool connect = true, duan;\n while (cin >> s) {\n len = s.size();\n nowl = 1;\n connect = true;\n ... | {
"funnel_score": 0.9179894179894179,
"n_pool": 197,
"pair_rank": 1
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1025_D | train | Dima the hamster enjoys nibbling different things: cages, sticks, bad problemsetters and even trees!
Recently he found a binary search tree and instinctively nibbled all of its edges, hence messing up the vertices. Dima knows that if Andrew, who has been thoroughly assembling the tree for a long time, comes home and s... | 1,000 | 256 | {
"solution_idx": 64,
"prog_id": 103,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int maxn = 700 + 7;\nconst int MOD = 1e9 + 7;\nconst int INF = 1e9 + 7;\nint a[maxn];\nint g[maxn][maxn];\nint n;\nstruct as {\n int l, r, v;\n bool operator<(const as& b) const {\n if (l... | {
"solution_idx": 92,
"prog_id": 158,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int N = 750;\nint n, a[N], g[N][N];\nvector<int> fac[N];\nint L[N][N], R[N][N], c[N][N];\nvector<int> calc(int first) {\n vector<int> v;\n for (int i = 2; i * i <= first; ++i)\n if (firs... | {
"funnel_score": 0.9370370370370371,
"n_pool": 94,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1025_E | train | Vasya passes all exams! Despite expectations, Vasya is not tired, moreover, he is ready for new challenges. However, he does not want to work too hard on difficult problems.
Vasya remembered that he has a not-so-hard puzzle: m colored cubes are placed on a chessboard of size n × n. The fact is that m ≤ n and all cubes... | 1,000 | 256 | {
"solution_idx": 15,
"prog_id": 15,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing std::sort;\nusing std::swap;\nconst int MAXN = 55;\nconst int MAXM = 55;\nconst int MAXS = 11111;\nint N, M;\nint Cnt;\nbool Inv = false;\nstruct Pos {\n int x, y;\n Pos() {}\n Pos(int _x, int _y) {\n x = _x;\... | {
"solution_idx": 20,
"prog_id": 20,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long MOD = 1e9 + 7;\nint gcd(int a, int b) { return b ? gcd(b, a % b) : a; }\nlong long binpow(long long a, long long b) {\n long long res = 1;\n while (b) {\n if (b & 1) res = (res ... | {
"funnel_score": 0.9375,
"n_pool": 148,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "variation",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
1025_F | train | A point belongs to a triangle if it lies inside the triangle or on one of its sides. Two triangles are disjoint if there is no point on the plane that belongs to both triangles.
You are given n points on the plane. No two points coincide and no three points are collinear.
Find the number of different ways to choose t... | 2,000 | 256 | {
"solution_idx": 6,
"prog_id": 7,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing ll = long long;\nusing ull = unsigned long long;\nusing uint = unsigned int;\nusing ld = long double;\nusing vi = std::vector<int>;\nusing pii = std::pair<int, int>;\nusing vvi = std::vector<vi>;\nusing vii = std::ve... | {
"solution_idx": 10,
"prog_id": 11,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\npair<int, int> p[2020];\nstruct line {\n int first, second, st, ed;\n line(int first = 0, int second = 0, int st = 0, int ed = 0)\n : first(first), second(second), st(st), ed(ed) {}\n bool op... | {
"funnel_score": 0.944078947368421,
"n_pool": 207,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
},
{
"judge": "haiku... | build-10k |
1027_B | train | You are given a chessboard of size n × n. It is filled with numbers from 1 to n^2 in the following way: the first ⌈ (n^2)/(2) ⌉ numbers from 1 to ⌈ (n^2)/(2) ⌉ are written in the cells with even sum of coordinates from left to right from top to bottom. The rest n^2 - ⌈ (n^2)/(2) ⌉ numbers from ⌈ (n^2)/(2) ⌉ + 1 to n^2 ... | 1,000 | 256 | {
"solution_idx": 39,
"prog_id": 89,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nstruct point {\n long double x, y;\n point() {\n x = 0;\n y = 0;\n }\n point(long long a, long long b) {\n x = a;\n y = b;\n }\n bool operator==(const point &b) { return x == b.x a... | {
"solution_idx": 114,
"prog_id": 272,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long int ar[500009], br[500009];\nint main() {\n long long int a, b, c, i, j, k, x, y;\n cin >> a >> b;\n for (i = 1; i <= b; i++) {\n cin >> x >> y;\n if (a % 2 == 0) {\n if ((x... | {
"funnel_score": 0.8999999999999999,
"n_pool": 202,
"pair_rank": 1
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1027_C | train | You have n sticks of the given lengths.
Your task is to choose exactly four of them in such a way that they can form a rectangle. No sticks can be cut to pieces, each side of the rectangle must be formed by a single stick. No stick can be chosen multiple times. It is guaranteed that it is always possible to choose suc... | 2,000 | 256 | {
"solution_idx": 27,
"prog_id": 45,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int T;\n cin >> T;\n while (T-- > 0) {\n int n;\n scanf(\"%d\", &n);\n map<int, int> cnts;\n for (int i = 0; i < n; i++) {\n int tmp;\n scanf(\"%d\", &tmp);\n ... | {
"solution_idx": 123,
"prog_id": 237,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconstexpr long double m_pi = 3.1415926535897932L;\nconstexpr long long MOD = 1000000007;\nconstexpr long long INF = 1LL << 62;\nconstexpr long double EPS = 1e-10;\ntemplate <typename T>\nusing vec... | {
"funnel_score": 1,
"n_pool": 175,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1027_D | train | Medicine faculty of Berland State University has just finished their admission campaign. As usual, about 80\% of applicants are girls and majority of them are going to live in the university dormitory for the next 4 (hopefully) years.
The dormitory consists of n rooms and a single mouse! Girls decided to set mouse tra... | 2,000 | 256 | {
"solution_idx": 5,
"prog_id": 10,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n long long int n;\n cin >> n;\n vector<long long int> cost(n);\n vector<long long int> graph(n);\n for (long long int i = 0; i < n; i++) {\n cin >> cost[i];\n }\n for (long lon... | {
"solution_idx": 140,
"prog_id": 247,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint visited[200005];\npair<pair<int, int>, int> fp(int a[], int c[], int i) {\n if (!visited[i]) {\n visited[i] = 1;\n pair<pair<int, int>, int> k = fp(a, c, a[i]);\n if (k.second == i) {... | {
"funnel_score": 0.9736842105263157,
"n_pool": 219,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "variation",
"different": false
},
{
"judge": "haiku",
... | build-10k |
1027_E | train | You are given a square board, consisting of n rows and n columns. Each tile in it should be colored either white or black.
Let's call some coloring beautiful if each pair of adjacent rows are either the same or different in every position. The same condition should be held for the columns as well.
Let's call some col... | 2,000 | 256 | {
"solution_idx": 169,
"prog_id": 191,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\ntemplate <typename A, typename B>\nostream& operator<<(ostream& os, const pair<A, B>& p) {\n return os << '(' << p.first << \", \" << p.second << ')';\n}\ntemplate <typename T_container, typename ... | {
"solution_idx": 190,
"prog_id": 214,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long mod = 998244353, dpp[510][510][4], dpc[510][510][4], f[510], g[510];\nint main() {\n ios_base::sync_with_stdio(false);\n cin.tie(0);\n cout.tie(0);\n long long tp2, i, j, n, k, cnt =... | {
"funnel_score": 0.9605263157894737,
"n_pool": 213,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
1027_F | train | Polycarp studies in Berland State University. Soon he will have to take his exam. He has to pass exactly n exams.
For the each exam i there are known two days: a_i — day of the first opportunity to pass the exam, b_i — day of the second opportunity to pass the exam (a_i < b_i). Polycarp can pass at most one exam durin... | 4,000 | 256 | {
"solution_idx": 18,
"prog_id": 19,
"provenance": "R",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nstruct node {\n int l, r;\n} e[1000100];\nint f[2000100];\nstruct ls {\n int x;\n int ix;\n int ty;\n friend bool operator<(ls a, ls b) { return a.x < b.x; }\n} t[2000100];\nint deg[2000100];\ni... | {
"solution_idx": 86,
"prog_id": 98,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nusing ll = long long;\nusing ld = long double;\nusing pii = pair<int, int>;\nconstexpr int N = 2e5 + 5;\nint n, ans = 0;\nmap<int, int> mp;\nint get(int x) { return mp[x] = (x >= mp[x] ? x : get(mp[x... | {
"funnel_score": 0.9703947368421053,
"n_pool": 169,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1027_G | train | The campus has m rooms numbered from 0 to m - 1. Also the x-mouse lives in the campus. The x-mouse is not just a mouse: each second x-mouse moves from room i to the room i ⋅ x mod{m} (in fact, it teleports from one room to another since it doesn't visit any intermediate room). Starting position of the x-mouse is unknow... | 1,500 | 256 | {
"solution_idx": 22,
"prog_id": 24,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long INF64 = 1LL << 60;\nconst int INF32 = 0x3f3f3f3f;\nmap<long long, vector<pair<long long, long long>>> dfact;\nlong long quick_mul(long long a, long long b, long long mod) {\n long lo... | {
"solution_idx": 91,
"prog_id": 96,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, tot, pri[9] = {2, 3, 5, 7, 11, 13, 17, 19, 23}, top;\nlong long m, x, a[100005], b[100005], f[100005], l[100005], prime[10005];\nmap<long long, int> id;\nint jjj = 0;\nlong long gcd(long long ... | {
"funnel_score": 0.868421052631579,
"n_pool": 126,
"pair_rank": 1
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | build-10k |
1028_A | train | Consider a table of size n × m, initially fully white. Rows are numbered 1 through n from top to bottom, columns 1 through m from left to right. Some square inside the table with odd side length was painted black. Find the center of this square.
Input
The first line contains two integers n and m (1 ≤ n, m ≤ 115) — th... | 1,000 | 256 | {
"solution_idx": 101,
"prog_id": 310,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nusing ll = long long;\nusing ld = long double;\nusing uint = unsigned int;\nusing ull = unsigned long long;\nusing pii = pair<int, int>;\nusing pll = pair<ll, ll>;\nusing pill = pair<int, ll>;\nus... | {
"solution_idx": 353,
"prog_id": 1026,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n, m, i, j, jl, jr, iu, id;\n string s;\n cin >> n >> m;\n int a[n + 2][m + 2];\n for (i = 0; i < n + 2; i++) {\n for (j = 0; j < m + 2; j++) {\n a[i][j] = 1;\n ... | {
"funnel_score": 0.9852941176470589,
"n_pool": 411,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1028_B | train | Let s(x) be sum of digits in decimal representation of positive integer x. Given two integers n and m, find some positive integers a and b such that
* s(a) ≥ n,
* s(b) ≥ n,
* s(a + b) ≤ m.
Input
The only line of input contain two integers n and m (1 ≤ n, m ≤ 1129).
Output
Print two lines, one for decimal... | 1,000 | 256 | {
"solution_idx": 261,
"prog_id": 598,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n, m;\n cin >> n >> m;\n cout << \"88888888888888888888888888888888888888888888888888888888888888888888\"\n \"88888888888888888888888888888888888888888888888888888888... | {
"solution_idx": 365,
"prog_id": 856,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nstruct bign {\n static const int width = 8, limit = 100000000, maxlen = 500;\n int bit[maxlen], len;\n int operator[](int p) const { return bit[p]; }\n void clearbit() {\n memset(bit, 0, siz... | {
"funnel_score": 0.9666666666666667,
"n_pool": 374,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1028_C | train | You are given n rectangles on a plane with coordinates of their bottom left and upper right points. Some (n-1) of the given n rectangles have some common point. A point belongs to a rectangle if this point is strictly inside the rectangle or belongs to its boundary.
Find any point with integer coordinates that belongs... | 2,000 | 256 | {
"solution_idx": 95,
"prog_id": 157,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\ntemplate <class T>\nvoid _R(T &x) {\n cin >> x;\n}\nvoid _R(int &x) { scanf(\"%d\", &x); }\nvoid _R(long long &x) { scanf(\"%lld\", &x); }\nvoid _R(unsigned long long &x) { scanf(\"%llu\", &x); }\n... | {
"solution_idx": 169,
"prog_id": 295,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n;\npair<pair<int, int>, pair<int, int> > rects[323456];\npair<pair<int, int>, pair<int, int> > lft[323456];\npair<pair<int, int>, pair<int, int> > rgt[323456];\nint main() {\n cin >> n;\n fo... | {
"funnel_score": 0.9179894179894179,
"n_pool": 327,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1028_D | train | Let's consider a simplified version of order book of some stock. The order book is a list of orders (offers) from people that want to buy or sell one unit of the stock, each order is described by direction (BUY or SELL) and price.
At every moment of time, every SELL offer has higher price than every BUY offer.
In th... | 2,000 | 256 | {
"solution_idx": 48,
"prog_id": 65,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long mod = 1000000007;\nstruct MinCompare {\n bool operator()(const long long &a, const long long &b) const {\n return (a < b);\n }\n};\nstruct MaxCompare {\n bool operator()(const l... | {
"solution_idx": 59,
"prog_id": 77,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int maxx = 600010;\nconst double pi = acos(-1.0);\nconst double eps = 1e-15;\nint t, n, m, x, y, z, root, val;\nint sum = 0, cnt = 0, l = 0, r = 0;\nint a[maxx];\nlong long ans = 0, total = 0;\... | {
"funnel_score": 0.9285714285714286,
"n_pool": 309,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1028_E | train | While discussing a proper problem A for a Codeforces Round, Kostya created a cyclic array of positive integers a_1, a_2, …, a_n. Since the talk was long and not promising, Kostya created a new cyclic array b_1, b_2, …, b_{n} so that b_i = (a_i mod a_{i + 1}), where we take a_{n+1} = a_1. Here mod is the [modulo operati... | 2,000 | 256 | {
"solution_idx": 125,
"prog_id": 137,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long n;\nlong long b[200010];\nlong long a[200010];\nint main() {\n cin >> n;\n pair<long long, long long> mx = {0, 0};\n for (long long i = 0; i < n; i++) {\n cin >> b[i];\n mx = ma... | {
"solution_idx": 278,
"prog_id": 308,
"provenance": "E",
"code": "#include <bits/stdc++.h>\n#pragma GCC optimize(\"Ofast\")\n#pragma GCC target( \\\n \"sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,popcnt,mmx,avx,tune=native\")\nusing namespace std;\nconst int MOD = 1000000007;\nconst int UNDEF = -1;\nconst int IN... | {
"funnel_score": 0.8555555555555556,
"n_pool": 304,
"pair_rank": 1
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | late-fill |
1028_F | train | Consider a set of points A, initially it is empty. There are three types of queries:
1. Insert a point (x_i, y_i) to A. It is guaranteed that this point does not belong to A at this moment.
2. Remove a point (x_i, y_i) from A. It is guaranteed that this point belongs to A at this moment.
3. Given a point (x_i... | 1,000 | 256 | {
"solution_idx": 13,
"prog_id": 13,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }\nconst int MAXN = 100000;\nconst int MAXQ = 200000;\nint nq;\nint qkind[MAXQ], qx[MAXQ], qy[MAXQ], qans[MAXQ];\nint n;\nmap<pair<int, int... | {
"solution_idx": 80,
"prog_id": 89,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nint t1, t2, t3;\nlong long l1, l2, l3, l4, l5, l6;\nint q;\nstd::map<double, int> m;\nstd::map<double, std::set<std::pair<int, int> > > dist;\ndouble why(long long a, long long b) { return atan2(a, b); }\nint cnt = 0;\nin... | {
"funnel_score": 0.9736842105263157,
"n_pool": 128,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1028_H | train | We call an array b_1, b_2, …, b_m good, if there exist two indices i < j such that b_i ⋅ b_j is a [perfect square](https://en.wikipedia.org/wiki/Square_number).
Given an array b_1, b_2, …, b_m, in one action you can perform one of the following:
* multiply any element b_i by any prime p;
* divide any element b_... | 7,000 | 1,024 | {
"solution_idx": 64,
"prog_id": 68,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\ntemplate <typename T>\ninline T max(T a, T b) {\n return a > b ? a : b;\n}\ntemplate <typename T>\ninline T min(T a, T b) {\n return a < b ? a : b;\n}\ntemplate <typename T>\ninline T abs(T a) {\n return a > 0 ? a : -... | {
"solution_idx": 73,
"prog_id": 78,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int MAXN = 2e5, MAXQ = 1 << 21, MAXM = 5100000;\nint sito[MAXM];\nvoid eratosten() {\n for (int i = (2); i < (MAXM); i++)\n if (!sito[i])\n for (int j = i; j < MAXM; j += i) sito[j] = ... | {
"funnel_score": 0.9481481481481482,
"n_pool": 113,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "variation",
"different": false
},
{
"judge": "haiku",
... | build-10k |
1029_B | train | You are given a problemset consisting of n problems. The difficulty of the i-th problem is a_i. It is guaranteed that all difficulties are distinct and are given in the increasing order.
You have to assemble the contest which consists of some problems of the given problemset. In other words, the contest you have to as... | 1,000 | 256 | {
"solution_idx": 2,
"prog_id": 11,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconstexpr long long MOD = 1000000007;\nconstexpr long long INF = 1LL << 60;\nconstexpr long double EPS = 1e-10;\nstring operator*(const string& s, int k) {\n if (k == 0) return \"\";\n string p = (... | {
"solution_idx": 324,
"prog_id": 981,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long int gcd(long long int a, long long int b) {\n return b == 0 ? a : gcd(b, a % b);\n}\nlong long int lcm(long long int a, long long int b) {\n return a * (b / gcd(a, b));\n}\nint dr[] = {... | {
"funnel_score": 0.9970588235294118,
"n_pool": 375,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1029_C | train | You are given n segments on a number line; each endpoint of every segment has integer coordinates. Some segments can degenerate to points. Segments can intersect with each other, be nested in each other or even coincide.
The intersection of a sequence of segments is such a maximal set of points (not necesserily having... | 3,000 | 256 | {
"solution_idx": 166,
"prog_id": 306,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint intersecao(vector<vector<int>> valores, int n) {\n int menorp1 = 0, maiorp0 = 1;\n if (n - 1 > 0) {\n menorp1 = valores[0][1];\n maiorp0 = valores[0][0];\n }\n for (int i = 1; i < n ... | {
"solution_idx": 243,
"prog_id": 466,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nbool compare(pair<int, int> a, pair<int, int> b) { return a.first > b.first; }\nint main() {\n int n;\n cin >> n;\n vector<pair<int, int>> l, r;\n for (int i = 0; i < n; i++) {\n int x, y;\n... | {
"funnel_score": 0.9882352941176471,
"n_pool": 378,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1029_D | train | You are given an array a, consisting of n positive integers.
Let's call a concatenation of numbers x and y the number that is obtained by writing down numbers x and y one right after another without changing the order. For example, a concatenation of numbers 12 and 3456 is a number 123456.
Count the number of ordered... | 2,000 | 256 | {
"solution_idx": 15,
"prog_id": 18,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long n, k;\nlong long a[200005], p[20], lg[200005];\nstruct hash_map {\n int head[200005], Next[200005], cnt;\n long long val[200005], tot[200005];\n hash_map() {\n cnt = 0;\n memset(he... | {
"solution_idx": 123,
"prog_id": 183,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long N = (long long)3e5 + 5;\nmap<long long, long long> mp;\nconst long long lim = (long long)2e20;\nmap<long long, map<long long, long long> > M;\nlong long Power[35];\ninline long long... | {
"funnel_score": 0.9333333333333333,
"n_pool": 323,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "variation",
"different": false
},
{
"judge": "haiku",
... | build-10k |
1029_E | train | You are given an undirected tree consisting of n vertices. An undirected tree is a connected undirected graph with n - 1 edges.
Your task is to add the minimum number of edges in such a way that the length of the shortest path from the vertex 1 to any other vertex is at most 2. Note that you are not allowed to add loo... | 1,000 | 256 | {
"solution_idx": 157,
"prog_id": 185,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nlong long dx[4] = {0, -1, 0, 1};\nlong long dy[4] = {1, 0, -1, 0};\nusing namespace std;\nclass pa3 {\n public:\n long long x, y, z;\n pa3(long long x = 0, long long y = 0, long long z = 0) : x(x), y(y), z(z) {}\n bo... | {
"solution_idx": 273,
"prog_id": 330,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n, a, b, s = 0;\n cin >> n;\n vector<int> D[n], T;\n vector<pair<int, int>> K;\n int S[n], g[n], d[n], P[n], t[n];\n for (int i = 0; i < n - 1; i++) {\n cin >> a >> b;\n... | {
"funnel_score": 0.9761904761904762,
"n_pool": 322,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | late-fill |
1029_F | train | There is an infinite board of square tiles. Initially all tiles are white.
Vova has a red marker and a blue marker. Red marker can color a tiles. Blue marker can color b tiles. If some tile isn't white then you can't use marker of any color on it. Each marker must be drained completely, so at the end there should be e... | 3,000 | 256 | {
"solution_idx": 138,
"prog_id": 176,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int M = 10000;\nvector<int> adj[M];\nint dx[] = {1, -1, 0, 0};\nint dy[] = {0, 0, 1, -1};\nint kx[] = {2, 2, -2, -2, 1, -1, 1, -1};\nint ky[] = {1, -1, 1, -1, 2, 2, -2, -2};\nint grid[100][10... | {
"solution_idx": 320,
"prog_id": 390,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvoid __print(int x) { cerr << x; }\nvoid __print(long x) { cerr << x; }\nvoid __print(long long x) { cerr << x; }\nvoid __print(unsigned x) { cerr << x; }\nvoid __print(unsigned long x) { cerr << x... | {
"funnel_score": 0.8361344537815125,
"n_pool": 324,
"pair_rank": 1
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "identical",
"different": false
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
},
{
"judge": "haiku",
... | late-fill |
102_B | train | Having watched the last Harry Potter film, little Gerald also decided to practice magic. He found in his father's magical book a spell that turns any number in the sum of its digits. At the moment Gerald learned that, he came across a number n. How many times can Gerald put a spell on it until the number becomes one-di... | 2,000 | 265 | {
"solution_idx": 57,
"prog_id": 275,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n string s;\n cin >> s;\n long long n = 0;\n if (s.length() == 1) {\n cout << 0;\n return 0;\n }\n for (char c : s) {\n n += (c - '0');\n }\n int count = 1;\n while (t... | {
"solution_idx": 193,
"prog_id": 954,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint lsone(int n) { return (n & -n); }\nvoid mult(long long int a[25][25], long long int b[25][25],\n long long int c[25][25], int m, int n, int p) {\n for (int i = 1; i <= m; i++) {\n ... | {
"funnel_score": 0.8487394957983193,
"n_pool": 196,
"pair_rank": 2
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1031_A | train | You have a plate and you want to add some gilding to it. The plate is a rectangle that we split into w× h cells. There should be k gilded rings, the first one should go along the edge of the plate, the second one — 2 cells away from the edge and so on. Each ring has a width of 1 cell. Formally, the i-th of these rings ... | 1,000 | 256 | {
"solution_idx": 27,
"prog_id": 135,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long N = 1e6 + 1;\nset<long long> h;\nmap<long long, long long> mp, pm;\nmap<char, long long> hs;\nvector<long long> v, vc, oreder1, inoreder, posoreder, ve, vv, vd;\ndeque<char> p, pe;\n... | {
"solution_idx": 164,
"prog_id": 782,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int N = 5e5 + 1;\nconst int L = 3e4 + 1;\nlong long n, m, l = 1, r, q, b[N], a[101][101], ans;\nstring s;\nint main() {\n ios_base::sync_with_stdio(false);\n cin >> n >> m >> q;\n for (in... | {
"funnel_score": 0.9852941176470589,
"n_pool": 235,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1031_B | train | When Masha came to math classes today, she saw two integer sequences of length n - 1 on the blackboard. Let's denote the elements of the first sequence as a_i (0 ≤ a_i ≤ 3), and the elements of the second sequence as b_i (0 ≤ b_i ≤ 3).
Masha became interested if or not there is an integer sequence of length n, which e... | 1,000 | 256 | {
"solution_idx": 23,
"prog_id": 39,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint a[100000], t[100000], b[100000];\nint n;\nint func(int k) {\n if (k == n - 1) {\n return 1;\n }\n if (b[k] == 0) {\n if (a[k] == 0) {\n if (t[k] == 0) {\n t[k + 1] = 0;\n ... | {
"solution_idx": 83,
"prog_id": 122,
"provenance": "R",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvector<long long> a, b;\nvector<long long> t;\nlong long n;\nvoid rec(long long i) {\n if (i == n) {\n cout << \"YES\" << endl;\n for (auto &i : t) {\n cout << i << \" \";\n }\n ex... | {
"funnel_score": 0.9342105263157895,
"n_pool": 168,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1031_C | train | In a galaxy far, far away Lesha the student has just got to know that he has an exam in two days. As always, he hasn't attended any single class during the previous year, so he decided to spend the remaining time wisely.
Lesha knows that today he can study for at most a hours, and he will have b hours to study tomorro... | 1,000 | 256 | {
"solution_idx": 103,
"prog_id": 164,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvoid vout(vector<long long> ans) {\n for (auto ele : ans) cout << ele << \" \";\n cout << \"\\n\";\n}\nvector<long long> adj[200001];\nbool vis[200001];\nclock_t time_p = clock();\nvoid purvansh... | {
"solution_idx": 123,
"prog_id": 192,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nstruct point {\n long double x, y;\n point() {\n x = 0;\n y = 0;\n }\n point(long long a, long long b) {\n x = a;\n y = b;\n }\n bool operator==(const point &b) { return x == b.x... | {
"funnel_score": 0.9441176470588235,
"n_pool": 266,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1031_D | train | You are given a matrix of size n × n filled with lowercase English letters. You can change no more than k letters in this matrix.
Consider all paths from the upper left corner to the lower right corner that move from a cell to its neighboring cell to the right or down. Each path is associated with the string that is f... | 1,500 | 256 | {
"solution_idx": 14,
"prog_id": 14,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst long long N = 2e3 + 36;\nconst long long M = 5e6 + 36;\nconst long long INF = 2e9 + 7;\nconst long long MOD = 987654323;\nconst long long MOD1 = 1e9 + 7;\nconst long long MOD2 = 1e9 + 9;\nconst... | {
"solution_idx": 79,
"prog_id": 95,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, k;\nchar a[2001][2001];\nbool v[2001][2001];\nint K[2001][2001];\nchar L[2001][2001];\nchar ans[4010];\nstruct record {\n int i, j, depth;\n};\nqueue<record> Q;\nint main() {\n scanf(\"%d%d... | {
"funnel_score": 0.9814814814814814,
"n_pool": 249,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1031_E | train | You are given an array a of length n that consists of zeros and ones.
You can perform the following operation multiple times. The operation consists of two steps:
1. Choose three integers 1 ≤ x < y < z ≤ n, that form an arithmetic progression (y - x = z - y).
2. Flip the values a_x, a_y, a_z (i.e. change 1 to 0... | 1,000 | 256 | {
"solution_idx": 61,
"prog_id": 68,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint arr[100005];\nstruct state {\n int a, b, c;\n} op1[8], op2[8][2];\nstate tran(int l, state now) { return state{l + now.a, l + now.b, l + now.c}; }\nint get(int l, int len = 3) {\n int ret = 0;\... | {
"solution_idx": 93,
"prog_id": 103,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint n, a[100010], nb, na;\nstruct Info {\n int x, y, z;\n} b[30], an[100010];\nvoid co(int x, int y) {\n an[++na].x = x;\n an[na].y = x + y;\n an[na].z = x + y + y;\n a[x] ^= 1;\n a[x + y] ^=... | {
"funnel_score": 0.9777777777777779,
"n_pool": 159,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1031_F | train | You are given two positive integers a and b. There are two possible operations:
1. multiply one of the numbers by some prime p;
2. divide one of the numbers on its prime factor p.
What is the minimum number of operations required to obtain two integers having the same number of divisors? You are given severa... | 2,000 | 256 | {
"solution_idx": 9,
"prog_id": 9,
"provenance": "PR",
"code": "#include <bits/stdc++.h>\nusing namespace std;\ninline int read() {\n int n = 0;\n char c;\n for (c = getchar(); c < '0' || c > '9'; c = getchar())\n ;\n for (; c >= '0' && c <= '9'; c = getchar()) n = n * 10 + c - 48;\n return n;\n}\nconst... | {
"solution_idx": 55,
"prog_id": 56,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nconst int INF = 1e9 + 7;\nconst long long INFL = 1e18 + 123;\nconst double PI = atan2(0, -1);\nmt19937 tw(960172);\nlong long rnd(long long x, long long y) {\n static uniform_int_distribution<long ... | {
"funnel_score": 0.8717105263157895,
"n_pool": 90,
"pair_rank": 2
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1032_B | train | At many competitions that have a word «cup» in its official name the winner is presented with an actual cup. This time the organizers of one unusual programming competition have decided to please the winner even more and to add a nameplate to the cup with the handle of the winner.
The nameplate is to be rectangular an... | 1,000 | 256 | {
"solution_idx": 6,
"prog_id": 21,
"provenance": "R",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n string s;\n cin >> s;\n int rows = (s.size() + 19) / 20;\n int cols = (s.size() + rows - 1) / rows;\n int starcnt = (rows - s.size() % rows) % rows;\n cout << rows << ' ' << cols ... | {
"solution_idx": 77,
"prog_id": 224,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nstring s;\nint main() {\n cin >> s;\n int len = s.length();\n if (len <= 20) {\n cout << 1 << ' ' << len << endl;\n cout << s;\n } else if (len > 20 && len <= 40) {\n if (len % 2 == 0) ... | {
"funnel_score": 0.9444444444444444,
"n_pool": 174,
"pair_rank": 0
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "variation",
"different": false
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
},
{
"judge": "haiku... | build-10k |
1032_C | train | Little Paul wants to learn how to play piano. He already has a melody he wants to start with. For simplicity he represented this melody as a sequence a_1, a_2, …, a_n of key numbers: the more a number is, the closer it is to the right end of the piano keyboard.
Paul is very clever and knows that the essential thing is... | 1,000 | 256 | {
"solution_idx": 51,
"prog_id": 69,
"provenance": "PER",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n std::ios::sync_with_stdio(false);\n int n;\n cin >> n;\n if (n == 1) {\n cout << 1 << endl;\n return 0;\n }\n vector<pair<int, int>> intervals;\n intervals.push_back(mak... | {
"solution_idx": 82,
"prog_id": 105,
"provenance": "ER",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvoid read() { return; }\nvoid wrt() { cout << (string) \"\\n\"; }\nvoid wrt(long long t) { cout << t; }\nvoid wrt(int t) { cout << t; }\nvoid wrt(char t) { cout << t; }\nvoid wrt(string t) { cout <... | {
"funnel_score": 0.9759615384615384,
"n_pool": 174,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
1033_A | train | Alice and Bob are playing chess on a huge chessboard with dimensions n × n. Alice has a single piece left — a queen, located at (a_x, a_y), while Bob has only the king standing at (b_x, b_y). Alice thinks that as her queen is dominating the chessboard, victory is hers.
But Bob has made a devious plan to seize the vic... | 1,000 | 256 | {
"solution_idx": 48,
"prog_id": 191,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\ntemplate <class T>\ninline bool read(T &x) {\n int c = getchar();\n int sgn = 1;\n while (~c && c<'0' | c> '9') {\n if (c == '-') sgn = -1;\n c = getchar();\n }\n for (x = 0; ~c && '0' <=... | {
"solution_idx": 128,
"prog_id": 415,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nint main() {\n int n, a[4], b[4], i;\n double k1, k2;\n scanf(\"%d\", &n);\n for (i = 1; i <= 3; i++) {\n scanf(\"%d%d\", &a[i], &b[i]);\n }\n if (a[2] == a[1] || a[3] == a[1] || b[2] == b... | {
"funnel_score": 0.9629629629629629,
"n_pool": 232,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "very_distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "very_distinct",
"different": true
}
]
} | build-10k |
1033_B | train | Alice has a lovely piece of cloth. It has the shape of a square with a side of length a centimeters. Bob also wants such piece of cloth. He would prefer a square with a side of length b centimeters (where b < a). Alice wanted to make Bob happy, so she cut the needed square out of the corner of her piece and gave it to ... | 2,000 | 256 | {
"solution_idx": 18,
"prog_id": 47,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nvoid fastIO() {\n std::ios_base::sync_with_stdio(0);\n cin.tie(0);\n cout.tie(0);\n}\ntemplate <typename T, typename U>\ninline void mnze(T &x, U y) {\n if (y < x) x = y;\n}\ntemplate <typename T... | {
"solution_idx": 156,
"prog_id": 566,
"provenance": "E",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long a, b, c;\nint t;\nconst int MAXN = 65;\nlong long n, x[MAXN];\nlong long multi(long long a, long long b, long long p) {\n long long ans = 0;\n while (b) {\n if (b & 1LL) ans = (ans +... | {
"funnel_score": 0.8355263157894737,
"n_pool": 186,
"pair_rank": 1
} | {
"outcome": "majority",
"n_judges": 3,
"n_different": 2,
"unanimous": false,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "variation",
"different": false
},
{
"judge": "haiku",
... | build-10k |
1033_C | train | After a long day, Alice and Bob decided to play a little game. The game board consists of n cells in a straight line, numbered from 1 to n, where each cell contains a number a_i between 1 and n. Furthermore, no two cells contain the same number.
A token is placed in one of the cells. They take alternating turns of mo... | 1,000 | 256 | {
"solution_idx": 60,
"prog_id": 114,
"provenance": "P",
"code": "#include <bits/stdc++.h>\nusing namespace std;\nlong long a[101100];\nlong long second[100100];\nlong long n, m;\nint solve(long long n0, long long p) {\n long long x = 1;\n if (second[p] != -1) return second[p];\n for (long long i = 1; ((p + ... | {
"solution_idx": 165,
"prog_id": 330,
"provenance": "PE",
"code": "#include <bits/stdc++.h>\n#pragma warning(disable : 4996)\nusing namespace std;\nlong long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }\nlong double dist_sqr(pair<double, double> a, pair<double, double> b) {\n return (a... | {
"funnel_score": 0.9841269841269842,
"n_pool": 223,
"pair_rank": 0
} | {
"outcome": "unanimous",
"n_judges": 2,
"n_different": 2,
"unanimous": true,
"votes": [
{
"judge": "flash_lite",
"rating": "distinct",
"different": true
},
{
"judge": "gpt54mini",
"rating": "distinct",
"different": true
}
]
} | build-10k |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.