diff --git a/problems/DP-02/Atcoder/abc180_e/editorial.md b/problems/DP-02/Atcoder/abc180_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..764f447238c5dc7db5df0abc72afe92d9cd6d294 --- /dev/null +++ b/problems/DP-02/Atcoder/abc180_e/editorial.md @@ -0,0 +1,20 @@ +# E - Traveling Salesman among Aerial Cities (editorial) + +Source: https://atcoder.jp/contests/abc180/editorial/249 by evima + +Since the triangular inequalities hold among the costs of traveling between the cities, so there is no need to travel from one city to another via other cities other than those two cities. + +Searching all the orders of visiting towns requires a total of \(O(N! * N)\) time, in which the answer cannot be obtained in time under the constraints this time. The problem can be solved by the following DP: + +\(DP[i][S]=\) The minimum cost when you are currently at city \(i\) and the set of towns you have already visited is \(S\) + +\(DP[i][S]=\min\{DP[j][S\setminus \{i\}]+dist(i,j) \mid j\in S\setminus\{i\}\}\) + +Here, you may hold the set \(S\) itself as a key, but you can treat those sets as integers by associating them with binaries, for example, Associating \(\{0,3,5\}\) with \(2^0+2^3+2^5=41\). That’s why this kind of DP is sometimes called bitDP. + +The integer obtained by the correspondence, \(f(S)\), satisfies the following properties: + +- \(i\in S \Longleftrightarrow\) The \(i\)-th bit of \(f(S)\) is \(1\) +- \(T \subset S \Longleftrightarrow (f(T) \text{ bitwiseor } f(S))=f(S) \Longrightarrow f(T) \leq f(S)\) + +so operations and properties on sets can be represented concisely by bit operations. diff --git a/problems/DP-02/Atcoder/abc180_e/judge.json b/problems/DP-02/Atcoder/abc180_e/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..78b0d0b29c3b020a0d1a657853224e0661113bda --- /dev/null +++ b/problems/DP-02/Atcoder/abc180_e/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 23, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc180_e/meta.json b/problems/DP-02/Atcoder/abc180_e/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..cc3004817b020abdfb3737e267ac17f32bfc2b1b --- /dev/null +++ b/problems/DP-02/Atcoder/abc180_e/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc180_e", + "contest": "abc180", + "type": "ABC", + "letter": "E", + "title": "Traveling Salesman among Aerial Cities", + "url": "https://atcoder.jp/contests/abc180/tasks/abc180_e", + "difficulty": 1256, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 23, + "editorial_url": "https://atcoder.jp/contests/abc180/editorial/249", + "code_source": "model", + "pid": "A1457" +} diff --git a/problems/DP-02/Atcoder/abc180_e/solution.cpp b/problems/DP-02/Atcoder/abc180_e/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e1c1a69dc6ff7eda3e7b24de924f12eaa2b7dbfc --- /dev/null +++ b/problems/DP-02/Atcoder/abc180_e/solution.cpp @@ -0,0 +1,54 @@ +// abc180_e: E - Traveling Salesman among Aerial Cities +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc180/editorial/249 +// Judged AC on all 23 tests, max 0.02 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N; + cin >> N; + vector X(N), Y(N), Z(N); + for (int i = 0; i < N; ++i) { + cin >> X[i] >> Y[i] >> Z[i]; + } + + long long cost[17][17]; + for (int i = 0; i < N; ++i) { + for (int j = 0; j < N; ++j) { + cost[i][j] = abs(X[j] - X[i]) + abs(Y[j] - Y[i]) + + max(0LL, Z[j] - Z[i]); + } + } + + const int states = 1 << N; + const int full = states - 1; + const long long INF = 1LL << 60; + vector dp(static_cast(states) * N, INF); + dp[N] = 0; // Visited only city 0, currently at city 0. + + for (int mask = 1; mask < states; mask += 2) { + for (int i = 0; i < N; ++i) { + long long current = dp[mask * N + i]; + if (current == INF) continue; + int remaining = full ^ mask; + while (remaining) { + int j = __builtin_ctz(remaining); + remaining &= remaining - 1; + int next_mask = mask | (1 << j); + long long &next = dp[next_mask * N + j]; + next = min(next, current + cost[i][j]); + } + } + } + + long long answer = INF; + for (int i = 0; i < N; ++i) { + answer = min(answer, dp[full * N + i] + cost[i][0]); + } + cout << answer << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc180_e/statement.md b/problems/DP-02/Atcoder/abc180_e/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..a3ad36f2a1aa3345e81ef8d4d94fe3b002aa57cd --- /dev/null +++ b/problems/DP-02/Atcoder/abc180_e/statement.md @@ -0,0 +1,98 @@ +# E - Traveling Salesman among Aerial Cities + +**Score:** 500 points + +## Problem Statement + +In a three-dimensional space, there are \(N\) cities: City \(1\) through City \(N\). City \(i\) is at point \((X_i,Y_i,Z_i)\). + +The cost it takes to travel from a city at point \((a,b,c)\) to a city at point \((p,q,r)\) is \(|p-a|+|q-b|+\max(0,r-c)\). + +Find the minimum total cost it takes to start at City \(1\), visit all other cities at least once, and return to City \(1\). + +## Constraints +- \(2 \leq N \leq 17\) +- \(-10^6 \leq X_i,Y_i,Z_i \leq 10^6\) +- No two cities are at the same point. +- All values in input are integers. + +--- + +## Input +Input is given from Standard Input in the following format: + +``` +N +X_1 Y_1 Z_1 +\vdots +X_N Y_N Z_N +``` + +## Output +Print the minimum total cost it takes to start at City \(1\), visit all other cities at least once, and return to City \(1\). + +--- + +## Sample Input 1 +``` +2 +0 0 0 +1 2 3 +``` + +## Sample Output 1 +``` +9 +``` + +The cost it takes to travel from City \(1\) to City \(2\) is \(|1-0|+|2-0|+\max(0,3-0)=6\). + +The cost it takes to travel from City \(2\) to City \(1\) is \(|0-1|+|0-2|+\max(0,0-3)=3\). + +Thus, the total cost will be \(9\). + +--- + +## Sample Input 2 +``` +3 +0 0 0 +1 1 1 +-1 -1 -1 +``` + +## Sample Output 2 +``` +10 +``` + +For example, we can visit the cities in the order \(1\), \(2\), \(1\), \(3\), \(1\) to make the total cost \(10\). Note that we can come back to City \(1\) on the way. + +--- + +## Sample Input 3 +``` +17 +14142 13562 373095 +-17320 508075 68877 +223606 -79774 9979 +-24494 -89742 783178 +26457 513110 -64591 +-282842 7124 -74619 +31622 -77660 -168379 +-33166 -24790 -3554 +346410 16151 37755 +-36055 51275 463989 +37416 -573867 73941 +-3872 -983346 207417 +412310 56256 -17661 +-42426 40687 -119285 +43588 -989435 -40674 +-447213 -59549 -99579 +45825 7569 45584 +``` + +## Sample Output 3 +``` +6519344 +``` diff --git a/problems/DP-02/Atcoder/abc187_f/editorial.md b/problems/DP-02/Atcoder/abc187_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..89a9165a05c984b6a91be5cde409983901628dbc --- /dev/null +++ b/problems/DP-02/Atcoder/abc187_f/editorial.md @@ -0,0 +1,33 @@ +# F - Close Group (editorial) + +Source: https://atcoder.jp/contests/abc187/editorial/502 by en_translator + +Let \(V\) be the vertex set of the graph, \(S\) be a non-empty subset of \(V\) and \(f(S)\) be the answer for this problem when the input is the subgraph induced by \(S\). + What we want is \(f(V)\), but it is necessary to calculate all \(f(S)\) when obtaining \(f(V)\), so let us consider calculating all \(f(S)\). + +If the induced subgraph by \(S\) is complete, then \(f(S) = 1\); otherwise \(f(S)\) is determined by \(\displaystyle \min_{T \subset S}f(T)+f(S \setminus T)\). + Therefore, one can determine \(f(S)\) in order that smaller subsets are calculated earlier. + +Let us consider the complexity. + One can determine if each induced subgraph is complete in \(O(2^N N^2)\) time for all \(S\). + The problem is \(\displaystyle \min_{T \subset S}f(T)+f(S \setminus T)\) part. + If \(T\) is iterated through all subset of \(V\), the total computation time for all \(S\) will be \(O(2^N \cdot 2^N)=O(4^N)\); actually, however, \(S\) can be processed in a total of \(O(3^N)\) time, since \(T\) can only be a subset of \(S\), and + +\[ \sum_{S \subset V} 2^{|S|}=3^N. \] + +This formula can also be understood from the fact that each element of \(V\) can be either + +- contained in both \(S\) and \(T\), +- contained only in \(S\), or +- not contained in either set, + +independently. + +The answer for this problem is the chromatic number of complement graph when + +- two vertices directly connected by an edge can be painted with the same color (if not, the edge is removed), and +- two vertices not directly connected by edges cannot be painted with the same color. + +It is known that the chromatic number of a graph calculated in a total of \(O(2^NN)\) time, so the original problem can be solved in a total of \(O(2^NN)\) time as well. + +Related Materials (Japanese): https://www.slideshare.net/wata_orz/ss-12131479 diff --git a/problems/DP-02/Atcoder/abc187_f/judge.json b/problems/DP-02/Atcoder/abc187_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..b403f7babaf78166430306734cdd7648e75809e1 --- /dev/null +++ b/problems/DP-02/Atcoder/abc187_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 3.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 44, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc187_f/meta.json b/problems/DP-02/Atcoder/abc187_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..25391aa5f3d679760f806234b56db97e431b99d3 --- /dev/null +++ b/problems/DP-02/Atcoder/abc187_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc187_f", + "contest": "abc187", + "type": "ABC", + "letter": "F", + "title": "Close Group", + "url": "https://atcoder.jp/contests/abc187/tasks/abc187_f", + "difficulty": 1895, + "score": 600, + "time_limit_sec": 3.0, + "memory_limit_mb": 1024, + "n_tests": 44, + "editorial_url": "https://atcoder.jp/contests/abc187/editorial/502", + "code_source": "model", + "pid": "A1500" +} diff --git a/problems/DP-02/Atcoder/abc187_f/solution.cpp b/problems/DP-02/Atcoder/abc187_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6a4b174e21e43fb490f68b2cc152f0f0ab94ad1 --- /dev/null +++ b/problems/DP-02/Atcoder/abc187_f/solution.cpp @@ -0,0 +1,49 @@ +// abc187_f: F - Close Group +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc187/editorial/502 +// Judged AC on all 44 tests, max 0.24 s of the 3 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + vector adj(N, 0); + for (int i = 0; i < M; ++i) { + int a, b; + cin >> a >> b; + --a; + --b; + adj[a] |= 1 << b; + adj[b] |= 1 << a; + } + + int size = 1 << N; + vector clique(size, false); + vector dp(size, 0); + clique[0] = true; + + for (int s = 1; s < size; ++s) { + int v = __builtin_ctz(static_cast(s)); + int rest = s ^ (1 << v); + clique[s] = clique[rest] && ((adj[v] & rest) == rest); + if (clique[s]) { + dp[s] = 1; + continue; + } + + int best = dp[rest] + 1; + // The two sides of a partition are interchangeable. + for (int t = (s - 1) & s; t > (s ^ t) && best > 2; + t = (t - 1) & s) { + best = min(best, dp[t] + dp[s ^ t]); + } + dp[s] = best; + } + + cout << dp[size - 1] << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc187_f/statement.md b/problems/DP-02/Atcoder/abc187_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..823350a38a38b696f303c9937edd00bdf9def069 --- /dev/null +++ b/problems/DP-02/Atcoder/abc187_f/statement.md @@ -0,0 +1,101 @@ +# F - Close Group + +**Score**: 600 points + +## Problem Statement +Given is a simple undirected graph with \(N\) vertices and \(M\) edges. The vertices are numbered \(1, 2, \dots, N\), and the \(i\)-th edge connects Vertices \(A_i\) and \(B_i\). + +Find the minimum possible number of connected components in the graph after removing zero or more edges so that the following condition will be satisfied: + +**Condition**: +For every pair of vertices \((a, b)\) such that \(1 \le a < b \le N\), if Vertices \(a\) and \(b\) belong to the same connected component, there is an edge that directly connects Vertices \(a\) and \(b\). + +## Constraints +- All values in input are integers. +- \(1 \le N \le 18\) +- \(0 \le M \le \frac{N(N - 1)}{2}\) +- \(1 \le A_i < B_i \le N\) +- \((A_i, B_i) \neq (A_j, B_j)\) for \(i \neq j\). + +--- + +## Input +Input is given from Standard Input in the following format: +``` +N M +A_1 B_1 +... +A_M B_M +``` + +## Output +Print the answer. + +--- + +## Sample Input 1 +``` +3 2 +1 2 +1 3 +``` + +### Sample Output 1 +``` +2 +``` +Without removing edges, the pair \((2, 3)\) violates the condition. +Removing one of the edges disconnects Vertices \(2\) and \(3\), satisfying the condition. + +--- + +## Sample Input 2 +``` +4 6 +1 2 +1 3 +1 4 +2 3 +2 4 +3 4 +``` + +### Sample Output 2 +``` +1 +``` + +--- + +## Sample Input 3 +``` +10 11 +9 10 +2 10 +8 9 +3 4 +5 8 +1 8 +5 6 +2 5 +3 6 +6 9 +1 9 +``` + +### Sample Output 3 +``` +5 +``` + +--- + +## Sample Input 4 +``` +18 0 +``` + +### Sample Output 4 +``` +18 +``` diff --git a/problems/DP-02/Atcoder/abc190_e/editorial.md b/problems/DP-02/Atcoder/abc190_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..25c355246b04df471d22ad74541fecc90e20f05a --- /dev/null +++ b/problems/DP-02/Atcoder/abc190_e/editorial.md @@ -0,0 +1,25 @@ +# E - Magical Ornament (editorial) + +Source: https://atcoder.jp/contests/abc190/editorial/691 by en_translator + +Let us regard it as a graph, where the magical gems are vertices and the pairs of them that can be adjacent are edges. + +Notice that the constraints of \(K\) is fairly small (\(K ≤ 17\)). + It can see that this problem is equivalent to the shortest Hamiltonian problem for vertices \(C_1, C_2, \dots,\) and \(C_K\). + Now let us consider solving this problem efficiently with Dynamic Programming (DP). + +Let \(C\) be a set \(C = \{C_1, C_2, \dots, C_K\}\), \(S\) be a subset of \(C\), and \(i\) be an element of \(S\); define + +\(dp[S][i] = {}\)(Minimum length of path that contains \(S\) and ends at \(i\)) + +then the answer for the problem is \(\displaystyle \min_{i}\{dp[C][i]\} + 1\). + This DP satisfies the following recurrence relations: + +\(\displaystyle dp[\{i\}][i] = 0\) + \(\displaystyle dp[S][i] = \min_{j}\{dp[S \setminus \{i\}][j] + \text{dist}(i, j)\}\) + +where \(\text{dist}(i, j)\) denotes the distance between vertices \(i, j\), so this dp can be calculated from smaller subsets to bigger (as long as \(\text{dist}(i, j)\) is known). + +As for \(\text{dist}(i, j)\), since \(i, j \in C\), they can be calculated with \(K\) times of BFS, beginning with each of \(C_1, C_2, \dots,\) and \(C_K\). + +Therefore, the problem can be solved in a total of \(O(2^KK^2+K(N+M))\) time. diff --git a/problems/DP-02/Atcoder/abc190_e/judge.json b/problems/DP-02/Atcoder/abc190_e/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..dd0a9bf6ed29df77e004c9403cf01ebb3d42656d --- /dev/null +++ b/problems/DP-02/Atcoder/abc190_e/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 40, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc190_e/meta.json b/problems/DP-02/Atcoder/abc190_e/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..88bf0ef2be996051178d274dc6fac023c43f9101 --- /dev/null +++ b/problems/DP-02/Atcoder/abc190_e/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc190_e", + "contest": "abc190", + "type": "ABC", + "letter": "E", + "title": "Magical Ornament", + "url": "https://atcoder.jp/contests/abc190/tasks/abc190_e", + "difficulty": 1645, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 40, + "editorial_url": "https://atcoder.jp/contests/abc190/editorial/691", + "code_source": "model", + "pid": "A1517" +} diff --git a/problems/DP-02/Atcoder/abc190_e/solution.cpp b/problems/DP-02/Atcoder/abc190_e/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ce34a50533a23046f291968629fca3f3274d4dbe --- /dev/null +++ b/problems/DP-02/Atcoder/abc190_e/solution.cpp @@ -0,0 +1,80 @@ +// abc190_e: E - Magical Ornament +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc190/editorial/691 +// Judged AC on all 40 tests, max 0.22 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + vector> graph(N); + for (int i = 0; i < M; ++i) { + int a, b; + cin >> a >> b; + --a; + --b; + graph[a].push_back(b); + graph[b].push_back(a); + } + + int K; + cin >> K; + vector C(K); + for (int &c : C) { + cin >> c; + --c; + } + + vector> distance(K, vector(K)); + vector dist(N), que(N); + for (int i = 0; i < K; ++i) { + fill(dist.begin(), dist.end(), -1); + int head = 0, tail = 0; + dist[C[i]] = 0; + que[tail++] = C[i]; + while (head < tail) { + int v = que[head++]; + for (int u : graph[v]) { + if (dist[u] != -1) continue; + dist[u] = dist[v] + 1; + que[tail++] = u; + } + } + for (int j = 0; j < K; ++j) { + if (dist[C[j]] == -1) { + cout << -1 << '\n'; + return 0; + } + distance[i][j] = dist[C[j]]; + } + } + + const int INF = 1000000000; + const int states = 1 << K; + const int full = states - 1; + vector dp(states * K, INF); + for (int i = 0; i < K; ++i) dp[(1 << i) * K + i] = 0; + + for (int mask = 1; mask < states; ++mask) { + int remaining = full ^ mask; + for (int bits = mask; bits; bits &= bits - 1) { + int i = __builtin_ctz((unsigned)bits); + int current = dp[mask * K + i]; + if (current == INF) continue; + for (int next = remaining; next; next &= next - 1) { + int j = __builtin_ctz((unsigned)next); + int &target = dp[(mask | (1 << j)) * K + j]; + target = min(target, current + distance[i][j]); + } + } + } + + int answer = INF; + for (int i = 0; i < K; ++i) answer = min(answer, dp[full * K + i]); + cout << answer + 1 << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc190_e/statement.md b/problems/DP-02/Atcoder/abc190_e/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..50d539e97bdc38db97e439bf11f74a5519360135 --- /dev/null +++ b/problems/DP-02/Atcoder/abc190_e/statement.md @@ -0,0 +1,88 @@ +# E - Magical Ornament + +**Score :** 500 points + +## Problem Statement +There are `N` kinds of magical gems, numbered `1, 2, \ldots, N`, distributed in the AtCoder Kingdom. +Takahashi is trying to make an ornament by arranging gems in a row. +For some pairs of gems, we can put the two gems next to each other; for other pairs, we cannot. We have `M` pairs for which the two gems can be adjacent: (Gem `A_1`, Gem `B_1`), (Gem `A_2`, Gem `B_2`), `\ldots`, (Gem `A_M`, Gem `B_M`). For the other pairs, the two gems cannot be adjacent. (Order does not matter in these pairs.) +Determine whether it is possible to form a sequence of gems that has one or more gems of each of the kinds `C_1, C_2, \dots, C_K`. If the answer is yes, find the minimum number of stones needed to form such a sequence. + +## Constraints +- All values in input are integers. +- `1 ≤ N ≤ 10^5` +- `0 ≤ M ≤ 10^5` +- `1 ≤ A_i < B_i ≤ N` +- If `i ≠ j`, `(A_i, B_i) ≠ (A_j, B_j)`. +- `1 ≤ K ≤ 17` +- `1 ≤ C_1 < C_2 < \dots < C_K ≤ N` + +## Input +Input is given from Standard Input in the following format: +``` +N M +A_1 B_1 +A_2 B_2 +... +A_M B_M +K +C_1 C_2 ... C_K +``` + +## Output +Print the minimum number of stones needed to form a sequence of gems that has one or more gems of each of the kinds `C_1, C_2, \dots, C_K`. +If such a sequence cannot be formed, print `-1` instead. + +## Sample Input 1 +``` +4 3 +1 4 +2 4 +3 4 +3 +1 2 3 +``` + +## Sample Output 1 +``` +5 +``` +For example, by arranging the gems in the order `[1, 4, 2, 4, 3]`, we can form a sequence of length `5` with Gems `1, 2, 3`. + +## Sample Input 2 +``` +4 3 +1 4 +2 4 +1 2 +3 +1 2 3 +``` + +## Sample Output 2 +``` +-1 +``` + +## Sample Input 3 +``` +10 10 +3 9 +3 8 +8 10 +2 10 +5 8 +6 8 +5 7 +6 7 +1 6 +2 4 +4 +1 2 7 9 +``` + +## Sample Output 3 +``` +11 +``` +For example, by arranging the gems in the order `[1, 6, 7, 5, 8, 3, 9, 3, 8, 10, 2]`, we can form a sequence of length `11` with Gems `1, 2, 7, 9`. diff --git a/problems/DP-02/Atcoder/abc192_f/editorial.md b/problems/DP-02/Atcoder/abc192_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..27e7345ab1073eff9a949f24680c9f67be352e44 --- /dev/null +++ b/problems/DP-02/Atcoder/abc192_f/editorial.md @@ -0,0 +1,13 @@ +# F - Potion (editorial) + +Source: https://atcoder.jp/contests/abc192/editorial/763 by en_translator + +We brute force through how many materials to mix. + +Due to the constraint of \(\sum A_i \leq X\), when the number of materials \(C\) to mix is fixed, it is sufficient to solve the problem “what is the maximum of sum of exactly \(C\) elements chosen from \(A_i\), such that the sum is equal to \(X\) under \(\bmod C\)?” + +This can be calculated in a total of \(O(NC^2)\) time with such DP that + +\(dp[i][j][k]=\) the maximum of sum of \(j\) elements chosen from the first \(i\) materials, such that the sum is equal to \(k\) \(\bmod C\), + +so the answer can be calculated in a total of \(O(N^4)\) time. diff --git a/problems/DP-02/Atcoder/abc192_f/judge.json b/problems/DP-02/Atcoder/abc192_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..c6587748b229443d86c141507c620c5b6de5e174 --- /dev/null +++ b/problems/DP-02/Atcoder/abc192_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 34, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc192_f/meta.json b/problems/DP-02/Atcoder/abc192_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..338e395c980180373e5b2e5e4108dc3855a2a149 --- /dev/null +++ b/problems/DP-02/Atcoder/abc192_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc192_f", + "contest": "abc192", + "type": "ABC", + "letter": "F", + "title": "Potion", + "url": "https://atcoder.jp/contests/abc192/tasks/abc192_f", + "difficulty": 1783, + "score": 600, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 34, + "editorial_url": "https://atcoder.jp/contests/abc192/editorial/763", + "code_source": "model", + "pid": "A1530" +} diff --git a/problems/DP-02/Atcoder/abc192_f/solution.cpp b/problems/DP-02/Atcoder/abc192_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..56706c2ddb08266c7653184ad4628ce51a6ff205 --- /dev/null +++ b/problems/DP-02/Atcoder/abc192_f/solution.cpp @@ -0,0 +1,39 @@ +// abc192_f: F - Potion +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc192/editorial/763 +// Judged AC on all 34 tests, max 0.03 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N; + long long X; + cin >> N >> X; + vector A(N); + for (int &a : A) cin >> a; + + long long answer = LLONG_MAX; + for (int C = 1; C <= N; ++C) { + vector> dp(C + 1, vector(C, -1)); + dp[0][0] = 0; + for (int i = 0; i < N; ++i) { + int rem = A[i] % C; + for (int j = min(i, C - 1); j >= 0; --j) { + for (int r = 0; r < C; ++r) { + if (dp[j][r] < 0) continue; + int nr = r + rem; + if (nr >= C) nr -= C; + dp[j + 1][nr] = max(dp[j + 1][nr], dp[j][r] + A[i]); + } + } + } + long long sum = dp[C][X % C]; + if (sum >= 0) answer = min(answer, (X - sum) / C); + } + + cout << answer << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc192_f/statement.md b/problems/DP-02/Atcoder/abc192_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..40671e50567506e896666d4fbaf0c7dbb7e5072d --- /dev/null +++ b/problems/DP-02/Atcoder/abc192_f/statement.md @@ -0,0 +1,62 @@ +# F - Potion + +**Score:** 600 points + +--- + +## Problem Statement +There are \(N\) kinds of materials. Material \(i\) has a magic power of \(A_i\). +Takahashi, the magician, wants to make a potion by choosing one or more kinds from these materials and mixing them. +At the moment when he makes a potion by mixing \(k\) kinds of materials, the magic power of the potion is the sum of the materials used. Then, every second, its magic power increases by \(k\). Note that the increase of the magic power is a discrete - not continuous - process. +Takahashi will mix materials just once, at time \(0\). What is the earliest time he can get a potion with a magic power of exactly \(X\)? +Under the constraints, it can be proved that it is possible to make a potion with a magic power of exactly \(X\). + +--- + +## Constraints +- \(1 \leq N \leq 100\) +- \(1 \leq A_i \leq 10^7\) +- \(10^9 \leq X \leq 10^{18}\) +- All values in input are integers. + +--- + +## Input +Input is given from Standard Input in the following format: +``` +N X +A_1 ... A_N +``` + +--- + +## Output +Print the earliest time he can get a potion with a magic power of exactly \(X\). + +--- + +## Sample Input 1 +``` +3 9999999999 +3 6 8 +``` + +## Sample Output 1 +``` +4999999994 +``` +The potion made by mixing Material \(1\) and Material \(3\) has a magic power of \(3+8=11\) at time \(0\), and it increases by \(2\) every second, so it will be \(9999999999\) at time \(4999999994\), which is the earliest possible time. +The potion made by mixing all the materials \(1, 2, 3\) will have a magic power of \(9999999998\) at time \(3333333327\) and \(10000000001\) at time \(3333333328\), so it will never be exactly \(9999999999\). + +--- + +## Sample Input 2 +``` +1 1000000000000000000 +1 +``` + +## Sample Output 2 +``` +999999999999999999 +``` diff --git a/problems/DP-02/Atcoder/abc195_f/editorial.md b/problems/DP-02/Atcoder/abc195_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..315a2c95c327753b9eed44997e271498331e5d75 --- /dev/null +++ b/problems/DP-02/Atcoder/abc195_f/editorial.md @@ -0,0 +1,9 @@ +# F - Coprime Present (editorial) + +Source: https://atcoder.jp/contests/abc195/editorial/896 by en_translator + +For any distinct pair of integers \(n > m\) between \(A\) through \(B\) (inclusive), \(GCD(n,m)=GCD(n-m,m)\leq n-m \leq B-A\). So, if \(n\) and \(m\) are not pairwise coprime, then both \(n\) and \(m\) are a multiple of an integer between \(2\) and \(B-A\), inclusive. + +Therefore, a set satisfies the conditions if and only if, for any integer \(d\) between \(2\) and \(B-A\), inclusive, the set contains at most one multiple of \(d\). Also, we can assume that \(d\) is a prime. + +One can find the answer with a bit DP, where the combination of primes are retained as the state, in a total of \(O(N2^{\pi(N)})\) time, where \(N=B-A\) and \(\pi(N)\) denotes the number of primes less than or equal to \(N\). There are at most \(20\) primes that are less than \(72\) (the maximum of \(B-A\)), so this solution is fast enough. diff --git a/problems/DP-02/Atcoder/abc195_f/judge.json b/problems/DP-02/Atcoder/abc195_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..5f69d2cd60d4fd43ddc605742f29bbc30fcac9f8 --- /dev/null +++ b/problems/DP-02/Atcoder/abc195_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 36, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc195_f/meta.json b/problems/DP-02/Atcoder/abc195_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..28c3276d26f72215c0c7f6928ae06509a3605594 --- /dev/null +++ b/problems/DP-02/Atcoder/abc195_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc195_f", + "contest": "abc195", + "type": "ABC", + "letter": "F", + "title": "Coprime Present", + "url": "https://atcoder.jp/contests/abc195/tasks/abc195_f", + "difficulty": 2068, + "score": 600, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 36, + "editorial_url": "https://atcoder.jp/contests/abc195/editorial/896", + "code_source": "model", + "pid": "A1548" +} diff --git a/problems/DP-02/Atcoder/abc195_f/solution.cpp b/problems/DP-02/Atcoder/abc195_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..910b3cfa88941ee4f64ce2d96386b6ab7025278a --- /dev/null +++ b/problems/DP-02/Atcoder/abc195_f/solution.cpp @@ -0,0 +1,48 @@ +// abc195_f: F - Coprime Present +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc195/editorial/896 +// Judged AC on all 36 tests, max 0.05 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + long long A, B; + cin >> A >> B; + int n = static_cast(B - A); + + vector primes; + for (int x = 2; x <= n; ++x) { + bool prime = true; + for (int d = 2; d * d <= x; ++d) { + if (x % d == 0) { + prime = false; + break; + } + } + if (prime) primes.push_back(x); + } + + int states = 1 << primes.size(); + vector dp(states, 0); + dp[0] = 1; + + for (long long x = A; x <= B; ++x) { + int mask = 0; + for (int i = 0; i < static_cast(primes.size()); ++i) { + if (x % primes[i] == 0) mask |= 1 << i; + } + for (int s = states - 1; s >= 0; --s) { + if ((s & mask) == 0) { + dp[s | mask] += dp[s]; + } + } + } + + long long answer = 0; + for (long long count : dp) answer += count; + cout << answer << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc195_f/statement.md b/problems/DP-02/Atcoder/abc195_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..8873c421d4f0d01c4eb50d704d12fa477a9bfa25 --- /dev/null +++ b/problems/DP-02/Atcoder/abc195_f/statement.md @@ -0,0 +1,85 @@ +# F - Coprime Present + +**Score**: 600 points + +## Problem Statement + +You have \( B-A+1 \) cards: for each integer from \( A \) through \( B \), you have one card with that integer written on it. +You will give some of them (possibly none) to your pet, Snuke. +Snuke will be happy if, for every pair of different cards, the numbers written on them are pairwise coprime; otherwise, he will be sad. +How many sets of cards will make Snuke happy? + +## Constraints + +- \( 1 \leq A \leq B \leq 10^{18} \) +- \( B-A \leq 72 \) +- All values in input are integers. + +--- + +## Input + +Input is given from Standard Input in the following format: + +``` +A B +``` + +## Output + +Print the number of sets of cards that will make Snuke happy. +**The constraints guarantee that the answer is less than \( 2^{63} \).** + +--- + +## Sample Input 1 + +``` +2 4 +``` + +### Sample Output 1 + +``` +6 +``` + +You have three cards with \( 2 \), \( 3 \), and \( 4 \) written on them. The following six sets of cards will make Snuke happy: +- \(\{\}\) +- \(\{2\}\) +- \(\{3\}\) +- \(\{4\}\) +- \(\{2,3\}\) +- \(\{3,4\}\) + +--- + +## Sample Input 2 + +``` +1 1 +``` + +### Sample Output 2 + +``` +2 +``` + +The following two sets of cards will make Snuke happy: +- \(\{\}\) +- \(\{1\}\) + +--- + +## Sample Input 3 + +``` +123456789000 123456789050 +``` + +### Sample Output 3 + +``` +2125824 +``` diff --git a/problems/DP-02/Atcoder/abc199_e/editorial.md b/problems/DP-02/Atcoder/abc199_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..20928745170e5ab61714e03ebc5934363903d041 --- /dev/null +++ b/problems/DP-02/Atcoder/abc199_e/editorial.md @@ -0,0 +1,18 @@ +# E - Permutation (editorial) + +Source: https://atcoder.jp/contests/abc199/editorial/1170 by en_translator + +Consider the following DP (Dynamic Programming). + +\(\mathrm{DP}_S\) (\(S\) is a subset of \(\{1, 2, 3, \dots, N\}\)): the number of permutations where the set first \(|S|\) elements is equal to \(S\) and that satisfies all the given conditions such that \(X_i \le |S|\) + +Let us consider the transition from an arbitrary \(\mathrm{DP}_S\) to \(\mathrm{DP}_{S \cup \{x\}}\), where the \(|S|+1\)-th element of \(a\) is determined to \(x\). Here, the transition is valid if: + +- \(x \notin S\), and +- For all \(i\) such that \(X_i = |S \cup \{x\}|\), \(S \cup \{x\}\) contains at most \(Z_i\) numbers less than or equal to \(Y_i\). + +The answer for the problem is \(\mathrm{DP}_{\{1, 2, 3, \dots, N\}}\). + Since there are \(2^N\) states, and each transition takes an \(O(N)\) time, it can be solved in a total of \(O(2^N N)\) time. + +For implementation, we can regard \(S\) as an integer \(\displaystyle \sum_{i \in S} 2^{(i - 1)}\) so that it can be used as an index of an array. Most languages is equipped with a bit operator which enables to obtain an integer corresponding to \(S \cup \{x\}\) from an integer corresponding to \(S\), which simplifies the implementation. + Such a technique of implementation is so general that the DP where the set is used as an index is called bitmask DP. diff --git a/problems/DP-02/Atcoder/abc199_e/judge.json b/problems/DP-02/Atcoder/abc199_e/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..525311dd9d87551db47a0b51b559338f2a2cd487 --- /dev/null +++ b/problems/DP-02/Atcoder/abc199_e/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 29, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc199_e/meta.json b/problems/DP-02/Atcoder/abc199_e/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..c09772de091554b40d4501fe3834a78922878adf --- /dev/null +++ b/problems/DP-02/Atcoder/abc199_e/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc199_e", + "contest": "abc199", + "type": "ABC", + "letter": "E", + "title": "Permutation", + "url": "https://atcoder.jp/contests/abc199/tasks/abc199_e", + "difficulty": 1814, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 29, + "editorial_url": "https://atcoder.jp/contests/abc199/editorial/1170", + "code_source": "model", + "pid": "A1571" +} diff --git a/problems/DP-02/Atcoder/abc199_e/solution.cpp b/problems/DP-02/Atcoder/abc199_e/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b8c393ca32214e7398aad24be1254058f1996c82 --- /dev/null +++ b/problems/DP-02/Atcoder/abc199_e/solution.cpp @@ -0,0 +1,43 @@ +// abc199_e: E - Permutation +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc199/editorial/1170 +// Judged AC on all 29 tests, max 0.01 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + vector>> constraints(N + 1); + for (int i = 0; i < M; ++i) { + int X, Y, Z; + cin >> X >> Y >> Z; + constraints[X].push_back({(1 << Y) - 1, Z}); + } + + int total = 1 << N; + vector dp(total, 0); + dp[0] = 1; + for (int mask = 1; mask < total; ++mask) { + int length = __builtin_popcount((unsigned)mask); + bool valid = true; + for (auto [low_mask, limit] : constraints[length]) { + if (__builtin_popcount((unsigned)(mask & low_mask)) > limit) { + valid = false; + break; + } + } + if (!valid) continue; + + for (int bits = mask; bits; bits &= bits - 1) { + int bit = bits & -bits; + dp[mask] += dp[mask ^ bit]; + } + } + + cout << dp[total - 1] << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc199_e/statement.md b/problems/DP-02/Atcoder/abc199_e/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..f53966195ea623a4bcb33b9e3355e9593939a560 --- /dev/null +++ b/problems/DP-02/Atcoder/abc199_e/statement.md @@ -0,0 +1,77 @@ +# E - Permutation + +**Score**: 500 points + +## Problem Statement +Print the number of sequences `a` that are permutations of `(1, 2, 3, \dots, N)` and satisfy the following condition: +- for every integer `i` such that `1 ≤ i ≤ M`, at most `Z_i` numbers among `a_1, a_2, a_3, \dots, a_{X_i}` are less than or equal to `Y_i`. + +## Constraints +- `2 ≤ N ≤ 18` +- `0 ≤ M ≤ 100` +- `1 ≤ X_i < N` +- `1 ≤ Y_i < N` +- `0 ≤ Z_i < N` +- All values in input are integers. + +--- + +## Input +Input is given from Standard Input in the following format: +``` +N M +X_1 Y_1 Z_1 +X_2 Y_2 Z_2 +X_3 Y_3 Z_3 +... +X_M Y_M Z_M +``` + +## Output +Print the answer. + +--- + +## Sample Input 1 +``` +3 1 +2 2 1 +``` + +### Sample Output 1 +``` +4 +``` +The four sequences `a` satisfying the condition are: +- `(1, 3, 2)` +- `(2, 3, 1)` +- `(3, 1, 2)` +- `(3, 2, 1)` + +`(1, 2, 3)` and `(2, 1, 3)` violate the condition, since each of them has two numbers less than or equal to `2` among `a_1, a_2`. + +--- + +## Sample Input 2 +``` +5 2 +3 3 2 +4 4 3 +``` + +### Sample Output 2 +``` +90 +``` + +--- + +## Sample Input 3 +``` +18 0 +``` + +### Sample Output 3 +``` +6402373705728000 +``` diff --git a/problems/DP-02/Atcoder/abc213_g/editorial.md b/problems/DP-02/Atcoder/abc213_g/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..6d356e3ac11ca69040ff68c881bd0627739da67e --- /dev/null +++ b/problems/DP-02/Atcoder/abc213_g/editorial.md @@ -0,0 +1,86 @@ +# G - Connectivity 2 (editorial) + +Source: https://atcoder.jp/contests/abc213/editorial/2414 by en_translator + +This problem is about techniques on combinatorics on **connected graph**. + As a prerequisite, we do not explain the technique called **bit DP** (DP=Dynamic Programming) in which each integer \(0,1,\dots,2^N-1\) is regarded a subset of \(1,2,\dots,N\). + +#### Prerequisite: subset enumeration + +Firstly, the following knowledge is required to solve this problem: + +For any non-negative integers \(i\) and \(j\), if \(i\&j = j\), let us denote \(j \subseteq i\). (Here, \(\&\) is bitwise logical products.) + Then, the pairs \((i, j)\) such that \(0 \leq i,j \lt 2^N, j \subseteq i\) can be enumerated in a total of \(\mathrm{O}(3^N)\) time. + +The equations above make us dizzy, so let us show you the example for \(N = 3\) in a **binary notation**: + +- \(i = 000_{(2)} \to j = 000_{(2)}\) +- \(i = 001_{(2)} \to j = 000_{(2)}, 001_{(2)}\) +- \(i = 110_{(2)} \to j = 000_{(2)}, 010_{(2)},100_{(2)}, 110_{(2)}\) + +As you can see, \(i\) and \(j\) are in the relationship where “a bit in \(j\) has the value \(1\) only if the corresponding digit in \(i\) has the value \(1\).” + The counterpart for the sets represented by \(i\) and \(j\) are “all elements in \(j\) are in \(i\),” that is, “\(j\) is a subset of \(i\).” + Therefore, now we can understand that the enumeration of \((i, j)\) described above is about the algorithm of **enumerating all the subset of \(i\) for every \(i\)**. + +First, let us count how many pairs \((i,j)\) satisfies the conditions. + If \(i\) has \(k\) ones in its binary notation, the number of \(j\) satisfying the conditions are \(2^k\); so the number of pairs \((i, j)\) is + +\[ \sum_{k=0}^N \binom{N}{k} 2^k.\] + +Here, we can apply binomial theorem to obtain + +\[ = (2 + 1) ^ N = 3^N.\] + +Therefore, we have proved that the number of pairs \((i,j)\) are exactly \(3^N\). + +Now let us actually enumerate \((i,j)\). They can be enumerated in a total of \(\mathrm{O}(4^N)\) with the following naive brute-force algorithm, but spending \(\mathrm{O}(4^N)\) time for iterating through \(\mathrm{O}(3^N)\) elements is not cool. + +Actually, we can exploit the bit operation as follows to enumerate them in a total of \(\mathrm{O}(3^N)\) time. + +The key point is (code omitted) in the third line. By taking bitwise and like this, the volume of range of `j` is decreased from \(\mathrm{o}(4^N)\) to \(\mathrm{o}(3^N)\). + Therefore, we can enumerate the subsets in a total of \(\mathrm{O}(3^N)\) time. We can use this algorithm to solve the problem. + +### Rephrase what we want to count + +Now we have enough prerequisite; let us explain the original problem. + First, the condition “\(1\) and \(k\) are connected” in the original problem seems to be too complex to count. In that case, we want to rephrase the object so that it becomes computable. + +Let \(V := \lbrace 1,2,\dots,N \rbrace\) be the set of vertices in \(G\). For \(S\) such that \(S \subseteq V\), we define \(f(S)\) and \(g(S)\) as follows: + +- \(f(S) := \) The number of **connected subgraph** of \(G\) whose vertex set is \(S \subseteq V\) +- \(g(S) := \) The number of **subgraph** of \(G\) whose vertex set is \(S \subseteq V\) + +Next, the desired answer can be rephrased in terms of graph theory as “the number of spanning subgraph of \(G\) such that Vertex \(1\) and Vertex \(K\) are connected;” let us denote it by \(C(k)\), and consider how to represent it by \(f(S)\) and \(g(S)\). The cases can be divided by the set of vertices that are connected to \(1\), so we have + +\[ C(k) = \sum_{\lbrace 1, k\rbrace \subseteq S \subseteq V} f(S) g(V \setminus S).\] + +(\(V \setminus S\) denotes the set of elements of \(V\) except for those in \(S\).) + +Therefore, if we can compute \(S \subseteq V\) for all \(f(S), g(S)\), then we can compute \(C(2),\dots,C(N)\) in a total of \(\mathrm{O}(N 2^N)\) with the equation above. + +### Computing \(f(S)\) and \(g(S)\) + +Now, how can we compute \(f(S)\) and \(g(S)\)? + The easier to compute is \(g(S)\). Let \(e\) be the number of edges that connects the vertices in \(S\), then the number of subgraphs is \(2^e\). Thus, let + +- \(E(S) :=\) the number of edges of \(G\) whose vertices on both ends are included in \(S\), + +then \(E(S)\) can be computed in a total of \(\mathrm{O}(M)\) time by checking if each edge is included in \(S\). Therefore, for every \(S \subseteq V\), we have found \(g(S)\) in a total of \(\mathrm{O}(M 2^N)\) time. + +Finally, let us compute \(f(S)\). + \(f(S)\) can be solved with a DP using inclusion-exclusion principle. (By the way, the DP described below is said to be “exclusion principle” or “exclusion DP” by some people, as only subtraction is used.) + +\(S = \emptyset\) (\(\emptyset\) denotes an empty set) is trivial, so we assume \(S \neq \emptyset\). \(f(S)\) can be represented by \(g(S)\) as \(f(S) = g(S) - (\) the number of unconnected graph with vertex set \(S\) \()\). + Let us represent this “unconnected graph” part by \(f\) and \(g\) just as we did for \(C(k)\). Let \(v\) be a vertex in \(S\), then we can divide the cases by the connected component including \(v\) by the following expression. (\(T \subsetneq S\) means \( T \subseteq S\) but \(T \neq S\).) + +\[ f(S) = g(S) - \sum_{v \in T \subsetneq S} f(T) g(S \setminus T).\] + +Therefore, we can compute \(f(S)\) in the increasing order, using the algorithm of enumerating the subsets, so that we obtain \(f(S)\) for all \(S \subseteq V\) in a total of \(\mathrm{O}(3^N)\) time. + +Note that \(g(S)\) can be computed by an algorithm called **Fast Zeta Transform** in a total of \(\mathrm{O}(N 2^N)\) time, but for solving Problem G, naive algorithm is enough, so we didn’t introduce it here. + Fast Zeta Transform is another important DP technique, so if you are interested, search on the Internet for the words like “Fast Zeta Transform” or “Sum over Subset DP”. + Also, a faster algorithm of finding \(f(S)\) in a total of \(\mathrm{O}(N^2 2^N)\) time is known, but we will omit it. + +### Similar problem + +- [AOJ2345: Network Reliability](https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2345) diff --git a/problems/DP-02/Atcoder/abc213_g/judge.json b/problems/DP-02/Atcoder/abc213_g/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..1c420c3bfa0137603719b03de2397f22d1d007cf --- /dev/null +++ b/problems/DP-02/Atcoder/abc213_g/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 3.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 36, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc213_g/meta.json b/problems/DP-02/Atcoder/abc213_g/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..451d0919f2ecbac72009e9fbae54dd00cd488441 --- /dev/null +++ b/problems/DP-02/Atcoder/abc213_g/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc213_g", + "contest": "abc213", + "type": "ABC", + "letter": "G", + "title": "Connectivity 2", + "url": "https://atcoder.jp/contests/abc213/tasks/abc213_g", + "difficulty": 2663, + "score": 600, + "time_limit_sec": 3.0, + "memory_limit_mb": 1024, + "n_tests": 36, + "editorial_url": "https://atcoder.jp/contests/abc213/editorial/2414", + "code_source": "model", + "pid": "A1659" +} diff --git a/problems/DP-02/Atcoder/abc213_g/solution.cpp b/problems/DP-02/Atcoder/abc213_g/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ed6b73bc7f083cdc8611ca991a709f12977d961a --- /dev/null +++ b/problems/DP-02/Atcoder/abc213_g/solution.cpp @@ -0,0 +1,65 @@ +// abc213_g: G - Connectivity 2 +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc213/editorial/2414 +// Judged AC on all 36 tests, max 0.14 s of the 3 s limit (submission 1). + +#include +#include +using namespace std; +using mint = atcoder::modint998244353; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + vector adj(N, 0); + for (int i = 0; i < M; ++i) { + int a, b; + cin >> a >> b; + --a; + --b; + adj[a] |= 1 << b; + adj[b] |= 1 << a; + } + + vector pow2(M + 1); + pow2[0] = 1; + for (int i = 1; i <= M; ++i) pow2[i] = pow2[i - 1] * 2; + + const int size = 1 << N; + vector edges(size, 0); + vector g(size), f(size); + g[0] = 1; + for (int s = 1; s < size; ++s) { + int v = __builtin_ctz(static_cast(s)); + int rest = s & (s - 1); + edges[s] = edges[rest] + __builtin_popcount(static_cast(adj[v] & rest)); + g[s] = pow2[edges[s]]; + } + + for (int s = 1; s < size; ++s) { + f[s] = g[s]; + int rest = s & (s - 1); + // The least significant vertex belongs to its connected component. + // u is the nonempty set of vertices outside that component. + for (int u = rest; u; u = (u - 1) & rest) { + f[s] -= f[s ^ u] * g[u]; + } + } + + const int full = size - 1; + vector answer(N); + for (int s = 1; s < size; s += 2) { + mint ways = f[s] * g[full ^ s]; + for (int t = s ^ 1; t; t &= t - 1) { + int k = __builtin_ctz(static_cast(t)); + answer[k] += ways; + } + } + + for (int k = 1; k < N; ++k) { + cout << answer[k].val() << '\n'; + } + return 0; +} diff --git a/problems/DP-02/Atcoder/abc213_g/statement.md b/problems/DP-02/Atcoder/abc213_g/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..6dc22923fe6c7e44e01bd731e20fdac53bff4f59 --- /dev/null +++ b/problems/DP-02/Atcoder/abc213_g/statement.md @@ -0,0 +1,74 @@ +# G - Connectivity 2 + +**Score :** 600 points + +## Problem Statement +Given is a simple undirected graph \( G \) with \( N \) vertices and \( M \) edges. The vertices are numbered \( 1,2,\dots,N \), the edges are numbered \( 1,2,\dots,M \), and Edge \( i \) connects Vertex \( a_i \) and Vertex \( b_i \). +Consider removing zero or more edges from \( G \) to get a new graph \( H \). There are \( 2^M \) graphs that we can get as \( H \). Among them, find the number of such graphs that Vertex \( 1 \) and Vertex \( k \) are directly or indirectly connected, for each integer \( k \) such that \( 2 \leq k \leq N \). +Since the counts may be enormous, print them modulo \( 998244353 \). + +## Constraints +- \( 2 \leq N \leq 17 \) +- \( 0 \leq M \leq \frac{N(N-1)}{2} \) +- \( 1 \leq a_i < b_i \leq N \) +- \( (a_i, b_i) \neq (a_j, b_j) \) if \( i \neq j \). +- All values in input are integers. + +## Input +Input is given from Standard Input in the following format: +``` +N M +a_1 b_1 +... +a_M b_M +``` + +## Output +Print \( N-1 \) lines. The \( i \)-th line should contain the answer for \( k = i + 1 \). + +## Sample Input 1 +``` +3 2 +1 2 +2 3 +``` + +## Sample Output 1 +``` +2 +1 +``` +We can get the following graphs as \( H \). +- The graph with no edges. Vertex \( 1 \) is disconnected from any other vertex. +- The graph with only the edge connecting Vertex \( 1 \) and \( 2 \). Vertex \( 2 \) is reachable from Vertex \( 1 \). +- The graph with only the edge connecting Vertex \( 2 \) and Vertex \( 3 \). Vertex \( 1 \) is disconnected from any other vertex. +- The graph with both edges. Vertex \( 2 \) and Vertex \( 3 \) are reachable from Vertex \( 1 \). + +## Sample Input 2 +``` +5 6 +1 2 +1 4 +1 5 +2 3 +2 5 +3 4 +``` + +## Sample Output 2 +``` +43 +31 +37 +41 +``` + +## Sample Input 3 +``` +2 0 +``` + +## Sample Output 3 +``` +0 +``` diff --git a/problems/DP-02/Atcoder/abc215_e/editorial.md b/problems/DP-02/Atcoder/abc215_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..ac1e3d64a037dfb179528f19bddd72e4857c6a7a --- /dev/null +++ b/problems/DP-02/Atcoder/abc215_e/editorial.md @@ -0,0 +1,18 @@ +# E - Chain Contestant (editorial) + +Source: https://atcoder.jp/contests/abc215/editorial/2514 by en_translator + +To come to the point, the following bitDP is possible. + dp[for the first \(i\) contests][set of contests participated so far][the kind of last participated contest]={the number of possible combinations} + The transition of DP is as follows. + +Let \(x\) be the kind of \(i\)-th contest. + +- For every set \(U\) and every kind of contest \(j\), add \(dp[i-1][U][j]\) to \(dp[i][U][j]\) (corresponding to when he does not participate in the \(i\)-th contest) + + - If \(j=x\), add \(dp[i-1][U][j]\) to it too (corresponding to when he participate in the \(i\)-th contest, which is the same kind of contest to that he participated last time) +- For every set \(V\) that does not include \(x\) and every kind of contest \(j\), add \(dp[i-1][V][j]\) to \(dp[i][V'][x]\), where \(V'\) is \(V\) with \(x\) added (corresponding to when he participate in the \(i\)-th contest, which is the different kind of contest to that he participated last time) +- Add \(1\) to \(dp[i][W][x]\), where \(W\) is a set only containing \(x\) (corresponding to the case where the first contest he participate in is the \(i\)-th one) + +For the bitDP with the transitions above, the final solution is the sum of \(dp[N][U][j]\) over every set \(U\) and every kind of contest \(j\). + The total computational complexity is \(O(2^KNK)\)(\(K=10\), the number of contest types), which fits in the time limit. diff --git a/problems/DP-02/Atcoder/abc215_e/judge.json b/problems/DP-02/Atcoder/abc215_e/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..ff24dd7c5175316340601a2bfbbe7542309026e6 --- /dev/null +++ b/problems/DP-02/Atcoder/abc215_e/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 22, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc215_e/meta.json b/problems/DP-02/Atcoder/abc215_e/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..9cd56e598f06101cdb5ce5c1a69c9f347b478c96 --- /dev/null +++ b/problems/DP-02/Atcoder/abc215_e/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc215_e", + "contest": "abc215", + "type": "ABC", + "letter": "E", + "title": "Chain Contestant", + "url": "https://atcoder.jp/contests/abc215/tasks/abc215_e", + "difficulty": 1413, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 22, + "editorial_url": "https://atcoder.jp/contests/abc215/editorial/2514", + "code_source": "editorial", + "pid": "A1673" +} diff --git a/problems/DP-02/Atcoder/abc215_e/solution.cpp b/problems/DP-02/Atcoder/abc215_e/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..28fcfa66e36331d8238563ecbbde5bbb7059e32f --- /dev/null +++ b/problems/DP-02/Atcoder/abc215_e/solution.cpp @@ -0,0 +1,42 @@ +// abc215_e: E - Chain Contestant +// Code from the official editorial, https://atcoder.jp/contests/abc215/editorial/2514 (by en_translator) +// Judged AC on all 22 tests, max 0.03 s of the 2 s limit. + +#include +#define mod 998244353 + +using namespace std; + +int main(){ + int n; + string s; + cin >> n >> s; + long long dp[1024][1024][10]={0}; + for(int i=1;i<=n;i++){ + int x=s[i-1]-'A'; + for(int u=0;u<1024;u++){ + for(int j=0;j<10;j++){ + dp[i][u][j]=dp[i-1][u][j]; + if(j==x){ + dp[i][u][j]+=dp[i-1][u][j]; + dp[i][u][j]%=mod; + } + } + } + for(int v=0;v<1024;v++){ + if(v&(1< +using namespace std; + +const int mod = 998244353; + +int main(){ + int N,M; cin >> N >> M; + vector> dp(N+1,vector(N+1)); + dp[0][0] = 1; + vector sum(N+1); + sum[0] = 1; + for(int i=1; i<=N; i++){ + for(int j=i; j<=N; j++){ + dp[i][j] = sum[j-i]+dp[i][j-i]; + dp[i][j] %= mod; + } + for(int j=0; j<=N; j++){ + sum[j] += dp[i][j]; + sum[j] %= mod; + if(M <= i){ + sum[j] -= dp[i-M][j]; + sum[j] %= mod; + } + } + } + for(int i=1; i<=N; i++){ + int ans = dp[i][N]; + if(ans < 0) ans += mod; + cout << ans << endl; + } +} diff --git a/problems/DP-02/Atcoder/abc221_h/statement.md b/problems/DP-02/Atcoder/abc221_h/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..9a49d172d35df5d0e2c0f4366c2e6a7e16a39a71 --- /dev/null +++ b/problems/DP-02/Atcoder/abc221_h/statement.md @@ -0,0 +1,58 @@ +# H - Count Multiset + +**Score:** 600 points + +## Problem Statement +Given are positive integers \( N \) and \( M \). +For each \( k=1,2,\ldots,N \), find the following number and print it modulo \( 998244353 \). + +- The number of multisets \( A \) containing \( k \) positive integers that satisfy both of the following conditions: + - the sum of the elements of \( A \) is \( N \); + - for every positive integer \( x \), \( A \) contains at most \( M \) occurrences of \( x \). + +## Constraints +- \( 1 \leq M \leq N \leq 5000 \) +- All values in input are integers. + +## Input +Input is given from Standard Input in the following format: + +``` +N M +``` + +## Output +Print \( N \) lines; the \( i \)-th line \( (1 \leq i \leq N) \) should contain the answer for the case \( k=i \). + +## Sample Input 1 +``` +4 2 +``` + +## Sample Output 1 +``` +1 +2 +1 +0 +``` +- For \( k=1 \), there is one multiset \( A \) that satisfies the conditions: \( \{4\} \). +- For \( k=2 \), there are two multisets \( A \) that satisfy the conditions: \( \{1,3\} \) and \( \{2,2\} \). +- For \( k=3 \), there is one multiset \( A \) that satisfies the conditions: \( \{1,1,2\} \). +- For \( k=4 \), there is no multiset \( A \) that satisfies the conditions. + +## Sample Input 2 +``` +7 7 +``` + +## Sample Output 2 +``` +1 +3 +4 +3 +2 +1 +1 +``` diff --git a/problems/DP-02/Atcoder/abc222_e/editorial.md b/problems/DP-02/Atcoder/abc222_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..d5afa231259ac92ffedf6077178bf3ef7a987054 --- /dev/null +++ b/problems/DP-02/Atcoder/abc222_e/editorial.md @@ -0,0 +1,15 @@ +# E - Red and Blue Tree (editorial) + +Source: https://atcoder.jp/contests/abc222/editorial/2762 by en_translator + +First, we count how many times the piece passes each edge with algorithm like DFS (Depth-First Search). If it passes Edge \(i\) for \(C_i\) times, then the problem is equivalent to “how many ways are there to separate \(C_1,\ldots,C_{N-1}\) into two groups so that the sum of the former \(R\) and the sum of the latter \(B\) satisfies \(R-B=K\)?” + +Moreover, with \(S=C_1+\ldots+C_{N-1}\), it is boiled down to “how many ways are there to choose some elements from \(C_1,\ldots,C_{N-1}\) so that its sum becomes \(\frac{K+S}{2}\)?” + +Therefore, this is computed by a DP where + +\(DP[i][j]=\) The number of ways to choose some elements from \(C_1,\ldots,C_i\) so that its sum becomes \(j\). + +Note that in some cases \(\frac{K+S}{2}\) may not be an integer or falls below \(0\). + +The DFS for finding \(C_i\) costs \(O(NM)\) time, and the DP costs \(O(N(NM+|K|))\) time, so the overall time complexity is \(O(N^2M+N|K|)\). diff --git a/problems/DP-02/Atcoder/abc222_e/judge.json b/problems/DP-02/Atcoder/abc222_e/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..82a56a78878046c237d85da6d8a08c4fac705323 --- /dev/null +++ b/problems/DP-02/Atcoder/abc222_e/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 44, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc222_e/meta.json b/problems/DP-02/Atcoder/abc222_e/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..72471dc5afe98a3d63fcbf58aa3d550c9be82427 --- /dev/null +++ b/problems/DP-02/Atcoder/abc222_e/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc222_e", + "contest": "abc222", + "type": "ABC", + "letter": "E", + "title": "Red and Blue Tree", + "url": "https://atcoder.jp/contests/abc222/tasks/abc222_e", + "difficulty": 1491, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 44, + "editorial_url": "https://atcoder.jp/contests/abc222/editorial/2762", + "code_source": "editorial", + "pid": "A1729" +} diff --git a/problems/DP-02/Atcoder/abc222_e/solution.cpp b/problems/DP-02/Atcoder/abc222_e/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..fbf0a1205a0bfc9b1f666ee7a72454d76ec86eef --- /dev/null +++ b/problems/DP-02/Atcoder/abc222_e/solution.cpp @@ -0,0 +1,55 @@ +// abc222_e: E - Red and Blue Tree +// Code from the official editorial, https://atcoder.jp/contests/abc222/editorial/2762 (by en_translator) +// Judged AC on all 44 tests, max 0.15 s of the 2 s limit. + +#include +using namespace std; +const int mod=998244353; + +vector>>G; +vectorC; + +int dfs(int v,int pre,int goal){ + if(v==goal)return 1; + for(auto [vv,i]:G[v])if(vv!=pre){ + if(dfs(vv,v,goal)){ + C[i]++; + return 1; + } + } + return 0; +} + +int main(){ + int N, M, K; + cin >> N >> M >> K; + vectorA(M); + + for(int i=0;i> A[i]; + A[i]--; + } + G.resize(N); + for(int i=0;i> x >> y; + x--,y--; + G[x].push_back({y,i}); + G[y].push_back({x,i}); + } + + C.resize(N-1); + for(int i=0;idp(100001); + dp[0]=1; + for(int i=0;i=C[i];x--)(dp[x]+=dp[x-C[i]])%=mod; + cout << dp[(S+K)/2]; +} diff --git a/problems/DP-02/Atcoder/abc222_e/statement.md b/problems/DP-02/Atcoder/abc222_e/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..e401ce1969a2801b8d12730133c98837f6efbf24 --- /dev/null +++ b/problems/DP-02/Atcoder/abc222_e/statement.md @@ -0,0 +1,106 @@ +# E - Red and Blue Tree + +**Score:** 500 points + +## Problem Statement +Given are a tree with \(N\) vertices, a sequence of \(M\) numbers \(A=(A_1,\ldots,A_M)\), and an integer \(K\). +The vertices are numbered \(1\) through \(N\), and the \(i\)-th edge connects Vertices \(U_i\) and \(V_i\). + +We will paint each of the \(N-1\) edges of this tree red or blue. Among the \(2^{N-1}\) such ways, find the number of ones that satisfies the following condition, modulo \(998244353\). + +**Condition:** +Let us put a piece on Vertex \(A_1\), and for each \(i=1,\ldots,M-1\) in this order, move it from Vertex \(A_i\) to Vertex \(A_{i+1}\) along the edges in the shortest path. After all of these movements, \(R-B=K\) holds, where \(R\) and \(B\) are the numbers of times the piece traverses a red edge and a blue edge, respectively. + +## Constraints +- \(2 \leq N \leq 1000\) +- \(2 \leq M \leq 100\) +- \(|K| \leq 10^5\) +- \(1 \leq A_i \leq N\) +- \(1\leq U_i,V_i\leq N\) +- The given graph is a tree. +- All values in input are integers. + +## Input +Input is given from Standard Input in the following format: +``` +N M K +A_1 A_2 \ldots A_M +U_1 V_1 +... +U_{N-1} V_{N-1} +``` + +## Output +Print the answer. + +## Sample Input 1 +``` +4 5 0 +2 3 2 1 4 +1 2 +2 3 +3 4 +``` + +## Sample Output 1 +``` +2 +``` +*If we paint the 1-st and 3-rd edges red and the 2-nd edge blue, the piece will traverse the following numbers of red and blue edges:* +- \(0\) red edges and \(1\) blue edge when moving from Vertex \(2\) to \(3\), +- \(0\) red edges and \(1\) blue edge when moving from Vertex \(3\) to \(2\), +- \(1\) red edge and \(0\) blue edges when moving from Vertex \(2\) to \(1\), +- \(2\) red edges and \(1\) blue edge when moving from Vertex \(1\) to \(4\). + +*for a total of \(3\) red edges and \(3\) blue edges, satisfying the condition.* + +Another way to satisfy the condition is to paint the 1-st and 3-rd edges blue and the 2-nd edge red. There is no other way to satisfy it, so the answer is \(2\). + +## Sample Input 2 +``` +3 10 10000 +1 2 1 2 1 2 2 1 1 2 +1 2 +1 3 +``` + +## Sample Output 2 +``` +0 +``` +*There may be no way to paint the tree to satisfy the condition.* + +## Sample Input 3 +``` +10 2 -1 +1 10 +1 2 +2 3 +3 4 +4 5 +5 6 +6 7 +7 8 +8 9 +9 10 +``` + +## Sample Output 3 +``` +126 +``` + +## Sample Input 4 +``` +5 8 -1 +1 4 1 4 2 1 3 5 +1 2 +4 1 +3 1 +1 5 +``` + +## Sample Output 4 +``` +2 +``` diff --git a/problems/DP-02/Atcoder/abc228_g/editorial.md b/problems/DP-02/Atcoder/abc228_g/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..1acc887578f8bb1e340b5c32cc7e84f441f3d289 --- /dev/null +++ b/problems/DP-02/Atcoder/abc228_g/editorial.md @@ -0,0 +1,75 @@ +# G - Digits on Grid (editorial) + +Source: https://atcoder.jp/contests/abc228/editorial/2957 by en_translator + +Consider the following undirected graph \(G\): + +- It has \(H\) vertices \(a_1, a_2, \ldots, a_H\) corresponding to each row and \(W\) vertices \(b_1, b_2, \ldots, b_W\) corresponding to each column, for a total of \((H+W)\) vertices. +- For each pair of integers \((i, j)\) such that \(1 \leq i \leq H\) and \(1 \leq j \leq W\), there is an undirected edge labeled \(c_{i, j}\) between Vertex \(a_i\) and Vertex \(b_j\). +- There are no other vertices or edges. + +Let \(\mathcal{R}\) be the set of vertices corresponding to the rows, and \(\mathcal{C}\) be the set of vertices corresponding to the columns. That is, + +\(\mathcal{R} := \lbrace a_1, a_2, \ldots, a_H \rbrace\) + \(\mathcal{C} := \lbrace b_1, b_2, \ldots, b_W \rbrace\) + +Note that \(G\) is a bipartite graph whose vertices are divided into \(\mathcal{R}\) and \(\mathcal{C}\). + +This problem can be rephrased as follows. + +Starting from a vertex belonging to \(\mathcal{R}\), we repeat “traveling from the current vertex to one of the adjacent vertices along the edge between them” \(2N\) times. Find the number of different sequences of labels \(d_1d_2\ldots d_{2N}\) that can be obtained by concatenating the labels on the traversed edges in order. + +We will solve this problem with Dynamic Programming (DP). If we define DP table as + +\(\mathrm{dp}[k][v] := \)(the number of different sequences of labels \(d_1d_2\ldots d_k\) corresponding to the first \(k\) moves ending with vertex \(v\)), + +the same sequences of label can be counted multiple times, so we cannot obtain the correct answer. This is because, for a sequence of label \(d_1d_2\ldots d_k\), there may be in general multiple possible “current vertex \(v\)” right after traveling through the label sequence. + In order to deal with this issue, instead of single “terminal vertex \(v\)”, we use “the set of all possible terminal vertices as the results of the label sequence” for each label sequence \(d_1d_2\ldots d_k\), so that the object and the sequence of labels correspond one-by-one, and thus counted without any duplicates. + +In other words, we fill the DP table defined as: + +\(\mathrm{dp}[k][S] := \)(The number of different sequences of labels of length \(k\) such that the set of possible terminal vertices after traversing those labels in the sequences is \(S\)). + +Since graph \(G\) is a bipartite graph, + +- after even number of moves, the current vertex is limited to those in \(\mathcal{R}\); +- after odd number of moves, the current vertex is limited to those in \(\mathcal{C}\). + +Therefore, + +when considering \(\mathrm{dp}[k][S]\), it is sufficient to consider + +- only \(S\) such that \(S \subseteq \mathcal{R}\) when \(k\) is event; +- only \(S\) such that \(S \subseteq \mathcal{C}\) when \(k\) is odd. + +Therefore, the number of states of DP to consider is \(\mathrm{O}(N(2^H + 2^W))\). + +We will now describe the specific steps of DP. + +First, as the initial state of DP, we consider the case of \(k = 0\), that is, \(\mathrm{dp}[0][\ast]\). Since the initial position before the first move can be chosen from arbitrary vertex belonging to \(\mathcal{R}\), so + +\(\mathrm{dp}[0][\mathcal{R}] = 1\); + \(\mathrm{dp}[0][S] = 0, \,\,\text{for}\,\,S \neq \mathcal{R}\). + +Next, we consider the transitions of the DP. + Consider a sequence of labels \(d_1 d_2 \ldots d_k\) of length \(k\). Also, let \(S\) be the set of possible vertices right after traversing through these labels. + Then, for a label sequence \(d_1 d_2 \ldots d_kc\) where digit \(c\) is appended to the original one, let \(S'_c\) be the set of all possible vertices right after traversing through them; then + +- If \(k\) is even, then \(S'_c = \lbrace b_j :\) there exists \(i \in S\) such that \(c_{i, j} = c\); +- If \(k\) is odd, then \(S'_c = \lbrace a_i :\) there exists \(j \in S\) such that \(c_{i, j} = c\). + +Based on these fact, it is sufficient to perform the following nine transitions: + +- \(\mathrm{dp}[k+1][S'_1] \leftarrow \mathrm{dp}[k+1][S'_1] + \mathrm{dp}[k][S]\) +- \(\mathrm{dp}[k+1][S'_2] \leftarrow \mathrm{dp}[k+1][S'_2] + \mathrm{dp}[k][S]\) +- \(\mathrm{dp}[k+1][S'_3] \leftarrow \mathrm{dp}[k+1][S'_3] + \mathrm{dp}[k][S]\) +- \(\cdots\) +- \(\mathrm{dp}[k+1][S'_9] \leftarrow \mathrm{dp}[k+1][S'_9] + \mathrm{dp}[k][S]\) + +each of which corresponds to the nine cases where the final digit \(c\) are \(1\) to \(9\), respectively. + +By filling the DP table with the initializations and transitions above, the answer for this problem is obtained as + +\(\displaystyle\sum_{S \in \mathcal{R}} \mathrm{dp}[2N][S] - \mathrm{dp}[2N][\emptyset]\). + +Therefore, the problem has been solved in a total of \(O(N(2^H+2^W))\) time. diff --git a/problems/DP-02/Atcoder/abc228_g/judge.json b/problems/DP-02/Atcoder/abc228_g/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..f5e0ab50f7a5aa26a4e928d14cec3d6840efaf97 --- /dev/null +++ b/problems/DP-02/Atcoder/abc228_g/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 3.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 48, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc228_g/meta.json b/problems/DP-02/Atcoder/abc228_g/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..143bb2df6c2d0937633377e520bc6558e0b8c005 --- /dev/null +++ b/problems/DP-02/Atcoder/abc228_g/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc228_g", + "contest": "abc228", + "type": "ABC", + "letter": "G", + "title": "Digits on Grid", + "url": "https://atcoder.jp/contests/abc228/tasks/abc228_g", + "difficulty": 2711, + "score": 600, + "time_limit_sec": 3.0, + "memory_limit_mb": 1024, + "n_tests": 48, + "editorial_url": "https://atcoder.jp/contests/abc228/editorial/2957", + "code_source": "model", + "pid": "A1779" +} diff --git a/problems/DP-02/Atcoder/abc228_g/solution.cpp b/problems/DP-02/Atcoder/abc228_g/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7b5407eafdc66fd4462ebd487d6ea3852f3db6f3 --- /dev/null +++ b/problems/DP-02/Atcoder/abc228_g/solution.cpp @@ -0,0 +1,72 @@ +// abc228_g: G - Digits on Grid +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc228/editorial/2957 +// Judged AC on all 48 tests, max 0.01 s of the 3 s limit (submission 1). + +#include +using namespace std; + +constexpr int MOD = 998244353; + +vector> build_transitions(const vector>& edges) { + int size = 1 << edges.size(); + vector> trans(size); + for (int mask = 1; mask < size; ++mask) { + int bit = __builtin_ctz((unsigned)mask); + int rest = mask & (mask - 1); + for (int digit = 0; digit < 9; ++digit) { + trans[mask][digit] = trans[rest][digit] | edges[bit][digit]; + } + } + return trans; +} + +vector advance_dp(const vector& dp, + const vector>& trans, + int next_size) { + vector next(next_size, 0); + for (int mask = 1; mask < (int)dp.size(); ++mask) { + if (dp[mask] == 0) continue; + for (int digit = 0; digit < 9; ++digit) { + int target = trans[mask][digit]; + if (target == 0) continue; + next[target] += dp[mask]; + if (next[target] >= MOD) next[target] -= MOD; + } + } + return next; +} + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int H, W, N; + cin >> H >> W >> N; + vector> row_edges(H), col_edges(W); + for (int i = 0; i < H; ++i) { + for (int j = 0; j < W; ++j) { + char c; + cin >> c; + int digit = c - '1'; + row_edges[i][digit] |= 1 << j; + col_edges[j][digit] |= 1 << i; + } + } + + auto row_trans = build_transitions(row_edges); + auto col_trans = build_transitions(col_edges); + vector dp(1 << H, 0); + dp[(1 << H) - 1] = 1; + for (int round = 0; round < N; ++round) { + dp = advance_dp(dp, row_trans, 1 << W); + dp = advance_dp(dp, col_trans, 1 << H); + } + + int answer = 0; + for (int mask = 1; mask < (int)dp.size(); ++mask) { + answer += dp[mask]; + if (answer >= MOD) answer -= MOD; + } + cout << answer << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc228_g/statement.md b/problems/DP-02/Atcoder/abc228_g/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..937d7a471a3b1957b6fba21681622cb70ddfd5db --- /dev/null +++ b/problems/DP-02/Atcoder/abc228_g/statement.md @@ -0,0 +1,104 @@ +# G - Digits on Grid + +**Score**: 600 points + +## Problem Statement +There is a grid with \( H \) horizontal rows and \( W \) vertical columns, where each square contains a digit between \( 1 \) and \( 9 \). +For each pair of integers \( (i, j) \) such that \( 1 \leq i \leq H \) and \( 1 \leq j \leq W \), the digit written on the square at the \( i \)-th row from the top and \( j \)-th column from the left is \( c_{i, j} \). + +Using this grid, Takahashi and Aoki will play together. +First, Takahashi chooses a square and puts a piece on it. +Then, the two will repeat the following procedures, 1. through 4., \( N \) times. + +1. Takahashi does one of the following two actions: + - Move the piece to another square that **shares a row** with the square the piece is on. + - Do nothing. +2. Takahashi writes on a blackboard the digit written on the square the piece is on. +3. Aoki does one of the following two actions: + - Move the piece to another square that **shares a column** with the square the piece is on. + - Do nothing. +4. Aoki writes on the blackboard the digit written on the square the piece is on. + +After that, there will be \( 2N \) digits written on the blackboard. Let \( d_1, d_2, \ldots, d_{2N} \) be those digits, in the order they are written. +The two boys will concatenate the \( 2N \) digits in this order to make a \( 2N \)-digit integer \( X := d_1d_2\ldots d_{2N} \). + +Find the number, modulo \( 998244353 \), of different integers that \( X \) can become. + +## Constraints +- \( 2 \leq H, W \leq 10 \) +- \( 1 \leq N \leq 300 \) +- \( 1 \leq c_{i, j} \leq 9 \) +- All values in input are integers. + +## Input +Input is given from Standard Input in the following format: +``` +H W N +c_{1, 1} c_{1, 2} ... c_{1, W} +c_{2, 1} c_{2, 2} ... c_{2, W} +... +c_{H, 1} c_{H, 2} ... c_{H, W} +``` + +## Output +Print the number, modulo \( 998244353 \), of different integers that \( X \) can become. + +## Sample Input 1 +``` +2 2 1 +31 +41 +``` + +## Sample Output 1 +``` +5 +``` +Below is one possible scenario: +- First, Takahashi puts the piece on \( (1, 2) \). +- Takahashi moves the piece from \( (1, 2) \) to \( (1, 1) \), and then writes the digit \( 3 \) written on \( (1, 1) \). +- Aoki moves the piece from \( (1, 1) \) to \( (2, 1) \), and then writes the digit \( 4 \) written on \( (2, 1) \). + +In this case, we have \( X = 34 \). +Below is another possible scenario: +- First, Takahashi puts the piece on \( (2, 2) \). +- Takahashi keeps the piece on \( (2, 2) \), and then writes the digit \( 1 \) written on \( (2, 2) \). +- Aoki moves the piece from \( (2, 2) \) to \( (1, 2) \), and then writes the digit \( 1 \) written on \( (1, 2) \). + +In this case, we have \( X = 11 \). +Other than these, \( X \) can also become \( 33 \), \( 44 \), or \( 43 \), but nothing else. +That is, there are five integers that \( X \) can become, so we print \( 5 \). + +## Sample Input 2 +``` +2 3 4 +777 +777 +``` + +## Sample Output 2 +``` +1 +``` +\( X \) can only become \( 77777777 \). + +## Sample Input 3 +``` +10 10 300 +3181534389 +4347471911 +4997373645 +5984584273 +1917179465 +3644463294 +1234548423 +6826453721 +5892467783 +1211598363 +``` + +## Sample Output 3 +``` +685516949 +``` +Be sure to find the count modulo \( 998244353 \). diff --git a/problems/DP-02/Atcoder/abc232_f/data/1.in b/problems/DP-02/Atcoder/abc232_f/data/1.in new file mode 100644 index 0000000000000000000000000000000000000000..2ed9b1987f6df11da51077180f4789f1a2a634b4 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/1.in @@ -0,0 +1,3 @@ +2 1 199999999 +1 100000000 +100000000 1 diff --git a/problems/DP-02/Atcoder/abc232_f/data/1.out b/problems/DP-02/Atcoder/abc232_f/data/1.out new file mode 100644 index 0000000000000000000000000000000000000000..5d4d2b9928639d9229516839e079c55d827f92dd --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/1.out @@ -0,0 +1 @@ +199999998 diff --git a/problems/DP-02/Atcoder/abc232_f/data/10.in b/problems/DP-02/Atcoder/abc232_f/data/10.in new file mode 100644 index 0000000000000000000000000000000000000000..821b47e84565b75e37227a14427f61b510690656 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/10.in @@ -0,0 +1,3 @@ +18 100000000 10000000000000000 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 diff --git a/problems/DP-02/Atcoder/abc232_f/data/10.out b/problems/DP-02/Atcoder/abc232_f/data/10.out new file mode 100644 index 0000000000000000000000000000000000000000..559cf564a33f22d92212bd933b073193d8f25bf9 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/10.out @@ -0,0 +1 @@ +179999998200000000 diff --git a/problems/DP-02/Atcoder/abc232_f/data/11.out b/problems/DP-02/Atcoder/abc232_f/data/11.out new file mode 100644 index 0000000000000000000000000000000000000000..559cf564a33f22d92212bd933b073193d8f25bf9 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/11.out @@ -0,0 +1 @@ +179999998200000000 diff --git a/problems/DP-02/Atcoder/abc232_f/data/12.out b/problems/DP-02/Atcoder/abc232_f/data/12.out new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/12.out @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/Atcoder/abc232_f/data/13.out b/problems/DP-02/Atcoder/abc232_f/data/13.out new file mode 100644 index 0000000000000000000000000000000000000000..7f1ddd5301bcd92f3a688806c9b556931e0dc287 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/13.out @@ -0,0 +1 @@ +153 diff --git a/problems/DP-02/Atcoder/abc232_f/data/14.out b/problems/DP-02/Atcoder/abc232_f/data/14.out new file mode 100644 index 0000000000000000000000000000000000000000..871727de1fd703d0c4aab92017011c373e795b67 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/14.out @@ -0,0 +1 @@ +84 diff --git a/problems/DP-02/Atcoder/abc232_f/data/15.in b/problems/DP-02/Atcoder/abc232_f/data/15.in new file mode 100644 index 0000000000000000000000000000000000000000..997c268335c402e7dd3ad6ebf818841688cf356c --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/15.in @@ -0,0 +1,3 @@ +18 100000000 1 +50905734 98984925 39717264 14963457 54373732 75279030 50643530 48166591 23999839 89011254 73390948 15176312 36982994 37603167 83216433 43277494 84994729 66398185 +37603167 39717264 23999839 66398185 54373732 43277494 50643530 83216433 15176312 89011254 14963457 75279030 98984925 84994729 48166591 36982994 73390948 50905735 diff --git a/problems/DP-02/Atcoder/abc232_f/data/15.out b/problems/DP-02/Atcoder/abc232_f/data/15.out new file mode 100644 index 0000000000000000000000000000000000000000..59eb5ad0f2b7384cab20a53f39e16c9c782c4813 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/15.out @@ -0,0 +1 @@ +100000088 diff --git a/problems/DP-02/Atcoder/abc232_f/data/16.out b/problems/DP-02/Atcoder/abc232_f/data/16.out new file mode 100644 index 0000000000000000000000000000000000000000..28875835204f6e5e1e1ee5cb8fd6630347403140 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/16.out @@ -0,0 +1 @@ +1799999982 diff --git a/problems/DP-02/Atcoder/abc232_f/data/17.out b/problems/DP-02/Atcoder/abc232_f/data/17.out new file mode 100644 index 0000000000000000000000000000000000000000..def39d71700bc4344cdbce69c00b7fb5061dd8b8 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/17.out @@ -0,0 +1 @@ +631776666 diff --git a/problems/DP-02/Atcoder/abc232_f/data/18.out b/problems/DP-02/Atcoder/abc232_f/data/18.out new file mode 100644 index 0000000000000000000000000000000000000000..783d9ab5bb5a5e6018c381d6d4f6b7484ac98dc8 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/18.out @@ -0,0 +1 @@ +7998 diff --git a/problems/DP-02/Atcoder/abc232_f/data/19.in b/problems/DP-02/Atcoder/abc232_f/data/19.in new file mode 100644 index 0000000000000000000000000000000000000000..e3c0f3ddb7f616cfae32c177c6e0fecce5ab306d --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/19.in @@ -0,0 +1,3 @@ +18 1 100 +20000045 15000056 40000064 5000069 30000077 5000009 35000028 25000048 30000010 34 15000034 10000089 25000056 45000033 20000094 35000025 10000015 40000061 +40000046 15000036 35000044 15000091 10000094 5000018 20000014 25000090 45000090 30000084 5000088 40000036 20000016 30000083 17 25000076 10000022 35000015 diff --git a/problems/DP-02/Atcoder/abc232_f/data/19.out b/problems/DP-02/Atcoder/abc232_f/data/19.out new file mode 100644 index 0000000000000000000000000000000000000000..570a753145afa823e172ca5f87fdae8fb9aa254e --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/19.out @@ -0,0 +1 @@ +4513 diff --git a/problems/DP-02/Atcoder/abc232_f/data/2.in b/problems/DP-02/Atcoder/abc232_f/data/2.in new file mode 100644 index 0000000000000000000000000000000000000000..25a4131c1816035bf1190a2855fd151e9b8c1967 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/2.in @@ -0,0 +1,3 @@ +4 3 5 +4 2 5 2 +6 4 2 1 diff --git a/problems/DP-02/Atcoder/abc232_f/data/2.out b/problems/DP-02/Atcoder/abc232_f/data/2.out new file mode 100644 index 0000000000000000000000000000000000000000..b6a7d89c68e0ca66e96a9a51892cc33db66fb8a3 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/2.out @@ -0,0 +1 @@ +16 diff --git a/problems/DP-02/Atcoder/abc232_f/data/20.out b/problems/DP-02/Atcoder/abc232_f/data/20.out new file mode 100644 index 0000000000000000000000000000000000000000..916b9f99b6ec0344563a30deaf45af0afcaa8d44 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/20.out @@ -0,0 +1 @@ +4745 diff --git a/problems/DP-02/Atcoder/abc232_f/data/21.out b/problems/DP-02/Atcoder/abc232_f/data/21.out new file mode 100644 index 0000000000000000000000000000000000000000..65fdaa483a770520b0ea737dec18f323703dec0b --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/21.out @@ -0,0 +1 @@ +3884 diff --git a/problems/DP-02/Atcoder/abc232_f/data/22.out b/problems/DP-02/Atcoder/abc232_f/data/22.out new file mode 100644 index 0000000000000000000000000000000000000000..94c0c0eb6b8d38ea655beb93c001e4b5c65cfc96 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/22.out @@ -0,0 +1 @@ +2418 diff --git a/problems/DP-02/Atcoder/abc232_f/data/23.out b/problems/DP-02/Atcoder/abc232_f/data/23.out new file mode 100644 index 0000000000000000000000000000000000000000..2ce9ce07bdb7c7720cb98a362d0704ac5d5cb017 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/23.out @@ -0,0 +1 @@ +2949 diff --git a/problems/DP-02/Atcoder/abc232_f/data/24.in b/problems/DP-02/Atcoder/abc232_f/data/24.in new file mode 100644 index 0000000000000000000000000000000000000000..f00b6b08c657b9a0da7d8d5c3ca9f6063f60ca7f --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/24.in @@ -0,0 +1,3 @@ +18 1 100 +10000081 87 84 60 5000077 30 10000020 5000025 20 10000069 5000070 5000076 2 10000091 5000009 10000046 5000081 5000082 +5000093 38 5000038 89 48 5000013 5000042 6 5000039 10000063 15 5000073 10000006 53 10000045 5000028 10000099 10000082 diff --git a/problems/DP-02/Atcoder/abc232_f/data/24.out b/problems/DP-02/Atcoder/abc232_f/data/24.out new file mode 100644 index 0000000000000000000000000000000000000000..842b1acc06e43aaf7d8be93b373e09b699815136 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/24.out @@ -0,0 +1 @@ +4258 diff --git a/problems/DP-02/Atcoder/abc232_f/data/25.out b/problems/DP-02/Atcoder/abc232_f/data/25.out new file mode 100644 index 0000000000000000000000000000000000000000..61c5a7e888399085f3e01f52bc5f3a2c7fb8e129 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/25.out @@ -0,0 +1 @@ +3564 diff --git a/problems/DP-02/Atcoder/abc232_f/data/26.out b/problems/DP-02/Atcoder/abc232_f/data/26.out new file mode 100644 index 0000000000000000000000000000000000000000..97ae9d3aeb777716a32149d545e34f1ce004dc0d --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/26.out @@ -0,0 +1 @@ +3657 diff --git a/problems/DP-02/Atcoder/abc232_f/data/27.out b/problems/DP-02/Atcoder/abc232_f/data/27.out new file mode 100644 index 0000000000000000000000000000000000000000..cf11591bbda65f2e9f154d89e9480e6f2f940626 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/27.out @@ -0,0 +1 @@ +5010113 diff --git a/problems/DP-02/Atcoder/abc232_f/data/28.in b/problems/DP-02/Atcoder/abc232_f/data/28.in new file mode 100644 index 0000000000000000000000000000000000000000..9162f1a410c6056985716faee4a9288caf12304c --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/28.in @@ -0,0 +1,3 @@ +18 1 100 +15000046 5000030 5000057 25000093 35000073 20000049 5000072 45000094 40000042 10000078 15000028 20000099 40000034 25000044 10000045 30000073 35000034 30000082 +10000063 45000073 35000093 40000068 5000068 30000074 40000066 10000042 35000006 25000059 39 20000065 20000014 15000048 15000047 25000004 30000018 5000089 diff --git a/problems/DP-02/Atcoder/abc232_f/data/28.out b/problems/DP-02/Atcoder/abc232_f/data/28.out new file mode 100644 index 0000000000000000000000000000000000000000..13aa74e7054fc4791a5841562f5dcdbc91507bd5 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/28.out @@ -0,0 +1 @@ +5007479 diff --git a/problems/DP-02/Atcoder/abc232_f/data/29.in b/problems/DP-02/Atcoder/abc232_f/data/29.in new file mode 100644 index 0000000000000000000000000000000000000000..12ea9fe58ae7d30196ffecb321c7ee3785e911dc --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/29.in @@ -0,0 +1,3 @@ +18 1 100 +10000029 5000071 25000047 10000085 10000093 95 5000054 20000048 5000038 20000082 15000055 25000055 5000038 15000076 20000077 30000013 25000075 15000067 +20000064 15000064 10000092 20000007 31 58 10000011 5000017 25000041 30000096 15000020 25000014 5000054 15000029 10000070 20000049 5000015 25000064 diff --git a/problems/DP-02/Atcoder/abc232_f/data/29.out b/problems/DP-02/Atcoder/abc232_f/data/29.out new file mode 100644 index 0000000000000000000000000000000000000000..865e4959cad6318c21ef4a04a7afadd846057e0c --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/29.out @@ -0,0 +1 @@ +5005376 diff --git a/problems/DP-02/Atcoder/abc232_f/data/3.out b/problems/DP-02/Atcoder/abc232_f/data/3.out new file mode 100644 index 0000000000000000000000000000000000000000..5d4d2b9928639d9229516839e079c55d827f92dd --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/3.out @@ -0,0 +1 @@ +199999998 diff --git a/problems/DP-02/Atcoder/abc232_f/data/30.out b/problems/DP-02/Atcoder/abc232_f/data/30.out new file mode 100644 index 0000000000000000000000000000000000000000..1eb52fe1699c06ca593fa309d458184bcf7ff27a --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/30.out @@ -0,0 +1 @@ +5005314 diff --git a/problems/DP-02/Atcoder/abc232_f/data/31.out b/problems/DP-02/Atcoder/abc232_f/data/31.out new file mode 100644 index 0000000000000000000000000000000000000000..149093ecb8047778e21cba7bcf2eeee7f6c3aa19 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/31.out @@ -0,0 +1 @@ +5003308 diff --git a/problems/DP-02/Atcoder/abc232_f/data/32.out b/problems/DP-02/Atcoder/abc232_f/data/32.out new file mode 100644 index 0000000000000000000000000000000000000000..e7dc9af5678800f4e07411ad329143a5882241a1 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/32.out @@ -0,0 +1 @@ +5004199 diff --git a/problems/DP-02/Atcoder/abc232_f/data/33.out b/problems/DP-02/Atcoder/abc232_f/data/33.out new file mode 100644 index 0000000000000000000000000000000000000000..af1ae83f987837bbdc94723854f2a60c2da6fbb0 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/33.out @@ -0,0 +1 @@ +5002644 diff --git a/problems/DP-02/Atcoder/abc232_f/data/34.in b/problems/DP-02/Atcoder/abc232_f/data/34.in new file mode 100644 index 0000000000000000000000000000000000000000..02c0728007a1f9a3a7ceba22cedbefe3d2eb42c2 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/34.in @@ -0,0 +1,3 @@ +18 1 100 +31 5000018 10000050 85 5000043 5000001 5000051 10000007 5000100 94 64 5000051 10000019 76 5000084 64 5000048 5000060 +5000013 5000093 5000073 13 26 5000093 5000083 9 10000051 69 5000097 25 96 10000029 12 5000038 5000092 10000045 diff --git a/problems/DP-02/Atcoder/abc232_f/data/34.out b/problems/DP-02/Atcoder/abc232_f/data/34.out new file mode 100644 index 0000000000000000000000000000000000000000..9bd92c50234c343469f1b3a50da1119274064949 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/34.out @@ -0,0 +1 @@ +5002781 diff --git a/problems/DP-02/Atcoder/abc232_f/data/35.out b/problems/DP-02/Atcoder/abc232_f/data/35.out new file mode 100644 index 0000000000000000000000000000000000000000..9a0eca66693afa90269a69e98d29b7f8986150d9 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/35.out @@ -0,0 +1 @@ +5002612 diff --git a/problems/DP-02/Atcoder/abc232_f/data/36.out b/problems/DP-02/Atcoder/abc232_f/data/36.out new file mode 100644 index 0000000000000000000000000000000000000000..6ff689b94b5714ed6ff9065388d560d631522514 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/36.out @@ -0,0 +1 @@ +4407225429001585 diff --git a/problems/DP-02/Atcoder/abc232_f/data/37.out b/problems/DP-02/Atcoder/abc232_f/data/37.out new file mode 100644 index 0000000000000000000000000000000000000000..d74b9e5fbe77cf72bf0b64ac51f41583113e8e45 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/37.out @@ -0,0 +1 @@ +2540452217965605 diff --git a/problems/DP-02/Atcoder/abc232_f/data/38.in b/problems/DP-02/Atcoder/abc232_f/data/38.in new file mode 100644 index 0000000000000000000000000000000000000000..d744595db992a6d14f047ff196dd795bd3009302 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/38.in @@ -0,0 +1,3 @@ +2 24954483 6953639676719327 +50555415 96038739 +14198136 39801173 diff --git a/problems/DP-02/Atcoder/abc232_f/data/38.out b/problems/DP-02/Atcoder/abc232_f/data/38.out new file mode 100644 index 0000000000000000000000000000000000000000..203f43e437df0d7baf64655bddc398353b6f89a4 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/38.out @@ -0,0 +1 @@ +2310656485440135 diff --git a/problems/DP-02/Atcoder/abc232_f/data/39.in b/problems/DP-02/Atcoder/abc232_f/data/39.in new file mode 100644 index 0000000000000000000000000000000000000000..cfe33102ee7cbbabd5805c6da53507f8024059e7 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/39.in @@ -0,0 +1,3 @@ +18 29257375 8425380906384052 +25770026 77279366 95057691 25505034 1170885 16040086 93409424 28565573 24902126 15113448 2773436 22246406 20836846 97035043 41925483 94493509 56909110 95998643 +74893005 19283712 52105941 35153479 80170742 66782647 76813828 59203665 73777503 35283184 20335771 38208649 19879010 86188724 7385241 39843947 82913985 57525520 diff --git a/problems/DP-02/Atcoder/abc232_f/data/39.out b/problems/DP-02/Atcoder/abc232_f/data/39.out new file mode 100644 index 0000000000000000000000000000000000000000..a742e950eefeb6cee96d7a6440977c57be370463 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/39.out @@ -0,0 +1 @@ +17693004955792250 diff --git a/problems/DP-02/Atcoder/abc232_f/data/4.out b/problems/DP-02/Atcoder/abc232_f/data/4.out new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/4.out @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/Atcoder/abc232_f/data/40.out b/problems/DP-02/Atcoder/abc232_f/data/40.out new file mode 100644 index 0000000000000000000000000000000000000000..af336b048dd7d5e9ad5652dc05fa384fd7761c0a --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/40.out @@ -0,0 +1 @@ +19295842401546038 diff --git a/problems/DP-02/Atcoder/abc232_f/data/41.out b/problems/DP-02/Atcoder/abc232_f/data/41.out new file mode 100644 index 0000000000000000000000000000000000000000..0892a5ad99c56a48200da1a33b762d049eb85aba --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/41.out @@ -0,0 +1 @@ +24593928289845327 diff --git a/problems/DP-02/Atcoder/abc232_f/data/42.out b/problems/DP-02/Atcoder/abc232_f/data/42.out new file mode 100644 index 0000000000000000000000000000000000000000..42c9e6de1a86c96a5bf02d35e3498058efff126d --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/42.out @@ -0,0 +1 @@ +16041347649410157 diff --git a/problems/DP-02/Atcoder/abc232_f/data/43.in b/problems/DP-02/Atcoder/abc232_f/data/43.in new file mode 100644 index 0000000000000000000000000000000000000000..981ed7abbf96a1745c62f00634d2faa139118a86 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/43.in @@ -0,0 +1,3 @@ +18 13061047 6703102520549137 +11452213 30745269 56378804 85992895 60622405 63918556 79105442 80745523 39952064 70923855 40907056 83385891 58502856 40875087 31962754 91467425 27933859 91112413 +13274143 22704576 56187707 23243842 85874804 82909212 86790559 48932233 56064081 40844367 54449536 81341952 88749418 50516349 77019061 18192827 38018263 81138633 diff --git a/problems/DP-02/Atcoder/abc232_f/data/43.out b/problems/DP-02/Atcoder/abc232_f/data/43.out new file mode 100644 index 0000000000000000000000000000000000000000..3f240010aa175bb5e7c9905c0aa492c434b79e0b --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/43.out @@ -0,0 +1 @@ +5179999119548384 diff --git a/problems/DP-02/Atcoder/abc232_f/data/44.out b/problems/DP-02/Atcoder/abc232_f/data/44.out new file mode 100644 index 0000000000000000000000000000000000000000..f9d2b1221e8b7eda6dc5a1ca9e34a8b1b8d64625 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/44.out @@ -0,0 +1 @@ +299547537972468 diff --git a/problems/DP-02/Atcoder/abc232_f/data/45.out b/problems/DP-02/Atcoder/abc232_f/data/45.out new file mode 100644 index 0000000000000000000000000000000000000000..06800ac29f6028ef0612edc2c6e83bed631b2144 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/45.out @@ -0,0 +1 @@ +86880292365015 diff --git a/problems/DP-02/Atcoder/abc232_f/data/46.out b/problems/DP-02/Atcoder/abc232_f/data/46.out new file mode 100644 index 0000000000000000000000000000000000000000..2ff50d284683e40fa9f41237e024646b1b27ff73 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/46.out @@ -0,0 +1 @@ +206496365341430 diff --git a/problems/DP-02/Atcoder/abc232_f/data/47.in b/problems/DP-02/Atcoder/abc232_f/data/47.in new file mode 100644 index 0000000000000000000000000000000000000000..5bc0b4c3fffaeb5f76b86a491c30e777a227028d --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/47.in @@ -0,0 +1,3 @@ +18 7093735 664026794294 +9135815 45153442 62415945 86147679 92639289 17114847 82269669 15867796 21334019 69646340 91589657 48435405 82075423 33407464 50661474 93225265 3001514 82528038 +89565087 15560175 92611688 1142685 69105300 20931510 29293885 34643953 29789802 56299837 71659701 89037832 60399405 91301308 505213 76328589 56257357 656497 diff --git a/problems/DP-02/Atcoder/abc232_f/data/47.out b/problems/DP-02/Atcoder/abc232_f/data/47.out new file mode 100644 index 0000000000000000000000000000000000000000..d91dd87d871a7fabe08bbc6382555b61b906b86a --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/47.out @@ -0,0 +1 @@ +869382989278457 diff --git a/problems/DP-02/Atcoder/abc232_f/data/48.in b/problems/DP-02/Atcoder/abc232_f/data/48.in new file mode 100644 index 0000000000000000000000000000000000000000..a36fe91399cb0b5da764b0c767fa8565bf949f9c --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/48.in @@ -0,0 +1,3 @@ +18 9166376 438942317758 +84628766 31488797 93922410 91759715 22734167 80200580 76927264 54787935 86250135 60451313 77430087 25077277 89534939 4547247 92127425 18196126 4475402 84507537 +44660115 76626340 95029865 92921451 88222313 88957238 43590951 27028374 80721681 93514272 15119571 11645808 80826108 58782064 74652128 22724570 1631424 8740602 diff --git a/problems/DP-02/Atcoder/abc232_f/data/48.out b/problems/DP-02/Atcoder/abc232_f/data/48.out new file mode 100644 index 0000000000000000000000000000000000000000..c89bcf86d3dfba6c534088e77f5698b4937a5cb7 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/48.out @@ -0,0 +1 @@ +874494076621616 diff --git a/problems/DP-02/Atcoder/abc232_f/data/49.in b/problems/DP-02/Atcoder/abc232_f/data/49.in new file mode 100644 index 0000000000000000000000000000000000000000..fb5629f05bb4a6b624af6466d53e61d5762227dd --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/49.in @@ -0,0 +1,3 @@ +18 15111355 712189406576 +23280280 30352853 87714918 7193205 82539746 1910493 60141498 95403388 8987808 47632175 85731113 47693760 57761016 66324911 83305755 6928437 2925492 39495813 +29717467 80636244 76234435 93256347 74588443 77613979 16361654 29260321 76955501 91137803 42329156 68198410 97012683 7041192 5702854 5892236 28581903 88079869 diff --git a/problems/DP-02/Atcoder/abc232_f/data/49.out b/problems/DP-02/Atcoder/abc232_f/data/49.out new file mode 100644 index 0000000000000000000000000000000000000000..0cdcd3ea3a7251b2d53d6d3466362e4e67b7e83e --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/49.out @@ -0,0 +1 @@ +2424304203063604 diff --git a/problems/DP-02/Atcoder/abc232_f/data/50.out b/problems/DP-02/Atcoder/abc232_f/data/50.out new file mode 100644 index 0000000000000000000000000000000000000000..6d32125244e9a476378f899ba92b066595724e09 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/50.out @@ -0,0 +1 @@ +71993391462259560 diff --git a/problems/DP-02/Atcoder/abc232_f/data/51.out b/problems/DP-02/Atcoder/abc232_f/data/51.out new file mode 100644 index 0000000000000000000000000000000000000000..48bde521af13358ce78a446c2db2c39e3c2d0ca2 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/51.out @@ -0,0 +1 @@ +62159118663688200 diff --git a/problems/DP-02/Atcoder/abc232_f/data/52.in b/problems/DP-02/Atcoder/abc232_f/data/52.in new file mode 100644 index 0000000000000000000000000000000000000000..c4ecfa2854038fa8ae809ae2afa9e02c09313b3b --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/52.in @@ -0,0 +1,3 @@ +18 30157522 7722058809759746 +90685757 92468140 97817741 51785770 72246236 81605268 67751631 99497670 51429017 73783375 80642392 90240119 85536446 92455427 98815987 75749943 74063162 53995163 +26933206 18296808 23035407 34602111 14690177 2352166 46344907 4261589 40626897 17695575 15611876 28108426 24476960 15774946 15413653 17870899 43559593 34809007 diff --git a/problems/DP-02/Atcoder/abc232_f/data/52.out b/problems/DP-02/Atcoder/abc232_f/data/52.out new file mode 100644 index 0000000000000000000000000000000000000000..8f1b2fb659b9b766ae8e7186bfe3a9b7abc4030b --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/52.out @@ -0,0 +1 @@ +30341634908268402 diff --git a/problems/DP-02/Atcoder/abc232_f/data/53.in b/problems/DP-02/Atcoder/abc232_f/data/53.in new file mode 100644 index 0000000000000000000000000000000000000000..545575269aab178c4594d8669faf29c0f3d8e5b4 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/53.in @@ -0,0 +1,3 @@ +18 14153036 1225131315336739 +64682370 58117082 58698373 57862867 52232901 77486606 61003576 72721203 84837771 52156458 62268483 60018272 74115749 88806602 93709400 95747497 85098696 99298576 +24182942 48308295 6110343 29202905 25468193 29961722 45809036 41697091 38724124 22166763 21323964 10910536 26277647 26257684 48091479 8762356 45101978 24859830 diff --git a/problems/DP-02/Atcoder/abc232_f/data/6.in b/problems/DP-02/Atcoder/abc232_f/data/6.in new file mode 100644 index 0000000000000000000000000000000000000000..3d1e06e8362b8bd7417f98366deb23e989a9baf0 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/6.in @@ -0,0 +1,3 @@ +2 1 199999998 +1 100000000 +100000000 1 diff --git a/problems/DP-02/Atcoder/abc232_f/data/7.in b/problems/DP-02/Atcoder/abc232_f/data/7.in new file mode 100644 index 0000000000000000000000000000000000000000..9b8964168a05469144b8d18e6a87c651eaf5dc17 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/7.in @@ -0,0 +1,3 @@ +2 1 199999997 +1 100000000 +100000000 1 diff --git a/problems/DP-02/Atcoder/abc232_f/data/8.in b/problems/DP-02/Atcoder/abc232_f/data/8.in new file mode 100644 index 0000000000000000000000000000000000000000..2237e1b80645f214abfad3d002288e9841c076ef --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/8.in @@ -0,0 +1,3 @@ +2 1 1 +1 1 +1 1 diff --git a/problems/DP-02/Atcoder/abc232_f/data/9.in b/problems/DP-02/Atcoder/abc232_f/data/9.in new file mode 100644 index 0000000000000000000000000000000000000000..d28d698454b6076db70ee929a9826c5db213a72a --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/9.in @@ -0,0 +1,3 @@ +18 100000000 10000000000000000 +100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 +100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 diff --git a/problems/DP-02/Atcoder/abc232_f/data/9.out b/problems/DP-02/Atcoder/abc232_f/data/9.out new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/data/9.out @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/Atcoder/abc232_f/editorial.md b/problems/DP-02/Atcoder/abc232_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..7ed8fd23650aa3d00604b73f4585c1754516d484 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/editorial.md @@ -0,0 +1,92 @@ +# F - Simple Operations on Sequence (editorial) + +Source: https://atcoder.jp/contests/abc232/editorial/3153 by en_translator + +Let’s call the first operation in the problem statement as “increment/decrement” and the second operation as “swap”. + +Here, let us constrain a little bit to the problem statement, so that once you performed increment/decrement, you cannot perform swap anymore. + +In other words, the only procedure allowed is: + +- first perform swaps any number of (possible zero) times; +- then perform increment/decrement any number of (possible zero) times. + +This modification does not change the answer. Because, “swapping after incrementing/decrementing” can be replaced with “incrementing/decrementing after swapping.” + +From the initial state \(A = (A_1, A_2, \ldots, A_N)\), consider the state after “swap any number of times” step is finished, where \(A\) can be expressed as \(A = (A_{P_1}, A_{P_2}, \ldots, A_{P_N})\). Here, \(P = (P_1, P_2, \ldots, P_N)\) is a permutation of \(1, 2, 3, \ldots, N\) . + +What is the total cost required to make \(A\) equal to \(B\)? + +- First, in the “swap any number of times” step, modifying \(A = (A_1, A_2, \ldots, A_N)\) to \(A = (A_{P_1}, A_{P_2}, \ldots, A_{P_N})\) requires \(\mathrm{inv}(P)\) number of swaps, where \(\mathrm{inv}(P)\) is the **inversion number** of \(P\). It requires \(\mathrm{inv}(P) \cdot Y\) yen. +- Next, in the “increment/decrement any number of times” step, making \(A = (A_{P_1}, A_{P_2}, \ldots, A_{P_N})\) equal to \(B\) requires \(\displaystyle\sum_{i = 1}^N |A_{P_i} - B_i|\) number of increments/decrements (where \(|\cdot|\) denotes the absolute value). This requires \(\displaystyle\sum_{i = 1}^N |A_{P_i} - B_i| \cdot X\) yen. + +Therefore, + +\(\mathrm{cost}(P) = \displaystyle\sum_{i = 1}^N |A_{P_i} - B_i|\cdot X + \mathrm{inv}(P)\cdot Y\). + +Thus, this problem is boiled down to “the optimization problem to minimize \(\mathrm{cost}(P)\) by choosing appropriate \(P\).” + +Here, + +\(\mathrm{cost}(P)\) + +\(=\displaystyle\sum_{i = 1}^N |A_{P_i} - B_i|\cdot X + \mathrm{inv}(P)\cdot Y\) + +\(= \displaystyle\sum_{i = 1}^N |A_{P_i} - B_i| \cdot X + \Big( \displaystyle\sum_{i=1}^N \#\lbrace j : j > i, P_j < P_i \rbrace \Big) \cdot Y\) + +\(= \displaystyle\sum_{i = 1}^N (|A_{P_i} - B_i| \cdot X + \#\lbrace j : j > i, P_j < P_i \rbrace \cdot Y)\) + +\(= \displaystyle\sum_{i = 1}^N (|A_{P_i} - B_i| \cdot X + \#\lbrace p : p \in \mathcal{N} \setminus \lbrace P_1, P_2, \ldots, P_{i-1}\rbrace, p < P_i \rbrace \cdot Y)\) + +where \(\#\) denotes the number of elements and \(\mathcal{N} := \lbrace 1, 2, \ldots, N\rbrace\). + +Here, note that \( \#\lbrace p : p \in \mathcal{N} \setminus \lbrace P_1, P_2, \ldots, P_{i-1}\rbrace, p < P_i \rbrace\) depends only on \(\lbrace P_1, P_2, \ldots, P_{i-1} \rbrace\) and \(P_i\) (but not on the actual permutation \(P_1, P_2, \ldots, P_{i-1}\)). + Thus, for \(S \subseteq \mathcal{N}\) and \(x \in \mathcal{N} \setminus S\), defining + +\(f(S, x) := \#\lbrace p : p \in \mathcal{N} \setminus S, p < x \rbrace\), + +then + +\(\mathrm{cost}(P) = \displaystyle\sum_{i = 1}^N (|A_{P_i} - B_i| \cdot X + f(\lbrace P_1, P_2, \ldots, P_{i-1} \rbrace, P_i) \cdot Y).\) + +Therefore, the original problem can be rephrased as follows. + +You will determine the element of \(P\) in the order of \(P_1, P_2, \ldots, P_N\). When the first \((i-1)\) elements \(P_1, P_2, \ldots, P_{i-1}\) is already determined, choosing \(x\) as the next element \(P_i\) costs + +\(|A_{x} - B_i| \cdot X + f(\lbrace P_1, P_2, \ldots, P_{i-1} \rbrace, x) \cdot Y.\) + +Find the minimum total cost to determine all the elements of \(P\). + +We will solve this problem by Dynamic Programming (DP). + +When the first \(i\) elements of \(P\), which are \(P_1, P_2, \ldots, P_i\), is already determined, and \(S = \lbrace P_1, P_2, \ldots, P_i \rbrace\), then let’s call this state \(S\). + +When no element of \(P\) is determined, the state is \(\emptyset\). Every time an element of \(P\) is determined, the current state changes, reaching state \(\mathcal{N}\) after all the elements of \(P\) is determined. + +For \(S \subseteq \mathcal{N}\), define \(\mathrm{dp}[S]\) as follows. + +\(\mathrm{dp}[S] := \) (Minimum total cost required to reach state \(S\)) + +The answer for the original problem is the minimum total cost to reach state \(\mathcal{N}\), that is, \(\mathrm{dp}[\mathcal{N}]\).: + +First, consider the initialization of DP. By the definition of \(\mathrm{dp}[\ast]\), + +\(\mathrm{dp}[\emptyset] = 0\). + +Also, for convenience, for \(S \neq \emptyset\) we initialize as + +\(\mathrm{dp}[S] \leftarrow \infty\). + +Next, consider the transitions of DP. + +When the current state is state \(S\), we can choose as the next element \(P_{\#S+1}\) any elements of \(\mathcal{N} \setminus S\). Choosing \(P_{\#S+1} = x \in \mathcal{N} \setminus S\) requires \( |A_{x} - B_{\#S+1}| \cdot X + f(S, x) \cdot Y\) cost, changing the current state to state \(S \cup \lbrace x \rbrace\). + +Correspondingly, for each \(x \in \mathcal{N} \setminus S\), we have the following transition: + +\(\mathrm{dp}[S \cup \lbrace x\rbrace] \leftarrow \min( \mathrm{dp}[S \cup \lbrace x\rbrace], \mathrm{dp}[S] + |A_{x} - B_{\#S+1}| \cdot X + f(S, x) \cdot Y)\) + +By computing \(\mathrm{dp}[\ast]\) by the aforementioned initialization and transition, the answer for this problem is obtained as \(\mathrm{dp}[\mathcal{N}]\). + +Therefore, this problem can been solved in a total of \(\mathrm{O}(N^2\cdot 2^N)\) time (or \(\mathrm{O}(N\cdot 2^N)\) time depending on implementation). + +We will show a sample code in C++ below. diff --git a/problems/DP-02/Atcoder/abc232_f/judge.json b/problems/DP-02/Atcoder/abc232_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..779de62ba7fe8164a9a1287b4f17231c1639caf6 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 53, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc232_f/meta.json b/problems/DP-02/Atcoder/abc232_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..a9368abcd2ea59e0d4587746900bdbfe6c289460 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc232_f", + "contest": "abc232", + "type": "ABC", + "letter": "F", + "title": "Simple Operations on Sequence", + "url": "https://atcoder.jp/contests/abc232/tasks/abc232_f", + "difficulty": 1857, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 53, + "editorial_url": "https://atcoder.jp/contests/abc232/editorial/3153", + "code_source": "editorial", + "pid": "A1810" +} diff --git a/problems/DP-02/Atcoder/abc232_f/solution.cpp b/problems/DP-02/Atcoder/abc232_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..35620276ee9a03fcb26bea44e8f7a2353194b672 --- /dev/null +++ b/problems/DP-02/Atcoder/abc232_f/solution.cpp @@ -0,0 +1,45 @@ +// abc232_f: F - Simple Operations on Sequence +// Code from the official editorial, https://atcoder.jp/contests/abc232/editorial/3153 (by en_translator) +// Judged AC on all 53 tests, max 0.10 s of the 2 s limit. + +#include +#include +#include +#define inf 1e18 +using namespace std; +typedef long long ll; + +ll N, X, Y; +ll A[20], B[20]; +ll dp[1<<18]; + +int f(int S, int x) +{ + int ret = 0; + for(int p = 1; p <= N; p++){ + if((S & (1<<(p-1))) == 0 && p < x) ret++; + } + return ret; +} + +int main(void) +{ + cin >> N >> X >> Y; + for(int i = 1; i <= N; i++) cin >> A[i]; + for(int i = 1; i <= N; i++) cin >> B[i]; + + dp[0] = 0; + for(int S = 1; S < (1< +using namespace std; + +using ll = long long; + +const ll MAX = 5010, MOD = 998244353; + +vector fac,finv,inv; + +void binom_init() { + fac.resize(MAX); + finv.resize(MAX); + inv.resize(MAX); + fac[0] = fac[1] = 1; + inv[1] = 1; + finv[0] = finv[1] = 1; + for(int i=2; i> S; + int N = S.size(); + vector freq(26); + for(auto el: S) freq[el-'a']++; + vector> dp(27,vector(N+1)); + dp[0][0] = 1; + for(int i=0; i<26; i++){ + for(int j=0; j<=N; j++){ + for(int k=0; k<=min(j,freq[i]); k++){ + dp[i+1][j] += dp[i][j-k]*binom(j,k); + dp[i+1][j] %= MOD; + } + } + } + ll ans = 0; + for(int i=1; i<=N; i++){ + ans += dp[26][i]; + ans %= MOD; + } + cout << ans << endl; +} diff --git a/problems/DP-02/Atcoder/abc234_f/statement.md b/problems/DP-02/Atcoder/abc234_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..3044ae25ef77e48e099f3599e692686043623e87 --- /dev/null +++ b/problems/DP-02/Atcoder/abc234_f/statement.md @@ -0,0 +1,61 @@ +# F - Reordering + +**Score**: 500 points + +## Problem Statement + +Given is a string \( S \). How many different strings can be obtained as a permutation of a non-empty, **not necessarily contiguous** subsequence of \( S \)? + +Since the count can be enormous, print it modulo \( 998244353 \). + +## Constraints +- \( S \) is a string of length \( 1 \) and \( 5000 \) (inclusive) consisting of lowercase English letters. + +--- + +## Input +Input is given from Standard Input in the following format: +``` +S +``` + +## Output +Print the number of different strings that can be obtained as a permutation of a subsequence of \( S \), modulo \( 998244353 \). + +--- + +## Sample Input 1 +``` +aab +``` + +### Sample Output 1 +``` +8 +``` +There are \( 8 \) different strings that can be obtained as a permutation of a subsequence of \( S \): `a`, `b`, `aa`, `ab`, `ba`, `aab`, `aba`, `baa`. + +--- + +## Sample Input 2 +``` +aaa +``` + +### Sample Output 2 +``` +3 +``` + +--- + +## Sample Input 3 +``` +abcdefghijklmnopqrstuvwxyz +``` + +### Sample Output 3 +``` +149621752 +``` +Be sure to print the count modulo \( 998244353 \). diff --git a/problems/DP-02/Atcoder/abc243_f/editorial.md b/problems/DP-02/Atcoder/abc243_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..f2e02700745ed67e8333045e57d97beb090f88a9 --- /dev/null +++ b/problems/DP-02/Atcoder/abc243_f/editorial.md @@ -0,0 +1,11 @@ +# F - Lottery (editorial) + +Source: https://atcoder.jp/contests/abc243/editorial/3553 by en_translator + +The probability that, after drawing the lottery \(K\) times, each item \(i\) is obtained \(c_i\) times is \(\displaystyle \frac{K!}{\prod_{i=1}^{N}c_i!}\prod_{i=1}^{N}p_i^{c_i}\). For a fixed \(c_i\), the contribution for \(i\) can be calculated, so the following DP (Dynamic Programming) can be used to solve the original problem. + +Let \(dp[x][y][z]\) be the sum, for all sequences of non-negative integers \(c=(c_1,\ldots,c_x)\) such that \(|\{i\mid c_i\neq 0\}|=y\) and \(\sum_{i=1}^{x} c_i=z\), of \(\displaystyle \frac{1}{\prod_{i=1}^{x}c_i!}\prod_{i=1}^{x}p_i^{c_i}\). What we want to find is \(dp[N][M][K]\times K!\). + +By inspecting all possible values for \(c_{x+1}\), the transition from \(dp[x][y][z]\) to \(dp[x+1][*][*]\) can be done. For more details, please refer to the sample code. + +Since the number of states is \(O(NMK)\) and each state has \(O(K)\) destination of transitions, the overall time complexity is \(O(NMK^2)\). diff --git a/problems/DP-02/Atcoder/abc243_f/judge.json b/problems/DP-02/Atcoder/abc243_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..36b39c63b77bf900cbea0ca767acb28bfe684390 --- /dev/null +++ b/problems/DP-02/Atcoder/abc243_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 28, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc243_f/meta.json b/problems/DP-02/Atcoder/abc243_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..09b6b9ec6cc1cf309f1793fb1e567857771579e0 --- /dev/null +++ b/problems/DP-02/Atcoder/abc243_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc243_f", + "contest": "abc243", + "type": "ABC", + "letter": "F", + "title": "Lottery", + "url": "https://atcoder.jp/contests/abc243/tasks/abc243_f", + "difficulty": 2125, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 28, + "editorial_url": "https://atcoder.jp/contests/abc243/editorial/3553", + "code_source": "model", + "pid": "A1899" +} diff --git a/problems/DP-02/Atcoder/abc243_f/solution.cpp b/problems/DP-02/Atcoder/abc243_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0da743be7303877588cad1cb3d73534a7416c403 --- /dev/null +++ b/problems/DP-02/Atcoder/abc243_f/solution.cpp @@ -0,0 +1,57 @@ +// abc243_f: F - Lottery +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc243/editorial/3553 +// Judged AC on all 28 tests, max 0.00 s of the 2 s limit (submission 1). + +#include +#include +using namespace std; +using mint = atcoder::modint998244353; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M, K; + cin >> N >> M >> K; + vector W(N); + mint total = 0; + for (int &w : W) { + cin >> w; + total += w; + } + if (M > K) { + cout << 0 << '\n'; + return 0; + } + + vector fact(K + 1), invfact(K + 1); + fact[0] = 1; + for (int i = 1; i <= K; ++i) fact[i] = fact[i - 1] * i; + invfact[K] = fact[K].inv(); + for (int i = K; i >= 1; --i) invfact[i - 1] = invfact[i] * i; + + vector> dp(M + 1, vector(K + 1)); + dp[0][0] = 1; + mint invtotal = total.inv(); + for (int i = 0; i < N; ++i) { + mint p = mint(W[i]) * invtotal; + vector coefficient(K + 1); + mint power = 1; + for (int c = 0; c <= K; ++c) { + coefficient[c] = power * invfact[c]; + power *= p; + } + auto next = dp; + for (int y = 0; y <= min(i, M - 1); ++y) { + for (int z = y; z < K; ++z) { + if (dp[y][z].val() == 0) continue; + for (int c = 1; z + c <= K; ++c) { + next[y + 1][z + c] += dp[y][z] * coefficient[c]; + } + } + } + dp.swap(next); + } + cout << (dp[M][K] * fact[K]).val() << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc243_f/statement.md b/problems/DP-02/Atcoder/abc243_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..3560eb72d57667687779011c9411d98d2fe54e9f --- /dev/null +++ b/problems/DP-02/Atcoder/abc243_f/statement.md @@ -0,0 +1,104 @@ +# F - Lottery + +**Score:** 500 points + +## Problem Statement +Takahashi is participating in a lottery. +Each time he takes a draw, he gets one of the **N** prizes available. Prize **i** is awarded with probability \(\frac{W_i}{\sum_{j=1}^{N}W_j}\). The results of the draws are independent of each other. +What is the probability that he gets exactly **M** different prizes from **K** draws? Find it modulo **998244353**. + +## Note +To print a rational number, start by representing it as a fraction \(\frac{y}{x}\). +Here, **x** and **y** should be integers, and **x** should not be divisible by **998244353** (under the Constraints of this problem, such a representation is always possible). +Then, print the only integer **z** between **0** and **998244352** (inclusive) such that \(xz \equiv y \pmod{998244353}\). + +## Constraints +- \(1 \leq K \leq 50\) +- \(1 \leq M \leq N \leq 50\) +- \(0 < W_i\) +- \(0 < W_1 + \ldots + W_N < 998244353\) +- All values in input are integers. + +--- + +## Input +Input is given from Standard Input in the following format: +``` +N M K +W_1 +\vdots +W_N +``` + +## Output +Print the answer. + +--- + +## Sample Input 1 +``` +2 1 2 +2 +1 +``` + +## Sample Output 1 +``` +221832079 +``` +Each draw awards Prize **1** with probability \(\frac{2}{3}\) and Prize **2** with probability \(\frac{1}{3}\). +He gets Prize **1** at both of the two draws with probability \(\frac{4}{9}\), and Prize **2** at both draws with probability \(\frac{1}{9}\), so the sought probability is \(\frac{5}{9}\). +The modulo **998244353** representation of this value, according to Note, is **221832079**. + +--- + +## Sample Input 2 +``` +3 3 2 +1 +1 +1 +``` + +## Sample Output 2 +``` +0 +``` +It is impossible to get three different prizes from two draws, so the sought probability is **0**. + +--- + +## Sample Input 3 +``` +3 3 10 +499122176 +499122175 +1 +``` + +## Sample Output 3 +``` +335346748 +``` + +--- + +## Sample Input 4 +``` +10 8 15 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +``` + +## Sample Output 4 +``` +755239064 +``` diff --git a/problems/DP-02/Atcoder/abc262_d/editorial.md b/problems/DP-02/Atcoder/abc262_d/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..9edbe56ca64a39b38db16da8d9816352cae1b864 --- /dev/null +++ b/problems/DP-02/Atcoder/abc262_d/editorial.md @@ -0,0 +1,12 @@ +# D - I Hate Non-integer Number (editorial) + +Source: https://atcoder.jp/contests/abc262/editorial/4517 by en_translator + +When \(x_1,\ldots,x_i\) are chosen, the average is \(\frac {x_1+\ldots+x_i}{i}\). This is integer if and only if the numerator, i.e. the sum of the chosen terms, is a multiple of \(i\). + +Here, consider the following \(\mathrm {dp}\) for each \(i=1,\ldots,N\). (DP stands for Dynamic Programming.) + +- \(\mathrm{dp}_{j,k,l}\): the number of ways, modulo \(998244353\), to choose \(k\) terms from the first \(j\) terms of \(A\) such that the remainder by \(i\) of the sum of the chosen terms equals \(l\) + +Then the answer is the sum of \(\mathrm{dp}_{N,i,0}\). + For the transitions of \(\mathrm{dp}\), please refer to the sample code. (The \(23\)-rd corresponds to choosing \(a_j\), and the \(24\)-th corresponds not choosing.) diff --git a/problems/DP-02/Atcoder/abc262_d/judge.json b/problems/DP-02/Atcoder/abc262_d/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..8695f5404cb6ae9449a98816df9a9975a974f532 --- /dev/null +++ b/problems/DP-02/Atcoder/abc262_d/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.5, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 18, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc262_d/meta.json b/problems/DP-02/Atcoder/abc262_d/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..b4601855179da57a8fc7af291da969e2a38e0f20 --- /dev/null +++ b/problems/DP-02/Atcoder/abc262_d/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc262_d", + "contest": "abc262", + "type": "ABC", + "letter": "D", + "title": "I Hate Non-integer Number", + "url": "https://atcoder.jp/contests/abc262/tasks/abc262_d", + "difficulty": 1213, + "score": 400, + "time_limit_sec": 2.5, + "memory_limit_mb": 1024, + "n_tests": 18, + "editorial_url": "https://atcoder.jp/contests/abc262/editorial/4517", + "code_source": "editorial", + "pid": "A2048" +} diff --git a/problems/DP-02/Atcoder/abc262_d/solution.cpp b/problems/DP-02/Atcoder/abc262_d/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3251ffb18d6fb32b1d4ae04a3d66aafc54e3fec5 --- /dev/null +++ b/problems/DP-02/Atcoder/abc262_d/solution.cpp @@ -0,0 +1,38 @@ +// abc262_d: D - I Hate Non-integer Number +// Code from the official editorial, https://atcoder.jp/contests/abc262/editorial/4517 (by en_translator) +// Judged AC on all 18 tests, max 0.15 s of the 2.5 s limit. + +#include +#include +using namespace std; +using namespace atcoder; +using mint = modint998244353; + +int main() { + + int N; + cin>>N; + + vector a(N); + for(int i=0;i>a[i]; + + mint ans = 0; + + for(int i=1;i<=N;i++){ + vector dp(N+1,vector(i+1,vector(i,0))); + dp[0][0][0] = 1; + for(int j=0;j +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + vector frequency(2 * M + 1, 0); + int initial_sum = 0; + for (int i = 0; i < N; ++i) { + int a, b; + cin >> a >> b; + initial_sum += a; + ++frequency[b - a + M]; + } + + // Each group is (change in the visible sum, number of flipped cards). + vector> groups; + for (int change = -M; change <= M; ++change) { + if (change == 0) continue; + int remaining = frequency[change + M]; + for (int size = 1; remaining > 0; size *= 2) { + int take = min(size, remaining); + groups.emplace_back(change * take, take); + remaining -= take; + } + } + + // Small changes first keep the active DP interval smaller for longer. + sort(groups.begin(), groups.end(), [](const auto& x, const auto& y) { + return abs(x.first) < abs(y.first); + }); + + const int INF = 1000000000; + vector dp(M + 1, INF); + dp[initial_sum] = 0; + int low = initial_sum, high = initial_sum; + + for (auto [change, cost] : groups) { + if (change > 0) { + for (int sum = high; sum >= low; --sum) { + dp[sum + change] = min(dp[sum + change], dp[sum] + cost); + } + high += change; + } else { + for (int sum = low; sum <= high; ++sum) { + dp[sum + change] = min(dp[sum + change], dp[sum] + cost); + } + low += change; + } + } + + for (int sum = 0; sum <= M; ++sum) { + cout << (dp[sum] == INF ? -1 : dp[sum]) << '\n'; + } + return 0; +} diff --git a/problems/DP-02/Atcoder/abc269_g/statement.md b/problems/DP-02/Atcoder/abc269_g/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..6b46c7b4a24f13a8fd3e706f021fcaadc6760e8d --- /dev/null +++ b/problems/DP-02/Atcoder/abc269_g/statement.md @@ -0,0 +1,102 @@ +# G - Reversible Cards 2 + +**Score**: 600 points + +## Problem Statement + +We have \(N\) cards numbered \(1\) to \(N\). +Card \(i\) has an integer \(A_i\) written on the front and an integer \(B_i\) written on the back. Here, \(\sum_{i=1}^N (A_i + B_i) = M\). +For each \(k=0,1,2,...,M\), solve the following problem. + +> The \(N\) cards are arranged so that their front sides are visible. You may choose between \(0\) and \(N\) cards (inclusive) and flip them. +> To make the sum of the visible numbers equal to \(k\), at least how many cards must be flipped? Print this number of cards. +> If there is no way to flip cards to make the sum of the visible numbers equal to \(k\), print \(-1\) instead. + +### Constraints +- \(1 \leq N \leq 2 \times 10^5\) +- \(0 \leq M \leq 2 \times 10^5\) +- \(0 \leq A_i, B_i \leq M\) +- \(\sum_{i=1}^N (A_i + B_i) = M\) +- All values in the input are integers. + +### Input +The input is given from Standard Input in the following format: +``` +N M +A_1 B_1 +A_2 B_2 +... +A_N B_N +``` + +### Output +Print \(M+1\) lines. The \(i\)-th line should contain the answer for \(k=i-1\). + +--- + +### Sample Input 1 +``` +3 6 +0 2 +1 0 +0 3 +``` + +### Sample Output 1 +``` +1 +0 +2 +1 +1 +3 +2 +``` +For \(k=0\), for instance, flipping just card \(2\) makes the sum of the visible numbers \(0+0+0=0\). This choice is optimal. +For \(k=5\), flipping all cards makes the sum of the visible numbers \(2+0+3=5\). This choice is optimal. + +--- + +### Sample Input 2 +``` +2 3 +1 1 +0 1 +``` + +### Sample Output 2 +``` +-1 +0 +1 +-1 +``` + +--- + +### Sample Input 3 +``` +5 12 +0 1 +0 3 +1 0 +0 5 +0 2 +``` + +### Sample Output 3 +``` +1 +0 +1 +1 +1 +2 +1 +2 +2 +2 +3 +3 +4 +``` diff --git a/problems/DP-02/Atcoder/abc275_f/editorial.md b/problems/DP-02/Atcoder/abc275_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..f8f6b94e1627975d2799a1717613c90bd06a3e41 --- /dev/null +++ b/problems/DP-02/Atcoder/abc275_f/editorial.md @@ -0,0 +1,19 @@ +# F - Erase Subarrays (editorial) + +Source: https://atcoder.jp/contests/abc275/editorial/5143 by en_translator + +Consider the following sequence \(B=(b_1,\ldots,b_N)\) corresponding to the result of the operations: + +- \(b_i=0\) if \(a_i\) is removed if \(b_i=0\), and \(b_i=1\) otherwise, for \(i=1,2,\ldots,N\) + +The sum of \(A\) is \(x\) if and only if \(\sum a_ib_i\) equals \(x\). Thus, it is sufficient to find the minimum number of operations to obtain such \(B\). + +The minimum number of operations required to obtain a \(B\) is equal to the number of maximal segments consisting of consecutive \(0\)s. For example, \(B=(1,0,0,1,0,1,1,0,0,0)\), the maximal segments consisting of consecutive \(0\)s are \(B[2,3], B[5,5]\), and \(B[8,10]\), so the minimum number of operations required is \(3\). (\(B[x,y]\) denotes \(b_x,\ldots,b_y\).) + Moreover, the number of maximal segments consisting of consecutive \(0\)s is equal to the number of \(i\)’s satisfying one of the following conditions: + +- \(i=1\) and \(b_i=0\); +- \(i \geq 2\) and \(b_{i-1}=1, b_i=0\). + +Therefore, the answer can be found by a Dynamic Programming (DP) where \(\mathrm{dp}[i][j][k]\) is “the minimum number of operations required to make \(a_1b_1 + a_2 b_2 + \ldots + a_i b_i = j\) and \(b_i=k\).” The time complexity is \(\mathrm{O}(NM)\). + +By letting \(b_0=1\), the case division above can be avoided. diff --git a/problems/DP-02/Atcoder/abc275_f/judge.json b/problems/DP-02/Atcoder/abc275_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..a90a7ac5de249df51602ab0f2950b85d7ddd585c --- /dev/null +++ b/problems/DP-02/Atcoder/abc275_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 38, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc275_f/meta.json b/problems/DP-02/Atcoder/abc275_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..5acaa80ba526aea6ad21add3ca7e39687067cc48 --- /dev/null +++ b/problems/DP-02/Atcoder/abc275_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc275_f", + "contest": "abc275", + "type": "ABC", + "letter": "F", + "title": "Erase Subarrays", + "url": "https://atcoder.jp/contests/abc275/tasks/abc275_f", + "difficulty": 1608, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 38, + "editorial_url": "https://atcoder.jp/contests/abc275/editorial/5143", + "code_source": "model", + "pid": "A2155" +} diff --git a/problems/DP-02/Atcoder/abc275_f/solution.cpp b/problems/DP-02/Atcoder/abc275_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..20ff7e099b22839f320d71dc80596f86c63504ac --- /dev/null +++ b/problems/DP-02/Atcoder/abc275_f/solution.cpp @@ -0,0 +1,38 @@ +// abc275_f: F - Erase Subarrays +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc275/editorial/5143 +// Judged AC on all 38 tests, max 0.01 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + vector A(N); + for (int &a : A) cin >> a; + + const int INF = 1000000000; + vector removed(M + 1, INF), kept(M + 1, INF); + vector next_removed(M + 1), next_kept(M + 1); + kept[0] = 0; // The virtual element b_0 is 1. + + for (int a : A) { + for (int sum = 0; sum <= M; ++sum) { + next_removed[sum] = min(removed[sum], kept[sum] + 1); + next_kept[sum] = (sum >= a) + ? min(removed[sum - a], kept[sum - a]) + : INF; + } + removed.swap(next_removed); + kept.swap(next_kept); + } + + for (int x = 1; x <= M; ++x) { + int answer = min(removed[x], kept[x]); + cout << (answer >= INF ? -1 : answer) << '\n'; + } + return 0; +} diff --git a/problems/DP-02/Atcoder/abc275_f/statement.md b/problems/DP-02/Atcoder/abc275_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..5ca3b75cc534a180fa6bb387ef99a5e1e7b9ae98 --- /dev/null +++ b/problems/DP-02/Atcoder/abc275_f/statement.md @@ -0,0 +1,110 @@ +# F - Erase Subarrays + +**Score:** 500 points + +## Problem Statement + +You are given an integer array \( A = (a_1,a_2,\ldots,a_N) \). +You may perform the following operation any number of times (possibly zero). + +- Choose a nonempty contiguous subarray of \( A \), and delete it from the array. + +For each \( x = 1,2,\ldots,M \), solve the following problem: + +- Find the minimum possible number of operations to make the sum of elements of \( A \) equal \( x \). +If it is impossible to make the sum of elements of \( A \) equal \( x \), print `-1` instead. + +Note that the sum of elements of an empty array is \( 0 \). + +## Constraints + +- \( 1 \leq N, M \leq 3000 \) +- \( 1 \leq a_i \leq 3000 \) +- All values in the input are integers. + +## Input + +The input is given from Standard Input in the following format: + +``` +N M +a_1 ... a_N +``` + +## Output + +Print \( M \) lines. The \( i \)-th line should contain the answer for \( x = i \). + +## Sample Input 1 + +``` +4 5 +1 2 3 4 +``` + +## Sample Output 1 + +``` +1 +2 +1 +1 +1 +``` + +The followings are examples of minimum number of operations that achieve the goal. + +- For \( x = 1 \), delete \( a_2,a_3,a_4 \), and the sum of elements of \( A \) becomes \( x \). +- For \( x = 2 \), delete \( a_3,a_4 \), then delete \( a_1 \), and the sum of elements of \( A \) becomes \( x \). +- For \( x = 3 \), delete \( a_3,a_4 \), and the sum of elements of \( A \) becomes \( x \). +- For \( x = 4 \), delete \( a_1,a_2,a_3 \), and the sum of elements of \( A \) becomes \( x \). +- For \( x = 5 \), delete \( a_2,a_3 \), and the sum of elements of \( A \) becomes \( x \). + +## Sample Input 2 + +``` +1 5 +3 +``` + +## Sample Output 2 + +``` +-1 +-1 +0 +-1 +-1 +``` + +## Sample Input 3 + +``` +12 20 +2 5 6 5 2 1 7 9 7 2 5 5 +``` + +## Sample Output 3 + +``` +2 +1 +2 +2 +1 +2 +1 +2 +2 +1 +2 +1 +1 +1 +2 +2 +1 +1 +1 +1 +``` diff --git a/problems/DP-02/Atcoder/abc301_e/editorial.md b/problems/DP-02/Atcoder/abc301_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..3f6614faaa1ead08b9cfd5d98f407690c75902fb --- /dev/null +++ b/problems/DP-02/Atcoder/abc301_e/editorial.md @@ -0,0 +1,11 @@ +# E - Pac-Takahashi (editorial) + +Source: https://atcoder.jp/contests/abc301/editorial/6370 by en_translator + +Let \(N\) be the number of candy squares. + +Let \(S\) be a set of candy squares visited during a tour. For all possible \(S\) (there are \(2^N\) such sets), we try finding the minimum number of moves required to visit all candy squares in \(S\), ending up in the goal square. This can be considered as a kind of traveling salesman problem, where the candy squares are regarded as vertices. Thus, if we know, for all pairs of candy squares, the minimum number of moves required to travel one from the other, then the problem can be solved with bit DP (Dynamic Programming) in a total of \(O(2^NN^2)\) time. If you don’t know how to sole the traveling salesman problem with bit DP, please refer to e.g. the editorials of [ABC180-E](https://atcoder.jp/contests/abc180/tasks/abc180_e). + +All that left is to find, for all pairs of candy squares, the minimum number of moves required to travel one from the other. This can be found in a total of \(O(HW)\) time by performing BFS (Breadth-First Search) on the grid, starting from every candy square. + +Thus, the problem has been solved in a total of \(O(NHW + 2^NN^2)\) time. diff --git a/problems/DP-02/Atcoder/abc301_e/judge.json b/problems/DP-02/Atcoder/abc301_e/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..a10683c92d6f9201d2b7d30b8e40d06c0d67cb3a --- /dev/null +++ b/problems/DP-02/Atcoder/abc301_e/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 5.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 49, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc301_e/meta.json b/problems/DP-02/Atcoder/abc301_e/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..2adf5e49b7d3964b2369657e79408d555fdf512a --- /dev/null +++ b/problems/DP-02/Atcoder/abc301_e/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc301_e", + "contest": "abc301", + "type": "ABC", + "letter": "E", + "title": "Pac-Takahashi", + "url": "https://atcoder.jp/contests/abc301/tasks/abc301_e", + "difficulty": 1673, + "score": 475, + "time_limit_sec": 5.0, + "memory_limit_mb": 1024, + "n_tests": 49, + "editorial_url": "https://atcoder.jp/contests/abc301/editorial/6370", + "code_source": "editorial", + "pid": "A2361" +} diff --git a/problems/DP-02/Atcoder/abc301_e/solution.cpp b/problems/DP-02/Atcoder/abc301_e/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6ff175c33f8f096520ea6161380ceeebc911d3ea --- /dev/null +++ b/problems/DP-02/Atcoder/abc301_e/solution.cpp @@ -0,0 +1,86 @@ +// abc301_e: E - Pac-Takahashi +// Code from the official editorial, https://atcoder.jp/contests/abc301/editorial/6370 (by en_translator) +// Judged AC on all 49 tests, max 0.25 s of the 5 s limit. + +#include + +using namespace std; + +const int inf = 1000000000; + +bool chmin(int &a, int b) { + if (a > b) { + a = b; + return true; + } + return false; +} + +const int dx[4] = {1, 0, -1, 0}; +const int dy[4] = {0, 1, 0, -1}; + +// Makes a table of distances from (si, sj) +// Gives inf if it is unreachable +vector> dist(int h, int w, const vector &a, int si, int sj) { + vector res(h, vector(w, inf)); + res[si][sj] = 0; + queue> q; + q.emplace(si, sj); + while (!q.empty()) { + auto [i, j] = q.front(); + q.pop(); + for (int k = 0; k < 4; k++) { + int ni = i + dx[k]; + int nj = j + dy[k]; + if (ni < 0 or ni >= h or nj < 0 or nj >= w) continue; + if (a[ni][nj] == '#') continue; + if (chmin(res[ni][nj], res[i][j] + 1)) q.emplace(ni, nj); + } + } + return res; +} + +int main() { + int h, w, t; + cin >> h >> w >> t; + vector a(h); + int si, sj, gi, gj; + vector> ls; + for (int i = 0; i < h; i++) { + cin >> a[i]; + for (int j = 0; j < w; j++) { + if (a[i][j] == 'S') si = i, sj = j; + if (a[i][j] == 'G') gi = i, gj = j; + if (a[i][j] == 'o') ls.emplace_back(i, j); + } + } + int cnt = ls.size(); + + vector d(cnt, vector>()); // d[i] : distance table starting from the i-th candy square + for (int i = 0; i < cnt; i++) d[i] = dist(h, w, a, ls[i].first, ls[i].second); + + vector dp(1 << cnt, vector(cnt, inf)); + for (int i = 0; i < cnt; i++) dp[1 << i][i] = d[i][si][sj]; + for (int s = 1; s < (1 << cnt); s++) { + for (int last = 0; last < cnt; last++) { + if (dp[s][last] == inf) continue; + for (int nx = 0; nx < cnt; nx++) { + if (s >> nx & 1) continue; + chmin(dp[s | 1 << nx][nx], dp[s][last] + d[last][ls[nx].first][ls[nx].second]); + } + } + } + + int ans = -1; + if (dist(h, w, a, si, sj)[gi][gj] <= t) ans = 0; + for (int s = 1; s < (1 << cnt); s++) { + for (int last = 0; last < cnt; last++) { + if (dp[s][last] + d[last][gi][gj] <= t) { + int now = 0; + for (int i = 0; i < cnt; i++) if (s >> i & 1) ++now; + ans = max(ans, now); + } + } + } + cout << ans << endl; +} diff --git a/problems/DP-02/Atcoder/abc301_e/statement.md b/problems/DP-02/Atcoder/abc301_e/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..0d466660912f806d3c835ad7332be14c1d71a2c6 --- /dev/null +++ b/problems/DP-02/Atcoder/abc301_e/statement.md @@ -0,0 +1,104 @@ +# E - Pac-Takahashi + +**Score**: 475 points + +## Problem Statement + +We have a grid with \( H \) rows and \( W \) columns. +Let \( (i,j) \) denote the square at the \( i \)-th row from the top and \( j \)-th column from the left. +Each square in the grid is one of the following: the start square, the goal square, an empty square, a wall square, and a candy square. +\( (i,j) \) is represented by a character \( A_{i,j} \), and is the start square if \( A_{i,j}= S \), the goal square if \( A_{i,j}= G \), an empty square if \( A_{i,j}= . \), a wall square if \( A_{i,j}= # \), and a candy square if \( A_{i,j}= o \). +Here, it is guaranteed that there are exactly one start, exactly one goal, and **at most \( 18 \)** candy squares. + +Takahashi is now at the start square. +He can repeat moving to a vertically or horizontally adjacent non-wall square. +He wants to reach the goal square in at most \( T \) moves. +Determine whether it is possible. +If it is possible, find the maximum number of candy squares he can visit on the way to the goal square, where he must finish. +Each candy square counts only once, even if it is visited multiple times. + +### Constraints + +- \( 1 \leq H,W \leq 300 \) +- \( 1 \leq T \leq 2 \times 10^6 \) +- \( H, W, T \) are integers. +- \( A_{i,j} \) is one of \( S, G, ., #, o \). +- Exactly one pair \( (i,j) \) satisfies \( A_{i,j}= S \). +- Exactly one pair \( (i,j) \) satisfies \( A_{i,j}= G \). +- **At most \( 18 \)** pairs \( (i,j) \) satisfy \( A_{i,j}= o \). + +--- + +### Input + +The input is given from Standard Input in the following format: + +``` +H W T +A_{1,1}A_{1,2}\dots A_{1,W} +\vdots +A_{H,1}A_{H,2}\dots A_{H,W} +``` + +### Output + +If it is impossible to reach the goal square in at most \( T \) moves, print `-1`. +Otherwise, print the maximum number of candy squares that can be visited on the way to the goal square, where Takahashi must finish. + +--- + +### Sample Input 1 + +``` +3 3 5 +S.G +o#o +.#. +``` + +### Sample Output 1 + +``` +1 +``` +If he makes four moves as \( (1,1) \rightarrow (1,2) \rightarrow (1,3) \rightarrow (2,3) \rightarrow (1,3) \), he can visit one candy square and finish at the goal square. +He cannot make five or fewer moves to visit two candy squares and finish at the goal square, so the answer is \( 1 \). + +Note that making five moves as \( (1,1) \rightarrow (2,1) \rightarrow (1,1) \rightarrow (1,2) \rightarrow (1,3) \rightarrow (2,3) \) to visit two candy squares is invalid since he would not finish at the goal square. + +--- + +### Sample Input 2 + +``` +3 3 1 +S.G +.#o +o#. +``` + +### Sample Output 2 + +``` +-1 +``` +He cannot reach the goal square in one or fewer moves. + +--- + +### Sample Input 3 + +``` +5 10 2000000 +S.o..ooo.. +..o..o.o.. +..o..ooo.. +..o..o.o.. +..o..ooo.G +``` + +### Sample Output 3 + +``` +18 +``` diff --git a/problems/DP-02/Atcoder/abc310_f/editorial.md b/problems/DP-02/Atcoder/abc310_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..ae4740639aaa86366d4017ae5b50e52836fec54a --- /dev/null +++ b/problems/DP-02/Atcoder/abc310_f/editorial.md @@ -0,0 +1,39 @@ +# F - Make 10 Again (editorial) + +Source: https://atcoder.jp/contests/abc310/editorial/6803 by en_translator + +Let us simply say an integer \(k\) is **obtainable** when we can choose the cast dice so that the results sums up to \(k\). + +We solve this problem with a dynamic programming (so-called bit DP). Instead of casting \(N\) dice, we consider casting dice one-by-one from the first one in order, and the set of integers obtainable after casting each die. In this problem, we are only interested in whether we can obtain the sum of \(10\) or not, so the integers greater than \(10\) can be ignored. So let us define the DP table by + +\(\mathrm{dp}[i][S] = \) ( the probability that the set of obtainable integers is \(S\) when the first \(i\) dice are cast). + +By filling this DP table, the answer can be obtained as + +\[\sum_{S \owns 10} \mathrm{dp}[N][S].\] + +We first consider the initialization of the DP. At first, \(0\) dice have been cast, and only \(0\) is obtainable (by choosing zero results from the zero cast dies), so + +\[ \mathrm{dp}[0][S] = \begin{cases} 1 &\,\,\text{if}\,\, S = \lbrace 0 \rbrace \\ 0 &\,\,\text{if}\,\, S \neq \lbrace 0 \rbrace. \end{cases} \] + +Next, we consider the transitions of the DP. Assume that we have cast the first \(i\) dice, and the set of obtainable integers no more than \(10\) is \(S\). If the \((i+1)\)-th die shows \(x\), the \(10\)-or-less integers obtained by the first \((i+1)\) results (including this one) is the union \(S \cup T_x\) of + +- the set of obtainable integers where the new result \(x\) is not chosen (which coincides with the set of integers \(S\) obtainable from the first \(i\) results), and +- the set of obtainable integers where the new result \(x\) is chosen (which coincides with \(T_x \coloneqq \lbrace s + x : s \in S \rbrace \cap \{0, 1, 2, \ldots, 10\}\), because we can obtain \(s+x\), where \(s \in S\) is an integer originally obtainable from the first \(i\) results). + +The \((i+1)\)-th die results in one of \(1, 2, \ldots, A_{i+1}\) with a equal probability of \(1 / A_{i+1}\), so if \(A_{i+1} \leq 10\), we perform the following \(A_{i+1}\) transitions: + +- add \(\mathrm{dp}[i][S] \times (1 / A_{i+1})\) to \(\mathrm{dp}[i+1][S \cup T_1]\) to consider \(x = 1\) case; +- add \(\mathrm{dp}[i][S] \times (1 / A_{i+1})\) to \(\mathrm{dp}[i+1][S \cup T_2]\) to consider \(x = 2\) case; +- \(\cdots\) +- add \(\mathrm{dp}[i][S] \times (1 / A_{i+1})\) to \(\mathrm{dp}[i+1][S \cup T_{A_{i+1}}]\) to consider \(x = A_{i+1}\) case. + +If \(A_{i+1} \gt 10\), the transitions for \(x \gt 10\) cases can be handled at once, because \(T_x = \emptyset\) for \(x \gt 10\). Specifically, we perform the following \(11\) transitions: + +- add \(\mathrm{dp}[i][S] \times (1 / A_{i+1})\) to \(\mathrm{dp}[i+1][S \cup T_1]\) to consider \(x = 1\) case; +- add \(\mathrm{dp}[i][S] \times (1 / A_{i+1})\) to \(\mathrm{dp}[i+1][S \cup T_2]\) to consider \(x = 2\) case; +- \(\cdots\) +- add \(\mathrm{dp}[i][S] \times (1 / A_{i+1})\) to \(\mathrm{dp}[i+1][S \cup T_{10}]\) to consider \(x = 10\) case; and +- add \(\mathrm{dp}[i][S] \times ((A_{i+1}-10) / A_{i+1})\) to \(\mathrm{dp}[i+1][S]\) to consider \(11 \leq x \leq A_{i+1}\) cases. + +Since \(S \subseteq \lbrace 0, 1, 2, \ldots, 10 \rbrace\), there are at most \(2^{11} = 2048\) possible sets for \(S\), so the DP table has \(2048N \leq 204800\) states. Since at most \(11\) transitions are needed for each state, one can obtain the result fast enough by filling the DP table. diff --git a/problems/DP-02/Atcoder/abc310_f/judge.json b/problems/DP-02/Atcoder/abc310_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..dd0a9bf6ed29df77e004c9403cf01ebb3d42656d --- /dev/null +++ b/problems/DP-02/Atcoder/abc310_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 40, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc310_f/meta.json b/problems/DP-02/Atcoder/abc310_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..9ec588ca8058b40403d6ff4a10f3be2af9a4c25b --- /dev/null +++ b/problems/DP-02/Atcoder/abc310_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc310_f", + "contest": "abc310", + "type": "ABC", + "letter": "F", + "title": "Make 10 Again", + "url": "https://atcoder.jp/contests/abc310/tasks/abc310_f", + "difficulty": 1938, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 40, + "editorial_url": "https://atcoder.jp/contests/abc310/editorial/6803", + "code_source": "model", + "pid": "A2435" +} diff --git a/problems/DP-02/Atcoder/abc310_f/solution.cpp b/problems/DP-02/Atcoder/abc310_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e86bc180965c06757e953c3100ad9dcac112440 --- /dev/null +++ b/problems/DP-02/Atcoder/abc310_f/solution.cpp @@ -0,0 +1,46 @@ +// abc310_f: F - Make 10 Again +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc310/editorial/6803 +// Judged AC on all 40 tests, max 0.00 s of the 2 s limit (submission 1). + +#include +#include +using namespace std; +using mint = atcoder::modint998244353; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N; + cin >> N; + constexpr int STATES = 1 << 11; + constexpr int MASK = STATES - 1; + vector dp(STATES), ndp(STATES); + dp[1] = 1; // Initially, only the sum zero is obtainable. + + for (int i = 0; i < N; ++i) { + int A; + cin >> A; + fill(ndp.begin(), ndp.end(), mint(0)); + mint invA = mint(A).inv(); + for (int s = 0; s < STATES; ++s) { + if (dp[s].val() == 0) continue; + mint p = dp[s] * invA; + for (int x = 1; x <= min(A, 10); ++x) { + int t = (s | (s << x)) & MASK; + ndp[t] += p; + } + if (A > 10) { + ndp[s] += p * (A - 10); + } + } + dp.swap(ndp); + } + + mint answer = 0; + for (int s = 0; s < STATES; ++s) { + if (s & (1 << 10)) answer += dp[s]; + } + cout << answer.val() << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc310_f/statement.md b/problems/DP-02/Atcoder/abc310_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..dc082c7d4fed3b9840f2a8a31f6bf08bb85e7681 --- /dev/null +++ b/problems/DP-02/Atcoder/abc310_f/statement.md @@ -0,0 +1,62 @@ +# F - Make 10 Again + +## Score : 500 points + +### Problem Statement +We have \(N\) dice. +For each \(i = 1, 2, \ldots, N\), when the \(i\)-th die is thrown, it shows a random integer between \(1\) and \(A_i\), inclusive, with equal probability. +Find the probability, modulo \(998244353\), that the following condition is satisfied when the \(N\) dice are thrown simultaneously. + +> There is a way to choose some (possibly all) of the \(N\) dice so that the sum of their results is \(10\). + +
How to find a probability modulo \(998244353\) +It can be proved that the sought probability is always a rational number. Additionally, the constraints of this problem guarantee that if the sought probability is represented as an irreducible fraction \(\frac{y}{x}\), then \(x\) is not divisible by \(998244353\). Here, there is a unique integer \(z\) such that \(xz \equiv y \pmod{998244353}\). Report this \(z\). +
+ +### Constraints +- \(1 \leq N \leq 100\) +- \(1 \leq A_i \leq 10^6\) +- All input values are integers. + +--- + +### Input +The input is given from Standard Input in the following format: +``` +N +A_1 A_2 ... A_N +``` + +### Output +Print the answer. + +--- + +### Sample Input 1 +``` +4 +1 7 2 9 +``` + +### Sample Output 1 +``` +942786334 +``` +For instance, if the first, second, third, and fourth dice show \(1\), \(3\), \(2\), and \(7\), respectively, these results satisfy the condition. +In fact, if the second and fourth dice are chosen, the sum of their results is \(3 + 7 = 10\). +Alternatively, if the first, third, and fourth dice are chosen, the sum of their results is \(1 + 2 + 7 = 10\). +On the other hand, if the first, second, third, and fourth dice show \(1\), \(6\), \(1\), and \(5\), respectively, there is no way to choose some of them so that the sum of their results is \(10\), so the condition is not satisfied. +In this sample input, the probability of the results of the \(N\) dice satisfying the condition is \(\frac{11}{18}\). Thus, print this value modulo \(998244353\), that is, \(942786334\). + +--- + +### Sample Input 2 +``` +7 +1 10 100 1000 10000 100000 1000000 +``` + +### Sample Output 2 +``` +996117877 +``` diff --git a/problems/DP-02/Atcoder/abc319_f/editorial.md b/problems/DP-02/Atcoder/abc319_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..f8d6c0ca32e7cd5d0fbcddd8ba4ae03aea63690e --- /dev/null +++ b/problems/DP-02/Atcoder/abc319_f/editorial.md @@ -0,0 +1,24 @@ +# F - Fighter Takahashi (editorial) + +Source: https://atcoder.jp/contests/abc319/editorial/7133 by en_translator + +The following fact holds. + +Whenever you face a defeatable enemy, immediately defeat it. + +Here, a defeatable enemy refers to an enemy on a vertex, reachable only via visited vertices, and whose \(s _ i\) is no more than the strength of \(s _ i\). + +This is true because if there is a way to defeat all the enemies, where an enemy is not immediately defeated, then one can bring it forward so that the enemy is immediately defeated. + +Therefore, if one can defeat all the enemies, then all the enemies can be defeated as follows: + +- If there is a defeatable enemy, defeat it. +- Otherwise, take an appropriate medicine. + +Consider the following DP (Dynamic Programming). + +- \(\operatorname{dp}[S]\coloneqq\) the maximum Takahashi’s strength when he took the medicine in the set \(S\) + +By the observation above, it is sufficient to consider the following case: from the state of \(\operatorname{dp}[S\setminus\lbrace i\rbrace]\), take medicine \(i\), and defeat as many enemies as possible. + +With an appropriate \(O(N\log N)\) precalculation, a simulation step costs \(O(N)\) time, and the transition occurs \(O(2^PP)\) times, where \(P\) is the number of medicine, for a total complexity of \(O(N(2^PP+\log N))\). diff --git a/problems/DP-02/Atcoder/abc319_f/judge.json b/problems/DP-02/Atcoder/abc319_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..d9eca3e11451cb9cbb5e5ff252d5ccafcfb37c8d --- /dev/null +++ b/problems/DP-02/Atcoder/abc319_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 70, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc319_f/meta.json b/problems/DP-02/Atcoder/abc319_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..a9934abd8ca731bd02b3245b94c6c5547b77678d --- /dev/null +++ b/problems/DP-02/Atcoder/abc319_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc319_f", + "contest": "abc319", + "type": "ABC", + "letter": "F", + "title": "Fighter Takahashi", + "url": "https://atcoder.jp/contests/abc319/tasks/abc319_f", + "difficulty": 2480, + "score": 550, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 70, + "editorial_url": "https://atcoder.jp/contests/abc319/editorial/7133", + "code_source": "editorial", + "pid": "A2490" +} diff --git a/problems/DP-02/Atcoder/abc319_f/solution.cpp b/problems/DP-02/Atcoder/abc319_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..023457dd02e127b35d6d110770af661654b2caf4 --- /dev/null +++ b/problems/DP-02/Atcoder/abc319_f/solution.cpp @@ -0,0 +1,119 @@ +// abc319_f: F - Fighter Takahashi +// Code from the official editorial, https://atcoder.jp/contests/abc319/editorial/7133 (by en_translator) +// Judged AC on all 70 tests, max 0.01 s of the 2 s limit. + +#include +#include +#include +#include +#include +#include + +int main() { + using namespace std; + + constexpr unsigned long max_strength{1000000000}; + + unsigned N; + cin >> N; + + struct vertex_info { + unsigned potion_mask; // set of medicine required to erase this vertex + unsigned parent; // parent of this vertex + unsigned long need_strength; // minimum strength required to erase this vertex + unsigned long gain; // strength gained by erasing this vertex (or 0 if there is a medicine on this vertex) + }; + struct potion_info { + unsigned index; // index of vertex + unsigned long multiply; // ratio of strength when the medicine is taken + }; + enum vertex_type { + ENEMY = 1, + POTION + }; + + vector vertex(N - 1); + vector potion; + vertex.emplace(begin(vertex), 0, 0, 0, 1); // root + for (unsigned type, i{1}; auto &&[m, p, strength, gain] : vertex | views::drop(1)) { + cin >> p >> type >> strength >> gain; + m = vertex[p].potion_mask; // The parent must be erased before the vertex itself is erased + if (type == vertex_type::POTION) { // If it is a medicine + m |= 1U << size(potion); // This medicine also has to be taken + potion.emplace_back(i, exchange(gain, 0)); + } + if (vertex[--p].gain) // If the parent is enemy + strength = clamp(vertex[p].need_strength + vertex[p].gain, strength, max_strength); + else // If the parent is medicine + strength = clamp(vertex[p].need_strength * potion[bit_width(vertex[p].potion_mask) - 1].multiply, strength, max_strength); + ++i; + } + + // Sort the vertex in ascending order of the strength required to erase it + { + vector sorted_index(N), sorted_index_inv(N); + iota(begin(sorted_index), end(sorted_index), 0U); + ranges::stable_sort(sorted_index, {}, [&vertex](auto i) { return vertex[i].need_strength; }); + for (const auto i : views::iota(0U, N)) + sorted_index_inv[sorted_index[i]] = i; + for (auto &&[_m, p, _s, _g] : vertex) + p = sorted_index_inv[p]; + for (auto &&[i, _] : potion) + i = sorted_index_inv[i]; + for (const auto i : views::iota(0U, N)) { + const auto j{sorted_index_inv[i]}; + swap(sorted_index_inv[sorted_index[i]], sorted_index_inv[sorted_index[j]]); + swap(sorted_index[i], sorted_index[j]); + swap(vertex[sorted_index[i]], vertex[sorted_index[j]]); + } + ranges::sort(potion, {}, [](auto &&i) { return i.index; }); + for (unsigned x{}; auto &&[m, p, strength, gain] : vertex) { + m = 0; + m = vertex[p].potion_mask; + if (!gain) + m |= 1U << x++; + } + } + + const auto K{size(potion)}; + // dp[S] := Maximum reachable strength when all the medicine in S are taken but the others are not + vector dp(1U << K); + + // vertex reachable without taking the medicine + dp[0] = 0; + for (const auto &[_m, _p, need_strength, gain] : vertex | views::filter([](auto &&i) { return i.potion_mask == 0; })) + if (need_strength <= dp[0]) + dp[0] = min(dp[0] + gain, max_strength + 1); + else + break; + + for (const auto drunk_potions : views::iota(0U, 1U << K)) { + const auto prev_strength{dp[drunk_potions]}; + // medicine that can be taken + const auto reachable_potion{[prev_strength, &vertex, &potion](auto i) { + return vertex[potion[i].index].need_strength <= prev_strength; + }}; + // medicine that are not taken yet + const auto remaining_potion{[drunk_potions](auto i) { return !(1 & (drunk_potions >> i)); }}; + for (const auto next_potion : views::iota(0U, K) | views::filter(reachable_potion) | views::filter(remaining_potion)) { + auto now_strength{min(prev_strength * potion[next_potion].multiply, max_strength + 1)}; + const auto next_potions{drunk_potions | (1U << next_potion)}; + // vertex reachable without taking medicine + const auto reachable_vertex{[next_potions](auto &&v) { return !(v.potion_mask & ~next_potions); }}; + // vertex not erased yet + const auto remaining_vertex{[drunk_potions, prev_strength](auto &&v) { + return (v.potion_mask & ~drunk_potions) || prev_strength < v.need_strength; + }}; + for (const auto &[_m, _p, need_strength, gain] : vertex | views::filter(reachable_vertex) | views::filter(remaining_vertex)) + if (need_strength <= now_strength) + now_strength = min(now_strength + gain, max_strength + 1); + else + break; + dp[next_potions] = max(dp[next_potions], now_strength); + } + } + + cout << (dp.back() < vertex.back().need_strength ? "No" : "Yes") << endl; + + return 0; +} diff --git a/problems/DP-02/Atcoder/abc319_f/statement.md b/problems/DP-02/Atcoder/abc319_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..6c7beccba1f32f2b4ed61545bc18fbeb0b1e3731 --- /dev/null +++ b/problems/DP-02/Atcoder/abc319_f/statement.md @@ -0,0 +1,134 @@ +# F - Fighter Takahashi + +**Score**: 550 points + +### Problem Statement +There is a tree with \(N\) vertices. The \(1\)-st vertex is the root, and the parent of the \(i\)-th vertex \((2\leq i\leq N)\) is \(p _ i\ (1\leq p _ i\lt i)\). + +Each non-root vertex has an **enemy** or a **medicine** on it. Takahashi wants to defeat all the enemies. Initially, his strength is \(1\), and he is at vertex \(1\). For \(i=2,\ldots,N\), the information of the \(i\)-th vertex is represented by a triple of integers \((t _ i,s _ i,g _ i)\) as follows. + +- If \(t _ i=1\), there is an enemy at the \(i\)-th vertex. When Takahashi visits this vertex for the first time, if his strength is less than \(s _ i\), Takahashi is defeated by the enemy and **loses**, after which he cannot move to other vertices. Otherwise, he defeats the enemy, and his strength increases by \(g _ i\). +- If \(t _ i=2\), there is a medicine at the \(i\)-th vertex. When Takahashi visits this vertex for the first time, he takes the medicine, and his strength is multiplied by \(g _ i\). (For a vertex with a medicine, \(s _ i=0\).) + +There are at most \(10\) vertices with a medicine. Takahashi can repeatedly move to an adjacent vertex. Determine if he can defeat all the enemies. + +### Constraints +- \(2\leq N\leq 500\) +- \(1\leq p _ i\lt i\ (2\leq i\leq N)\) +- \(t _ i\in\{1,2\}\ (2\leq i\leq N)\) +- \(t _ i=1\implies1\leq s _ i\leq 10 ^ 9\ (2\leq i\leq N)\) +- \(t _ i=2\implies s _ i=0\ (2\leq i\leq N)\) +- \(1\leq g _ i\leq 10 ^ 9\ (2\leq i\leq N)\) +- There are at most \(10\) vertices with \(t _ i=2\). +- All input values are integers. + +--- + +### Input +The input is given from Standard Input in the following format: +``` +N +p _ 2 t _ 2 s _ 2 g _ 2 +p _ 3 t _ 3 s _ 3 g _ 3 +... +p _ N t _ N s _ N g _ N +``` + +### Output +Print the answer (`Yes` or `No`) in one line. + +--- + +### Sample Input 1 +``` +8 +1 2 0 3 +2 1 3 3 +1 2 0 4 +4 1 2 2 +1 2 0 5 +6 1 5 5 +5 1 140 1 +``` + +### Sample Output 1 +``` +Yes +``` + +Initially, the tree looks like this: +![Tree Example 1](https://img.atcoder.jp/abc319/df876b93cd1181b6e7269d978c19632b.png) + +Takahashi can defeat all the enemies by moving from vertex \(1\) to \(2,3,2,1,6,7,6,1,4,5,8\) in this order. Here, his position and strength change as shown in the following figure (movements to vertices that have already been visited are omitted). +![Movement Example 1](https://img.atcoder.jp/abc319/de96b59f8e4b180017fbd1aba73f4fb3.png) + +On the other hand, if he moves from vertex \(1\) to \(4,5,8\) in this order, for example, his strength when visiting vertex \(8\) will be less than \(s _ 8=140\), so he will lose without defeating all the enemies. + +--- + +### Sample Input 2 +``` +12 +1 1 166 619 +1 1 17 592 +2 1 222 983 +2 1 729 338 +5 1 747 62 +3 1 452 815 +3 2 0 1 +4 2 0 40 +4 1 306 520 +6 1 317 591 +1 1 507 946 +``` + +### Sample Output 2 +``` +No +``` + +--- + +### Sample Input 3 +``` +12 +1 1 1 791 +2 2 0 410 +2 1 724 790 +2 1 828 599 +5 2 0 13 +3 1 550 803 +1 1 802 506 +5 1 261 587 +6 1 663 329 +8 1 11 955 +9 1 148 917 +``` + +### Sample Output 3 +``` +Yes +``` + +--- + +### Sample Input 4 +``` +12 +1 2 0 1000000000 +2 2 0 1000000000 +3 2 0 1000000000 +4 2 0 1000000000 +5 2 0 1000000000 +6 2 0 1000000000 +7 2 0 1000000000 +8 2 0 1000000000 +9 2 0 1000000000 +10 2 0 1000000000 +11 1 1 1 +``` + +### Sample Output 4 +``` +Yes +``` diff --git a/problems/DP-02/Atcoder/abc321_f/editorial.md b/problems/DP-02/Atcoder/abc321_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..db41bc3acad77126d63b58aa7e0c2236f4383ea1 --- /dev/null +++ b/problems/DP-02/Atcoder/abc321_f/editorial.md @@ -0,0 +1,19 @@ +# F - #(subset sum = K) with Add and Erase (editorial) + +Source: https://atcoder.jp/contests/abc321/editorial/7281 by en_translator + +If this problem only has operations of type \(1\) (addition), one can perform a DP (Dynamic Programming) where \(dp\) [ partial sum ] \(=\) { count }. We will try to extend this method to support deletion too. + +On addition, the transition of the DP is as follows: + +- for each \(i=K,K-1,\dots,x+1,x\) in this order, + + - add \(dp[i-x]\) to \(dp[i]\). + +Its inverse operation is the correct transition of DP on removal: + +- for each \(i=x,x+1,\dots,K-1,K\) in this order, + + - subtract \(dp[i-x]\) from \(dp[i-x]\). + +Note that one has to store \(dp\) only for the indices \(0,1,\dots,K\). (The value \(dp[K+1]\) and later does not affect to \(dp[K]\) and prior.) diff --git a/problems/DP-02/Atcoder/abc321_f/judge.json b/problems/DP-02/Atcoder/abc321_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..f5ce1b320caf4f5f42e7e96b906247908c2769d4 --- /dev/null +++ b/problems/DP-02/Atcoder/abc321_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 72, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc321_f/meta.json b/problems/DP-02/Atcoder/abc321_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..77d971d25f5c811be2164b9502969c6bc89daddb --- /dev/null +++ b/problems/DP-02/Atcoder/abc321_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc321_f", + "contest": "abc321", + "type": "ABC", + "letter": "F", + "title": "#(subset sum = K) with Add and Erase", + "url": "https://atcoder.jp/contests/abc321/tasks/abc321_f", + "difficulty": 1645, + "score": 525, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 72, + "editorial_url": "https://atcoder.jp/contests/abc321/editorial/7281", + "code_source": "editorial", + "pid": "A2504" +} diff --git a/problems/DP-02/Atcoder/abc321_f/solution.cpp b/problems/DP-02/Atcoder/abc321_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3f0386ba7c7f5ef79c78f2a83017a27e0558b89b --- /dev/null +++ b/problems/DP-02/Atcoder/abc321_f/solution.cpp @@ -0,0 +1,36 @@ +// abc321_f: F - #(subset sum = K) with Add and Erase +// Code from the official editorial, https://atcoder.jp/contests/abc321/editorial/7281 (by en_translator) +// Judged AC on all 72 tests, max 0.06 s of the 2 s limit. + +#include +#define mod 998244353 + +using namespace std; + +int dp[5005]={0}; + +int main(){ + int q,k; + cin >> q >> k; + dp[0]=1; + while(q>0){ + q--; + string s; + int x; + cin >> s >> x; + if(s=="+"){ + for(int i=k;i>=x;i--){ + dp[i]+=dp[i-x]; + dp[i]%=mod; + } + } + else{ + for(int i=x;i<=k;i++){ + dp[i]+=(mod-dp[i-x]); + dp[i]%=mod; + } + } + cout << dp[k] << "\n"; + } + return 0; +} diff --git a/problems/DP-02/Atcoder/abc321_f/statement.md b/problems/DP-02/Atcoder/abc321_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..c8985f4c10b8bb8ecdb8010d8816e8a9ca590112 --- /dev/null +++ b/problems/DP-02/Atcoder/abc321_f/statement.md @@ -0,0 +1,90 @@ +# F - #(subset sum = K) with Add and Erase + +**Score:** 525 points + +## Problem Statement +We have a box, which is initially empty. +Let us perform a total of `Q` operations of the following two types in the order they are given in the input. + +``` ++ x +``` +Type `1`: Put into the box a ball with the integer `x` written on it. + +``` +- x +``` +Type `2`: Remove from the box a ball with the integer `x` written on it. +**It is guaranteed that the box contains a ball with the integer `x` written on it before the operation.** + +For the box after each operation, solve the following problem. +> Find the number, modulo `998244353`, to pick up some number of balls from the box so that the integers written on them sum to `K`. +All balls in the box are distinguishable. + +## Constraints +- All input values are integers. +- `1 ≤ Q ≤ 5000` +- `1 ≤ K ≤ 5000` +- For each type-`1` operation, `1 ≤ x ≤ 5000`. +- All the operations satisfy the condition in the problem statement. + +## Input +The input is given from Standard Input in the following format, where `Query_i` represents the `i`-th operation: +``` +Q K +Query_1 +Query_2 +... +Query_Q +``` + +## Output +Print `Q` lines. +The `i`-th line should contain the answer when the first `i` operations have been done. + +## Sample Input 1 +``` +15 10 ++ 5 ++ 2 ++ 3 +- 2 ++ 5 ++ 10 +- 3 ++ 1 ++ 3 ++ 3 +- 5 ++ 1 ++ 7 ++ 4 +- 3 +``` + +## Sample Output 1 +``` +0 +0 +1 +0 +1 +2 +2 +2 +2 +2 +1 +3 +5 +8 +5 +``` +This input contains `15` operations. +After the last operation, the box contains the balls `(5,10,1,3,1,7,4)`. +There are five ways to pick up balls for a sum of `10`: +- `5+1+3+1` (the `1`-st, `3`-rd, `4`-th, `5`-th balls) +- `5+1+4` (the `1`-st, `3`-rd, `7`-th balls) +- `5+1+4` (the `1`-st, `5`-th, `7`-th balls) +- `10` (the `2`-nd ball) +- `3+7` (the `4`-th, `6`-th balls) diff --git a/problems/DP-02/Atcoder/abc321_g/editorial.md b/problems/DP-02/Atcoder/abc321_g/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..84b22144592b8c22a79d92323f71845faf0942e7 --- /dev/null +++ b/problems/DP-02/Atcoder/abc321_g/editorial.md @@ -0,0 +1,25 @@ +# G - Electric Circuit (editorial) + +Source: https://atcoder.jp/contests/abc321/editorial/7277 by en_translator + +By linearity of expected value, it is sufficient to find for each \(S \subseteq \lbrace 1,2,\dots,N \rbrace\ (S \neq \emptyset)\) the probability that \(S\) forms a connected component. Here, let us define \(f(S)\) and \(g(S)\) as follows: + +- \(f(S) = g(S) = 0\) if \(S\) contains different numbers of red and blue endpoints +- Otherwise, let \(m\) be the number of red endpoints in \(S\) and + + - \(f(S)=\) (the number of ways to connect cables, only considering the endpoints in \(S\))\(= m!\) + - \(g(S)=\) (the number of ways to connect cables, only considering the endpoints in \(S\), so that entire \(S\) becomes connected). + +Once we obtain \(g(S)\), it is easy to find the probability that \(S\) forms a connected component. However, it is hard to directly find \(g(S)\) itself; instead, we try to exploit a relation between \(f(S)\) and \(g(S)\) to find \(g(S)\) based on \(f(S)\). Actually, considering partitions into connected components of \(S\) resulting from connecting \(m\) cables, we obtain + +\[\displaystyle f(S) = \sum_{\lbrace s_1, s_2,\dots, s_k \rbrace} \prod_{i=1}^{k} g(s_i),\] + +where the family of sets \(\lbrace s_1, s_2,\dots, s_k \rbrace\) is a [partition](https://en.wikipedia.org/wiki/Partition_of_a_set) of \(S\). Transposing the term with \(k=1\) (where entire \(S\) solely forms a partition), we have + +\[\displaystyle g(S) =f(S) - \sum_{\substack{\lbrace s_1, s_2,\dots, s_k \rbrace\\k>1}} \prod_{i=1}^{k} g(s_i).\] + +For an arbitrary fixed element \(a\) in \(S\), we can further deform it into + +\[\displaystyle g(S) =f(S) - \sum_{\substack{\lbrace s_1, s_2,\dots, s_k \rbrace\\k>1}} \prod_{i=1}^{k} g(s_i).\] + +With this equation, one can find \(g(S)\) with an \(O(3^N)\) bit DP (Dynamic Programming) to solve this problem. One can make use of a logarithm of subset convolution to make it even faster. diff --git a/problems/DP-02/Atcoder/abc321_g/judge.json b/problems/DP-02/Atcoder/abc321_g/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..b2c8fad50a7e4ae94a2332545fd1a00c8a6b5a10 --- /dev/null +++ b/problems/DP-02/Atcoder/abc321_g/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 3.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 35, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc321_g/meta.json b/problems/DP-02/Atcoder/abc321_g/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..91d777c842ce247e59d80c8d78bf03282f63c694 --- /dev/null +++ b/problems/DP-02/Atcoder/abc321_g/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc321_g", + "contest": "abc321", + "type": "ABC", + "letter": "G", + "title": "Electric Circuit", + "url": "https://atcoder.jp/contests/abc321/tasks/abc321_g", + "difficulty": 2439, + "score": 600, + "time_limit_sec": 3.0, + "memory_limit_mb": 1024, + "n_tests": 35, + "editorial_url": "https://atcoder.jp/contests/abc321/editorial/7277", + "code_source": "editorial", + "pid": "A2505" +} diff --git a/problems/DP-02/Atcoder/abc321_g/solution.cpp b/problems/DP-02/Atcoder/abc321_g/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6c1df4508168ea092428217664e28de497cfed76 --- /dev/null +++ b/problems/DP-02/Atcoder/abc321_g/solution.cpp @@ -0,0 +1,45 @@ +// abc321_g: G - Electric Circuit +// Code from the official editorial, https://atcoder.jp/contests/abc321/editorial/7277 (by en_translator) +// Judged AC on all 35 tests, max 0.38 s of the 3 s limit. + +#include +#include + +using namespace std; +using namespace atcoder; + +using mint = modint998244353; + +int main() { + int n, m; + cin >> n >> m; + vector r_cnt(1 << n), b_cnt(1 << n); + for (int t = 0; t < 2; t++) { + vector v(n); + for (int i = 0; i < m; i++) { + int r; + cin >> r; + v[--r]++; + } + for (int i = 0; i < (1 << n); i++) { + for (int j = 0; j < n; j++) { + if (i >> j & 1) r_cnt[i] += v[j]; + } + } + swap(r_cnt, b_cnt); + } + vector fact(m + 1, 1); + for (int i = 1; i <= m; i++) fact[i] = fact[i - 1] * i; + vector f(1 << n), g(1 << n); + mint ans; + for (int bit = 1; bit < (1 << n); bit++) { + if (r_cnt[bit] != b_cnt[bit]) continue; + f[bit] = g[bit] = fact[r_cnt[bit]]; + for (int sub = (bit - 1) & bit; sub > (bit - sub); sub = (sub - 1) & bit) { + g[bit] -= g[sub] * f[bit - sub]; + } + ans += g[bit] * fact[m - r_cnt[bit]]; + } + for (int i = 1; i <= m; i++) ans /= i; + cout << ans.val() << endl; +} diff --git a/problems/DP-02/Atcoder/abc321_g/statement.md b/problems/DP-02/Atcoder/abc321_g/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..9be78f5e55652060458a279f1ca231e2cb24026f --- /dev/null +++ b/problems/DP-02/Atcoder/abc321_g/statement.md @@ -0,0 +1,81 @@ +## G - Electric Circuit + +**Score:** 600 points + +### Problem Statement + +You are creating an electrical circuit using \(N\) parts numbered \(1\) to \(N\) and \(M\) cables. +These parts have a total of \(M\) red terminals and \(M\) blue terminals, with the \(i\)-th red terminal attached to part \(R_i\) and the \(i\)-th blue terminal attached to part \(B_i\). +Each cable connects one red terminal and one blue terminal. +In particular, it is allowed to connect two terminals attached to the same part. +You cannot connect two or more cables to a terminal. +Therefore, there are \(M!\) ways in total to connect the \(M\) cables (the cables are not distinguished from each other). + +Let \(s\) be the number of connected components when seeing this circuit as a graph with parts as vertices and cables as edges. +Find the expected value, modulo \(998244353\), of \(s\) when randomly choosing the way to connect the \(M\) cables out of the \(M!\) ways. + +
+What does it mean to find an expected value modulo \(998244353\)? +It can be proved that the sought expected value is always a rational number. +Also, under the constraints of this problem, it can be proved that when this value is expressed as \(\frac{P}{Q}\) using two coprime integers \(P\) and \(Q\), there is exactly one integer \(R\) that satisfies \(R \times Q \equiv P\pmod{998244353}\) and \(0 \leq R < 998244353\). +Find this \(R\). +
+ +### Constraints +- \(1 \leq N \leq 17\) +- \(1 \leq M \leq 10^5\) +- \(1 \leq R_i, B_i \leq N\) +- All input values are integers. + +### Input +The input is given from Standard Input in the following format: +``` +N M +R_1 R_2 ... R_M +B_1 B_2 ... B_M +``` + +### Output +Print the expected value of \(s\), modulo \(998244353\). + +### Sample Input 1 +``` +3 2 +1 2 +3 2 +``` + +### Sample Output 1 +``` +499122178 +``` +Let \((i, j)\) denote the action of connecting the \(i\)-th red terminal and the \(j\)-th blue terminal with a cable. +- For \((1,1), (2,2)\): There will be two connected components, \(\{ 1,3 \}\) and \(\{ 2 \}\), so \(s=2\). +- For \((1,2), (2,1)\): The whole graph constitutes one connected component, so \(s=1\). + +Thus, the expected value of \(s\) is \(\frac{3}{2} \equiv 499122178 \pmod{998244353}\). + +### Sample Input 2 +``` +17 5 +1 1 1 1 1 +1 1 1 1 1 +``` + +### Sample Output 2 +``` +17 +``` +\(s=N\) no matter how you connect the cables. + +### Sample Input 3 +``` +8 10 +2 4 7 1 7 6 1 4 8 1 +5 1 5 2 5 8 4 6 1 3 +``` + +### Sample Output 3 +``` +608849831 +``` diff --git a/problems/DP-02/Atcoder/abc325_f/editorial.md b/problems/DP-02/Atcoder/abc325_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..9a075c22d5fa2c950f918dead0400c8729ae85dd --- /dev/null +++ b/problems/DP-02/Atcoder/abc325_f/editorial.md @@ -0,0 +1,13 @@ +# F - Sensor Optimization Dilemma (editorial) + +Source: https://atcoder.jp/contests/abc325/editorial/7483 by en_translator + +Consider solving the problem using DP (Dynamic Programming). One of the easiest ones to come up with may be one that maintains “how many sensor \(1\) was used?” and “how many sensor \(2\) was used?” as keys, but this does not finish in the execution time limit. Instead, when the number of sensor \(1\) used so far is fixed, we only have to consider the minimum use of sensor \(2\), so we can naturally derive the following DP: + +\[dp[i][j] = (\text{the minimum number of sensor }2\text{ required to cover the first }i\text{ segments, when sensor }1\text{ is used }j\text{ times}).\] + +The transition can be derived by considering how many sensor \(1\) should be used to cover the \(i\)-th segment: + +\[dp[i][j] = \max_{0 \leq k \leq j} \bigg(dp[i-1][j-k] + \Big\lceil \frac{\max(D_i-kL_1,0)}{L_2} \Big\rceil \bigg).\] + +Since there are \(O(NK_1)\) states, and a transition costs \(O(K_1)\), so the overall complexity is \(O(NK_1^2)\), which is fast enough. diff --git a/problems/DP-02/Atcoder/abc325_f/judge.json b/problems/DP-02/Atcoder/abc325_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..bab24453491e0a0de444a28bdbb17c5b6a182992 --- /dev/null +++ b/problems/DP-02/Atcoder/abc325_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 60, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc325_f/meta.json b/problems/DP-02/Atcoder/abc325_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..b004e4881881eb6b8e627c4aec0b05d02f50e818 --- /dev/null +++ b/problems/DP-02/Atcoder/abc325_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc325_f", + "contest": "abc325", + "type": "ABC", + "letter": "F", + "title": "Sensor Optimization Dilemma", + "url": "https://atcoder.jp/contests/abc325/tasks/abc325_f", + "difficulty": 1769, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 60, + "editorial_url": "https://atcoder.jp/contests/abc325/editorial/7483", + "code_source": "editorial", + "pid": "A2532" +} diff --git a/problems/DP-02/Atcoder/abc325_f/solution.cpp b/problems/DP-02/Atcoder/abc325_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..13669a82f787da5354e46737e72e1d26dad12d06 --- /dev/null +++ b/problems/DP-02/Atcoder/abc325_f/solution.cpp @@ -0,0 +1,38 @@ +// abc325_f: F - Sensor Optimization Dilemma +// Code from the official editorial, https://atcoder.jp/contests/abc325/editorial/7483 (by en_translator) +// Judged AC on all 60 tests, max 0.09 s of the 2 s limit. + +#include + +using namespace std; + +using ll = long long; + +int main() { + int n; + cin >> n; + vector d(n); + for (int &i: d) cin >> i; + vector l(2), c(2), k(2); + for (int i = 0; i < 2; i++) { + cin >> l[i] >> c[i] >> k[i]; + } + vector dp(n + 1, vector(k[0] + 1, 1e9)); + dp[0][0] = 0; + for (int i = 0; i < n; i++) { + for (int j = 0; j <= k[0]; j++) { + int rem = d[i]; + for (int nj = j; nj <= k[0]; nj++) { + dp[i + 1][nj] = min(dp[i + 1][nj], dp[i][j] + (rem + l[1] - 1) / l[1]); + rem = max(rem - l[0], 0); + } + } + } + ll ans = 2e18; + for (int i = 0; i <= k[0]; i++) { + if (dp[n][i] > k[1]) continue; + ans = min(ans, (ll) c[0] * i + (ll) c[1] * dp[n][i]); + } + if (ans > 1e18) ans = -1; + cout << ans << endl; +} diff --git a/problems/DP-02/Atcoder/abc325_f/statement.md b/problems/DP-02/Atcoder/abc325_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..95d46be38b61b729cbad18907e5a5f1ec8d6e659 --- /dev/null +++ b/problems/DP-02/Atcoder/abc325_f/statement.md @@ -0,0 +1,78 @@ +# F - Sensor Optimization Dilemma + +## Score : 500 points + +### Problem Statement +As the factory manager of Keyence, you want to monitor several sections on a conveyor belt. There are a total of \(N\) sections you want to monitor, and the length of the \(i\)-th section is \(D_i\) meters. + +There are two types of sensors to choose from, and below is some information about each sensor. +- Type-\(j\) sensor \((1\leq j \leq 2)\): Can monitor a section of length \(L_j\) meters. The price is \(C_j\) per sensor, and you can use at most \(K_j\) sensors of this type in total. + +You can divide one section into several sections for monitoring. It is fine if the sections monitored by the sensors overlap, or if they monitor more than the length of the section you want to monitor. For example, when \(L_1=4\) and \(L_2=2\), you can use one type-\(1\) sensor to monitor a section of length \(3\) meters, or use one type-\(1\) and one type-\(2\) sensor to monitor a section of length \(5\) meters. + +Determine whether it is possible to monitor all \(N\) sections, and if it is possible, find the minimum total cost of the necessary sensors. + +### Constraints +- \(1\leq N \leq 100\) +- \(1\leq D_i,L_j \leq 10^5\) +- \(1\leq C_j \leq 10^9\) +- \(1\leq K_j \leq 10^3\) +- All input values are integers. + +### Input +The input is given from Standard Input in the following format: +``` +N +D_1 D_2 ... D_N +L_1 C_1 K_1 +L_2 C_2 K_2 +``` + +### Output +If it is impossible to monitor all \(N\) sections, print \(-1\). Otherwise, print the minimum total cost of the necessary sensors. + +### Sample Input 1 +``` +3 +3 5 10 +4 3 3 +2 2 6 +``` + +### Sample Output 1 +``` +17 +``` +You can monitor all sections by using three type-\(1\) sensors and four type-\(2\) sensors as follows. +- Use one type-\(1\) sensor to monitor the first section. +- Use one type-\(1\) and one type-\(2\) sensor to monitor the second section. +- Use one type-\(1\) and three type-\(2\) sensors to monitor the third section. + +In this case, the total cost of the necessary sensors is \(3 \times 3 + 2 \times 4 = 17\), which is the minimum. + +### Sample Input 2 +``` +3 +3 5 10 +4 3 3 +2 2 3 +``` + +### Sample Output 2 +``` +-1 +``` + +### Sample Input 3 +``` +2 +4 8 +3 1 100 +4 10000 100 +``` + +### Sample Output 3 +``` +5 +``` +It is fine if one type of sensor is not used at all. diff --git a/problems/DP-02/Atcoder/abc328_g/editorial.md b/problems/DP-02/Atcoder/abc328_g/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..7adae89dee611e293997e394f08ec883575f5411 --- /dev/null +++ b/problems/DP-02/Atcoder/abc328_g/editorial.md @@ -0,0 +1,21 @@ +# G - Cut and Reorder (editorial) + +Source: https://atcoder.jp/contests/abc328/editorial/7667 by en_translator + +It is unnecessary to perform the former operation multiple times; one can assume that the former is performed only once in the beginning, then the latter. + +If we consider the process of determining the sequence \((A _ {p _ 1},A _ {p _ 2},\ldots,A _ {p _ N})\) resulting from the former operation from its initial element, we come up with the following DP (Dynamic Programming): + +- \(\operatorname{dp}[S]\coloneqq\) the minimum cost required to determine the first \(|S|\) terms so that \(S=\lbrace p _ 1,p _ 2,\ldots,p _ {|S|}\rbrace\). + +Here, the “cost” above is defined as the minimum cost that conforming initial \(|S|\) terms contribute; formally: + +\[\min _ {\substack{p\text{ is a permutation of }(1,2,\ldots,N)\\\lbrace p _ 1,p _ 2,\ldots,p _ {|S|}\rbrace=S}}\left(C\times\#\lbrace i|1\leq i\lt|S|,p _ i+1\neq p _ {i+1}\rbrace+\sum _ {i=1} ^ {|S|}\left|A _ {p _ i}-B _ i\right|\right).\] + +We consider transitions that correspond to a block formed by the former operation. + +For each \(S\subset\lbrace1,2,\ldots,N\rbrace\), we perform a transition \(S\rightarrow S\cup\lbrace l,l+1,\ldots,r\rbrace\) for every pair \((l,r)\) such that \(S\cap\lbrack l,r\rbrack=\emptyset\ (1\leq l\leq r\leq N)\). + +For each length-\(k\) segment, there are only \(2 ^ {N-k}\) sets \(S\) against which the segment applies a transition; therefore, the total number of transitions is \(\displaystyle\sum _ {k=1} ^ N2 ^ {N-k}(N+1-k)=2 ^ N(N-3)+2=O(2 ^ NN)\). + +(Under the assumption that the word size \(w\) satisfies \(N\leq w\),) one can represent a subset of \(\lbrace1,2,\ldots,N\rbrace\) by a single-word integer, so that the overall complexity is \(O(2 ^ NN)\). diff --git a/problems/DP-02/Atcoder/abc328_g/judge.json b/problems/DP-02/Atcoder/abc328_g/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..1bc888e1ec15abeb1f3d3b5c46a023b8fc498e30 --- /dev/null +++ b/problems/DP-02/Atcoder/abc328_g/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.8, + "time_limit_source": "task page", + "memory_mb": 512, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 43, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc328_g/meta.json b/problems/DP-02/Atcoder/abc328_g/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..a40d4f5e021b1e07a773a0a78a7d78c8802b0999 --- /dev/null +++ b/problems/DP-02/Atcoder/abc328_g/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc328_g", + "contest": "abc328", + "type": "ABC", + "letter": "G", + "title": "Cut and Reorder", + "url": "https://atcoder.jp/contests/abc328/tasks/abc328_g", + "difficulty": 2193, + "score": 575, + "time_limit_sec": 2.8, + "memory_limit_mb": 512, + "n_tests": 43, + "editorial_url": "https://atcoder.jp/contests/abc328/editorial/7667", + "code_source": "editorial", + "pid": "A2554" +} diff --git a/problems/DP-02/Atcoder/abc328_g/solution.cpp b/problems/DP-02/Atcoder/abc328_g/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ca9d1fc74d74f720c1e7525930af2ac1f547bc97 --- /dev/null +++ b/problems/DP-02/Atcoder/abc328_g/solution.cpp @@ -0,0 +1,41 @@ +// abc328_g: G - Cut and Reorder +// Code from the official editorial, https://atcoder.jp/contests/abc328/editorial/7667 (by en_translator) +// Judged AC on all 43 tests, max 0.42 s of the 2.8 s limit. + +#include +#include +#include +#include + +int main() { + using namespace std; + + unsigned N; + unsigned long C; + cin >> N >> C; + vector A(N), B(N); + for (auto &&a : A) + cin >> a; + for (auto &&b : B) + cin >> b; + + vector dp(1U << N, numeric_limits::max() / 2); + dp[0] = -C; // はじめの 1 ブロックは分割のコストがかからないので -C しておく + + const auto chmin{[](auto &&x, const auto &y) { + if (x > y)x = y; + return x; + }}; + + for (unsigned long S{}; S < 1U << N; ++S) + for (unsigned long B_front(popcount(S)), l{}; l < N; ++l) + for (unsigned long cost{C}, r{l}, i{B_front}; r < N; ++r, ++i) { + if ((S >> r) & 1) // 区間が重なったら終了 + break; + cost += max(A[r], B[i]) - min(A[r], B[i]); // 区間のコストに |A[p[i]] - B[i]| を加える + chmin(dp[S | (1UL << r + 1) - (1UL << l)], dp[S] + cost); // コストを更新 + } + + cout << dp.back() << endl; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc328_g/statement.md b/problems/DP-02/Atcoder/abc328_g/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..0e24c70ee425ebee83829ace127b7707503dbab0 --- /dev/null +++ b/problems/DP-02/Atcoder/abc328_g/statement.md @@ -0,0 +1,94 @@ +# G - Cut and Reorder + +**Score**: 575 points + +## Problem Statement + +You are given two sequences of length \( N \): \( A=(A_1,A_2,\ldots,A_N) \) and \( B=(B_1,B_2,\ldots,B_N) \). + +You can perform the following two types of operations on the sequence \( A \) any number of times in any order. +- Split \( A \) at any positions and freely rearrange the split sequences. Each split position incurs a cost of \( C \). More formally, at a cost of \( (X-1)C \), take a sequence of length \( X+1 \), \( (i_0,i_1,i_2,\ldots,i_X) \ (0=i_0 + +using namespace std; + +const int inf = 1 << 30; + +void chmin(int &a, int b) { a = min(a, b); } + +int main() { + int n, m; + cin >> n >> m; + vector d(n, vector(n, inf)); + for (int i = 0; i < n; i++) d[i][i] = 0; + for (int i = 0; i < m; i++) { + int u, v, w; + cin >> u >> v >> w; + --u, --v; + d[u][v] = w; + } + for (int k = 0; k < n; k++) { + for (int i = 0; i < n; i++) { + for (int j = 0; j < n; j++) { + if (d[i][k] == inf or d[k][j] == inf) continue; + chmin(d[i][j], d[i][k] + d[k][j]); + } + } + } + vector dp(1 << n, vector(n, inf)); + for (int i = 0; i < n; i++) dp[1 << i][i] = 0; + for (int bit = 1; bit < (1 << n) - 1; bit++) { + for (int i = 0; i < n; i++) { + if (~bit >> i & 1) continue; + if (dp[bit][i] == inf) continue; + for (int j = 0; j < n; j++) { + if (bit >> j & 1) continue; + if (d[i][j] == inf) continue; + chmin(dp[bit | 1 << j][j], dp[bit][i] + d[i][j]); + } + } + } + int ans = inf; + for (int i = 0; i < n; i++) { + chmin(ans, dp[(1 << n) - 1][i]); + } + if (ans == inf) cout << "No" << endl; + else cout << ans << endl; +} diff --git a/problems/DP-02/Atcoder/abc338_f/statement.md b/problems/DP-02/Atcoder/abc338_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..8edc44547b2bf50e954103cb6f4fb758e3c0c567 --- /dev/null +++ b/problems/DP-02/Atcoder/abc338_f/statement.md @@ -0,0 +1,82 @@ +# F - Negative Traveling Salesman + +**Score: 500 points** + +## Problem Statement +There is a weighted simple directed graph with \(N\) vertices and \(M\) edges. The vertices are numbered \(1\) to \(N\), and the \(i\)-th edge has a weight of \(W_i\) and extends from vertex \(U_i\) to vertex \(V_i\). The weights can be negative, but the graph does not contain negative cycles. + +Determine whether there is a walk that visits each vertex at least once. If such a walk exists, find the minimum total weight of the edges traversed. If the same edge is traversed multiple times, the weight of that edge is added for each traversal. + +Here, "a walk that visits each vertex at least once" is a sequence of vertices \(v_1,v_2,\dots,v_k\) that satisfies both of the following conditions: +- For every \(i\) \((1\leq i\leq k-1)\), there is an edge extending from vertex \(v_i\) to vertex \(v_{i+1}\). +- For every \(j\) \((1\leq j\leq N)\), there is \(i\) \((1\leq i\leq k)\) such that \(v_i=j\). + +## Constraints +- \(2\leq N \leq 20\) +- \(1\leq M \leq N(N-1)\) +- \(1\leq U_i,V_i \leq N\) +- \(U_i \neq V_i\) +- \((U_i,V_i) \neq (U_j,V_j)\) for \(i\neq j\) +- \(-10^6\leq W_i \leq 10^6\) +- The given graph does not contain negative cycles. +- All input values are integers. + +## Input +The input is given from Standard Input in the following format: +``` +N M +U_1 V_1 W_1 +U_2 V_2 W_2 +... +U_M V_M W_M +``` + +## Output +If there is a walk that visits each vertex at least once, print the minimum total weight of the edges traversed. Otherwise, print `No`. + +## Sample Input 1 +``` +3 4 +1 2 5 +2 1 -3 +2 3 -4 +3 1 100 +``` + +## Sample Output 1 +``` +-2 +``` +By following the vertices in the order \(2\rightarrow 1\rightarrow 2\rightarrow 3\), you can visit all vertices at least once, and the total weight of the edges traversed is \((-3)+5+(-4)=-2\). This is the minimum. + +## Sample Input 2 +``` +3 2 +1 2 0 +2 1 0 +``` + +## Sample Output 2 +``` +No +``` +There is no walk that visits all vertices at least once. + +## Sample Input 3 +``` +5 9 +1 2 -246288 +4 5 -222742 +3 1 246288 +3 4 947824 +5 2 -178721 +4 3 -947824 +5 4 756570 +2 5 707902 +5 1 36781 +``` + +## Sample Output 3 +``` +-449429 +``` diff --git a/problems/DP-02/Atcoder/abc343_g/editorial.md b/problems/DP-02/Atcoder/abc343_g/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..587697785eb35ed7709e59f1c8cc23d43dbb09af --- /dev/null +++ b/problems/DP-02/Atcoder/abc343_g/editorial.md @@ -0,0 +1,26 @@ +# G - Compress Strings (editorial) + +Source: https://atcoder.jp/contests/abc343/editorial/9447 by en_translator + +First, if there exist \(i\) and \(j\) such that \(S_i\) is a substring of \(S_j\), then the condition that “\(S_i\) is contained as a substring” is completely implied by the condition that “\(S_j\) is contained as a substring,” so one can ignore \(S_i\). From now on, we assume there are no such \(i\) and \(j\). + +For two strings \(X\) and \(Y\), we define \(f(X, Y)\) as the maximum \(k\) such that the last \(k\) characters of \(X\) coincide with the first \(k\) characters of \(Y\). + +Consider a string with the minimal length that contains all of \(S_1,S_2,\dots,S_N\) as substrings, and take a pair \((l_i,r_i)\) so that its \(l_i\)-th through \((r_i-1)\)-th characters match \(S_i\), for each \(i\). + +Without loss of generality, we assume \(l_1 \leq l_2\leq \dots \leq l_N\). Then, for all \(i=1,2,\dots,N-1\) it holds that: + +- \(l_i < l_{i+1} \leq r_i\), +- \(r_i-l_{i+1}=f(S_i,S_{i+1})\). + +Otherwise, it contradicts the assumption in the first paragraph or the minimality assumed in the second paragraph. + +Therefore, when finding the minimum length of a string that contains all of \(S_1,S_2,\dots,S_N\) as substrings, we only have to consider the following type of strings: + +- for a permutation \((p_1,p_2,\dots,p_N)\) of \((1,2,\dots,N)\), the string is a concatenation of \(S_{p_1}\), the last \(|S_{p_2}|-f(S_{p_1},S_{p_2})\) characters of \(S_{p_2}\), the last \(|S_{p_3}|-f(S_{p_2},S_{p_3})\) characters of \(S_{p_3}\), \(\dots\), and the last \(|S_{p_N}|-f(S_{p_{N-1}},S_{p_N})\) characters of \(S_{p_N}\). + +Thus, the original problem is reduced to minimizing \(\displaystyle\sum_{i=1}^{N-1} f(S_{p_i},S_{p_{i+1}})\) for a permutation \((p_1,p_2,\dots,p_N)\) of \((1,2,\dots,N)\). + +By precalculating \(f_(S_i,S_j)\) for all pairs \(i,j\) using string algorithms such as Z algorithm, KMP (Knuth–Morris–Pratt) algorithm, or rolling hash, this problem can be solved with bit DP (Dynamic Programming) just as the traveling salesman problem. + +Hence, the problem has been solved in a total of about \(O(N\sum|S_i|+2^NN^2)\). diff --git a/problems/DP-02/Atcoder/abc343_g/judge.json b/problems/DP-02/Atcoder/abc343_g/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..33c1b8bc3be1be6284b53bd94ec2681e4e5ae65b --- /dev/null +++ b/problems/DP-02/Atcoder/abc343_g/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 5.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 39, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc343_g/meta.json b/problems/DP-02/Atcoder/abc343_g/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..f421485e2b365d188240b8434cc3fda5a6f28d95 --- /dev/null +++ b/problems/DP-02/Atcoder/abc343_g/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc343_g", + "contest": "abc343", + "type": "ABC", + "letter": "G", + "title": "Compress Strings", + "url": "https://atcoder.jp/contests/abc343/tasks/abc343_g", + "difficulty": 2114, + "score": 600, + "time_limit_sec": 5.0, + "memory_limit_mb": 1024, + "n_tests": 39, + "editorial_url": "https://atcoder.jp/contests/abc343/editorial/9447", + "code_source": "editorial", + "pid": "A2659" +} diff --git a/problems/DP-02/Atcoder/abc343_g/solution.cpp b/problems/DP-02/Atcoder/abc343_g/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bc92b79654d9fdcdc7b7bbd18a4004c5b2c71a00 --- /dev/null +++ b/problems/DP-02/Atcoder/abc343_g/solution.cpp @@ -0,0 +1,67 @@ +// abc343_g: G - Compress Strings +// Code from the official editorial, https://atcoder.jp/contests/abc343/editorial/9447 (by en_translator) +// Judged AC on all 39 tests, max 0.64 s of the 5 s limit. + +#include +#include + +using namespace std; +using namespace atcoder; + +// Does s contain t as a substring? +bool contains(const string &s, const string &t) { + int n = s.size(), m = t.size(); + vector za = z_algorithm(t + s); + for (int i = m; i <= n; i++) { + if (za[i] >= m) return true; + } + return false; +} + +int main() { + int n; + cin >> n; + vector s(n); + for (int i = 0; i < n; i++) cin >> s[i]; + for (auto it = s.begin(); it < s.end();) { + bool flag = false; + for (auto jt = s.begin(); jt < s.end(); jt++) { + if (jt != it) flag |= contains(*jt, *it); + } + if (flag) it = s.erase(it); + else ++it; + } + n = s.size(); + vector d(n, vector(n)); + for (int i = 0; i < n; i++) { + string now = s[i]; + for (int j = 0; j < n; j++) { + if (j != i) now += s[j]; + } + vector za = z_algorithm(now); + int cur = s[i].size(); + for (int j = 0; j < n; j++) { + if (j == i) continue; + d[j][i] = s[i].size(); + for (int k = 0; k < s[j].size(); k++) { + if (za[cur + k] >= s[j].size() - k) { + d[j][i] = k + s[i].size() - s[j].size(); + break; + } + } + cur += s[j].size(); + } + } + vector dp(1 << n, vector(n, 1 << 30)); + for (int i = 0; i < n; i++) dp[1 << i][i] = s[i].size(); + for (int bit = 1; bit < (1 << n) - 1; bit++) { + for (int i = 0; i < n; i++) { + if (~bit >> i & 1) continue; + for (int j = 0; j < n; j++) { + if (bit >> j & 1) continue; + dp[bit | 1 << j][j] = min(dp[bit | 1 << j][j], dp[bit][i] + d[i][j]); + } + } + } + cout << *min_element(dp.back().begin(), dp.back().end()) << endl; +} diff --git a/problems/DP-02/Atcoder/abc343_g/statement.md b/problems/DP-02/Atcoder/abc343_g/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..f8f5b4273917e8c33da924a2ed73909305b151db --- /dev/null +++ b/problems/DP-02/Atcoder/abc343_g/statement.md @@ -0,0 +1,91 @@ +# G - Compress Strings + +**Score:** 600 points + +--- + +## Problem Statement + +You are given \(N\) strings \(S_1, S_2, \ldots, S_N\). + +Find the minimum length of a string that contains all these strings as substrings. + +Here, a string \(S\) contains a string \(T\) as a substring if \(T\) can be obtained by deleting zero or more characters from the beginning and zero or more characters from the end of \(S\). + +--- + +## Constraints + +- \(N\) is an integer. +- \(1 \leq N \leq 20\) +- \(S_i\) is a string consisting of lowercase English letters whose length is at least 1. +- The total length of \(S_1, S_2, \dots, S_N\) is at most \(2 \times 10^5\). + +--- + +## Input + +The input is given from Standard Input in the following format: + +``` +N +S_1 +S_2 +... +S_N +``` + +--- + +## Output + +Print the answer as an integer. + +--- + +## Sample Input 1 +``` +3 +snuke +kensho +uk +``` + +### Sample Output 1 +``` +9 +``` +The string `snukensho` of length 9 contains all of \(S_1\), \(S_2\), and \(S_3\) as substrings. Specifically, the first to fifth characters of `snukensho` correspond to \(S_1\), the fourth to ninth correspond to \(S_2\), and the third to fourth correspond to \(S_3\). No shorter string contains all of \(S_1\), \(S_2\), and \(S_3\) as substrings. Thus, the answer is 9. + +--- + +## Sample Input 2 +``` +3 +abc +abc +arc +``` + +### Sample Output 2 +``` +6 +``` + +--- + +## Sample Input 3 +``` +6 +cmcmrcc +rmrrrmr +mrccm +mmcr +rmmrmrcc +ccmcrcmcm +``` + +### Sample Output 3 +``` +27 +``` diff --git a/problems/DP-02/Atcoder/abc352_f/editorial.md b/problems/DP-02/Atcoder/abc352_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..4325eec0352b6abc892ef1dbdd0ef5558b74033d --- /dev/null +++ b/problems/DP-02/Atcoder/abc352_f/editorial.md @@ -0,0 +1,19 @@ +# F - Estimate Order (editorial) + +Source: https://atcoder.jp/contests/abc352/editorial/10217 by en_translator + +Consider a \(N\)-vertex \(M\)-edge graph whose \(i\)-th edge connects vertex \(A_i\) and vertex \(B_i\). + +By the constraints, we can take an integer sequence \(D = (D_1, D_2, \ldots, D_N)\) such that \(D_{A_i} - D_{B_i} = C_i\) for each \(i\). This sequence can be obtained by appropriately performing DFS (Depth-First Search) or BFS (Breadth-First Search) on the graph defined above. + +The sequence of person \(i\)’s rank \(X_i\), collectively written as \(X = (X_1, X_2, \ldots, X_N)\), is limited to permutations of \((1,2,\ldots, N)\) such that: + +- \(X_i = D_i + v\), where \(v\) is an arbitrary integer taken for each connected component and \(i\) is any of the vertex in it. + +We try to respond to the query per connected component. + +When finding the answer to the \(i\)-th query, we perform a bit DP (Dynamic Programming) that places connected components not containing vertex \(i\). Specifically, maintain boolean values \(dp_{x,y}\) that represent whether the vertices in the first \(x\) connected components may correspond to the set of ranks \(y\). + +Since there are \(O(N)\) pairs of possible tuples of rank for each connected component, the DP above costs \(O(N^22^N)\) time naively, or \(O(N2^N)\) time if you use the property that the value of \(x\) uniquely determines the popcount of \(y\). + +Therefore, the problem has been solved in a total of \(O(N^22^N)\) time. diff --git a/problems/DP-02/Atcoder/abc352_f/judge.json b/problems/DP-02/Atcoder/abc352_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..d58987fe59e1d8858b2568ec7bd09cd968dc5bcc --- /dev/null +++ b/problems/DP-02/Atcoder/abc352_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 62, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc352_f/meta.json b/problems/DP-02/Atcoder/abc352_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..edfb3637c14197120af4cac7de304372862931c6 --- /dev/null +++ b/problems/DP-02/Atcoder/abc352_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc352_f", + "contest": "abc352", + "type": "ABC", + "letter": "F", + "title": "Estimate Order", + "url": "https://atcoder.jp/contests/abc352/tasks/abc352_f", + "difficulty": 2052, + "score": 525, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 62, + "editorial_url": "https://atcoder.jp/contests/abc352/editorial/10217", + "code_source": "model", + "pid": "A2721" +} diff --git a/problems/DP-02/Atcoder/abc352_f/solution.cpp b/problems/DP-02/Atcoder/abc352_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9fd8e25d534e0e589c61810855ca0a71013a3ae7 --- /dev/null +++ b/problems/DP-02/Atcoder/abc352_f/solution.cpp @@ -0,0 +1,114 @@ +// abc352_f: F - Estimate Order +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc352/editorial/10217 +// Judged AC on all 62 tests, max 0.05 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + vector>> graph(N); + for (int i = 0; i < M; ++i) { + int a, b, c; + cin >> a >> b >> c; + --a; + --b; + graph[a].push_back({b, -c}); + graph[b].push_back({a, c}); + } + + vector offset(N, 0); + vector visited(N, false); + vector> components; + vector> placements; + for (int root = 0; root < N; ++root) { + if (visited[root]) continue; + vector vertices{root}; + visited[root] = true; + for (int at = 0; at < (int)vertices.size(); ++at) { + int v = vertices[at]; + for (auto [u, delta] : graph[v]) { + if (!visited[u]) { + visited[u] = true; + offset[u] = offset[v] + delta; + vertices.push_back(u); + } + } + } + + int minimum = offset[vertices[0]]; + for (int v : vertices) minimum = min(minimum, offset[v]); + int shape = 0, maximum = 0; + for (int v : vertices) { + offset[v] -= minimum; + maximum = max(maximum, offset[v]); + shape |= 1 << offset[v]; + } + vector masks; + for (int shift = 0; shift + maximum < N; ++shift) { + masks.push_back(shape << shift); + } + components.push_back(move(vertices)); + placements.push_back(move(masks)); + } + + const int states = 1 << N; + const int full = states - 1; + const int K = (int)components.size(); + vector popcount(states, 0); + for (int mask = 1; mask < states; ++mask) { + popcount[mask] = popcount[mask >> 1] + (mask & 1); + } + vector answer(N, -1); + + for (int target = 0; target < K; ++target) { + // The number of occupied ranks determines which component is next. + vector next_component(N + 1, -1); + int used = 0; + for (int c = 0; c < K; ++c) { + if (c == target) continue; + next_component[used] = c; + used += (int)components[c].size(); + } + + vector dp(states, 0); + dp[0] = 1; + for (int mask = 0; mask < states; ++mask) { + if (!dp[mask]) continue; + int c = next_component[popcount[mask]]; + if (c == -1) continue; + for (int placement : placements[c]) { + if ((mask & placement) == 0) { + dp[mask | placement] = 1; + } + } + } + + int unique_shift = -1; + for (int shift = 0; shift < (int)placements[target].size(); ++shift) { + if (dp[full ^ placements[target][shift]]) { + if (unique_shift != -1) { + unique_shift = -2; + break; + } + unique_shift = shift; + } + } + if (unique_shift >= 0) { + for (int v : components[target]) { + answer[v] = offset[v] + unique_shift + 1; + } + } + } + + for (int i = 0; i < N; ++i) { + if (i) cout << ' '; + cout << answer[i]; + } + cout << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc352_f/statement.md b/problems/DP-02/Atcoder/abc352_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..d95ce681aad98d1651071cd3e7cfcf69ef3292bb --- /dev/null +++ b/problems/DP-02/Atcoder/abc352_f/statement.md @@ -0,0 +1,75 @@ +# F - Estimate Order + +**Score: 525 points** + +## Problem Statement +There are \(N\) people, numbered \(1\) to \(N\). + +A competition was held among these \(N\) people, and they were ranked accordingly. The following information is given about their ranks: +- Each person has a unique rank. +- For each \(1 \leq i \leq M\), if person \(A_i\) is ranked \(x\)-th and person \(B_i\) is ranked \(y\)-th, then \(x - y = C_i\). + +The given input guarantees that there is at least one possible ranking that does not contradict the given information. + +Answer \(N\) queries. The answer to the \(i\)-th query is an integer determined as follows: +- If the rank of person \(i\) can be uniquely determined, return that rank. Otherwise, return \(-1\). + +### Constraints +- \(2 \leq N \leq 16\) +- \(0 \leq M \leq \frac{N(N - 1)}{2}\) +- \(1 \leq A_i, B_i \leq N\) +- \(1 \leq C_i \leq N - 1\) +- \((A_i, B_i) \neq (A_j, B_j) (i \neq j)\) +- There is at least one possible ranking that does not contradict the given information. +- All input values are integers. + +## Input +The input is given from Standard Input in the following format: +``` +N M +A_1 B_1 C_1 +A_2 B_2 C_2 +... +A_M B_M C_M +``` + +## Output +Print the answers to the \(1\)-st, \(2\)-nd, \(\ldots\), \(N\)-th queries in this order, separated by spaces. + +## Sample Input 1 +``` +5 2 +2 3 3 +5 4 3 +``` + +### Sample Output 1 +``` +3 -1 -1 -1 -1 +``` +Let \(X_i\) be the rank of person \(i\). Then, \((X_1, X_2, X_3, X_4, X_5)\) could be \((3, 4, 1, 2, 5)\) or \((3, 5, 2, 1, 4)\). Therefore, the answer to the \(1\)-st query is \(3\), and the answers to the \(2\)-nd, \(3\)-rd, \(4\)-th, and \(5\)-th queries are \(-1\). + +## Sample Input 2 +``` +3 0 +``` + +### Sample Output 2 +``` +-1 -1 -1 +``` + +## Sample Input 3 +``` +8 5 +6 7 3 +8 1 7 +4 5 1 +7 2 1 +6 2 4 +``` + +### Sample Output 3 +``` +1 -1 -1 -1 -1 -1 -1 8 +``` diff --git a/problems/DP-02/Atcoder/abc358_e/editorial.md b/problems/DP-02/Atcoder/abc358_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..cec77c803abc71809be8d106889d938b0b304e3d --- /dev/null +++ b/problems/DP-02/Atcoder/abc358_e/editorial.md @@ -0,0 +1,23 @@ +# E - Alphabet Tiles (editorial) + +Source: https://atcoder.jp/contests/abc358/editorial/10275 by en_translator + +As in the problem statement, let \(a_i\) be the \(a_i\)-th capital English letter. + +Consider counting conforming strings for each number of occurrences of `z`, and finding the answer as their sum. (For convenience we take a letter `z`, but this is not essential; you can fix any letter and find the count for each number of its occurrences.) + +Suppose that a length-\(s\) string has \(t\) occurrences of `z`. Then, there are \(\binom{s}{t}\) ways to determine the positions of `z`. The characters at the other positions form a string of length \((s-t)\) without `z` such that \(a_i\) occurs between \(0\) and \(C_i\) times, which is understood by considering the string of length \((s-t)\) obtained by removing `z`, for each of the \(\binom{s}{t}\) positions. + +Therefore, the problem for `a`, `b`, \(\ldots\), `z` has been boiled down to that for`a`, `b`, \(\ldots\), `y`. + +Similarly, the problem for `a`, `b`, \(\ldots\), `y` can be boiled down to that for `a`, `b`, \(\ldots\), `x`; repeating this procedure seems to solve the problem. + +Once you boiled down the problem with a smaller one, employing DP (Dynamic Programming) is often effective. + +Indeed, let \(dp_{i,j}\) be the number of length-\(j\) strings consisting of \(a_1, a_2, \ldots, a_i\) such that \(a_k\) occurs between \(0\) and \(C_k\) times for all \(1 \leq k \leq i\); then by the observation above it turns out that \(dp_{i + 1, j} = \sum_{k = 0}^{\min(j, C_{i+1})} dp_{i,j-k} \binom{j}{k}\). (We find the sum over \(k\), the number of occurrences of \(a_{i + 1}\).) + +The answer is \(\sum_{j= 1}^{K}dp_{26, j}\). Note that the DP only ranges in \(j \leq K\). + +By finding the binomial coefficients according to precalculated factorials and it inverses, or by precomputing the binomial coefficients themselves in the manner of Pascal’s triangle,this DP can be solved in a total of \(O(\sigma K^2)\) time, where \(\sigma\) is the size of alphabet (\(\sigma = 26\) in our case), which is fast enough for the constraints for this problem. + +(C++) diff --git a/problems/DP-02/Atcoder/abc358_e/judge.json b/problems/DP-02/Atcoder/abc358_e/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..ff24dd7c5175316340601a2bfbbe7542309026e6 --- /dev/null +++ b/problems/DP-02/Atcoder/abc358_e/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 22, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc358_e/meta.json b/problems/DP-02/Atcoder/abc358_e/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..801c674123640edafc97683c907495c028248b4f --- /dev/null +++ b/problems/DP-02/Atcoder/abc358_e/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc358_e", + "contest": "abc358", + "type": "ABC", + "letter": "E", + "title": "Alphabet Tiles", + "url": "https://atcoder.jp/contests/abc358/tasks/abc358_e", + "difficulty": 1397, + "score": 475, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 22, + "editorial_url": "https://atcoder.jp/contests/abc358/editorial/10275", + "code_source": "model", + "pid": "A2762" +} diff --git a/problems/DP-02/Atcoder/abc358_e/solution.cpp b/problems/DP-02/Atcoder/abc358_e/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..00af97f270e510b27ee88699be306a35257b2899 --- /dev/null +++ b/problems/DP-02/Atcoder/abc358_e/solution.cpp @@ -0,0 +1,44 @@ +// abc358_e: E - Alphabet Tiles +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc358/editorial/10275 +// Judged AC on all 22 tests, max 0.03 s of the 2 s limit (submission 1). + +#include +#include +using namespace std; +using mint = atcoder::modint998244353; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int K; + cin >> K; + array C; + for (int &c : C) cin >> c; + + vector> choose(K + 1, vector(K + 1)); + choose[0][0] = 1; + for (int n = 1; n <= K; ++n) { + choose[n][0] = choose[n][n] = 1; + for (int k = 1; k < n; ++k) { + choose[n][k] = choose[n - 1][k - 1] + choose[n - 1][k]; + } + } + + vector dp(K + 1), next_dp(K + 1); + dp[0] = 1; + for (int c : C) { + fill(next_dp.begin(), next_dp.end(), mint(0)); + for (int j = 0; j <= K; ++j) { + for (int k = 0; k <= min(j, c); ++k) { + next_dp[j] += dp[j - k] * choose[j][k]; + } + } + dp.swap(next_dp); + } + + mint answer = 0; + for (int j = 1; j <= K; ++j) answer += dp[j]; + cout << answer.val() << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc358_e/statement.md b/problems/DP-02/Atcoder/abc358_e/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..e36749a46ff165275e4df9cd2b6c01acc77d3494 --- /dev/null +++ b/problems/DP-02/Atcoder/abc358_e/statement.md @@ -0,0 +1,60 @@ +# E - Alphabet Tiles + +### Score : 475 points + +## Problem Statement +AtCoder Land sells tiles with English letters written on them. Takahashi is thinking of making a nameplate by arranging these tiles in a row. + +Find the number, modulo `998244353`, of strings consisting of uppercase English letters with a length between `1` and `K`, inclusive, that satisfy the following conditions: +- For every integer `i` satisfying `1 ≤ i ≤ 26`, the following holds: + - Let `a_i` be the `i`-th uppercase English letter in lexicographical order. For example, `a_1 = A`, `a_5 = E`, `a_{26} = Z`. + - The number of occurrences of `a_i` in the string is between `0` and `C_i`, inclusive. + +### Constraints +- `1 ≤ K ≤ 1000` +- `0 ≤ C_i ≤ 1000` +- All input values are integers. + +## Input +The input is given from Standard Input in the following format: +``` +K +C_1 C_2 ... C_{26} +``` + +## Output +Print the answer. + +### Sample Input 1 +``` +2 +2 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +``` + +### Sample Output 1 +``` +10 +``` +The `10` strings that satisfy the conditions are `A`, `B`, `C`, `AA`, `AB`, `AC`, `BA`, `BC`, `CA`, `CB`. + +### Sample Input 2 +``` +358 +1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +``` + +### Sample Output 2 +``` +64 +``` + +### Sample Input 3 +``` +1000 +1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 +``` + +### Sample Output 3 +``` +270274035 +``` diff --git a/problems/DP-02/Atcoder/abc359_d/editorial.md b/problems/DP-02/Atcoder/abc359_d/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..23e0f1beee115ffbb8ee265119ab826eab42e9d4 --- /dev/null +++ b/problems/DP-02/Atcoder/abc359_d/editorial.md @@ -0,0 +1,30 @@ +# D - Avoid K Palindrome (editorial) + +Source: https://atcoder.jp/contests/abc359/editorial/10290 by en_translator + +For a string \(T\) consisting of `A`, `B`, and `?`, define \(\operatorname{dp} _ T[P]\) as follows (DP stands for Dynamic Programming): + +- The number of strings obtained by replacing each occurrnce of `?` with either `A` or `B` such that: + + - it is a good string, and + - its last \(\min\lbrace K-1,|T|\rbrace\) characters coincide with \(P\). + +For a string \(T\) consisting of `A`, `B`, and `?`, suppose that \(\operatorname{dp} _ T[P]\) is known for all possible \(P\). + Then, if \(\operatorname{dp} _ {T+\mathtt{A}}[P]\) and \(\operatorname{dp} _ {T+\mathtt{B}}[P],\operatorname{dp} _ {T+\mathtt{?}}[P]\) can be found fast, then the problem can be solved using Dynamic Programming. (Here, the string \(X\) succeeded by a character \(c\) is denoted by \(X+c\). + +Let us consider an algorithm to find \(\operatorname{dp} _ {T+\mathtt A}\) from \(\operatorname{dp} _ T\). (Same applies to `B`, and for `?` we can take their sum.) + +- Initially, initialize \(\operatorname{dp} _ {T+\mathtt A}[P]=0\) for all \(P\). +- For all possible \(P\), do the following. + + - If \(P+\mathtt A\) is a length-\(W\) palindrome, do nothing. + - Otherwise, let \(P ^ \prime\) be the string formed by the last \(\min\lbrace K-1,|P|+1\rbrace\) characters of \(P+\mathtt A\). Add \(\operatorname{dp} _ T[P]\) to \(\operatorname{dp} _ {T+\mathtt A}[P ^ \prime]\). + +Consider finding \(\operatorname{dp} _ S\) for the given string \(S\) using these values. Even if you spend \(\Theta(K)\) time to check if a string is palindrome, the overall complexity is \(O(2 ^ KKN)\), which is fast enough. + +For implementation, one can use a string or a non-negative integer as the key of the DP table. + +If you us a string, the key is easy to understand, and you can also use a sentinel to evaluate the DP table for string of length less than \(K\), but the constant factor may be bad. + If you use a non-negative integer, the constant factors of the time and spacial complexity is good, but the implementation may be complicated. + +In the sample code in C++, the key of the DP table is a non-negative integer, and it has a separate process for shorter \(S\). In the sample code in Python, the key of the DP table is a string, and it puts a sentinel to simplify the implementation. diff --git a/problems/DP-02/Atcoder/abc359_d/judge.json b/problems/DP-02/Atcoder/abc359_d/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..9a22e0f589e55cee4f0fc886cfa06c3f3f3f21ab --- /dev/null +++ b/problems/DP-02/Atcoder/abc359_d/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 76, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc359_d/meta.json b/problems/DP-02/Atcoder/abc359_d/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..b32debd61c95cd7f5e39a8d9fd8e4bcad6badbd3 --- /dev/null +++ b/problems/DP-02/Atcoder/abc359_d/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc359_d", + "contest": "abc359", + "type": "ABC", + "letter": "D", + "title": "Avoid K Palindrome", + "url": "https://atcoder.jp/contests/abc359/tasks/abc359_d", + "difficulty": 1381, + "score": 450, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 76, + "editorial_url": "https://atcoder.jp/contests/abc359/editorial/10290", + "code_source": "editorial", + "pid": "A2768" +} diff --git a/problems/DP-02/Atcoder/abc359_d/solution.cpp b/problems/DP-02/Atcoder/abc359_d/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e31629fc3ce3c1526e2c36149178c4956ea376e2 --- /dev/null +++ b/problems/DP-02/Atcoder/abc359_d/solution.cpp @@ -0,0 +1,77 @@ +// abc359_d: D - Avoid K Palindrome +// Code from the official editorial, https://atcoder.jp/contests/abc359/editorial/10290 (by en_translator) +// Judged AC on all 76 tests, max 0.01 s of the 2 s limit. + +#include +#include +#include +#include +#include +#include +#include + +int main() { + using namespace std; + using modint = atcoder::static_modint<998244353>; + + unsigned N, K; + cin >> N >> K; + + // Non-palindrome 0/1 string of length K + // represented as a integer + vector not_palindrome; + for (unsigned i = 0; i < 1U << K; ++i) { + bool is_palindrome = true; + for (unsigned j = 0, k = K - 1; j < k; ++j, --k){ + // If there are different bits seen from the head or tail, + if ((1 & i >> j) != (1 & i >> k)){ + // Then it's not a palindrome. + is_palindrome = false; + break; + } + } + // Add if it is not a palindrome + if (!is_palindrome) + not_palindrome.emplace_back(i); + } + + string S; + cin >> S; + + vector dp(1U << K - 1), prev(1U << K - 1); + { // Enumerate all possible first K-1 characters + // a_mask = bitmask with bit 1 for the position 'A', and 0 otherwise + // q_mask = bitmask with bit 0 for the position '?', and 1 otherwise + unsigned a_mask{}, q_mask{}; + for (const auto c : S | views::take(K - 1)) { + (a_mask *= 2) += c == 'A'; + (q_mask *= 2) += c != '?'; + } + + // Fix the positions where q_mask is standing, and enumerate the other part + for (unsigned i{q_mask}; i < 1U << K - 1; ++i |= q_mask) + dp[i ^ a_mask] = 1; + } + + const unsigned mask{(1U << K - 1) - 1}; + for (const auto c : S | views::drop(K - 1)) { + swap(dp, prev); + ranges::fill(dp, modint{}); + + // If 'A' is to be added + if (c != 'B') + // Transition occurs only when it is not a palindrome and it ends with 'A' (0) + for(const auto i : not_palindrome | views::filter([](auto i){return ~i & 1;})) + dp[i & mask] += prev[i / 2]; + + // If 'B' is to be added + if (c != 'A') + // Transition occurs only when it is not a palindrome and it ends with 'B' (1) + for(const auto i : not_palindrome | views::filter([](auto i){return i & 1;})) + dp[i & mask] += prev[i / 2]; + } + + // The answer is the sum over all prefixes + cout << reduce(begin(dp), end(dp)).val() << endl; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc359_d/statement.md b/problems/DP-02/Atcoder/abc359_d/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..6757c0a0c2bb17651d313d3d78d694e6dc608cd9 --- /dev/null +++ b/problems/DP-02/Atcoder/abc359_d/statement.md @@ -0,0 +1,110 @@ +# D - Avoid K Palindrome + +**Score:** 450 points + +## Problem Statement + +You are given a string `S` of length `N` consisting of characters `A`, `B`, and `?`. + +You are also given a positive integer `K`. +A string `T` consisting of `A` and `B` is considered a **good string** if it satisfies the following condition: + +- **No** contiguous substring of length `K` in `T` is a palindrome. + +Let `q` be the number of `?` characters in `S`. +There are `2^q` strings that can be obtained by replacing each `?` in `S` with either `A` or `B`. Find how many of these strings are good strings. + +The count can be very large, so find it modulo `998244353`. + +## Constraints + +- `2 ≤ K ≤ N ≤ 1000` +- `K ≤ 10` +- `S` is a string consisting of `A`, `B`, and `?`. +- The length of `S` is `N`. +- `N` and `K` are integers. + +## Input + +The input is given from Standard Input in the following format: + +``` +N K +S +``` + +## Output + +Print the answer. + +## Sample Input 1 + +``` +7 4 +AB?A?BA +``` + +### Sample Output 1 + +``` +1 +``` + +The given string has two `?`s. +There are four strings obtained by replacing each `?` with `A` or `B`: +- `ABAAABA` +- `ABAABBA` +- `ABBAABA` +- `ABBABBA` + +Among these, the last three contain the contiguous substring `ABBA` of length 4, which is a palindrome, and thus are not good strings. +Therefore, you should print `1`. + +--- + +## Sample Input 2 + +``` +40 7 +???????????????????????????????????????? +``` + +### Sample Output 2 + +``` +116295436 +``` + +Ensure to find the number of good strings modulo `998244353`. + +--- + +## Sample Input 3 + +``` +15 5 +ABABA?????????? +``` + +### Sample Output 3 + +``` +0 +``` + +It is possible that there is no way to replace the `?`s to obtain a good string. + +--- + +## Sample Input 4 + +``` +40 8 +?A?B??B?B?AA?A?B??B?A???B?BB?B???BA??BAA +``` + +### Sample Output 4 + +``` +259240 +``` diff --git a/problems/DP-02/Atcoder/abc364_e/editorial.md b/problems/DP-02/Atcoder/abc364_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..79d6f8abffc8aacc0d9da6ee97b6a9b63b9caf91 --- /dev/null +++ b/problems/DP-02/Atcoder/abc364_e/editorial.md @@ -0,0 +1,17 @@ +# E - Maximum Glutton (editorial) + +Source: https://atcoder.jp/contests/abc364/editorial/10559 by en_translator + +Notice that the total sweetness and saltiness of all but last dishes that he eats do not exceed \(X\) and \(Y\), respectively (*). + +Let \(x\) be the maximum size of a set of dishes \(S\) such that the total sweetness does not exceed \(X\) and the total saltiness does not exceed \(Y\). Then, the answer to the original problem can be represented as \(\min(x+1, N)\). (Proof: obvious if \(x=N\). If \(x + +using namespace std; + +void chmin(int &a, int b) { a = min(a, b); } + +int main() { + int n, x, y; + cin >> n >> x >> y; + vector a(n), b(n); + for (int i = 0; i < n; i++) { + cin >> a[i] >> b[i]; + } + vector dp(n + 1, vector(n + 1, vector(x + 1, 1e9))); + dp[0][0][0] = 0; + for (int i = 0; i < n; i++) { + for (int j = 0; j <= i; j++) { + for (int k = 0; k <= x; k++) { + chmin(dp[i + 1][j][k], dp[i][j][k]); + if (k + a[i] <= x) { + chmin(dp[i + 1][j + 1][k + a[i]], dp[i][j][k] + b[i]); + } + } + } + } + for (int i = n; i >= 0; i--) { + for (int j = 0; j <= x; j++) { + if (dp[n][i][j] <= y) { + cout << min(i + 1, n) << endl; + return 0; + } + } + } +} diff --git a/problems/DP-02/Atcoder/abc364_e/statement.md b/problems/DP-02/Atcoder/abc364_e/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..3e45ab81191f9c92b5e3b33fb46804cf5f92e77b --- /dev/null +++ b/problems/DP-02/Atcoder/abc364_e/statement.md @@ -0,0 +1,95 @@ +# E - Maximum Glutton + +**Score :** 475 points + +## Problem Statement + +Takahashi has prepared **N** dishes for Snuke. +The dishes are numbered from **1** to **N**, and dish **i** has a **sweetness** of **A_i** and a **saltiness** of **B_i**. + +Takahashi can arrange these dishes in any order he likes. +Snuke will eat the dishes in the order they are arranged, but if at any point the total sweetness of the dishes he has eaten so far exceeds **X** or the total saltiness exceeds **Y**, he will not eat any further dishes. + +Takahashi wants Snuke to eat as many dishes as possible. +Find the maximum number of dishes Snuke will eat if Takahashi arranges the dishes optimally. + +## Constraints +- \(1 \leq N \leq 80\) +- \(1 \leq A_i, B_i \leq 10000\) +- \(1 \leq X, Y \leq 10000\) +- All input values are integers. + +## Input +The input is given from Standard Input in the following format: +``` +N X Y +A_1 B_1 +A_2 B_2 +... +A_N B_N +``` + +## Output +Print the answer as an integer. + +## Sample Input 1 +``` +4 8 4 +1 5 +3 2 +4 1 +5 3 +``` + +## Sample Output 1 +``` +3 +``` +Consider the scenario where Takahashi arranges the dishes in the order **2, 3, 1, 4**. +- First, Snuke eats dish **2**. The total sweetness so far is **3**, and the total saltiness is **2**. +- Next, Snuke eats dish **3**. The total sweetness so far is **7**, and the total saltiness is **3**. +- Next, Snuke eats dish **1**. The total sweetness so far is **8**, and the total saltiness is **8**. +- The total saltiness has exceeded **Y=4**, so Snuke will not eat any further dishes. + +Thus, in this arrangement, Snuke will eat three dishes. +No matter how Takahashi arranges the dishes, Snuke will not eat all four dishes, so the answer is **3**. + +## Sample Input 2 +``` +2 1 1 +3 2 +3 2 +``` + +## Sample Output 2 +``` +1 +``` + +## Sample Input 3 +``` +2 100 100 +3 2 +3 2 +``` + +## Sample Output 3 +``` +2 +``` + +## Sample Input 4 +``` +6 364 463 +230 381 +154 200 +328 407 +339 94 +193 10 +115 309 +``` + +## Sample Output 4 +``` +3 +``` diff --git a/problems/DP-02/Atcoder/abc364_g/editorial.md b/problems/DP-02/Atcoder/abc364_g/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..e4869d784d1319398e5ce76f86812b1bae05b12e --- /dev/null +++ b/problems/DP-02/Atcoder/abc364_g/editorial.md @@ -0,0 +1,27 @@ +# G - Last Major City (editorial) + +Source: https://atcoder.jp/contests/abc364/editorial/10557 by en_translator + +This problem is an extension of a famous problem called **minimum Steiner tree problem**. We referred to [an editorial slide by Yoichi Iwata](https://www.slideshare.net/wata_orz/ss-12131479#50). + +We call a city, road, and cost simply a vertex, edge, and weight. + +First of all, in an optimal solution the graph defined by the set of edges to be extended as well as their adjacent vertices obviously form a tree. + +For a non-empty subset of the vertex set \(\{1,2,\dots,K-1\}\) and a vertex \(v\), we define \(f(S,v)\) as the minimum total weights of the edges of a tree containing vertex \(v\) and all vertices in \(S\). What we finally want is \(f(\{1,2,\dots,K-1\}, v)\) for each \(K\leq v\leq N\). + +The conclusion is that \(f(S,v)\) can be evaluated with Dynamic Programming (DP). With initial values \(f(\{i\}, i)=0\ (1 \leq i \leq K-1)\), there are two kinds of transitions: + +- \(f(S,v) \leftarrow \min(f(S,v),f(S,u) + w)\) (An edge of weight \(w\) connecting vertices \(u\) and \(v\) exists) +- \(f(S,v) \leftarrow \min(f(S,v),f(T,v)+f(S\setminus T,v))\ (T\subsetneq S, T\neq \emptyset)\) + +The transitions can be interpreted (somewhat informally) as follows: + +- Former: if \(v\) is not in \(S\) and is a tree of the tree, remove \(v\) and the only adjacent edge from the tree. +- Latter: otherwise, partition \(S\) into two non-empty sets \(T\) and \(S\setminus T\) (which is always possible in an optimal solution): + + - the intersection of the following is empty: the set of edges connecting \(v\) and each vertex in \(T\), and the set of edges connecting \(v\) and each vertex in \(S\setminus T\), in \(T\). + +All that left is how to process these transitions. The latter can be handled by filling the DP table in ascending order of the size of \(S\). The problem is the circular dependency in the former transitions, which can be handled by determining \(f(S,v)\ (1\leq v\leq N)\) in ascending order of its value in the manner of Dijkstra’s algorithm. + +The overall complexity is \(O(3^KN+2^KM\log M)\). diff --git a/problems/DP-02/Atcoder/abc364_g/judge.json b/problems/DP-02/Atcoder/abc364_g/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..4f0290153f8153ebb68933a0b4d4180278c7c4ff --- /dev/null +++ b/problems/DP-02/Atcoder/abc364_g/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 5.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 40, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc364_g/meta.json b/problems/DP-02/Atcoder/abc364_g/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..2a1ccfe8555a6c8c4f9206f4b7abdd9bf764edd1 --- /dev/null +++ b/problems/DP-02/Atcoder/abc364_g/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc364_g", + "contest": "abc364", + "type": "ABC", + "letter": "G", + "title": "Last Major City", + "url": "https://atcoder.jp/contests/abc364/tasks/abc364_g", + "difficulty": 2455, + "score": 600, + "time_limit_sec": 5.0, + "memory_limit_mb": 1024, + "n_tests": 40, + "editorial_url": "https://atcoder.jp/contests/abc364/editorial/10557", + "code_source": "editorial", + "pid": "A2806" +} diff --git a/problems/DP-02/Atcoder/abc364_g/solution.cpp b/problems/DP-02/Atcoder/abc364_g/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6e7998d6842d2e7376f6b4f5f16e6da3e39c5458 --- /dev/null +++ b/problems/DP-02/Atcoder/abc364_g/solution.cpp @@ -0,0 +1,55 @@ +// abc364_g: G - Last Major City +// Code from the official editorial, https://atcoder.jp/contests/abc364/editorial/10557 (by en_translator) +// Judged AC on all 40 tests, max 0.55 s of the 5 s limit. + +#include + +using namespace std; + +using ll = long long; + +bool chmin(ll &a, ll b) { + if (a > b) { + a = b; + return true; + } + return false; +} + +int main() { + int n, m, k; + cin >> n >> m >> k; + --k; + vector>> G(n); + for (int i = 0; i < m; i++) { + int a, b, c; + cin >> a >> b >> c; + --a, --b; + G[a].emplace_back(b, c); + G[b].emplace_back(a, c); + } + vector dp(1 << k, vector(n, 1e18)); + for (int i = 0; i < k; i++) dp[1 << i][i] = 0; + for (int bit = 1; bit < (1 << k); bit++) { + for (int sub = bit; sub > 0; sub = (sub - 1) & bit) { + for (int i = 0; i < n; i++) { + chmin(dp[bit][i], dp[sub][i] + dp[bit - sub][i]); + } + } + priority_queue, vector>, greater<>> pq; + for (int i = 0; i < n; i++) pq.emplace(dp[bit][i], i); + while (!pq.empty()) { + auto [d, u] = pq.top(); + pq.pop(); + if (d > dp[bit][u]) continue; + for (auto [v, l]: G[u]) { + if (chmin(dp[bit][v], d + l)) { + pq.emplace(d + l, v); + } + } + } + } + for (int i = k; i < n; i++) { + cout << dp.back()[i] << '\n'; + } +} diff --git a/problems/DP-02/Atcoder/abc364_g/statement.md b/problems/DP-02/Atcoder/abc364_g/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..fa481c7ce0c8811988b5b482ff520588796dbe9b --- /dev/null +++ b/problems/DP-02/Atcoder/abc364_g/statement.md @@ -0,0 +1,107 @@ +# G - Last Major City + +**Score**: 600 points + +## Problem Statement + +The Country of AtCoder consists of `N` cities and `M` roads connecting them, and one can travel between any two cities by traversing some roads. +The cities are numbered from `1` to `N`, and the roads are numbered from `1` to `M`. Road `i` connects cities `A_i` and `B_i` bidirectionally. + +Due to increasing traffic in the country, some roads are planned to be expanded. +Currently, no roads have been expanded, and the cost to expand road `i` is `C_i`. + +Since it is difficult to expand all roads at once, the plan is to first designate `K` out of the `N` cities as **major cities** and perform the minimum necessary expansion work so that one can travel between any two major cities using only expanded roads. +It has already been decided that cities `1, 2, \dots, K-1` will be major cities, but the last major city has not yet been decided. + +For each `i=K, K+1, \dots, N`, answer the following question: + +- If city `i` is designated as the last major city, what is the minimum total cost of the expansion work required to ensure that one can travel between any two major cities using only expanded roads? + +## Constraints + +- `2 ≤ N ≤ 4000` +- `N-1 ≤ M ≤ 8000` +- `2 ≤ K ≤ min(N, 10)` +- `1 ≤ A_i < B_i ≤ N` +- `1 ≤ C_i ≤ 10^9` +- One can travel between any two cities by traversing some roads. +- All input values are integers. + +## Input + +The input is given from Standard Input in the following format: +``` +N M K +A_1 B_1 C_1 +A_2 B_2 C_2 +... +A_M B_M C_M +``` + +## Output + +Print `N-K+1` lines. +The `l`-th line `(1 ≤ l ≤ N-K+1)` should contain the answer to the question for `i=l+K-1`, as an integer. + +## Sample Input 1 +``` +4 5 3 +1 4 3 +3 4 4 +1 2 4 +2 3 2 +1 3 1 +``` + +## Sample Output 1 +``` +3 +6 +``` + +In the above figure, circles with numbers represent cities with those numbers, and lines with numbers represent roads with the cost of expansion being that number. +The left and right figures correspond to the cases `i=3` and `i=4`, respectively. The colored circles represent the major cities, and the colored thick lines represent the roads that are expanded in an optimal solution. + +- For `i=3`, expanding roads `4` and `5` results in a total cost of `2+1=3`, which is the minimum. +- For `i=4`, expanding roads `1`, `4`, and `5` results in a total cost of `3+2+1=6`, which is the minimum. + +## Sample Input 2 +``` +4 3 2 +2 4 28 +1 4 56 +1 3 82 +``` + +## Sample Output 2 +``` +84 +82 +56 +``` + +## Sample Input 3 +``` +6 12 4 +2 6 68 +2 5 93 +4 6 28 +2 4 89 +3 6 31 +1 3 10 +1 2 53 +3 5 1 +3 5 74 +3 4 22 +4 5 80 +3 4 35 +``` + +## Sample Output 3 +``` +85 +64 +94 +``` + +There may be multiple roads connecting the same pair of cities. diff --git a/problems/DP-02/Atcoder/abc373_f/editorial.md b/problems/DP-02/Atcoder/abc373_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..0cc8ca491c966c9f887b7bd17fed501a7c05bbe1 --- /dev/null +++ b/problems/DP-02/Atcoder/abc373_f/editorial.md @@ -0,0 +1,24 @@ +# F - Knapsack with Diminishing Values (editorial) + +Source: https://atcoder.jp/contests/abc373/editorial/11051 by en_translator + +Consider the following Dynamic Programming (DP): + +- \(\mathrm{dp}[w][j] \coloneqq\) the maximum total happiness when choosing items with a total weight of \(j\), chosen from the items with weight \(w\) or less + +Let us try to process items with weight \(w\) at once. Suppose that there are \(m\) types of items with weight \(w\), with their value being \(v_1,\dots,v_m\). If we know \(f_w(k)\), the maximum total happiness to choose \(k\) items from them, then we can update the DP table by the following transition: + +\[ \mathrm{dp}[w][j] \leftarrow \max\{\mathrm{dp}[w-1][j-kw] + f_w(k) \mid k=0,\dots,\lfloor j/w \rfloor\} \quad (j=0,\dots,W) \] + +\(f_w(k)\) can be found greedily. The happiness when choosing \(k\) items of value \(v\) can be written as \(k v - k^2 = \sum_{i=1}^k (v - 2i + 1)\). We can interpret this equation as follows: when this item is chosen for the \(i\)-th time, an additional happiness of \(v-2i+1\) is accumulated. This is why the following greedy algorithm is valid: choose the item with the maximum delta of happiness. Specifically, we can use the following algorithm: + +1. For \(i=1,2,\dots,m\), let \(d_i \leftarrow v_i-1\). +2. For \(k=1,2,\dots,\lfloor W/w \rfloor\), do the following: + + - Find the maximum value \(d_i\) among \(d_1,\dots,d_m\). + - Let \(f_w(k) \leftarrow f_w(k-1) + d_i\). + - Let \(d_i \leftarrow d_i - 2\). + +The algorithm above works in a total of \(O((N+W/w)\log N)\) time using a priority queue. + +Let us estimate the time complexity of the solution above. The bottleneck part is the transition process, which costs \(O(W^2/w)\) time per single transition. The overall time complexity of the transition is \(O(\sum_{w=1}^W W^2/w) = O(W^2 \log W)\), where the **harmonic series** relation \(\sum_{w=1}^W 1/w = O(\log W)\) has been employed. diff --git a/problems/DP-02/Atcoder/abc373_f/judge.json b/problems/DP-02/Atcoder/abc373_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..20bb5d0a97ce0ac8859ab60bcd8da097d5e11821 --- /dev/null +++ b/problems/DP-02/Atcoder/abc373_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 3.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 58, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc373_f/meta.json b/problems/DP-02/Atcoder/abc373_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..5f5ff3cb065a0b51b26fd6143cf421a15de489cd --- /dev/null +++ b/problems/DP-02/Atcoder/abc373_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc373_f", + "contest": "abc373", + "type": "ABC", + "letter": "F", + "title": "Knapsack with Diminishing Values", + "url": "https://atcoder.jp/contests/abc373/tasks/abc373_f", + "difficulty": 2018, + "score": 550, + "time_limit_sec": 3.0, + "memory_limit_mb": 1024, + "n_tests": 58, + "editorial_url": "https://atcoder.jp/contests/abc373/editorial/11051", + "code_source": "model", + "pid": "A2868" +} diff --git a/problems/DP-02/Atcoder/abc373_f/solution.cpp b/problems/DP-02/Atcoder/abc373_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..183b28213ecd2f260bb60f5585038a01738440d8 --- /dev/null +++ b/problems/DP-02/Atcoder/abc373_f/solution.cpp @@ -0,0 +1,53 @@ +// abc373_f: F - Knapsack with Diminishing Values +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/abc373/editorial/11051 +// Judged AC on all 58 tests, max 0.03 s of the 3 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, W; + cin >> N >> W; + vector> values(W + 1); + for (int i = 0; i < N; ++i) { + int w; + long long v; + cin >> w >> v; + values[w].push_back(v); + } + + const long long NEG = -(1LL << 60); + vector dp(W + 1, NEG); + dp[0] = 0; + + for (int w = 1; w <= W; ++w) { + if (values[w].empty()) continue; + + priority_queue pq; + for (long long v : values[w]) pq.push(v - 1); + + int limit = W / w; + vector f(limit + 1, 0); + for (int k = 1; k <= limit; ++k) { + long long delta = pq.top(); + pq.pop(); + f[k] = f[k - 1] + delta; + pq.push(delta - 2); + } + + vector next = dp; + for (int j = 0; j <= W; ++j) { + if (dp[j] == NEG) continue; + for (int k = 1, target = j + w; target <= W; ++k, target += w) { + next[target] = max(next[target], dp[j] + f[k]); + } + } + dp.swap(next); + } + + cout << *max_element(dp.begin(), dp.end()) << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/abc373_f/statement.md b/problems/DP-02/Atcoder/abc373_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..37a494898045eb0fb448e642174fee60e9ffd3dc --- /dev/null +++ b/problems/DP-02/Atcoder/abc373_f/statement.md @@ -0,0 +1,81 @@ +# F - Knapsack with Diminishing Values + +**Score**: 550 points + +## Problem Statement + +There are `N` types of items. The `i`-th type of item has a weight of `w_i` and a value of `v_i`. Each type has `10^{10}` items available. + +Takahashi is going to choose some items and put them into a bag with capacity `W`. He wants to maximize the value of the selected items while avoiding choosing too many items of the same type. Hence, he defines the **happiness** of choosing `k_i` items of type `i` as `k_i v_i - k_i^2`. He wants to choose items to maximize the total happiness over all types while keeping the total weight at most `W`. Calculate the maximum total happiness he can achieve. + +## Constraints + +- `1 ≤ N ≤ 3000` +- `1 ≤ W ≤ 3000` +- `1 ≤ w_i ≤ W` +- `1 ≤ v_i ≤ 10^9` +- All input values are integers. + +--- + +## Input + +The input is given from Standard Input in the following format: + +``` +N W +w_1 v_1 +w_2 v_2 +... +w_N v_N +``` + +## Output + +Print the answer. + +--- + +## Sample Input 1 +``` +2 10 +3 4 +3 2 +``` + +### Sample Output 1 +``` +5 +``` + +By choosing `2` items of type `1` and `1` item of type `2`, the total happiness can be `5`, which is optimal. +Here, the happiness for type `1` is `2 × 4 - 2^2 = 4`, and the happiness for type `2` is `1 × 2 - 1^2 = 1`. +The total weight is `9`, which is within the capacity `10`. + +--- + +## Sample Input 2 +``` +3 6 +1 4 +2 3 +2 7 +``` + +### Sample Output 2 +``` +14 +``` + +--- + +## Sample Input 3 +``` +1 10 +1 7 +``` + +### Sample Output 3 +``` +12 +``` diff --git a/problems/DP-02/Atcoder/abc375_e/editorial.md b/problems/DP-02/Atcoder/abc375_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..45a62821e426ca6deb6e931c35ec5a59cc43aae4 --- /dev/null +++ b/problems/DP-02/Atcoder/abc375_e/editorial.md @@ -0,0 +1,19 @@ +# E - 3 Team Division (editorial) + +Source: https://atcoder.jp/contests/abc375/editorial/11144 by en_translator + +Let \(S \coloneqq \displaystyle\sum_{i = 1}^{N} B_i\). + +If \(S\) is not a multiple of \(3\), the answer is \(-1\). From now on, we assume that \(S\) is a multiple of \(3\). + +Noticing that \(S\) is small, we take Dynamic Programming (DP) approach. + +Let \(dp_{i, x, y, z}\) be the minimum number of people who need to switch their teams so that people \(1, 2, \ldots, i\) are assigned to each team and the strengths of teams \(1\), \(2\), and \(3\) are \(x\), \(y\), and \(z\), respectively. (If it is impossible, let it \(\infty\).) + +Naively performing this DP does not finish within the execution time limit. However, considering the sum of strengths of people \(1, 2, \ldots ,\), and \(i\), it turns out that \(z\) is uniquely determined given \(i, x\), and \(y\) (strictly speaking, we use the fact that for a fixed triple \((i, x, y)\), there is at most one \(z\) with \(dp_{i,x ,y, z} \neq \infty\)). This allows us not to maintain \(z\) as the index. + +In short, the answer can be found with DP, where \(dp_{i, x, y}\) is the minimum number of people who need to switch their teams so that people \(1, 2, \ldots, i\) are assigned to each team and the strengths of teams \(1\) and \(2\) are \(x\) and \(y\), respectively. (If it is impossible, let it \(\infty\).) + +The sought value is \(dp_{N,\frac{S}{3},\frac{S}{3}}\), so it is sufficient to support indices \(x\) and \(y\) up to \(\frac{S}{3}\). (If you try to maintain up to \(S\), it might not finish in time depending on other constant factors.) + +Alternatively, since \(1 \leq B_i\), one can kick out the index \(i\), which requires extra caution on the constant factor. diff --git a/problems/DP-02/Atcoder/abc375_e/judge.json b/problems/DP-02/Atcoder/abc375_e/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..2c6ad6482625ce974eee8617a9fd2d4a75812de5 --- /dev/null +++ b/problems/DP-02/Atcoder/abc375_e/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 4.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 52, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/abc375_e/meta.json b/problems/DP-02/Atcoder/abc375_e/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..4b400da817d2e778baebb0633dcbc0741848ff16 --- /dev/null +++ b/problems/DP-02/Atcoder/abc375_e/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "abc375_e", + "contest": "abc375", + "type": "ABC", + "letter": "E", + "title": "3 Team Division", + "url": "https://atcoder.jp/contests/abc375/tasks/abc375_e", + "difficulty": 1424, + "score": 450, + "time_limit_sec": 4.0, + "memory_limit_mb": 1024, + "n_tests": 52, + "editorial_url": "https://atcoder.jp/contests/abc375/editorial/11144", + "code_source": "editorial", + "pid": "A2881" +} diff --git a/problems/DP-02/Atcoder/abc375_e/solution.cpp b/problems/DP-02/Atcoder/abc375_e/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6a78f9797e8c226c7f83d1e1b83fd5e0348cc5e5 --- /dev/null +++ b/problems/DP-02/Atcoder/abc375_e/solution.cpp @@ -0,0 +1,50 @@ +// abc375_e: E - 3 Team Division +// Code from the official editorial, https://atcoder.jp/contests/abc375/editorial/11144 (by en_translator) +// Judged AC on all 52 tests, max 0.09 s of the 4 s limit. + +#include +using namespace std; +#define rep(i, n) for (int i = 0; i < (n); i++) +template inline bool chmin(T& a, const U& b) { if (a > b) { a = b; return true; } return false; } + +int main() { + int n; + cin >> n; + vector a(n), b(n); + rep(i, n) cin >> a[i] >> b[i]; + int sum = accumulate(b.begin(), b.end(), 0); + if (sum % 3 != 0) { + cout << "-1\n"; + return 0; + } + int A = 501; + int inf = 1000000000; + vector> dp(A, vector(A, inf)); + dp[0][0] = 0; + rep(i, n) { + vector> ep(A, vector(A, inf)); + int e = b[i]; + rep(j, A) { + rep(k, A) { + if (a[i] == 1) { + if (j + e < A) chmin(ep[j + e][k], dp[j][k]); + if (k + e < A) chmin(ep[j][k + e], dp[j][k] + 1); + chmin(ep[j][k], dp[j][k] + 1); + } + else if (a[i] == 2) { + if (j + e < A) chmin(ep[j + e][k], dp[j][k] + 1); + if (k + e < A) chmin(ep[j][k + e], dp[j][k]); + chmin(ep[j][k], dp[j][k] + 1); + } + else { + if (j + e < A) chmin(ep[j + e][k], dp[j][k] + 1); + if (k + e < A) chmin(ep[j][k + e], dp[j][k] + 1); + chmin(ep[j][k], dp[j][k]); + } + } + } + dp = move(ep); + } + int res = dp[sum / 3][sum / 3]; + cout << (res == inf ? -1 : res) << '\n'; +} diff --git a/problems/DP-02/Atcoder/abc375_e/statement.md b/problems/DP-02/Atcoder/abc375_e/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..3024ab4429153b69c48077b9df99ffc42c096333 --- /dev/null +++ b/problems/DP-02/Atcoder/abc375_e/statement.md @@ -0,0 +1,112 @@ +# E - 3 Team Division + +**Score**: 450 points + +## Problem Statement + +There are `N` people divided into three teams. +The people are numbered `1, 2, ..., N`, and the teams are numbered `1, 2, 3`. Currently, person `i` belongs to team `A_i`. +Each person has a value called **strength**; person `i` has a strength of `B_i`. The **strength** of a team is defined as the sum of the strengths of its members. +Determine whether it is possible for zero or more people to switch teams so that all teams have equal strength. If it is possible, find the minimum number of people who need to switch teams to achieve this. +You cannot create new teams other than teams `1`, `2`, `3`. + +### Constraints + +- `3 ≤ N ≤ 100` +- `A_i ∈ {1, 2, 3}` +- For each `x ∈ {1, 2, 3}`, there exists some `i` with `A_i = x`. +- `1 ≤ B_i` +- \(\sum_{i = 1}^{N} B_i ≤ 1500\) +- All input values are integers. + +--- + +### Input + +The input is given from Standard Input in the following format: + +``` +N +A_1 B_1 +A_2 B_2 +... +A_N B_N +``` + +### Output + +If it is possible to make all teams have equal strength, print the minimum number of people who need to switch teams. Otherwise, print `-1`. + +--- + +### Sample Input 1 +``` +6 +1 2 +2 5 +1 5 +3 3 +1 3 +3 6 +``` + +### Sample Output 1 +``` +2 +``` +If person `1` switches to team `3` and person `4` switches to team `2`, all teams will have a strength of `8`. + +--- + +### Sample Input 2 +``` +4 +1 1 +1 2 +2 3 +3 4 +``` + +### Sample Output 2 +``` +-1 +``` + +--- + +### Sample Input 3 +``` +3 +1 1 +2 1 +3 1 +``` + +### Sample Output 3 +``` +0 +``` + +--- + +### Sample Input 4 +``` +12 +2 5 +1 4 +3 3 +2 3 +3 9 +1 2 +2 2 +3 9 +2 6 +1 9 +1 1 +3 1 +``` + +### Sample Output 4 +``` +3 +``` diff --git a/problems/DP-02/Atcoder/agc049_d/editorial.md b/problems/DP-02/Atcoder/agc049_d/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..913d811e357194750f8a0ac09aabcde998cb4df2 --- /dev/null +++ b/problems/DP-02/Atcoder/agc049_d/editorial.md @@ -0,0 +1,17 @@ +# D - Convex Sequence (editorial) + +Source: https://atcoder.jp/contests/agc049/editorial/334 by evima + +Let \(m\) be the index \(i\) with the smallest \(A_i\) (if there are multiple such indices, choose the minimum one). + +Assume \(m\) is fixed. Here, the possible sequences \(A_i\) are limited to the ones that can be obtained by the following procedure: + +- Choose a constant \(C\), initialize \(A=(C,C,\cdots,C)\), then repeat the two operations below. +- Choose \(i < m\), and add \(1,2,3,\cdots\) to \(A_i,A_{i-1},\cdots,A_1\), respectively. (We need to do this operation with \(i=m-1\) at least once.) +- Choose \(i > m\), and add \(1,2,3,\cdots\) to \(A_i,A_{i+1},\cdots,A_N\), respectively. + +Then, the problem boils down to the following: having items with weights \(N,1,3,6,\cdots\), how many ways are there to combine them so that the sum will be \(M\)? Since we only need to consider \(O(\sqrt{M})\) kinds of items, we can solve it in \(O(M\sqrt{M})\) time. + +Now, let us unfix \(m\) and change it in this way: \(m=1,2,\cdots\). After each change of \(m\), we will do the DP above. It takes too much time to compute from scratch every time. However, by focusing on the differences in the available items, we can redo the DP in \(O(M)\) time. + +Since we only need to consider the first \(O(\sqrt{M})\) values for \(m\), the computation will take \(O(M\sqrt{M})\) time in total. diff --git a/problems/DP-02/Atcoder/agc049_d/judge.json b/problems/DP-02/Atcoder/agc049_d/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..c6587748b229443d86c141507c620c5b6de5e174 --- /dev/null +++ b/problems/DP-02/Atcoder/agc049_d/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 34, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/agc049_d/meta.json b/problems/DP-02/Atcoder/agc049_d/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..637270ad96da3cce415226277e76983b5247f648 --- /dev/null +++ b/problems/DP-02/Atcoder/agc049_d/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "agc049_d", + "contest": "agc049", + "type": "AGC", + "letter": "D", + "title": "Convex Sequence", + "url": "https://atcoder.jp/contests/agc049/tasks/agc049_d", + "difficulty": 2602, + "score": 1000, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 34, + "editorial_url": "https://atcoder.jp/contests/agc049/editorial/334", + "code_source": "model", + "pid": "A3183" +} diff --git a/problems/DP-02/Atcoder/agc049_d/solution.cpp b/problems/DP-02/Atcoder/agc049_d/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..0766774f4af015365b9b6bcebb2e756440395f83 --- /dev/null +++ b/problems/DP-02/Atcoder/agc049_d/solution.cpp @@ -0,0 +1,69 @@ +// agc049_d: D - Convex Sequence +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/agc049/editorial/334 +// Judged AC on all 34 tests, max 0.05 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + constexpr int MOD = 1000000007; + vector dp(M + 1, 0); + + // The common minimum contributes an arbitrary multiple of N. + for (int s = 0; s <= M; s += N) dp[s] = 1; + + // Initially the leftmost minimum is at position 1. + for (int len = 1; len < N; ++len) { + long long weight = 1LL * len * (len + 1) / 2; + if (weight > M) break; + int w = static_cast(weight); + for (int s = w; s <= M; ++s) { + int value = dp[s] + dp[s - w]; + if (value >= MOD) value -= MOD; + dp[s] = value; + } + } + + int answer = 0; + for (int m = 1; m <= N; ++m) { + long long required = 1LL * m * (m - 1) / 2; + if (required > M) break; + + if (m > 1) { + long long oldRightLength = N - m + 1; + long long removedWeight = oldRightLength * (oldRightLength + 1) / 2; + int addedWeight = static_cast(required); + + if (removedWeight != addedWeight) { + // Remove one unbounded coin type, using descending order. + if (removedWeight <= M) { + int w = static_cast(removedWeight); + for (int s = M; s >= w; --s) { + int value = dp[s] - dp[s - w]; + if (value < 0) value += MOD; + dp[s] = value; + } + } + + // Add the newly available left-side triangular weight. + for (int s = addedWeight; s <= M; ++s) { + int value = dp[s] + dp[s - addedWeight]; + if (value >= MOD) value -= MOD; + dp[s] = value; + } + } + } + + // At least one operation of length m-1 is mandatory on the left. + answer += dp[M - static_cast(required)]; + if (answer >= MOD) answer -= MOD; + } + + cout << answer << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/agc049_d/statement.md b/problems/DP-02/Atcoder/agc049_d/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..5d6d3ac30c10e18c09f56eae4bb91fe68e47749a --- /dev/null +++ b/problems/DP-02/Atcoder/agc049_d/statement.md @@ -0,0 +1,73 @@ +# D - Convex Sequence + +**Score:** 1000 points + +## Problem Statement + +Given are integers \(N\) and \(M\). + +Find the number, modulo \((10^9+7)\), of length-\(N\) sequences \((A_1,A_2,\ldots,A_N)\) that consist of non-negative integers and satisfy the following conditions: +- \(A_1+A_2+\ldots +A_N = M\); +- For every \(i\) \((2 \leq i \leq N-1)\), \(2 A_i \leq A_{i-1} + A_{i+1}\). + +## Constraints +- \(1 \leq N \leq 10^5\) +- \(1 \leq M \leq 10^5\) +- All values in input are integers. + +--- + +## Input + +Input is given from Standard Input in the following format: +``` +N M +``` + +## Output + +Print the number, modulo \((10^9+7)\), of sequences that satisfy the conditions. + +--- + +## Sample Input 1 +``` +3 3 +``` + +### Sample Output 1 +``` +7 +``` +The following seven sequences satisfy the conditions: +- \(0,0,3\) +- \(0,1,2\) +- \(1,0,2\) +- \(1,1,1\) +- \(2,0,1\) +- \(2,1,0\) +- \(3,0,0\) + +--- + +## Sample Input 2 +``` +10 100 +``` + +### Sample Output 2 +``` +10804516 +``` + +--- + +## Sample Input 3 +``` +10000 100000 +``` + +### Sample Output 3 +``` +694681734 +``` diff --git a/problems/DP-02/Atcoder/agc061_e/editorial.md b/problems/DP-02/Atcoder/agc061_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..31b321026d1271047086a1d25db417ff65733b15 --- /dev/null +++ b/problems/DP-02/Atcoder/agc061_e/editorial.md @@ -0,0 +1,43 @@ +# E - Increment or XOR (editorial) + +Source: https://atcoder.jp/contests/agc061/editorial/5697 by endagorion + +Suppose we want to make lowest bits \(0, \ldots, k\) of \(X\) equal to those of \(T\). + +- If throughout the process no increment results in a carry from bit \(k - 1\) to bit \(k\), then bit \(k\) is only affected by XORs, so we want to match bits \(0, \ldots, k - 1\), and ensure that XORs we make also set bit \(k\). +- If there is a carry from bit \(k -1\) to bit \(k\), then, after the carry, bits \(0, \ldots, k - 1\) are set to \(0\). After this, we can consider going from \(0\) to \(T\). + +We can see that the bigger problem boils down to smaller ones with different starts and targets, and we want to keep track of how XORs affect higher bits. To avoid keeping track of large carries, we will limit the scope of a subproblem to a single carry beyond the current bit number. + +Formally, we define a subproblem \((k, s, f, M)\) as follows: + +- \(k\) is the number of lowest bits we want to match. +- \(s\) defines the initial value of \(X\) in the subproblem. + + - if \(s = 0\), then initially \(X = S\). + - if \(s = 1\), then initially \(X = 0\). +- \(f\) defines the target value of \(X\), as well as carry constraints. + + - If \(f = 0\), then the target is \(T\), and we do not allow any carry between bits \(k - 1 \to k\). + - If \(f = 1\), then the target is \(0\), and we require the only carry \(k - 1 \to k\) to happen on the last operation (which thus has to be an increment). +- \(M\) is a bitmask of size \(n\). If \(M_i = 0\) (resp. \(1\)), then we require to apply the operation \(X \to X \oplus Y_i\) an even (resp. odd) number of times. + +Define \(cost(k, s, f, M)\) as the smallest cost to solve the subprolem described above. The answer is \(\min_M cost(B, 0, 0, M)\), where \(B = 40\) is the number of bits. + +We compute all \(cost(k, \ldots)\) by increasing of \(k\). When \(k = 0\), we don’t have to match anything. Still, \(cost(0, s, 0, M) = \sum_{i \in M} C_i\), \(cost(0, s, 1, M) = A + \sum_{i \in M} C_i\) (adding \(1\) can be treated as a carry between bits \(-1 \to 0\)). + +We subdivide solutions to \((k + 1, s, f, M)\) based on carries \(k - 1 \to k\). Then, possible solutions can look as follows: + +- For any \(s, M\), if applying XORs in \(M\) correctly sets bit \(k\) in \(X\), then \((k, s, 0, M)\) solves \((k + 1, s, 0, M)\). +- In all other cases at least one carry \(k - 1 \to k\) has to happen. Thus, a solution is given by a sequence \((k, s, 1, M_0)\), \((k, 1, 1, M_1)\), \(\ldots\), \((k, 1, f, M_t)\). Note that, knowing \(M_i\), we can keep track of bit \(k\) of \(X\) between the subproblems, and make sure that carries \(k \to k + 1\) happen only when they should. + +Thus, finding \(cost(k, s, f, M)\) boils down to constructing an optimal sequence of subproblems. This is a shortest path problem, in a graph where edges are subproblems \((k - 1, s, f, M)\) as described above, and vertices \((x, M)\) describe intermediate states: + +- \(x\) is bit \(k\) of \(X\) before the next subproblem, +- \(M\) is the currently accumulated bitmask. + +Shortest paths can be found e.g. with Dijkstra. In fact, one can prove that at most one transition of the type \((k, 1, 1, M_i)\) is always enough, but this is not necessary to solve the problem, nor is it helpful to speed up the solution. + +Complexity of this solution is \(O(B 2^{2N})\). + +Note that if a solution exists, then the answer does not exceed \(2 \cdot 10^{17}\), since there is always a solution involving at most \(2^{40}\) increments and two XORs. diff --git a/problems/DP-02/Atcoder/agc061_e/judge.json b/problems/DP-02/Atcoder/agc061_e/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..b82ada8c747af6b7419ae25d3b3323898a07a6a4 --- /dev/null +++ b/problems/DP-02/Atcoder/agc061_e/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 57, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/agc061_e/meta.json b/problems/DP-02/Atcoder/agc061_e/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..491b09f6ea09d7806bebb519b53f469d63525383 --- /dev/null +++ b/problems/DP-02/Atcoder/agc061_e/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "agc061_e", + "contest": "agc061", + "type": "AGC", + "letter": "E", + "title": "Increment or XOR", + "url": "https://atcoder.jp/contests/agc061/tasks/agc061_e", + "difficulty": 3901, + "score": 1400, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 57, + "editorial_url": "https://atcoder.jp/contests/agc061/editorial/5697", + "code_source": "model", + "pid": "A3244" +} diff --git a/problems/DP-02/Atcoder/agc061_e/solution.cpp b/problems/DP-02/Atcoder/agc061_e/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..79019836b7bd0bc44be7406356e01b2d39efe215 --- /dev/null +++ b/problems/DP-02/Atcoder/agc061_e/solution.cpp @@ -0,0 +1,120 @@ +// agc061_e: E - Increment or XOR +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/agc061/editorial/5697 +// Judged AC on all 57 tests, max 0.02 s of the 2 s limit (submission 1). + +#include +using namespace std; + +using ll = long long; +using ull = unsigned long long; +const ll INF = 4000000000000000000LL; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N; + ull S, T; + ll A; + cin >> N >> S >> T >> A; + vector Y(N); + vector C(N); + for (int i = 0; i < N; ++i) cin >> Y[i] >> C[i]; + + int L = 1 << N; + vector xr(L, 0); + vector sum(L, 0); + for (int m = 1; m < L; ++m) { + int i = __builtin_ctz((unsigned)m); + int p = m & (m - 1); + xr[m] = xr[p] ^ Y[i]; + sum[m] = sum[p] + C[i]; + } + + // dp[s][f][m] is cost(k, s, f, m) for the current k. + using Table = array, 2>, 2>; + Table dp; + for (int s = 0; s < 2; ++s) { + for (int f = 0; f < 2; ++f) { + dp[s][f].resize(L); + for (int m = 0; m < L; ++m) + dp[s][f][m] = sum[m] + (f ? A : 0); + } + } + + for (int k = 0; k < 40; ++k) { + vector bit(L); + vector middle; + for (int m = 0; m < L; ++m) { + bit[m] = (xr[m] >> k) & 1ULL; + if (bit[m] && dp[1][1][m] < INF) middle.push_back(m); + } + int target = (T >> k) & 1ULL; + Table nxt; + for (auto &row : nxt) + for (auto &v : row) v.assign(L, INF); + + for (int s = 0; s < 2; ++s) { + int start = s == 0 ? ((S >> k) & 1ULL) : 0; + vector dist(L, INF); + vector used(L, false); + + for (int m = 0; m < L; ++m) { + // No carry into bit k. + if ((start ^ bit[m]) == target) + nxt[s][0][m] = dp[s][0][m]; + + // The first carry into bit k either overflows it, or + // leaves bit k equal to 1 and all lower bits equal to 0. + if ((start ^ bit[m]) == 0) + dist[m] = dp[s][1][m]; + else + nxt[s][1][m] = dp[s][1][m]; + } + + // All intermediate states have lower k bits zero and bit k + // equal to 1, so only the accumulated XOR mask is needed. + for (int step = 0; step < L; ++step) { + int v = -1; + ll best = INF; + for (int m = 0; m < L; ++m) { + if (!used[m] && dist[m] < best) { + best = dist[m]; + v = m; + } + } + if (v == -1) break; + used[v] = true; + for (int m : middle) { + int to = v ^ m; + ll candidate = best + dp[1][1][m]; + if (candidate < dist[to]) dist[to] = candidate; + } + } + + for (int v = 0; v < L; ++v) { + if (dist[v] == INF) continue; + for (int m = 0; m < L; ++m) { + int to = v ^ m; + // Finish without an outgoing carry. + if ((1 ^ bit[m]) == target) { + ll candidate = dist[v] + dp[1][0][m]; + if (candidate < nxt[s][0][to]) + nxt[s][0][to] = candidate; + } + // Finish with the unique outgoing carry. + if (bit[m] == 0) { + ll candidate = dist[v] + dp[1][1][m]; + if (candidate < nxt[s][1][to]) + nxt[s][1][to] = candidate; + } + } + } + } + dp = move(nxt); + } + + ll answer = *min_element(dp[0][0].begin(), dp[0][0].end()); + cout << (answer == INF ? -1 : answer) << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/agc061_e/statement.md b/problems/DP-02/Atcoder/agc061_e/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..08cb90c9bdc9dafe41daba2bb07024e90d244be7 --- /dev/null +++ b/problems/DP-02/Atcoder/agc061_e/statement.md @@ -0,0 +1,99 @@ +# E - Increment or XOR + +**Score :** 1400 points + +## Problem Statement + +There is a non-negative integer \(X\) initially equal to \(S\). One can perform the following operations, in any order, any number of times: +- Add \(1\) to \(X\). This has a cost of \(A\). +- Choose \(i\) between \(1\) and \(N\), and replace \(X\) with \(X \oplus Y_i\). This has a cost of \(C_i\). Here, \(\oplus\) denotes bitwise XOR. + +Find the smallest total cost to make \(X\) equal to a given non-negative integer \(T\), or report that this is impossible. + +
+ + What is bitwise \(\mathrm{XOR}\)? + + The bitwise \(\mathrm{XOR}\) of non-negative integers \(A\) and \(B\), \(A \oplus B\), is defined as follows: + - When \(A \oplus B\) is written in base two, the digit in the \(2^k\)'s place (\(k \geq 0\)) is \(1\) if exactly one of the digits in that place of \(A\) and \(B\) is \(1\), and \(0\) otherwise. + + For example, we have \(3 \oplus 5 = 6\) (in base two: \(011 \oplus 101 = 110\). + Generally, the bitwise \(\mathrm{XOR}\) of \(k\) non-negative integers \(p_1, p_2, p_3, \dots, p_k\) is defined as \((\dots ((p_1 \oplus p_2) \oplus p_3) \oplus \dots \oplus p_k)\). We can prove that this value does not depend on the order of \(p_1, p_2, p_3, \dots, p_k\). +
+ +## Constraints +- \(1 \leq N \leq 8\) +- \(0 \leq S, T < 2^{40}\) +- \(0 \leq A \leq 10^5\) +- \(0 \leq Y_i < 2^{40}\) (\(1 \leq i \leq N\)) +- \(0 \leq C_i \leq 10^{16}\) (\(1 \leq i \leq N\)) +- All values in the input are integers. + +## Input +Input is given from Standard Input in the following format: +``` +N S T A +Y_1 C_1 +... +Y_N C_N +``` + +## Output +If the task is impossible, print `-1`. Otherwise, print the smallest total cost. + +## Sample Input 1 +``` +1 15 0 1 +8 2 +``` + +## Sample Output 1 +``` +5 +``` +You can make \(X\) equal to \(T\) in the following manner: +- Choose \(i=1\) and replace \(X\) with \(X \oplus 8\) to get \(X=7\). This has a cost of \(2\). +- Add \(1\) to \(X\) to get \(X=8\). This has a cost of \(1\). +- Choose \(i=1\) and replace \(X\) with \(X \oplus 8\) to get \(X=0\). This has a cost of \(2\). + +## Sample Input 2 +``` +3 21 10 100 +30 1 +12 1 +13 1 +``` + +## Sample Output 2 +``` +3 +``` + +## Sample Input 3 +``` +1 2 0 1 +1 1 +``` + +## Sample Output 3 +``` +-1 +``` + +## Sample Input 4 +``` +8 352217 670575 84912 +239445 2866 +537211 16 +21812 6904 +50574 8842 +380870 5047 +475646 8924 +188204 2273 +429397 4854 +``` + +## Sample Output 4 +``` +563645 +``` diff --git a/problems/DP-02/Atcoder/agc062_d/editorial.md b/problems/DP-02/Atcoder/agc062_d/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..f04fe17a15263e7a385d4b36363350399fb694af --- /dev/null +++ b/problems/DP-02/Atcoder/agc062_d/editorial.md @@ -0,0 +1,97 @@ +# D - Walk Around Neighborhood (editorial) + +Source: https://atcoder.jp/contests/agc062/editorial/6467 by evima + +Let \(\displaystyle \max_{1\leq i \leq N}D_i=M\). We know from the triangle inequality that it is impossible to return to the origin after \(N\) actions when \(\sum_{i=1}^{N}D_i < 2M\). From now on, we will assume that \(2M \leq \sum_{i=1}^{N}D_i\). + +## [1] Considering changes in distance from the origin due to movement + +For real numbers \(D\), \(R\), \(R'\ (R' \leq R)\) and \((a, b)\ (0 \leq a, b)\) satisfying \(|a|+|b|=R\), we consider the conditions under which \((a', b')\) exists that satisfy: + +- \(|a'|+|b'|=R'\), and +- \(|a-a'|+|b-b'|=D\). + +From the triangle inequality, it is necessary that \(R-R' \leq D \leq R+R'\). + +(In the figure below, the Japanese text says: “The distance between A and B is R-R’, and the distance between A and C is R+R’.”) + +![](https://img.atcoder.jp/agc062/0494c054ffbed0a07634863f97dee5ec.jpg) + +For \(D=R-R'\), when \(0 \leq a \leq R'\), the two conditions are satisfied by \((a',b')=(a,b-(R-R'))\) satisfies, and when \(R' \leq a \leq R\), they are satisfied by \((a',b')=(a-(R-R'),b)\) (\(A\) and \(B\) in the figure above). + +Also, for \(D=R+R'\), when \(0 \leq a \leq R'\), the two conditions are satisfied by \((a',b')=(-a,(R-R')-b)\), and when \(R' \leq a \leq R\), they are satisfied by \((a',b')=((R-R')-a,-b)\) (\(A\) and \(C\) in the figure above). + +From the above, for any \((a, b)\), there is always an \((a', b')\) that satisfies the conditions when \(D=R-R',R+R'\), and since \(|a-a'|+|b-b'|\) changes continuously as \((a', b')\) moves on \(|x|+|y|=R'\), such a pair always exists when \(R-R' \leq D \leq R+R'\). + +The same conclusion can be obtained for the case of \(R < R'\) by considering it in reverse. + +The particularly important points in the discussion so far can be summarized in the following two points: + +- for any \((a, b)\) and \(D\) satisfying \(|R'-R| \leq D \leq|R+R'|\) and |a|+|b|=R\(, the above \)(a,‘b’)$ exists; +- for any \((a, b)\) and \(D\) satisfying \(0 \leq D \leq 2R\) and \(|a|+|b|=R\), there is an \((a', b')\) satisfying \(|a'|+|b'|=R\) and \(|a-b'|+|a-b'|=D\). + +## [2] The decision problem with fixed order + +We consider the decision problem of whether it is possible to finish \(N\) actions with \(|x_i|+|y_i| \leq K\) when the moving distance in the \(i\)-th action is fixed to \(D_i\). First of all, it is necessary that \(D_i \leq 2K\). + +Let \(S_i=D_1+D_2+\dots+D_i\) and \(T_i=D_i+D_{i+1}+\dots+D_N\). + +Let \(L\) be the smallest \(i\) satisfying \(K \leq S_i\). From the triangle inequality, it is necessary that \(D_L \leq S_{L-1}+K\). If this is satisfied, you can be at any point on the outer circumference ( \(|x|+|y|=K\) ) after \(L\) actions, as seen from the discussion in [1]. Similarly, let \(R\) be the largest \(i\) satisfying \(K \leq T_i\), and then it is necessary that \(D_{R} \leq T_{R+1}+K\). If this is satisfied, you can always return to the origin no matter where you are on the outer circumference after \(R-1\) actions. + +Then, if you can start and finish the \((L+1)\)-th to \((R-1)\)-th actions on the outer circumference, you can also finish \(N\) actions with the conditions satisfied. This is indeed possible since it is always possible to stay on the outer circumferences, as seen from the discussion at the end of [1]. + +Therefore, if \(L\) and \(R\) exist and \(L < R\), the following are the necessary and sufficient conditions. + +- \(D_i \leq 2K\) +- \(D_L \leq S_{L-1}+K\) +- \(D_R \leq T_{R+1}+K\) + +Let’s consider the other cases. + +If the sum of \(D_i\) is less than or equal to \(2K\), the objective is always achievable. + +Proof + + Let \(k\) be the smallest \(i\) satisfying \(\frac{S_N}{2} \leq S_i\), and let \(a=\frac{S_N}{2} - S_{k-1}, b = S_k - a\). + +Consider the following \(S_N\) moves. + +- From the \(1\)-st to \(b\)-th move: move from \((x,y)\) to \((x,y+1)\). +- From the \(b+1\)-th to \(\frac{S_N}{2}\)-th move: move from \((x,y)\) to \((x+1,y)\). +- From the \(\frac{S_N}{2}+1\)-th to \(\frac{S_N}{2}+b\)-th move: move from \((x,y)\) to \((x,y-1)\). +- From the \(\frac{S_N}{2}+b+1\)-th to \(S_N\)-th move: move from \((x,y)\) to \((x-1,y)\). + +These moves can be grouped into \(D_i\) moves each (the first and third moves should not be mixed, but this does not happen since \(D_i \leq \frac{S_N}{2}\)). The maximum Manhattan distance from the origin during the moves is \(\frac{S_N}{2} \leq K\), so \(|x_i|+|y_i| \leq K\) always holds. + +If the sum is greater than \(2K\), then \(L\) and \(R\) do exist, and \(L=R\). First, the above three conditions must be satisfied. If they are satisfied, consider the following way to make \(N\) actions: move to a lattice point \(S_{L-1}\) away from the origin → move exactly \(D_L\) to a lattice point \(T_{R+1}\) away from the origin → return to the origin, which is possible if \(|S_{L-1}-T_{R+1}| \leq D_L \leq S_{L-1}+T_{R+1}\) is satisfied. The first inequality can be seen to hold from \(S_{L-1} < K \leq T_{R+1}+D_L, T_{R+1} < K \leq S_{L-1}+D_L\). The second inequality can also be seen to hold from [1]. Therefore, also in this case, the above three conditions are necessary and sufficient. + +## [3] The decision problem without fixed order + +Based on the discussion in [2], we consider the decision problem when the order of \(D_i\) is not fixed. First, if \(M \leq K\), it is always possible to finish \(N\) actions with the conditions satisfied. From now on, we will deal with the case where \(\frac{M}{2} \leq K < M\). + +In this case, \(L\) and \(R\) considered in [2] always exist. If there is only one \(D_i\) greater than \(K\) (i.e., only \(M\)), the answer to the decision problem does not change because we can put another \(M\) in \(D_i\) and perform the moves with a distance of \(M\) consecutively. Therefore, we only need to consider the case where there are at least two \(D_i\)’s greater than \(K\). + +In this case, since \(L < R\) always holds, the decision problem can be reduced to whether we can create two sets \(\{i_1, i_2, \dots, i_n\}\) (without common elements) that satisfy the following conditions: + +- \(D_{i_1} + D_{i_2} + \dots D_{i_{n-1}} < K\), +- \(K \leq D_{i_1} + D_{i_2} + \dots D_{i_{n-1}}+D_{i_n}\), and +- \(D_{i_n} \leq K+D_{i_1} + D_{i_2} + \dots D_{i_{n-1}}\). + +From the first condition, we have \(D_{i_k} < K\ (k\neq n)\). If \(D_{i_n} \leq K\), the third condition always holds. Now, if the first condition does not hold while \(D_{i_k} < K\ (k\neq n)\) is satisfied, we can recreate a set that satisfies these conditions by properly removing \(i_k\). Therefore, we only need to create a set that satisfies the following conditions: + +- \(D_{i_k} < K\ (k\neq n)\), +- \(K \leq D_{i_1} + D_{i_2} + \dots D_{i_{n-1}}+D_{i_n}\), and +- \(D_{i_n} \leq K+D_{i_1} + D_{i_2} + \dots D_{i_{n-1}}\). + +Furthermore, when \(D_{i_n} \leq K\) holds, we can add another \(D_i\) larger than \(K\) without violating these conditions (since there are at least two \(D_i\)’s larger than \(K\)). In this case, the second condition always holds, so the problem becomes whether we can create two sets \(\{i_1, i_2, \dots, i_n\}\) that satisfy the following conditions: + +- \(D_{i_k} < K\ (k\neq n)\), and +- \(D_{i_n} \leq K+D_{i_1} + D_{i_2} + \dots D_{i_{n-1}}\). + +It is clear that \(D_{i_n}\) should be as small as possible, so we should choose the two smallest \(D_i\)’s larger than \(K\). Therefore, we can reduce the problem to the following partial sum problem, where \(S\) is the sum of \(D_i\)’s less than or equal to \(K\), and \(A\) and \(B\) are the two smallest \(D_i\)’s larger than \(K\): + +- Determine if there is a partial sum \(s\) of \(D_i\)’s less than or equal to \(K\) such that \(A-K \leq s \leq S-(B-K)\). + +Let’s consider the case when \(S\) is very large. We will add \(D_i\) less than or equal to \(K\) in ascending order, and stop adding when the sum is greater than or equal to \(A-K\) to create a partial sum \(s\). Since the \(D_i\) being added are less than or equal to \(K\), we have \(s < A\), and this partial sum satisfies the above inequality if \(A+(B-K) \leq S\). In particular, if \(2M \leq S\), this inequality always holds, so we only need to consider the case when \(S < 2M\). In this case, the number of different values among \(D_i\)’s is \(O(\sqrt{M})\), so the partial sum problem can be solved in \(O(M\sqrt{M})\) time. + +By using this to perform a binary search, the whole problem can be solved in \(O(M\sqrt{M}\log M)\) time. However, considering that there is always a partial sum satisfying the above when there are two \(D_i\)’s between \(\frac{M}{2}\) and \(K\), inclusive, we only need to consider at most two sets of \(D_i\)’s less than or equal to \(K\), so the problem can be solved in \(O(M\sqrt{M})\) time. diff --git a/problems/DP-02/Atcoder/agc062_d/judge.json b/problems/DP-02/Atcoder/agc062_d/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..3c681a3e8db24e04971bdc768c52b0a7bf1b457f --- /dev/null +++ b/problems/DP-02/Atcoder/agc062_d/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 4.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 70, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/agc062_d/meta.json b/problems/DP-02/Atcoder/agc062_d/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..1bcbe55288dcef87f80b109689294024f3ce9953 --- /dev/null +++ b/problems/DP-02/Atcoder/agc062_d/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "agc062_d", + "contest": "agc062", + "type": "AGC", + "letter": "D", + "title": "Walk Around Neighborhood", + "url": "https://atcoder.jp/contests/agc062/tasks/agc062_d", + "difficulty": 3274, + "score": 1100, + "time_limit_sec": 4.0, + "memory_limit_mb": 1024, + "n_tests": 70, + "editorial_url": "https://atcoder.jp/contests/agc062/editorial/6467", + "code_source": "model", + "pid": "A3249" +} diff --git a/problems/DP-02/Atcoder/agc062_d/solution.cpp b/problems/DP-02/Atcoder/agc062_d/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..486e0ed6e857c707f5f3b72f7718f5d08fe3fbb4 --- /dev/null +++ b/problems/DP-02/Atcoder/agc062_d/solution.cpp @@ -0,0 +1,97 @@ +// agc062_d: D - Walk Around Neighborhood +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/agc062/editorial/6467 +// Judged AC on all 70 tests, max 0.03 s of the 4 s limit (submission 1). + +#include +using namespace std; + +using ull = unsigned long long; +using ll = long long; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N; + cin >> N; + vector D(N); + for (int &d : D) cin >> d; + sort(D.begin(), D.end()); + int M = D.back(); + vector sum(N + 1, 0); + for (int i = 0; i < N; ++i) sum[i + 1] = sum[i] + D[i]; + if (sum[N] < 2LL * M) { + cout << -1 << '\n'; + return 0; + } + + int base = lower_bound(D.begin(), D.end(), M / 2) - D.begin(); + array, 2> cache; + + auto build = [&](int cnt) { + // All distances are even, so store subset sums after dividing by two. + int S = int(sum[cnt] / 2); + vector bits(S / 64 + 1, 0); + bits[0] = 1; + auto shift_or = [&](int shift) { + int w = shift / 64, b = shift % 64; + if (b == 0) { + for (int j = int(bits.size()) - 1; j >= w; --j) + bits[j] |= bits[j - w]; + } else { + for (int j = int(bits.size()) - 1; j >= w; --j) { + ull x = bits[j - w] << b; + if (j > w) x |= bits[j - w - 1] >> (64 - b); + bits[j] |= x; + } + } + }; + for (int i = 0; i < cnt; ) { + int j = i; + while (j < cnt && D[j] == D[i]) ++j; + int remaining = j - i; + for (int block = 1; remaining > 0; block <<= 1) { + int take = min(block, remaining); + remaining -= take; + shift_or((D[i] / 2) * take); + } + i = j; + } + vector pref(S + 2, 0); + for (int i = 0; i <= S; ++i) + pref[i + 1] = pref[i] + int((bits[i / 64] >> (i % 64)) & 1ULL); + return pref; + }; + + auto feasible = [&](int K) { + if (K >= M) return true; + int cnt = upper_bound(D.begin(), D.end(), K) - D.begin(); + // Two distances in [M/2, K] can support the two ends independently. + if (cnt - base >= 2) return true; + if (sum[cnt] >= 2LL * M) return true; + + int A = D[cnt]; + // When only one distance exceeds K, duplicate it as in the reduction. + int B = (cnt + 1 < N ? D[cnt + 1] : A); + int S = int(sum[cnt]); + int low = A - K; + int high = S - (B - K); + if (low > high) return false; + int l = (low + 1) / 2; + int r = high / 2; + if (l > r) return false; + + int id = cnt - base; // Only zero or one can reach this point. + if (cache[id].empty()) cache[id] = build(cnt); + return cache[id][r + 1] > cache[id][l]; + }; + + int ng = M / 2 - 1, ok = M; + while (ok - ng > 1) { + int mid = (ok + ng) / 2; + if (feasible(mid)) ok = mid; + else ng = mid; + } + cout << ok << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/agc062_d/statement.md b/problems/DP-02/Atcoder/agc062_d/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..0281e3f48b1ee834b90ecdc7e6b5f13701978a76 --- /dev/null +++ b/problems/DP-02/Atcoder/agc062_d/statement.md @@ -0,0 +1,82 @@ +# D - Walk Around Neighborhood + +**Score:** 1100 points + +## Problem Statement + +Takahashi, with a notepad, is standing at the origin \((0,0)\) of a two-dimensional plane. His notepad has \(N\) **even numbers** \(D_i\ (1\leq i \leq N)\) written. + +Takahashi will perform the following actions \(N\) times on the plane. + +- He chooses and erases one even number written on the notepad. Let \(d\) be the chosen even number. He then moves to a point exactly \(d\) distance away in terms of Manhattan distance. More precisely, if Takahashi is currently at the coordinates \((x,y)\), he moves to a point \((x',y')\) such that \(|x-x'|+|y-y'|=d\). + +After performing \(N\) actions, Takahashi must return to the origin \((0,0)\). + +Determine if it is possible to perform \(N\) actions in such a way. If it is possible, find the minimum value of \(\displaystyle \max_{1\leq i \leq N}(|x_i|+|y_i|)\), where \((x_i,y_i)\) are the coordinates where Takahashi is located after the \(i\)-th action (we can prove that this value is an integer). + +## Constraints + +- \(1 \leq N \leq 2 \times 10^5\) +- \(2 \leq D_i \leq 2 \times 10^5\) +- \(D_i\ (1\leq i \leq N)\) is even. +- All input values are integers. + +## Input + +The input is given from Standard Input in the following format: + +``` +N +D_1 D_2 ... D_N +``` + +## Output + +If it is impossible to perform \(N\) actions as described above, print `-1`. If it is possible, print the minimum value of \(\displaystyle \max_{1\leq i \leq N}(|x_i|+|y_i|)\) as an integer. + +## Sample Input 1 + +``` +3 +2 4 6 +``` + +### Sample Output 1 + +``` +4 +``` + +If Takahashi erases \(2,6,4\) from his notepad for the first to third actions, respectively, and moves as \((0,0)\rightarrow (0,2) \rightarrow (-4,0) \rightarrow (0,0)\), then \(\displaystyle \max_{1\leq i \leq N}(|x_i|+|y_i|)\) is \(4\), which is the minimum. + +## Sample Input 2 + +``` +5 +2 2 2 2 6 +``` + +### Sample Output 2 + +``` +3 +``` + +If Takahashi erases \(2,2,6,2,2\) from his notepad for the first to fifth actions, respectively, and moves as \((0,0)\rightarrow (\frac{1}{2},\frac{3}{2})\rightarrow (0,3) \rightarrow (0,-3) \rightarrow (-\frac{1}{2},-\frac{3}{2}) \rightarrow (0,0)\), then \(\displaystyle \max_{1\leq i \leq N}(|x_i|+|y_i|)\) is \(3\), which is the minimum. + +Takahashi can also move to non-grid points. + +## Sample Input 3 + +``` +2 +2 200000 +``` + +### Sample Output 3 + +``` +-1 +``` + +Takahashi cannot return to the origin after performing \(N\) actions as described above. diff --git a/problems/DP-02/Atcoder/agc064_d/editorial.md b/problems/DP-02/Atcoder/agc064_d/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..4767f09ababac76a1a650d3852dd6186a0219f03 --- /dev/null +++ b/problems/DP-02/Atcoder/agc064_d/editorial.md @@ -0,0 +1,71 @@ +# D - Red and Blue Chips (editorial) + +Source: https://atcoder.jp/contests/agc064/editorial/6982 by evima + +We delete the last `B` in \(S\). Consider the string \(T\) of colors of chips in the final pile on square \(N\) **from bottom to top**, skipping the bottom chip. + +Let \(R\) and \(B\) be the number of `R` and `B` in \(S\), respectively. Then, + +\(T\) can be made to be the string `R`\(^{l_1}\)`B` `R`\(^{l_2}\)`B` `R`\(^{l_3}\)`B`\(\ldots\)`R`\(^{l_B}\)`B` `R`\(^{l_{B+1}}\) (where \(\sum_{i = 1}^{B+1} l_i = R\)) + +if and only if: + +(\(\star\)) \(S\) has \(B\) disjoint (not necessarily continuous) subsequences `R`\(^{l_1}\)`B`, `R`\(^{l_2}\)`B`, `R`\(^{l_3}\)`B`, \(\ldots\), and `R`\(^{l_B}\)`B`. + +Proof + + Let chip \(i\) be the chip starts on square \(i\), and \(X = (x_1, x_2, \ldots, x_N)\) be the sequence of chip numbers on square \(N\) in the final state from bottom to top. Here, \(X_1 = N\) always holds. Now, what can be obtained as the sequence \((x_2, x_3, \ldots, x_N)\) by the operation? + +First, if you are not limited to moving piles to blue squares, all permutations of \((1, 2, \ldots, N-1)\) can be obtained as \((x_2, x_3, \ldots, x_N)\). Specifically, the only way to obtain \((x_2, x_3, \ldots, x_N)\) is to choose, for each \(i\), the square with chip \(x_{i-1}\) at the top of the pile as the destination for the \(x_i\)-th operation. + +Thus, with the original restriction that you can only move piles to blue squares, + +\((x_2, x_3, \ldots, x_N)\) is obtainable + + if and only if: + +(\(\spadesuit\)) for every \(i = 2, 3, \ldots, N\), the square with chip \(x_{i-1}\) at the time of the \(x_i\)-th operation is blue. + + Here, note that once a chip is moved, it will always be on a blue square. Thus, chip \(x_{i-1}\) is on a red square if and only if chip \(x_{i-1}\) is a red chip that has never been moved. Thus, the condition (\(\spadesuit\)) is equivalent to: + +(\(\clubsuit\)) for every \(i = 2, 3, \ldots, N\), if chip \(x_{i-1}\) is red, then \(x_i \gt x_{i-1}\). + +\(T\) is a concatenation of \(x_2\)-th, \(x_3\)-th, \(\ldots\), \(x_N\)-th characters of \(S\) in this order, so the condition (\(\clubsuit\)) means: + +the set of strings obtainable as \(T\) is equal to the set of strings obtainable by extracting \(B\) disjoint subsequences of the form `R`\(^{\ast}\)`B` from \(S\) and concatenating them in any order, followed by all remaining `R`s. + +Since the `R`s appearing after the last `B` in \(S\) cannot be involved in the sequences `R`\(^{l_i}\)`B` in the above condition (\(\star\)), removing all `R`s appearing after the last `B` from \(S\) does not change the answer to the problem. Thus, we may let \(S = \)`R`\(^{c_B}\)`B` `R`\(^{c_{B-1}}\)`B` `R`\(^{c_{B-2}}\)`B`\(\ldots\)`R`\(^{c_1}\)`B`. + +When extracting \(B\) disjoint subsequences `R`\(^{l_1}\)`B`, `R`\(^{l_2}\)`B`, `R`\(^{l_3}\)`B`, \(\ldots\), `R`\(^{l_B}\)`B` from \(S\), note that it is optimal to correspond `B` that is more to the left in \(S\) to the `B` of a shorter subsequence `R`\(^{l_i }\)`B`. Then, the condition ( \(\star\)) is equivalent to the following. + +\(L' = (l_1, l_2, \ldots, l_B)\), the result of sorting \(L = (l_1, l_2, \ldots, l_B)\) in descending order, satisfies the following for all \(p = 0, 1, 2, \ldots, B\): + +\[\sum_{q = 0}^p l'_q \geq \sum_{q = 0} ^pc_q \tag{1}\] + +(where \(l'_0 \coloneqq R - \sum_{i = 1}^B l'_i\) and \(c_0 \coloneqq 0\)). + +Thus, the answer to this problem is: + +the sum of \(B! / (f_0!f_1!\ldots f_i!)\), the number of sequences that are permutations of \((l'_1, l'_2, \ldots, l'_B)\), over all integer sequences of length \((B+1)\), \(L' = (l'_0, l'_1, l'_2, \ldots, l'_B)\), such that: + +- \(\sum_{q = 0}^B l'_q = R\), +- \(l'_1 \geq l'_2 \geq \cdots \geq l'_B \geq 0\), and +- the inequality (1) is satisfied for all \(p= 0, 1, 2, \ldots, B\). + +Here, \(f_i\) is the number of occurrences of the integer \(i\) in \((l'_1, l'_2, \ldots, l'_B)\). + +This can be obtained by defining the DP table \(\mathrm{dp}[i][j][k]\) as follows: + +\(\mathrm{dp}[i][j][k]\): the sum of \(1 / (f_i!f_{i+1}!f_{i+2}\ldots f_R!)\) over all integer sequences of length \((j+1)\) such that: + +- \(\sum_{q = 0}^B l'_q = k\), +- \(l'_1 \geq l'_2 \geq \cdots \geq l'_j \geq i\), and +- the inequality (1) is satisfied for all \(p= 0, 1, 2, \ldots, j\), + +and then filling it in descending order of \(i\) to find \(\mathrm{dp}[0][B][R]\cdot B!\). From each state \(\mathrm{dp}[i][j][k]\), there is a transition for each \(l\) that adds \(l\) copies of the integer \((i-1)\) to the end of \(L'\) and moves to the state \(\mathrm{dp}[i-1][j+l][k+(i-1)l]\) with the coefficient \(1/l!\). + +Here, you only have to consider \(k\) that is at most \(R\), so it follows from \(R \geq k = \sum_{q = 0}^j l'_q \geq \sum_{q = 0}^j i \geq ij\) that you only have to consider \(j\) that is at most \(R/i\). Also, for \(l\), you only have to consider only \(O(R/i)\) transitions in the range \(k+(i-1)l \leq R\). Thus, the number of transitions needed is: + +\[O\Big(\sum_{i = 0}^R \sum_{j = 0}^{\lfloor R/i\rfloor} \sum_{k = 0}^R \frac{R}{i}\Big) = O\Big(R^3 \sum_{i = 0}^R \frac{1}{i^2}\Big) = O(R^3),\] + +and you can solve the problem in \(O(N^3)\) time. diff --git a/problems/DP-02/Atcoder/agc064_d/judge.json b/problems/DP-02/Atcoder/agc064_d/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..779de62ba7fe8164a9a1287b4f17231c1639caf6 --- /dev/null +++ b/problems/DP-02/Atcoder/agc064_d/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 53, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/agc064_d/meta.json b/problems/DP-02/Atcoder/agc064_d/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..6c6456bb94adcd6bb2cdcddbfd22ed016e54955e --- /dev/null +++ b/problems/DP-02/Atcoder/agc064_d/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "agc064_d", + "contest": "agc064", + "type": "AGC", + "letter": "D", + "title": "Red and Blue Chips", + "url": "https://atcoder.jp/contests/agc064/tasks/agc064_d", + "difficulty": 2808, + "score": 900, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 53, + "editorial_url": "https://atcoder.jp/contests/agc064/editorial/6982", + "code_source": "model", + "pid": "A3261" +} diff --git a/problems/DP-02/Atcoder/agc064_d/solution.cpp b/problems/DP-02/Atcoder/agc064_d/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c42ea24b1eebfc2b44a98bf07ab10f3baf423214 --- /dev/null +++ b/problems/DP-02/Atcoder/agc064_d/solution.cpp @@ -0,0 +1,76 @@ +// agc064_d: D - Red and Blue Chips +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/agc064/editorial/6982 +// Judged AC on all 53 tests, max 0.01 s of the 2 s limit (submission 1). + +#include +#include +using namespace std; +using mint = atcoder::modint998244353; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N; + string S; + cin >> N >> S; + + // The final blue chip is fixed. Trailing red chips in the remaining + // string must all belong to the final red run, so they can be removed. + S.pop_back(); + while (!S.empty() && S.back() == 'R') S.pop_back(); + + int R = 0, run = 0; + vector blocks; + for (char ch : S) { + if (ch == 'R') { + ++R; + ++run; + } else { + blocks.push_back(run); + run = 0; + } + } + const int B = (int)blocks.size(); + vector prefix(B + 1, 0); + for (int p = 1; p <= B; ++p) { + prefix[p] = prefix[p - 1] + blocks[B - p]; + } + + vector fact(B + 1), invfact(B + 1); + fact[0] = 1; + for (int i = 1; i <= B; ++i) fact[i] = fact[i - 1] * i; + invfact[B] = fact[B].inv(); + for (int i = B; i >= 1; --i) invfact[i - 1] = invfact[i] * i; + + const int W = R + 1; + vector dp((B + 1) * W), ndp((B + 1) * W); + // Initially, only l'_0 has been chosen. + for (int k = 0; k <= R; ++k) dp[k] = 1; + + // Add equal-valued runs to the nonincreasing sequence l'_1,...,l'_B. + for (int value = R; value >= 0; --value) { + fill(ndp.begin(), ndp.end(), mint(0)); + int max_j = min(B, R / (value + 1)); + for (int j = 0; j <= max_j; ++j) { + for (int k = j * (value + 1); k <= R; ++k) { + mint ways = dp[j * W + k]; + if (ways.val() == 0) continue; + + int limit = B - j; + if (value > 0) limit = min(limit, (R - k) / value); + for (int count = 0; count <= limit; ++count) { + int nj = j + count; + int nk = k + value * count; + // Every intermediate prefix must satisfy the inequality. + if (nk < prefix[nj]) break; + ndp[nj * W + nk] += ways * invfact[count]; + } + } + } + dp.swap(ndp); + } + + cout << (dp[B * W + R] * fact[B]).val() << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/agc064_d/statement.md b/problems/DP-02/Atcoder/agc064_d/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..25c51784252b336b4bf4f3c82dc80fe7599fd8d7 --- /dev/null +++ b/problems/DP-02/Atcoder/agc064_d/statement.md @@ -0,0 +1,86 @@ +# D - Red and Blue Chips + +**Score**: 900 points + +--- + +## Problem Statement + +There are \(N\) squares: square \(1\), square \(2\), \(\ldots\), square \(N\). Each square is colored red or blue. The colors of the squares are represented by a string \(S\) of length \(N\). Specifically, for each \(i = 1, 2, \ldots, N\), square \(i\) is colored red if the \(i\)-th character of \(S\) is `R`, and blue if it is `B`. Square \(N\) is always colored blue. + +Initially, each square has a chip of the same color as the square. + +For each \(i = 1, 2, \ldots, N-1\) in this order, let us perform the following operation: + +- Choose an integer \(j\) such that \(i < j \leq N\) and square \(j\) is colored **blue**, and place the pile of chips on square \(i\) on top of the pile of chips on square \(j\), keeping the order of the chips. + +Print the number of possible sequences of colors of chips of the \(N\)-chip pile on square \(N\) from top to bottom after the above process, modulo \(998244353\). + +--- + +## Constraints + +- \(2 \leq N \leq 300\) +- \(N\) is an integer. +- \(S\) is a string of length \(N\) consisting of `R` and `B`. +- The \(N\)-th character of \(S\) is `B`. + +--- + +## Input + +The input is given from Standard Input in the following format: +``` +N +S +``` + +--- + +## Output + +Print the answer. + +--- + +## Sample Input 1 +``` +4 +RBRB +``` + +### Sample Output 1 +``` +2 +``` + +We use a string consisting of `R` and `B`, corresponding to red and blue, to represent the sequence of colors of the chips of a pile from top to bottom. Particularly, the sequence of colors of the chips of a \(0\)-chip pile is an empty string \(\varepsilon\). + +Also, the state where the sequences of colors of chips of the piles on square \(1, 2, 3, 4\) are \(S_1, S_2, S_3, S_4\), respectively, is called as state \((S_1, S_2, S_3, S_4)\). + +The following process yields `RRBB` as the sequence of colors of chips of the pile on square \(4\): +- First, on each square, place a chip of the same color as the square, resulting in state \((R, B, R, B)\). +- Place the pile of chips on square \(1\) on top of the pile of chips on square \(2\), resulting in state \((\varepsilon, RB, R, B)\). +- Place the pile of chips on square \(2\) on top of the pile of chips on square \(4\), resulting in state \((\varepsilon, \varepsilon, R, RBB)\). +- Place the pile of chips on square \(3\) on top of the pile of chips on square \(4\), resulting in state \((\varepsilon, \varepsilon, \varepsilon, RRBB)\). + +The following process yields `RBRB` as the sequence of colors of chips of the pile on square \(4\): +- First, on each square, place a chip of the same color as the square, resulting in state \((R, B, R, B)\). +- Place the pile of chips on square \(1\) on top of the pile of chips on square \(4\), resulting in state \((\varepsilon, B, R, RB)\). +- Place the pile of chips on square \(2\) on top of the pile of chips on square \(4\), resulting in state \((\varepsilon, \varepsilon, R, BRB)\). +- Place the pile of chips on square \(3\) on top of the pile of chips on square \(4\), resulting in state \((\varepsilon, \varepsilon, \varepsilon, RBRB)\). + +The above two, `RRBB` and `RBRB`, are the only possible sequences of colors of chips of the pile on square \(4\) from top to bottom after the process in the problem. + +--- + +## Sample Input 2 +``` +20 +RRBRRRBBRBBBBRBRBRBB +``` + +### Sample Output 2 +``` +92378 +``` diff --git a/problems/DP-02/Atcoder/arc104_d/editorial.md b/problems/DP-02/Atcoder/arc104_d/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..82b19163ebf9338f47837a2b5cbb0d663009fb30 --- /dev/null +++ b/problems/DP-02/Atcoder/arc104_d/editorial.md @@ -0,0 +1,21 @@ +# D - Multiset Mean (editorial) + +Source: https://atcoder.jp/contests/arc104/editorial/163 by evima + +A naive DP would have the count of each number and the sum as the states, but its time complexity would be \(\mathrm{O}(N^4K^2)\) even after optimization, which is too slow, so we need to exploit the particular setting. + +Let us say we want to count sets whose average is \(m\). + +We can consider it as the number of balanced states where there is a straight bar that pivots on a fulcrum at coordinate \(m\), and we attach at most \(K\) objects of weight \(1\) at coordinates \(1, 2, \cdots, N\). (This is because we can transform \((\sum_{x \in S}x ) / |S| = m\) to \((\sum_{x \in S} (x - m) ) = 0\).) + +#### An easy-to-implement solution + +Let us divide the bar at the fulcrum into the left and right parts. Now we have to choose two subsets from \(S = \{1,2,\cdots,m-1\}, T = \{1,2,\cdots,N-m\}\) so that the sums are equal. Thus, if we precompute dp[\(i\)][\(j\)] := (the number of sets totaling \(j\) considering \(1,2,\cdots,i\)) for every \(i\) and \(j\), we can process the queries in \(\mathrm{O}(N^2K)\) time on average per query. For the precomputation, it is dp[\(i-1\)][\(j\)], dp[\(i-1\)][\(j - i\)]\(, \cdots, \) dp[\(i-1\)][\(j - i * K\)] that transition to dp[\(i\)][\(j\)] above, so we can optimize it by maintaining the sum while “sliding” within each \(\mod i\), and the time complexity will be \(\mathrm{O}(N^3K)\). + +#### A solution using Formal Power Series + +Even if we do not notice the use of precomputation, we can still maintain the distribution of sums in the left and right parts while shifting the average one by one. (Since the counts are fixed, the relative distribution only changes at both ends.) + +If we think of the DP above as maintaining \(\prod(1 + x^i + x^{2i} + \cdots + x^{Ki})\), since \((1 + x^i + x^{2i} + \cdots + x^{Ki}) = (1 - x^{(K+1)i})/(1-x^i)\), the addition and removal at both ends can be regarded as multiplying or dividing this formula. + +This solution has the same time complexity as the solution above and an improved space complexity. diff --git a/problems/DP-02/Atcoder/arc104_d/judge.json b/problems/DP-02/Atcoder/arc104_d/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..78195c1441d0ca88562064aa8b6a9c529b940c83 --- /dev/null +++ b/problems/DP-02/Atcoder/arc104_d/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 4.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 23, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/arc104_d/meta.json b/problems/DP-02/Atcoder/arc104_d/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..db10ff41eff89d5a38931533abeb7245bedd3694 --- /dev/null +++ b/problems/DP-02/Atcoder/arc104_d/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "arc104_d", + "contest": "arc104", + "type": "ARC", + "letter": "D", + "title": "Multiset Mean", + "url": "https://atcoder.jp/contests/arc104/tasks/arc104_d", + "difficulty": 2251, + "score": 700, + "time_limit_sec": 4.0, + "memory_limit_mb": 1024, + "n_tests": 23, + "editorial_url": "https://atcoder.jp/contests/arc104/editorial/163", + "code_source": "model", + "pid": "A3570" +} diff --git a/problems/DP-02/Atcoder/arc104_d/solution.cpp b/problems/DP-02/Atcoder/arc104_d/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8ccb7defe1e3deac03ac1e417c71fac8f5c2c877 --- /dev/null +++ b/problems/DP-02/Atcoder/arc104_d/solution.cpp @@ -0,0 +1,50 @@ +// arc104_d: D - Multiset Mean +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/arc104/editorial/163 +// Judged AC on all 23 tests, max 0.17 s of the 4 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, K, M; + cin >> N >> K >> M; + + // dp[i][s]: ways to obtain sum s using 0..K copies of 1..i. + vector> dp(N); + dp[0] = {1}; + for (int i = 1; i < N; ++i) { + int maxSum = K * i * (i + 1) / 2; + int previousMax = static_cast(dp[i - 1].size()) - 1; + int window = (K + 1) * i; + dp[i].resize(maxSum + 1); + for (int s = 0; s <= maxSum; ++s) { + int value = (s <= previousMax ? dp[i - 1][s] : 0); + if (s >= i) { + value += dp[i][s - i]; + if (value >= M) value -= M; + } + if (s >= window) { + value -= dp[i - 1][s - window]; + if (value < 0) value += M; + } + dp[i][s] = value; + } + } + + for (int x = 1; x <= N; ++x) { + const auto &left = dp[x - 1]; + const auto &right = dp[N - x]; + int limit = static_cast(min(left.size(), right.size())); + long long balanced = 0; + for (int s = 0; s < limit; ++s) { + balanced = (balanced + 1LL * left[s] * right[s]) % M; + } + // There are K+1 choices for copies of x; exclude the empty multiset. + long long answer = (balanced * (K + 1) - 1 + M) % M; + cout << answer << '\n'; + } + return 0; +} diff --git a/problems/DP-02/Atcoder/arc104_d/statement.md b/problems/DP-02/Atcoder/arc104_d/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..e0a2112ac10efed62f28e6976fbee44a2521e49c --- /dev/null +++ b/problems/DP-02/Atcoder/arc104_d/statement.md @@ -0,0 +1,76 @@ +# D - Multiset Mean + +**Score**: 700 points + +## Problem Statement +Given positive integers \(N, K\) and \(M\), solve the following problem for every integer \(x\) between \(1\) and \(N\) (inclusive): +- Find the number, modulo \(M\), of non-empty multisets containing between \(0\) and \(K\) (inclusive) instances of each of the integers \(1, 2, 3 \cdots, N\) such that the average of the elements is \(x\). + +## Constraints +- \(1 \leq N, K \leq 100\) +- \(10^8 \leq M \leq 10^9 + 9\) +- \(M\) is prime. +- All values in input are integers. + +## Input +Input is given from Standard Input in the following format: +``` +N K M +``` + +## Output +Use the following format: +``` +c_1 +c_2 +: +c_N +``` +Here, \(c_x\) should be the number, modulo \(M\), of multisets such that the average of the elements is \(x\). + +## Sample Input 1 +``` +3 1 998244353 +``` + +## Sample Output 1 +``` +1 +3 +1 +``` +Consider non-empty multisets containing between \(0\) and \(1\) instance(s) of each of the integers between \(1\) and \(3\). Among them, there are: +- one multiset such that the average of the elements is \(k = 1\): \(\{1\}\); +- three multisets such that the average of the elements is \(k = 2\): \(\{2\}, \{1, 3\}, \{1, 2, 3\}\); +- one multiset such that the average of the elements is \(k = 3\): \(\{3\}\). + +## Sample Input 2 +``` +1 2 1000000007 +``` + +## Sample Output 2 +``` +2 +``` +Consider non-empty multisets containing between \(0\) and \(2\) instances of each of the integers between \(1\) and \(1\). Among them, there are: +- two multisets such that the average of the elements is \(k = 1\): \(\{1\}, \{1, 1\}\). + +## Sample Input 3 +``` +10 8 861271909 +``` + +## Sample Output 3 +``` +8 +602 +81827 +4054238 +41331779 +41331779 +4054238 +81827 +602 +8 +``` diff --git a/problems/DP-02/Atcoder/arc105_f/editorial.md b/problems/DP-02/Atcoder/arc105_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..3716ccb0b902ef3930c0a3a2e0ec305779a5d77d --- /dev/null +++ b/problems/DP-02/Atcoder/arc105_f/editorial.md @@ -0,0 +1,13 @@ +# F - Lights Out on Connected Graph (editorial) + +Source: https://atcoder.jp/contests/arc105/editorial/204 by evima + +\(G = (V,E)\) is good if and only if \(G\) is a connected bipartite graph. + +For \(S \subseteq V\), let \(f(S)\) be the number of ways to remove some edges from \(G[S]\), the subgraph induced in \(G\) by \(S\), so that the resulting graph \(G[S]^{\prime}\) is a connected bipartite graph. We are done if we can find \(f(V)\), but it is hard to compute \(f\) directly, so let us introduce a supplementary function. + +For \(S \subseteq V\), let \(g(S)\) be the sum of the number of ways to paint \(G[S]^{\prime}\) using two colors over all graphs \(G[S]^{\prime}\) that can result from removing some edges in \(G[S]\), the subgraph induced in \(G\) by \(S\). + +We can compute \(g\) by finding the number of ways to paint the vertices black, white, or grey and then remove edges so that every remaining edge connects a black vertex and a white vertex. \(f(S)\) can be found by subtracting from \(g(S)\) the number of the colorings where \(S\) is disconnected, then dividing the result by \(2\). + +We can compute \(f\) in the order from the empty set to \(V\). When properly implemented, it takes \(O(2^N M + 3^N)\) time, which is fast enough. diff --git a/problems/DP-02/Atcoder/arc105_f/judge.json b/problems/DP-02/Atcoder/arc105_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..2824f35b34e918d204ede7c5d885344fe718f830 --- /dev/null +++ b/problems/DP-02/Atcoder/arc105_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 3.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 33, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/arc105_f/meta.json b/problems/DP-02/Atcoder/arc105_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..de05f94ab39ce3e0cbaac794791e50fa0495fc9b --- /dev/null +++ b/problems/DP-02/Atcoder/arc105_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "arc105_f", + "contest": "arc105", + "type": "ARC", + "letter": "F", + "title": "Lights Out on Connected Graph", + "url": "https://atcoder.jp/contests/arc105/tasks/arc105_f", + "difficulty": 3231, + "score": 900, + "time_limit_sec": 3.0, + "memory_limit_mb": 1024, + "n_tests": 33, + "editorial_url": "https://atcoder.jp/contests/arc105/editorial/204", + "code_source": "model", + "pid": "A3578" +} diff --git a/problems/DP-02/Atcoder/arc105_f/solution.cpp b/problems/DP-02/Atcoder/arc105_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ea71d4cd94252a2eeed302eca6d61b7d91fc2509 --- /dev/null +++ b/problems/DP-02/Atcoder/arc105_f/solution.cpp @@ -0,0 +1,69 @@ +// arc105_f: F - Lights Out on Connected Graph +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/arc105/editorial/204 +// Judged AC on all 33 tests, max 0.14 s of the 3 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + constexpr int MOD = 998244353; + vector adj(N, 0); + for (int i = 0; i < M; ++i) { + int a, b; + cin >> a >> b; + --a; + --b; + adj[a] |= 1 << b; + adj[b] |= 1 << a; + } + + int size = 1 << N; + vector edge_count(size, 0); + for (int mask = 1; mask < size; ++mask) { + int v = __builtin_ctz((unsigned)mask); + int rest = mask & (mask - 1); + edge_count[mask] = edge_count[rest] + __builtin_popcount((unsigned)(adj[v] & rest)); + } + + vector pow2(M + 1, 1); + for (int i = 1; i <= M; ++i) { + pow2[i] = (2LL * pow2[i - 1]) % MOD; + } + + // g[S]: all properly two-colored edge subsets on S. + // connected[S]: the same count restricted to connected graphs (= 2*f[S]). + vector g(size, 0), connected(size, 0); + g[0] = 1; + for (int mask = 1; mask < size; ++mask) { + int bit = mask & -mask; + int rest = mask ^ bit; + + // Count colorings with 'bit' in the first color class, then double. + // The omitted full first color class contributes 1. + unsigned long long coloring_sum = 1; + unsigned long long disconnected_sum = 0; + if (rest != 0) { + for (int sub = (rest - 1) & rest; ; sub = (sub - 1) & rest) { + int first = sub | bit; + int other = rest ^ sub; + int crossing = edge_count[mask] - edge_count[first] - edge_count[other]; + coloring_sum += pow2[crossing]; + + // 'first' is the connected component containing 'bit'. + disconnected_sum += (unsigned long long)connected[first] * g[other] % MOD; + if (sub == 0) break; + } + } + g[mask] = (2 * coloring_sum) % MOD; + connected[mask] = g[mask] - int(disconnected_sum % MOD); + if (connected[mask] < 0) connected[mask] += MOD; + } + + cout << (long long)connected[size - 1] * ((MOD + 1) / 2) % MOD << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/arc105_f/statement.md b/problems/DP-02/Atcoder/arc105_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..dd923fd0c279598327cdd33ffffa81a6a3403c15 --- /dev/null +++ b/problems/DP-02/Atcoder/arc105_f/statement.md @@ -0,0 +1,128 @@ +# F - Lights Out on Connected Graph + +### Score: 900 points + +## Problem Statement + +Given is an undirected graph \( G \) consisting of \( N \) vertices numbered \( 1 \) through \( N \) and \( M \) edges numbered \( 1 \) through \( M \). It is guaranteed that \( G \) is connected and contains no self-loops and no multi-edges. Edge \( i \) connects Vertex \( a_i \) and Vertex \( b_i \) bidirectionally. Each edge can be painted red or blue. Initially, every edge is painted red. + +Consider making a new graph \( G' \) by removing zero or more edges from \( G \). There are \( 2^M \) graphs that \( G' \) can be. Among them, find the number of good graphs defined below, modulo \( 998244353 \). + +\( G' \) is said to be a *good graph* when both of the following conditions are satisfied: + +- \( G' \) is connected. +- It is possible to make all edges blue by doing the following operation zero or more times. + - Choose one vertex and change the color of every edge incident to that vertex, that is, red to blue and vice versa. + +## Constraints + +- All values in input are integers. +- \( 1 \leq N \leq 17 \) +- \( N-1 \leq M \leq N(N-1)/2 \) +- \( G \) is connected and has no self-loops and no multi-edges. + +## Input + +Input is given from Standard Input in the following format: +``` +N M +a_1 b_1 +... +a_M b_M +``` + +## Output + +Print the number of good graphs among the ones that \( G' \) can be, modulo \( 998244353 \). + +## Sample Input 1 +``` +3 2 +1 2 +2 3 +``` + +### Sample Output 1 +``` +1 +``` +- The conditions are satisfied only if neither Edge \( 1 \) nor Edge \( 2 \) is removed. + - In this case, we can make all edges blue by, for example, doing the operation for Vertex \( 2 \). +- Otherwise, the graph gets disconnected and thus does not satisfy the condition. + +## Sample Input 2 +``` +4 6 +1 2 +1 3 +1 4 +2 3 +2 4 +3 4 +``` + +### Sample Output 2 +``` +19 +``` + +## Sample Input 3 +``` +17 50 +16 17 +10 9 +16 10 +5 17 +6 15 +5 9 +15 11 +16 1 +8 13 +6 17 +15 3 +16 15 +11 3 +7 6 +1 4 +11 13 +10 6 +10 12 +3 16 +7 3 +16 5 +13 3 +12 13 +7 11 +3 12 +13 10 +1 12 +9 15 +11 14 +4 6 +13 2 +6 1 +15 2 +1 14 +15 17 +2 11 +14 13 +16 9 +16 8 +8 17 +17 12 +1 11 +6 12 +17 2 +8 1 +14 6 +9 7 +11 10 +5 14 +17 7 +``` + +### Sample Output 3 +``` +90625632 +``` +- Be sure to find the count modulo \( 998244353 \). diff --git a/problems/DP-02/Atcoder/arc132_f/editorial.md b/problems/DP-02/Atcoder/arc132_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..feef0901e2235ba4b1d5944886d8407e4b486c4e --- /dev/null +++ b/problems/DP-02/Atcoder/arc132_f/editorial.md @@ -0,0 +1,92 @@ +# F - Takahashi The Strongest (editorial) + +Source: https://atcoder.jp/contests/arc132/editorial/3204 by evima + +Focusing only on Aoki’s and Snuke’s strategies, there are four possible scenarios for the \(i\)-th round, as follows. + +1. Takahashi can become the only winner by playing paper. (The other two both play rock.) +2. Takahashi can become the only winner by playing rock. (The other two both play scissors.) +3. Takahashi can become the only winner by playing scissors. (The other two both play paper.) +4. Takahashi cannot become the only winner by playing any hand. (The other two play different hands.) + +Let the **opponents’ strategy** be the sequence \((v_1,\dots,v_t)\), representing each of the \(k\) rounds as one of the four above. + +### Find the probability distribution for the opponents’ strategy in \(O(k4^k)\). + +Let us find a way to find the probability distribution representing what the opponents’ strategy becomes among the \(4^k\) possible ones. + +An obvious policy is to try all \(nm\) choices, but it takes \(O(k9^k)\) time, so let us do convolution using DP similar to the fast zeta transform. + +#### Policy + +Let \(A_{v_1,\dots,v_k}\) be the probability that Aoki satisfies the following conditions, where \(v_i=1,2,3\). + +- If \(v_i=1\), he plays rock in the \(i\)-th round. +- If \(v_i=2\), he plays scissors in the \(i\)-th round. +- If \(v_i=3\), he plays paper in the \(i\)-th round. + +Let \(A'_{v_1,\dots,v_k}\) be the probability that Aoki satisfies the following conditions, where \(v_i=1,2,3,4\). + +- If \(v_i=1\), he plays rock in the \(i\)-th round. +- If \(v_i=2\), he plays scissors in the \(i\)-th round. +- If \(v_i=3\), he plays paper in the \(i\)-th round. +- If \(v_i=4\), he may play anything. + +Let \(f\) be the process that finds \(\{A'_{v_1,\dots,v_k}\}_{v_1,\dots,v_n=1,2,3,4}\) from \(\{A_{v_1,\dots,v_k}\}_{v_1,\dots,v_n=1,2,3,4}\). + +For Snuke, we similarly define \(B_{v_1,\dots,v_k}\) and \(B'_{v_1,\dots,v_k}\). Then, \(C'_{v_1,\dots,v_k}:=A'_{v_1,\dots,v_k}B'_{v_1,\dots,v_k}\) will be the probability that the following is satisfied. + +- If \(v_i=1\), both play rock in the \(i\)-th round. +- If \(v_i=2\), both play scissors in the \(i\)-th round. +- If \(v_i=3\), both play paper in the \(i\)-th round. +- If \(v_i=4\), they may play anything. + +Therefore, if \(C_{v_1,\dots,v_k}\) is the sequence that satisfies \(\{C'_{v_1,\dots,v_k}\}_{v_i=1,2,3,4} = f(\{C_{v_1,\dots,v_k}\}_{v_i=1,2,3,4})\), \(C_{v_1,\dots,v_k}\) is the probability distribution that we seek. + +#### Implementation + +\(\{A_{v_1,\dots,v_k}\}_{v_1,\dots,v_n=1,2,3,4}\) can be directly found from input. + +\(f\) can be computed by adding each term \(A_{v_1,\dots,v_k}\) such that \(v_i\neq 4\) to \(A_{v_1,\dots,v_{i-1},4,v_{i+1}\dots v_k}\), similarly to the fast zeta transform. That is, we let \(A^0_{v_1,\dots,v_k}:=A_{v_1,\dots,v_k}\), compute \(A^{i+1}_{v_1,\dots,v_k}\) for each \(i\) as follows, and then let \(A'_{v_1,\dots,v_k}:=A^k_{v_1,\dots,v_k}\). (Here, superscripts are indices, not powers.) + +- \(A^{i+1}_{v_1,\dots,v_{i-1},1,v_{i+1}\dots v_k} := A^i_{v_1,\dots,v_{i-1},1,v_{i+1}\dots v_k}\) +- \(A^{i+1}_{v_1,\dots,v_{i-1},2,v_{i+1}\dots v_k} := A^i_{v_1,\dots,v_{i-1},2,v_{i+1}\dots v_k}\) +- \(A^{i+1}_{v_1,\dots,v_{i-1},3,v_{i+1}\dots v_k} := A^i_{v_1,\dots,v_{i-1},3,v_{i+1}\dots v_k}\) +- \(A^{i+1}_{v_1,\dots,v_{i-1},4,v_{i+1}\dots v_k} := A^i_{v_1,\dots,v_{i-1},1,v_{i+1}\dots v_k}+A^i_{v_1,\dots,v_{i-1},2,v_{i+1}\dots v_k}+A^i_{v_1,\dots,v_{i-1},3,v_{i+1}\dots v_k}+A^i_{v_1,\dots,v_{i-1},4,v_{i+1}\dots v_k}\) + +Here, \(A^j_{v_1,\dots,v_k}\) is the probability that the following is satisfied. + +- For each \(i\) such that \(i +using namespace std; + +// Replace a wildcard coordinate by the sum over all four coordinates. +static void zeta_transform(vector& a) { + const int size = (int)a.size(); + for (int step = 1; step < size; step *= 4) { + for (int base = 0; base < size; base += 4 * step) { + int* p0 = a.data() + base; + int* p1 = p0 + step; + int* p2 = p1 + step; + int* p3 = p2 + step; + for (int j = 0; j < step; ++j) { + p3[j] += p0[j] + p1[j] + p2[j]; + } + } + } +} + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int k, n, m; + cin >> k >> n >> m; + const int size = 1 << (2 * k); + vector a(size), b(size); + + // Coordinates 0,1,2 mean both opponents play R,S,P, respectively; + // coordinate 3 is the wildcard. + auto read_strategies = [&](vector& v, int count) { + string s; + for (int i = 0; i < count; ++i) { + cin >> s; + int index = 0; + for (char ch : s) { + int digit = (ch == 'R' ? 0 : ch == 'S' ? 1 : 2); + index = index * 4 + digit; + } + ++v[index]; + } + }; + read_strategies(a, n); + read_strategies(b, m); + + zeta_transform(a); + zeta_transform(b); + vector c(size); + for (int i = 0; i < size; ++i) { + c[i] = 1LL * a[i] * b[i]; + } + vector().swap(a); + vector().swap(b); + + // Fuse the editorial's inverse transform and unhappy-count transform. + // In one coordinate, inverse first makes x3 into x3-x0-x1-x2. + // The next transform consequently gives (x3-x0,x3-x1,x3-x2,x3). + // Operations on distinct coordinates commute, so these can be fused. + for (int step = 1; step < size; step *= 4) { + for (int base = 0; base < size; base += 4 * step) { + long long* p0 = c.data() + base; + long long* p1 = p0 + step; + long long* p2 = p1 + step; + long long* p3 = p2 + step; + for (int j = 0; j < step; ++j) { + const long long all = p3[j]; + p0[j] = all - p0[j]; + p1[j] = all - p1[j]; + p2[j] = all - p2[j]; + } + } + } + + const long long total = 1LL * n * m; + // Digits 0,1,2 now correspond to Takahashi's P,R,S in lexicographic order. + auto output = [&](auto&& self, int remaining, int index) -> void { + if (remaining == 0) { + cout << total - c[index] << '\n'; + return; + } + for (int digit = 0; digit < 3; ++digit) { + self(self, remaining - 1, index * 4 + digit); + } + }; + output(output, k, 0); + return 0; +} diff --git a/problems/DP-02/Atcoder/arc132_f/statement.md b/problems/DP-02/Atcoder/arc132_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..91301f2eacc7b223049a4465f4da65bd27e9c5b2 --- /dev/null +++ b/problems/DP-02/Atcoder/arc132_f/statement.md @@ -0,0 +1,116 @@ +# F - Takahashi The Strongest + +**Score**: 900 points + +## Problem Statement +Takahashi, Aoki, and Snuke will play a game with `k` rounds of rock-paper-scissors. + +Let us call a string of length `k` consisting of `P`, `R`, `S` a **strategy**. The game proceeds as follows. +- Each participant chooses a strategy. +- Play `k` rounds of rock-paper-scissors. In the `i`-th round, each participant plays the hand corresponding to the `i`-th character in the chosen strategy: paper for `P`, rock for `R`, and scissors for `S`. + +Aoki will randomly choose one strategy from the `n` strategies `a_1, ..., a_n` with equal probability. Snuke will randomly choose one strategy from the `m` strategies `b_1, ..., b_m` with equal probability. Their choices are independent of each other. + +Takahashi will be happy if he is the **only** winner in at least one of the `k` rounds. For each of the `3^k` possible strategies, find the probability that he becomes happy when choosing that strategy and print it multiplied by `nm` as an integer (it can be proved that this value is an integer). + +## Notes +In the game of rock-paper-scissors with three players, the following three scenarios make Takahashi the only winner: +- Takahashi plays paper, while Aoki and Snuke play rock. +- Takahashi plays rock, while Aoki and Snuke play scissors. +- Takahashi plays scissors, while Aoki and Snuke play paper. + +## Constraints +- `1 ≤ k ≤ 12` +- `1 ≤ n, m ≤ 3^k` +- Each of `a_i` and `b_i` is a string of length `k` consisting of `P`, `R`, `S`. +- `a_1, ..., a_n` are distinct. +- `b_1, ..., b_m` are distinct. + +--- + +## Input +Input is given from Standard Input in the following format: +``` +k n m +a_1 +... +a_n +b_1 +... +b_m +``` + +## Output +Print `3^k` values. The `i`-th value should be the answer when Takahashi chooses the `i`-th lexicographically smallest possible strategy. + +--- + +## Sample Input 1 +``` +2 1 3 +RS +RP +RR +RS +``` + +## Sample Output 1 +``` +3 +3 +3 +0 +1 +0 +0 +1 +0 +``` +Aoki chooses the strategy `RS`. If Snuke chooses the strategy `RP`, the strategies that can meet Takahashi's objective are `PP`, `PR`, `PS`. If Snuke chooses the strategy `RR`, the strategies that can meet Takahashi's objective are `PP`, `PR`, `PS`. If Snuke chooses the strategy `RS`, the strategies that can meet Takahashi's objective are `PP`, `PR`, `PS`, `RR`, `SR`. Therefore, the probabilities when Takahashi chooses `PP`, `PR`, `PS`, `RP`, `RR`, `RS`, `SP`, `SR`, `SS` are `1`, `1`, `1`, `0`, `1/3`, `0`, `0`, `1/3`, `0`, respectively. Print them multiplied by `3`. + +--- + +## Sample Input 2 +``` +3 5 4 +RRP +SSS +RSR +PPP +RSS +PPS +SRP +SSP +RRS +``` + +## Sample Output 2 +``` +4 +7 +7 +6 +9 +10 +4 +7 +8 +4 +8 +7 +4 +8 +8 +3 +7 +7 +3 +7 +6 +4 +8 +8 +1 +5 +5 +``` diff --git a/problems/DP-02/Atcoder/arc137_d/editorial.md b/problems/DP-02/Atcoder/arc137_d/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..df991a0be3e1bddd29d098164eeaa080ea34d145 --- /dev/null +++ b/problems/DP-02/Atcoder/arc137_d/editorial.md @@ -0,0 +1,13 @@ +# D - Prefix XORs (editorial) + +Source: https://atcoder.jp/contests/arc137/editorial/3608 by evima + +For a fixed \(k\), let us consider the contribution of \(A_i\) to the answer. + +Repeated applications of one-dimensional prefix sum correspond to vertical and horizontal moves in a two-dimensional grid. It follows that if \(\binom{(N-i)+(k-1)}{k-1}\) is odd, the answer gets XORed by \(A_i\), and if it is even, the answer is unaffected. + +\(\binom{(N-i)+(k-1)}{k-1}\) is odd iff the positions of all \(1\)’s in the binary representations of \((N-i)\) and \(k-1\) are different.([Lucas’s theorem](https://en.wikipedia.org/wiki/Lucas%27s_theorem)) + +Now, let \(S\) be the smallest power of \(2\) such that \(\max(N,M) \leq S\). Then, the condition of \(\binom{(N-i)+(k-1)}{k-1}\) being odd can be rephrased into the set of bit positions of \(1\)’s in \(S-1-(N-i)\) containing the set of bit positions of \(1\)’s in \(k-1\). + +At this point, we can solve the problem in a way similar to the fast zeta transform. The complexity is \(O(\max(N,M) \log \max(N,M))\). diff --git a/problems/DP-02/Atcoder/arc137_d/judge.json b/problems/DP-02/Atcoder/arc137_d/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..5121057f4caab9713fe9780cbd11c3915cb66581 --- /dev/null +++ b/problems/DP-02/Atcoder/arc137_d/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 4.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 15, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/arc137_d/meta.json b/problems/DP-02/Atcoder/arc137_d/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..ab65254bde2d535b528932a02a82bf25b080731f --- /dev/null +++ b/problems/DP-02/Atcoder/arc137_d/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "arc137_d", + "contest": "arc137", + "type": "ARC", + "letter": "D", + "title": "Prefix XORs", + "url": "https://atcoder.jp/contests/arc137/tasks/arc137_d", + "difficulty": 2191, + "score": 700, + "time_limit_sec": 4.0, + "memory_limit_mb": 1024, + "n_tests": 15, + "editorial_url": "https://atcoder.jp/contests/arc137/editorial/3608", + "code_source": "model", + "pid": "A3769" +} diff --git a/problems/DP-02/Atcoder/arc137_d/solution.cpp b/problems/DP-02/Atcoder/arc137_d/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f80e8a7a84970c1b934fc7f4674a998de52c60b3 --- /dev/null +++ b/problems/DP-02/Atcoder/arc137_d/solution.cpp @@ -0,0 +1,38 @@ +// arc137_d: D - Prefix XORs +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/arc137/editorial/3608 +// Judged AC on all 15 tests, max 0.15 s of the 4 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + + int S = 1; + while (S < max(N, M)) S <<= 1; + + vector f(S, 0); + for (int i = 0; i < N; ++i) { + cin >> f[S - N + i]; + } + + // Superset zeta transform, with XOR in place of addition. + for (int bit = 1; bit < S; bit <<= 1) { + for (int base = 0; base < S; base += bit * 2) { + for (int j = 0; j < bit; ++j) { + f[base + j] ^= f[base + bit + j]; + } + } + } + + for (int k = 0; k < M; ++k) { + if (k) cout << ' '; + cout << f[k]; + } + cout << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/arc137_d/statement.md b/problems/DP-02/Atcoder/arc137_d/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..e51a35be7c78da0df466ee37af74c1300b0b7d14 --- /dev/null +++ b/problems/DP-02/Atcoder/arc137_d/statement.md @@ -0,0 +1,64 @@ +# D - Prefix XORs + +**Score :** 700 points + +## Problem Statement +You are given an integer sequence of length \(N\): \(A=(A_1,A_2,\cdots,A_N)\), and an integer \(M\). + +For each \(k=1,2,\cdots,M\), find the value of \(A_N\) after doing the operation below \(k\) times. +- For every \(i\) (\(1 \leq i \leq N\)), simultaneously, replace the value of \(A_i\) with \(A_1 \oplus A_2 \oplus \cdots \oplus A_i\). + +Here, \(\oplus\) denotes bitwise \(\mathrm{XOR}\). + +
+ + What is bitwise \(\mathrm{XOR}\)? + + The bitwise \(\mathrm{XOR}\) of non-negative integers \(A\) and \(B\), \(A \oplus B\), is defined as follows: + - When \(A \oplus B\) is written in base two, the digit in the \(2^k\)'s place (\(k \geq 0\)) is \(1\) if exactly one of \(A\) and \(B\) is \(1\), and \(0\) otherwise. + + For example, we have \(3 \oplus 5 = 6\) (in base two: \(011 \oplus 101 = 110\).
+ Generally, the bitwise \(\mathrm{XOR}\) of \(k\) integers \(p_1, p_2, p_3, \dots, p_k\) is defined as \((\dots ((p_1 \oplus p_2) \oplus p_3) \oplus \dots \oplus p_k)\). We can prove that this value does not depend on the order of \(p_1, p_2, p_3, \dots p_k\). +
+ +## Constraints +- \(1 \leq N \leq 10^6\) +- \(1 \leq M \leq 10^6\) +- \(0 \leq A_i < 2^{30}\) +- All values in input are integers. + +## Input +Input is given from Standard Input in the following format: +``` +N M +A_1 A_2 \cdots A_N +``` + +## Output +Print the answers for respective values of \(k\), separated by spaces. + +## Sample Input 1 +``` +3 2 +2 1 3 +``` + +## Sample Output 1 +``` +0 1 +``` +Each operation changes \(A\) as follows. +- Initially: \(A=(2,1,3)\). +- After the first operation: \(A=(2,3,0)\). +- After the second operation: \(A=(2,1,1)\). + +## Sample Input 2 +``` +10 12 +721939838 337089195 171851101 1069204754 348295925 77134863 839878205 89360649 838712948 918594427 +``` + +## Sample Output 2 +``` +716176219 480674244 678890528 642764255 259091950 663009497 942498522 584528336 364872846 145822575 392655861 844652404 +``` diff --git a/problems/DP-02/Atcoder/arc138_f/editorial.md b/problems/DP-02/Atcoder/arc138_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..01279a3a643e7de011b994536a8aa19ade179716 --- /dev/null +++ b/problems/DP-02/Atcoder/arc138_f/editorial.md @@ -0,0 +1,18 @@ +# F - KD Tree (editorial) + +Source: https://atcoder.jp/contests/arc138/editorial/3758 by evima + +Let \(f(A)\) be the number of sequences obtained by arranging a set \(A\) of points. Here, the \(X\)- or \(Y\)-coordinates of the points may not be a permutation of the smallest positive integers. In the actual computation of \(f\), however, we compress the values and make it a permutation of those numbers. + +Basically, we try all possibilities for the position and direction of the division of \(A\) to recursively call \(f\). However, this can count the same sequence multiple times. + +This is because there is a degree of freedom in dividing \(A\) even after fixing the sequence to get. To handle it, let us adopt the following rule so that there is a unique way to divide \(A\). + +- Let \(X_x\) denote the division according to whether the \(X\)-coordinate is less than \(x\) or not. Similarly, let \(Y_y\) denote the division according to whether the \(Y\)-coordinate is less than \(y\) or not. +- Among the divisions leading to the desired sequence, we use the leftmost one in \(X_2,Y_2,X_3,Y_3,\cdots,X_K,Y_K\). + +For each division in the order of preference, let us count the number of desired sequences that cause the division to be chosen. + +Assume that we are considering \(X_x\). Note that whether \(X_x\) is chosen in the above procedure depends on the first \(x-1\) elements in the desired sequence. Thus, we will count the number of such ways to arrange the first \(x-1\) elements. Let us first count the number of sequences obtained by arranging the points whose \(X\)-coordinates are less than \(x\). From this, let us subtract the number of sequences that cause us to choose \(X_2\), \(Y_2\), \(X_3\), \(Y_3\), \(\cdots\), \(X_{x-1}\), or \(Y_{x-1}\) in the above procedure. For instance, the number of sequences that causes us to choose \(X_z\) \((z < x)\) looks as follows: \((\)the first \(z-1\) elements that cause \(X_z\) to be chosen in the procedure\()+(\)the sequence obtained by arranging the set of points whose \(X\)-coordinates are between \(z\) and \(x-1)\). We can count such sequences because we should have already counted the number of ways to arrange \((\)the first \(z-1\) elements that cause \(X_z\) to be chosen in the procedure\()\). Divisions in the \(Y\)-direction can be handled similarly. + +Let us estimate the complexity. The set of points passed as an argument to \(f\) can only result from extracting a rectangular region from the set of \(N\) points given in input. Therefore, there are only \(O(N^4)\) states after memoization. We need \(O(N^2)\) time for each state, for a total complexity of \(O(N^6)\). diff --git a/problems/DP-02/Atcoder/arc138_f/judge.json b/problems/DP-02/Atcoder/arc138_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..82f54878b13b4d049ef3b1e6f6449106dfd28f92 --- /dev/null +++ b/problems/DP-02/Atcoder/arc138_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 4.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 33, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/arc138_f/meta.json b/problems/DP-02/Atcoder/arc138_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..96fcd223de5e3219348c18f7124082546972eab9 --- /dev/null +++ b/problems/DP-02/Atcoder/arc138_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "arc138_f", + "contest": "arc138", + "type": "ARC", + "letter": "F", + "title": "KD Tree", + "url": "https://atcoder.jp/contests/arc138/tasks/arc138_f", + "difficulty": 3882, + "score": 1000, + "time_limit_sec": 4.0, + "memory_limit_mb": 1024, + "n_tests": 33, + "editorial_url": "https://atcoder.jp/contests/arc138/editorial/3758", + "code_source": "model", + "pid": "A3777" +} diff --git a/problems/DP-02/Atcoder/arc138_f/solution.cpp b/problems/DP-02/Atcoder/arc138_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..7c3961a7a6f9a3ab49120a81b5e0834c2d9d38be --- /dev/null +++ b/problems/DP-02/Atcoder/arc138_f/solution.cpp @@ -0,0 +1,85 @@ +// arc138_f: F - KD Tree +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/arc138/editorial/3758 +// Judged AC on all 33 tests, max 0.02 s of the 4 s limit (submission 1). + +#include +#include +using namespace std; +using mint = atcoder::modint1000000007; +using Mask = uint32_t; + +int N; +int by_y[30]; +unordered_map memo; + +mint solve(Mask s) { + // The empty set is useful when two cuts have identical prefixes. + if ((s & (s - 1)) == 0) return 1; + auto it = memo.find(s); + if (it != memo.end()) return it->second; + + Mask px[31] = {}, py[31] = {}; + int k = 0; + for (Mask t = s; t; ) { + Mask bit = t & -t; + ++k; + px[k] = px[k - 1] | bit; + t ^= bit; + } + int cnt = 0; + for (int y = 0; y < N; ++y) { + Mask bit = Mask(1) << by_y[y]; + if (s & bit) { + ++cnt; + py[cnt] = py[cnt - 1] | bit; + } + } + + // gx[m], gy[m]: valid arrangements of the first m points for which + // this cut is the earliest available cut in X_2,Y_2,X_3,Y_3,... . + mint gx[31] = {}, gy[31] = {}; + mint answer = 0; + for (int m = 1; m < k; ++m) { + mint ax = solve(px[m]); + mint ay = solve(py[m]); + for (int j = 1; j < m; ++j) { + if (gx[j].val() != 0) { + ax -= gx[j] * solve(px[m] ^ px[j]); + if ((px[j] & py[m]) == px[j]) { + ay -= gx[j] * solve(py[m] ^ px[j]); + } + } + if (gy[j].val() != 0) { + ay -= gy[j] * solve(py[m] ^ py[j]); + if ((py[j] & px[m]) == py[j]) { + ax -= gy[j] * solve(px[m] ^ py[j]); + } + } + } + gx[m] = ax; + // X_{m+1} precedes Y_{m+1}. They can describe the same prefix. + if (px[m] == py[m]) ay -= ax; + gy[m] = ay; + + if (ax.val() != 0) answer += ax * solve(s ^ px[m]); + if (ay.val() != 0) answer += ay * solve(s ^ py[m]); + } + memo.emplace(s, answer); + return answer; +} + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + cin >> N; + for (int i = 0; i < N; ++i) { + int p; + cin >> p; + by_y[p - 1] = i; + } + memo.max_load_factor(0.7f); + memo.reserve(65536); + cout << solve((Mask(1) << N) - 1).val() << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/arc138_f/statement.md b/problems/DP-02/Atcoder/arc138_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..29e122ae4efde60ef7b9fd718dba05d8504b1df3 --- /dev/null +++ b/problems/DP-02/Atcoder/arc138_f/statement.md @@ -0,0 +1,88 @@ +# F - KD Tree + +**Score**: 1000 points + +## Problem Statement +There are \(N\) points in a plane, the \(i\)-th \((1 \leq i \leq N)\) of which is \((i,P_i)\). Here, \((P_1,P_2,\cdots,P_N)\) is a permutation of \((1,2,\cdots,N)\). + +You can **arrange** a non-empty set \(s\) of points, which is a recursive operation defined as follows. + +- If \(s\) contains exactly one point, arranging it creates a sequence composed of just that point. +- If \(s\) contains two or more points, arranging it creates a sequence composed of those points by doing one of the following two operations: + - Choose any integer \(x\) and divide \(s\) into two: the set \(a\) of points whose \(X\)-coordinates are less than \(x\) and the set \(b\) of the other points. Here, neither \(a\) nor \(b\) should be empty. Create a sequence by concatenating the sequence obtained by arranging \(a\) and the sequence obtained by arranging \(b\) in this order. + - Choose any integer \(y\) and divide \(s\) into two: the set \(a\) of points whose \(Y\)-coordinates are less than \(y\) and the set \(b\) of the other points. Here, neither \(a\) nor \(b\) should be empty. Create a sequence by concatenating the sequence obtained by arranging \(a\) and the sequence obtained by arranging \(b\) in this order. + +Find the number, modulo \(10^9+7\), of sequences that can be obtained by arranging the set of points \(\{(1,P_1),(2,P_2),\cdots,(N,P_N)\}\). + +## Constraints +- \(1 \leq N \leq 30\) +- \((P_1,P_2,\cdots,P_N)\) is a permutation of \((1,2,\cdots,N)\). +- All values in input are integers. + +## Input +Input is given from Standard Input in the following format: +``` +N +P_1 P_2 ... P_N +``` + +## Output +Print the answer. + +## Sample Input 1 +``` +3 +3 1 2 +``` + +## Sample Output 1 +``` +3 +``` + +The following three sequences can be obtained: +- \(((1,3),(2,1),(3,2))\) +- \(((2,1),(3,2),(1,3))\) +- \(((2,1),(1,3),(3,2))\) + +For example, the sequence \(((2,1),(1,3),(3,2))\) can be obtained as follows. +- Arrange the set \(\{(1,3),(2,1),(3,2)\}\) by dividing it to the set of points whose \(Y\)-coordinates are less than \(2\) (\(=\{(2,1)\}\)) and the set of the other points (\(=\{(1,3),(3,2)\}\)). + - Arrange the set \(\{(2,1)\}\) to obtain the sequence \(((2,1))\). + - Arrange the set \(\{(1,3),(3,2)\}\) by dividing it to the set of points whose \(X\)-coordinates are less than \(3\) and the set of the other points. + - Arrange the set \(\{(1,3)\}\) to obtain the sequence \(((1,3))\). + - Arrange the set \(\{(3,2)\}\) to obtain the sequence \(((3,2))\). + - Concatenate the resulting two sequences to obtain the sequence \(((1,3),(3,2))\). + - Concatenate the resulting two sequences to obtain the sequence \(((2,1),(1,3),(3,2))\). + +## Sample Input 2 +``` +5 +1 2 3 4 5 +``` + +## Sample Output 2 +``` +1 +``` + +## Sample Input 3 +``` +10 +3 6 4 8 7 2 10 5 9 1 +``` + +## Sample Output 3 +``` +1332 +``` + +## Sample Input 4 +``` +30 +7 11 8 26 4 13 28 5 14 1 16 27 10 2 23 25 17 6 3 18 24 15 9 22 21 29 12 20 19 30 +``` + +## Sample Output 4 +``` +641915679 +``` diff --git a/problems/DP-02/Atcoder/arc158_f/editorial.md b/problems/DP-02/Atcoder/arc158_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..5e95ff594dab4a5219008f64cc9464345e172b72 --- /dev/null +++ b/problems/DP-02/Atcoder/arc158_f/editorial.md @@ -0,0 +1,58 @@ +# F - Random Radix Sort (editorial) + +Source: https://atcoder.jp/contests/arc158/editorial/5985 by evima + +Hints → https://atcoder.jp/contests/arc158/editorial/5987 + +### [1] Transform the condition + +Let us represent a way to execute the process as the sequence of chosen \(k\): \(X = (k_1, \ldots, k_M)\). When does \(X\) satisfy the condition? + +Stable sort does not reorder elements with the same values, so it can be uniquely determined which \(A_i\) each \(B_i\) derives from. \(B_1, B_2, \ldots, B_N\) will be arranged in the desired order if and only if for every \(i\), \(B_{i+1}\) is to the right of \(B_i\). + +Below, the “positional relationship” between \(B_i\) and \(B_{i+1}\) means which of these two is to the left. + +Let us fix \(i\) and focus only on the positional relationship of \(B_i\) and \(B_{i+1}\). Each stable sort changes this positional relationship, where \(a\) and \(b\) are the \(k\)-th lowest digits of \(B_i\) and \(B_{i+1}\), respectively. + +- If \(ab\), then \(B_i\) will be to the right of \(B_{i+1}\). + +Thus, if \(S\) is the set of all \(k\) such that \(a +#include +using namespace std; +using mint = atcoder::modint998244353; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, K; + long long M; + cin >> N >> M >> K; + + vector> sortedA(N), sortedB(N); + for (int i = 0; i < N; ++i) { + long long x; + cin >> x; + sortedA[i] = {x, i}; + } + vector B(N); + for (int i = 0; i < N; ++i) { + cin >> B[i]; + sortedB[i] = {B[i], i}; + } + sort(sortedA.begin(), sortedA.end()); + sort(sortedB.begin(), sortedB.end()); + + // Equal values retain their relative order throughout all stable sorts. + vector originalPosition(N); + for (int i = 0; i < N; ++i) { + originalPosition[sortedB[i].second] = sortedA[i].second; + } + + const int STATES = 1 << K; + const int FULL = STATES - 1; + const int INVALID = STATES; + // Low K bits: forbidden next digits. Bit K: invalid final subset. + vector restrictions(STATES, 0); + for (int i = 0; i + 1 < N; ++i) { + long long x = B[i], y = B[i + 1]; + int good = 0, bad = 0; + for (int k = 0; k < K; ++k) { + int dx = x % 10, dy = y % 10; + x /= 10; + y /= 10; + if (dx < dy) good |= 1 << k; + if (dx > dy) bad |= 1 << k; + } + int complement = FULL ^ good; + restrictions[complement] |= bad; + if (originalPosition[i] > originalPosition[i + 1]) { + restrictions[complement] |= INVALID; + } + } + + // Propagate restrictions from every set to all of its subsets. + for (int k = 0; k < K; ++k) { + int len = 1 << k; + for (int base = 0; base < STATES; base += 2 * len) { + for (int j = 0; j < len; ++j) { + restrictions[base + j] |= restrictions[base + len + j]; + } + } + } + + // Construct the distinct last occurrences from right to left. + vector dp(STATES), count(K + 1); + dp[0] = 1; + for (int s = 0; s < STATES; ++s) { + if (!(restrictions[s] & INVALID)) { + count[__builtin_popcount((unsigned)s)] += dp[s]; + } + if (dp[s] == mint(0)) continue; + int available = FULL & ~(s | restrictions[s]); + while (available) { + int bit = available & -available; + available ^= bit; + dp[s | bit] += dp[s]; + } + } + + vector fact(K + 1), invfact(K + 1), powers(K + 1); + fact[0] = 1; + for (int i = 1; i <= K; ++i) fact[i] = fact[i - 1] * i; + invfact[K] = fact[K].inv(); + for (int i = K; i >= 1; --i) invfact[i - 1] = invfact[i] * i; + for (int i = 0; i <= K; ++i) powers[i] = mint(i).pow(M); + + mint answer = 0; + for (int n = 1; n <= K; ++n) { + // Surj(M,n) / n!, by inclusion-exclusion. + mint ways = 0; + for (int j = 0; j <= n; ++j) { + mint term = powers[j] * invfact[j] * invfact[n - j]; + if ((n - j) & 1) ways -= term; + else ways += term; + } + answer += count[n] * ways; + } + cout << answer.val() << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/arc158_f/statement.md b/problems/DP-02/Atcoder/arc158_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..832b1b8eef17da11dc58f387b4dd6d33d1bd222c --- /dev/null +++ b/problems/DP-02/Atcoder/arc158_f/statement.md @@ -0,0 +1,84 @@ +# F - Random Radix Sort + +**Score :** 900 points + +## Problem Statement +For non-negative integers \(x\) and \(k\), the \(k\)-th lowest digit of \(x\) is the remainder when \(\bigl\lfloor \frac{x}{10^k}\bigr\rfloor\) is divided by \(10\). For instance, the \(0\)-th, \(1\)-st, \(2\)-nd, and \(3\)-rd lowest digits of \(123\) are \(3\), \(2\), \(1\), and \(0\), respectively. +You are given positive integers \(N\), \(M\), \(K\), and sequences of non-negative integers \(A = (A_1, \ldots, A_N)\) and \(B = (B_1, \ldots, B_N)\). +Consider rearranging \(A\) by the following process. +- Do the following \(M\) times. + - Choose an integer \(k\) such that \(0\leq k \leq K - 1\). + - Then, perform a stable sort on \(A\) by \(k\)-th lowest digit. That is, let \(A^{(d)}\) be the subsequence of \(A\) composed of all elements of \(A\) whose \(k\)-th lowest digits are \(d\), and replace \(A\) with the concatenation of \(A^{(0)}, A^{(1)}, \ldots, A^{(9)}\) in this order. + +There are \(K^M\) ways to execute this process. How many of them end up making \(A\) equal \(B\)? Find this count modulo \(998244353\). + +### Constraints +- \(1\leq N\leq 2\times 10^5\) +- \(1\leq M\leq 10^9\) +- \(1\leq K\leq 18\) +- \(0\leq A_i < 10^K\) +- \(0\leq B_i < 10^K\) +- \(A\) and \(B\) are equal as multisets. That is, every integer \(x\) occurs the same number of times in \(A\) and \(B\). + +## Input +The input is given from Standard Input in the following format: +``` +N M K +A_1 ... A_N +B_1 ... B_N +``` + +## Output +Print the number, modulo \(998244353\), of ways to execute the process that end up making \(A\) equal \(B\). + +## Sample Input 1 +``` +3 2 3 +74 42 54 +42 54 74 +``` + +## Sample Output 1 +``` +5 +``` +Let \(k_1\) and \(k_2\) be the \(k\) chosen in the first and second iterations, respectively. For instance, if \(k_1 = 0\) and \(k_2 = 1\), then \(A\) changes as follows. +- A stable sort by \(k_1\)-th (\(0\)-th) lowest digit makes \(A = (42,74,54)\). +- A stable sort by \(k_2\)-th (\(1\)-st) lowest digit makes \(A = (42,54,74)\). + +Here are all the ways to execute the process and the resulting \(A\). +- \((k_1, k_2) = (0,0)\): \(A = (42,74,54)\). +- \((k_1, k_2) = (0,1)\): \(A = (42,54,74)\). +- \((k_1, k_2) = (0,2)\): \(A = (42,74,54)\). +- \((k_1, k_2) = (1,0)\): \(A = (42,54,74)\). +- \((k_1, k_2) = (1,1)\): \(A = (42,54,74)\). +- \((k_1, k_2) = (1,2)\): \(A = (42,54,74)\). +- \((k_1, k_2) = (2,0)\): \(A = (42,74,54)\). +- \((k_1, k_2) = (2,1)\): \(A = (42,54,74)\). +- \((k_1, k_2) = (2,2)\): \(A = (74,42,54)\). + +## Sample Input 2 +``` +2 1 1 +2 3 +3 2 +``` + +## Sample Output 2 +``` +0 +``` +There is no way to satisfy the condition. + +## Sample Input 3 +``` +5 100 4 +0 12 34 56 78 +0 12 34 56 78 +``` + +## Sample Output 3 +``` +982924732 +``` +All \(4^{100}\) ways satisfy the condition. diff --git a/problems/DP-02/Atcoder/arc160_f/editorial.md b/problems/DP-02/Atcoder/arc160_f/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..c8a8f7efc9fbc6e6b453ba68051f42f86f978181 --- /dev/null +++ b/problems/DP-02/Atcoder/arc160_f/editorial.md @@ -0,0 +1,53 @@ +# F - Count Sorted Arrays (editorial) + +Source: https://atcoder.jp/contests/arc160/editorial/6373 by evima + +Below, a pair \((a_i, b_i)\) is called **effective** when it causes a swap in at least one of your permutations, and the application of a swap caused by an effective pair to the permutation tuple is called an **effective swap**. + The following fact can be proved. + +Proposition: During the \(M\) operations, there can be at most \(N(N-1)/2\) effective swaps. + +(Proof) Let \(X\) be the number of ineffective integer pairs \((a, b)\) for your permutations. Initially, \(X=0\). One can prove the following lemma on \(X\). + +Lemma: Each effective swap increases \(X\) by \(1\) or more. + +(Proof of lemma) When an effective pair \((a, b)\) is applied to the permutation tuple, \((a, b)\) becomes ineffective, increasing the contribution of \((a, b)\) to \(X\) by \(1\). + Of the contributions of other integer pairs, those of the following two types of integer pairs may decrease. + +- \((c, a)\) was ineffective but made effective by the \((a, b)\) swap. +- \((b, c)\) was ineffective but made effective by the \((a, b)\) swap. + +Consider the former case. The ineffectiveness of \((c, a)\) means that \(p_c \leq p_a\) holds for all your permutations \(p\). Applying the \((a, b)\) swap is equivalent to replacing \(p_a, p_b\) with \(\min(p_a, p_b), \max(p_a, p_b)\), so from \(p_c \leq p_a \leq \max(p_a, p_b)\), the permutation \(p'\) after the swap satisfies \(p'_c ≤ p'_b\), so \((c, b)\) is ineffective after the swap. + Additionally, if \((c, a)\) was ineffective but made effective by the (a, b) swap, there is a permutation \(p\) such that \((p_c, p_a, p_b) = (1, 1, 0)\). Therefore, in this case, \((c, b)\) was an effective swap before the swap. + Thus, it has been shown that when the contribution of \((c, a)\) to \(X\) decreases, that of \((c, b)\) increases by \(1\), canceling the negative contribution to \(X\). + The same argument applies to the latter case. Therefore, each effective swap increases \(X\) by \(1\) or more. (End of proof of lemma) + +We have \(X = N(N-1)/2\) when all permutations are sorted, so combining this with the lemma proves there can be at most \(N(N-1)/2\) effective swaps. (End of proof) + +One can use this fact to see that a naive DP with appropriate pruning can work quickly. + Let us explain in detail. The number of sorted permutations at some time can be computed as follows if one knows the set of binary sequences of length \(N\) that will be sorted when the swaps so far are applied. + +- Consider an \(N\)-dimensional grid with \(2 \times 2 \times \dots \times 2\) cells, where the cells at the coordinates corresponding to the binary sequences that will be sorted by applying the swaps are passable, and the other cells are impassable. Then, the number of paths from \((0,0, \dots ,0)\) to \((1,1, \dots,1)\) corresponds to the number of permutations that are sorted. + +The above path-counting DP works in \(\mathrm{O}(N 2^N)\) time, so combining this with the fact that there are \(\mathrm{O}(N^2)\) updates on the set of binary sequences that will be sorted, this DP part of the solution to compute the number of sorted permutations only takes \(\mathrm{O}(2^N N^3)\) time in total. + +Now, consider a DP to manage the state when applying swaps to a binary sequence of length \(N\). We define an array \(S\) of length \(2^N\) and a two-dimensional array \(C\) of size \(N \times N\) as follows: + +- Sx:= (the state after applying \((a, b)\) to the state \(x\)) +- C[i][j]: (the number of \(S[x]\) whose \(i\)-th bit is \(1\) and the \(j\)-th bit is \(0\), where \(i < j\)) + +When applying \((i, j)\) swap, perform the following steps. + +1. Check whether \(C[i][j]\) is non-zero to determine whether \((i, j)\) swap is effective in \(O(1)\) time. If it is not effective, abort the process. +2. If necessary, scan all \(S[x]\) and update them by swapping the \(i\)-th and \(j\)-th bits of \(S[x]\) when they are swappable. + + - Accordingly, update the value of \(\mathrm{O}(1)\) at the same time. Since you only need to do this for parts \(C[i][*], C[j][*], C[*][i], C[*][j]\), it can be done in \(\mathrm{O}(N)\) time. + - If S[x] is now sorted, set the cell corresponding to \(x\) as passable. +3. Then, perform the path-counting DP and update the answer. + +This algorithm works in \(\mathrm{O}(2^N N^3 + M)\) time in total, which is fast. + There is also an easier-to-implement \(\mathrm{O}(2^N N^4 + M)\) solution, which is sufficient for getting AC. + +Thus, this problem can be solved in \(\mathrm{O}(2^N N^4 + M)\) or \(\mathrm{O}(2^N N^3 + M)\) time, which is fast enough. + +(There is also a \(\mathrm{O}^\ast (3^N)\) solution that updates the table for the path-counting DP each time there is a new passable cell, using the fact that there are at most \(\mathrm{O}(2^N N^2)\) adjacent swaps on binary sequences in total.) diff --git a/problems/DP-02/Atcoder/arc160_f/judge.json b/problems/DP-02/Atcoder/arc160_f/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..4a2990b370e1fcc957f74364c6cbf1527a3e589c --- /dev/null +++ b/problems/DP-02/Atcoder/arc160_f/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 87, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/arc160_f/meta.json b/problems/DP-02/Atcoder/arc160_f/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..8d01c0eba499c47dd7263cc620aa7a37e9fec303 --- /dev/null +++ b/problems/DP-02/Atcoder/arc160_f/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "arc160_f", + "contest": "arc160", + "type": "ARC", + "letter": "F", + "title": "Count Sorted Arrays", + "url": "https://atcoder.jp/contests/arc160/tasks/arc160_f", + "difficulty": 3202, + "score": 900, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 87, + "editorial_url": "https://atcoder.jp/contests/arc160/editorial/6373", + "code_source": "model", + "pid": "A3909" +} diff --git a/problems/DP-02/Atcoder/arc160_f/solution.cpp b/problems/DP-02/Atcoder/arc160_f/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ef6a4d10e31d28f10af83afbf8bad16421b3bbae --- /dev/null +++ b/problems/DP-02/Atcoder/arc160_f/solution.cpp @@ -0,0 +1,100 @@ +// arc160_f: F - Count Sorted Arrays +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/arc160/editorial/6373 +// Judged AC on all 87 tests, max 0.10 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N, M; + cin >> N >> M; + const int K = 1 << N; + const int full = K - 1; + + vector state(K), target(K); + vector good(K); + vector dp(K); + for (int x = 0; x < K; ++x) { + state[x] = x; + int ones = __builtin_popcount((unsigned)x); + target[x] = full ^ ((1 << (N - ones)) - 1); + good[x] = (state[x] == target[x]); + } + + int C[15][15] = {}; + for (int a = 0; a < N; ++a) + for (int b = a + 1; b < N; ++b) + C[a][b] = 1 << (N - 2); + + long long answer = 1; + string output; + output.reserve(static_cast(M) * 14); + + for (int operation = 0; operation < M; ++operation) { + int x, y; + cin >> x >> y; + int r = answer % N; + int a = (x + r) % N; + int b = (y + 2 * r) % N; + if (a > b) swap(a, b); + + if (C[a][b] != 0) { + int abit = 1 << a; + int bbit = 1 << b; + int pairmask = abit | bbit; + for (int initial = 0; initial < K; ++initial) { + int s = state[initial]; + if ((s & pairmask) != abit) continue; + + // Update inversion counts involving a or b. + --C[a][b]; + for (int k = 0; k < a; ++k) { + if (s & (1 << k)) { + ++C[k][a]; + --C[k][b]; + } + } + for (int k = a + 1; k < b; ++k) { + if (s & (1 << k)) { + --C[k][b]; + } else { + --C[a][k]; + } + } + for (int k = b + 1; k < N; ++k) { + if (!(s & (1 << k))) { + --C[a][k]; + ++C[b][k]; + } + } + + s ^= pairmask; + state[initial] = s; + if (s == target[initial]) good[initial] = 1; + } + + // Count chains of sortable binary inputs in the Boolean lattice. + dp[0] = 1; + for (int mask = 1; mask < K; ++mask) { + long long ways = 0; + if (good[mask]) { + for (int bits = mask; bits; bits &= bits - 1) { + int bit = bits & -bits; + ways += dp[mask ^ bit]; + } + } + dp[mask] = ways; + } + answer = dp[full]; + } + + output += to_string(answer); + output += '\n'; + } + + cout << output; + return 0; +} diff --git a/problems/DP-02/Atcoder/arc160_f/statement.md b/problems/DP-02/Atcoder/arc160_f/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..460963f35baca02d35f3979a93399e87d8dd5a49 --- /dev/null +++ b/problems/DP-02/Atcoder/arc160_f/statement.md @@ -0,0 +1,100 @@ +# F - Count Sorted Arrays + +## Score: 900 points + +### Problem Statement +There are an integer \(N\) and \(M\) pairs of integers: \((a_1, b_1), (a_2, b_2), \dots, (a_M, b_M)\). Each pair \((a_i, b_i)\) satisfies \(1 \leq a_i < b_i \leq N\). + +Initially, you have all \(N!\) permutations of \((1,2,\dots,N)\). +You will perform \(M\) operations. The \(i\)-th operation is as follows. + +- Do the following for each of your \(N!\) permutations. + - Compare the \(a_i\)-th and \(b_i\)-th elements. If the former is greater, swap the two elements. + +For each \(1 \leq i \leq M\), let \(S_i\) be the number of permutations of yours that are already sorted in ascending order at the end of the \(i\)-th operation. +Print \(S_1, S_2, \dots, S_M\). + +Here, the input gives you pairs of integers \((x_i, y_i)\) instead of \((a_i, b_i)\). +The values of \((a_i, b_i)\) can be obtained using \(x_i\), \(y_i\), and \(S_{i-1}\) as follows. (Let \(S_0 = 1\) for convenience.) +- Let \(c_i = ((x_i + S_{i-1}) \bmod N) + 1\). +- Let \(d_i = ((y_i + S_{i-1} \times 2) \bmod N) + 1\). (Here, it is guaranteed that \(c_i \neq d_i\).) +- Let \(a_i = \min(c_i, d_i)\). +- Let \(b_i = \max(c_i, d_i)\). + +### Constraints +- \(2 \leq N \leq 15\) +- \(1 \leq M \leq 5 \times 10^5\) +- \(1 \leq a_i < b_i \leq N\) +- \(0 \leq x_i, y_i \leq N - 1\) + +--- + +### Input +The input is given from Standard Input in the following format: +``` +N M +x_1 y_1 +x_2 y_2 +... +x_M y_M +``` + +### Output +Print \(M\) lines. The \(i\)-th line should contain \(S_i\). + +--- + +### Sample Input 1 +``` +2 1 +1 1 +``` + +### Sample Output 1 +``` +2 +``` +You start with the permutations \((1, 2)\) and \((2, 1)\). +We have \((a_1, b_1) = (1, 2)\). At the end of the first operation, you have two copies of \((1, 2)\), so you should print \(2\). + +--- + +### Sample Input 2 +``` +3 4 +0 1 +2 1 +1 1 +0 1 +``` + +### Sample Output 2 +``` +2 +4 +4 +6 +``` +\((a_i, b_i)\) in order are \((1, 2), (2, 3), (1, 3), (1, 2)\). + +--- + +### Sample Input 3 +``` +5 5 +4 4 +0 4 +1 1 +2 4 +1 2 +``` + +### Sample Output 3 +``` +2 +4 +4 +8 +16 +``` +\((a_i, b_i)\) in order are \((1, 2), (3, 4), (1, 5), (2, 3), (4, 5)\). diff --git a/problems/DP-02/Atcoder/arc162_e/editorial.md b/problems/DP-02/Atcoder/arc162_e/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..9392a5cf28607fb1ee8dbd1642fd9c876cb9b812 --- /dev/null +++ b/problems/DP-02/Atcoder/arc162_e/editorial.md @@ -0,0 +1,36 @@ +# E - Strange Constraints (editorial) + +Source: https://atcoder.jp/contests/arc162/editorial/6640 by evima + +### [1] Dynamic programming + +Let’s rephrase the problem to make it easier to understand. For each integer \(i=1,2,\ldots,N\), let \(d_i\) be the number of occurrences of \(i\) in \(B\). Then, the two conditions can be written as follows: + +- \(d_i \leq A_i\) +- At the \(i\)-th position of \(B\), we can place an integer \(j\) such that \(d_j\leq A_i\). + +From the above conditions, we can see that the smaller \(d_i\) is, the more different integers we can place and the more positions we can place them in. Based on this observation, a dynamic programming approach that determines the placement in descending order of \(d_i\) is considered effective. + +Let \(\mathrm{dp}[i][j][k]\) be the number of ways to determine the positions of integers with more than \(i\) occurrences in \(B\) so that the number of different determined integers is \(j\) and the number of determined integers is \(k\). Also, let \(C_j\) be the number of \(i\) such that \(A_i \geq j\). + +Let’s consider the transition from \(\mathrm{dp}[i][j][k]\). Suppose there are \(l\) different integers that occur \(i\) times. + +Then, there are \(\binom{C_i - j}{l}\) ways to choose integers that appear \(i\) times. Next, the number of ways to choose the positions for these integers is the multinomial coefficient \(\binom{C_i-k}{\underbrace{i,\ldots, i}_{l\text{ times}}, C_i-k-il}\). + +In the end, for each \((i,j,k,l)\), we need to perform the following update: + +- add \(\displaystyle \mathrm{dp}[i][j][k] \ \binom{C_i - j}{l} \binom{C_i-k}{\underbrace{i,\ldots, i}_{l\text{ times}}, C_i-k-il} \) to \(\mathrm{dp}[i-1][j+l][k+il]\). + +### [2] Complexity analysis + +Let’s analyze the complexity. At first glance, the state may seem to be \(\mathrm{O}(N^3)\) and the transition may seem to be \(\mathrm{O}(N)\) for each state, resulting in a total of \(\mathrm{O}(N^4)\). In fact, however, considering \((i,j,k,l)\) only for the valid range, it works in \(\mathrm{O}(N^3)\). + +Proof: For a given \(i\), the range of \(j\) for which \(\mathrm{dp}[i][j][*][*]\) can take non-zero values is \(0\leq j \leq \lfloor \frac{N}{i+1}\rfloor\). Furthermore, the valid range of \(l\) is also \(0\leq j \leq \lfloor \frac{N}{i}\rfloor\). Even if we look at the entire range of \(i,k\), the number of transitions is \(\sum_{i=1}^N N(\big\lfloor \frac{N}{i+1}\big\rfloor+1)(\big\lfloor \frac{N}{i}\big\rfloor+1)\), and by expanding and looking at the most significant part, we can evaluate it as + +\[\sum_{i=1}^N N\Big\lfloor \frac{N}{i+1}\Big\rfloor\Big\lfloor \frac{N}{i}\Big\rfloor \leq N^3 \sum_{i=1}^N \frac{1}{i(i+1)}=\frac{N^4}{N+1}.\] + +Thus, we have found that the number of transitions is \(\mathrm{O}(N^3)\). + +In conclusion, by considering only the valid range of \(j,l\) and performing the dynamic programming in [1], we can solve this problem in \(\mathrm{O}(N^3)\). + +*(Above is a modification of a translation by GPT-4.)* diff --git a/problems/DP-02/Atcoder/arc162_e/judge.json b/problems/DP-02/Atcoder/arc162_e/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..14bee3f35a924652130f5b0deae3a5b662c8bf82 --- /dev/null +++ b/problems/DP-02/Atcoder/arc162_e/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 3.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 22, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/arc162_e/meta.json b/problems/DP-02/Atcoder/arc162_e/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..dca58860b76e9aacad7072444a11e1fe02388aba --- /dev/null +++ b/problems/DP-02/Atcoder/arc162_e/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "arc162_e", + "contest": "arc162", + "type": "ARC", + "letter": "E", + "title": "Strange Constraints", + "url": "https://atcoder.jp/contests/arc162/tasks/arc162_e", + "difficulty": 2780, + "score": 700, + "time_limit_sec": 3.0, + "memory_limit_mb": 1024, + "n_tests": 22, + "editorial_url": "https://atcoder.jp/contests/arc162/editorial/6640", + "code_source": "model", + "pid": "A3920" +} diff --git a/problems/DP-02/Atcoder/arc162_e/solution.cpp b/problems/DP-02/Atcoder/arc162_e/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..85dae2bb4e3b0fe3a07f2781fdfdfbdbf9a967ee --- /dev/null +++ b/problems/DP-02/Atcoder/arc162_e/solution.cpp @@ -0,0 +1,85 @@ +// arc162_e: E - Strange Constraints +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/arc162/editorial/6640 +// Judged AC on all 22 tests, max 0.07 s of the 3 s limit (submission 1). + +#include +#include +using namespace std; +using mint = atcoder::modint998244353; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int N; + cin >> N; + vector C(N + 2, 0); + for (int i = 0; i < N; ++i) { + int a; + cin >> a; + ++C[a]; + } + for (int i = N; i >= 1; --i) C[i] += C[i + 1]; + + vector fact(N + 1), invfact(N + 1); + fact[0] = 1; + for (int i = 1; i <= N; ++i) fact[i] = fact[i - 1] * i; + invfact[N] = fact[N].inv(); + for (int i = N; i >= 1; --i) invfact[i - 1] = invfact[i] * i; + + vector> binom(N + 1, vector(N + 1)); + for (int n = 0; n <= N; ++n) { + binom[n][0] = binom[n][n] = 1; + for (int r = 1; r < n; ++r) + binom[n][r] = binom[n - 1][r - 1] + binom[n - 1][r]; + } + + const int W = N + 1; + vector dp(W * W), next_dp(W * W); + vector powers(N + 1), coefficient(N + 1); + dp[0] = 1; + + for (int i = N; i >= 1; --i) { + fill(next_dp.begin(), next_dp.end(), mint(0)); + const int eligible = C[i]; + powers[0] = 1; + for (int l = 1; l <= eligible / i; ++l) + powers[l] = powers[l - 1] * invfact[i]; + + // Previously placed integers each occur at least i+1 times. + const int max_k = C[i + 1]; + const int max_j = max_k / (i + 1); + for (int j = 0; j <= max_j; ++j) { + const int min_k = (i + 1) * j; + const int max_l = (eligible - min_k) / i; + for (int l = 1; l <= max_l; ++l) + coefficient[l] = binom[eligible - j][l] * powers[l]; + + const int row = j * W; + for (int k = min_k; k <= max_k; ++k) { + mint value = dp[row + k]; + if (value.val() == 0) continue; + + // No integer has exactly i occurrences. + next_dp[row + k] += value; + + // Choose l labels and disjoint groups of i eligible positions. + const int available = eligible - k; + mint base = value * fact[available]; + int index = row + k; + int remaining = available; + for (int l = 1; l <= available / i; ++l) { + index += W + i; + remaining -= i; + next_dp[index] += base * coefficient[l] * invfact[remaining]; + } + } + } + dp.swap(next_dp); + } + + mint answer = 0; + for (int j = 0; j <= N; ++j) answer += dp[j * W + N]; + cout << answer.val() << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/arc162_e/statement.md b/problems/DP-02/Atcoder/arc162_e/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..17f3deaf086029177069f436d0f288c0a6542a79 --- /dev/null +++ b/problems/DP-02/Atcoder/arc162_e/statement.md @@ -0,0 +1,83 @@ +# E - Strange Constraints + +**Score :** 700 points + +## Problem Statement +You are given a sequence of length \( N \) consisting of integers from \( 1 \) to \( N \), \( A=(A_1,A_2,\ldots,A_N) \). + +Find the number, modulo \( 998244353 \), of sequences of length \( N \) consisting of integers from \( 1 \) to \( N \), \( B=(B_1,B_2,\ldots,B_N) \), that satisfy the following conditions for all \( i=1,2,\ldots,N \). +- The number of occurrences of \( i \) in \( B \) is at most \( A_i \). +- The number of occurrences of \( B_i \) in \( B \) is at most \( A_i \). + +## Constraints +- \( 1 \leq N \leq 500 \) +- \( 1 \leq A_i \leq N \) +- All input values are integers. + +## Input +The input is given from Standard Input in the following format: +``` +N +A_1 A_2 ... A_N +``` + +## Output +Print the answer. + +## Sample Input 1 +``` +3 +1 2 3 +``` + +## Sample Output 1 +``` +10 +``` +The following \( 10 \) sequences satisfy the conditions: +- (1,2,2) +- (1,2,3) +- (1,3,2) +- (1,3,3) +- (2,1,3) +- (2,3,1) +- (2,3,3) +- (3,1,2) +- (3,2,1) +- (3,2,2) + +## Sample Input 2 +``` +4 +4 4 4 4 +``` + +## Sample Output 2 +``` +256 +``` +All sequences of length \( 4 \) consisting of integers from \( 1 \) to \( 4 \) satisfy the conditions, and there are \( 4^4=256 \) such sequences. + +## Sample Input 3 +``` +5 +1 1 1 1 1 +``` + +## Sample Output 3 +``` +120 +``` +All permutations of \( (1,2,3,4,5) \) satisfy the conditions, and there are \( 5!=120 \) such sequences. + +## Sample Input 4 +``` +14 +6 5 14 3 6 7 3 11 11 2 3 7 8 10 +``` + +## Sample Output 4 +``` +628377683 +``` +Be sure to print the number modulo \( 998244353 \). diff --git a/problems/DP-02/Atcoder/arc171_d/editorial.md b/problems/DP-02/Atcoder/arc171_d/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..bfc2e2bb3648d1449b83c2894aeb08f1203509a1 --- /dev/null +++ b/problems/DP-02/Atcoder/arc171_d/editorial.md @@ -0,0 +1,37 @@ +# D - Rolling Hash (editorial) + +Source: https://atcoder.jp/contests/arc171/editorial/9229 by evima + +Since we can consider the elements of \(A\) modulo \(P\), we assume \(0 \leq A_i < P\) from now on. + +For a sequence \(A\), we define a sequence \((C_1, C_2, \dots, C_{N + 1})\) by the following recurrence formula: + +\[ \begin{aligned} C_{N + 1} &= 0 \\ C_i &= (C_{i + 1} + B^{N - i} A_i) \bmod{P} \end{aligned} \] + +Here, the set of sequences \((A_1, A_2, \dots, A_N)\) \((0 \leq A_i < P)\) and the set of sequences \((C_1, C_2, \dots, C_N)\) \((0 \leq C_i < P)\) are in one-to-one correspondence. This is because, when we fix \((C_1, C_2, \dots, C_N)\), we can restore the corresponding \((A_1, A_2, \dots, A_N)\) using the formula + +\[A_i = \left((C_i - C_{i+1}) \times B^{-(N - i)}\right) \bmod p\] + +(Here, \(B^{-1}\) denotes the multiplicative inverse of \(B\) modulo \(p\).) + +Moreover, \(\mathrm{hash}((A_L, A_{L+1}, \dots, A_R))\) can be rewritten using \(C\) as follows: + +\[ \begin{aligned} &\mathrm{hash}((A_L, A_{L+1}, \dots, A_R)) \\ &=\left(\sum_{i=L}^R A_i B^{R-i}\right)\bmod{P} \\ &= \left(B^{R-N}\sum_{i=L}^R A_i B^{N-i}\right)\bmod{P} \\ &= B^{R-N}(C_L - C_{R + 1}) \bmod{P} \end{aligned} \] + +Therefore, the condition \(\mathrm{hash}((A_L, A_{L+1}, \dots, A_R)) \neq 0\) is equivalent to the condition \(C_L \neq C_{R + 1}\). Thus, using \(C\), this problem can be rephrased as follows: + +- There is a graph with \(N + 1\) vertices and \(M\) edges. Edge \(i\) connects vertices \(L_i\) and \(R_i + 1\). Now, each vertex is to be colored with one of the \(P\) colors \(0,1,\dots,P-1\), with vertex \(N+1\) already colored \(0\). Determine whether it is possible to color all vertices so that vertices connected by an edge are not colored the same. + +This is precisely a coloring problem. That is, we have reduced the problem to determining whether the chromatic number of the graph is less than or equal to \(P\). + +Let’s explain how to find the chromatic number of a graph. + +- Let \(V\) be the set of vertices of the graph. +- Let \(dp(v)\) be the chromatic number of the subgraph of \(G\) induced by \(\emptyset \neq v \subseteq V\). + +Then, for \(\emptyset \neq v \subseteq V\), the following recurrence formula holds (\(\sqcup\) denotes the disjoint union): + +\[dp(v) = \begin{cases} 1 & (v \text{ is an independent set}) \\ \displaystyle {\min_{s \sqcup t = v, s \neq \emptyset, t \neq \emptyset}} dp(s) + dp(t) & \mathrm{otherwise} \end{cases} \] + +Therefore, we can calculate the chromatic number of \(G\) in \(\mathrm{O}(3^N)\) using what is commonly known as subset DP. + Thus, the problem is solved in \(\mathrm{O}(3^N)\). diff --git a/problems/DP-02/Atcoder/arc171_d/judge.json b/problems/DP-02/Atcoder/arc171_d/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..29325a32ac3e9becefcd23f8a1bb9ee22d1f2513 --- /dev/null +++ b/problems/DP-02/Atcoder/arc171_d/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 118, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/arc171_d/meta.json b/problems/DP-02/Atcoder/arc171_d/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..8c8333599bc3e653971e45982853f1913ea75e24 --- /dev/null +++ b/problems/DP-02/Atcoder/arc171_d/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "arc171_d", + "contest": "arc171", + "type": "ARC", + "letter": "D", + "title": "Rolling Hash", + "url": "https://atcoder.jp/contests/arc171/tasks/arc171_d", + "difficulty": 2377, + "score": 600, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 118, + "editorial_url": "https://atcoder.jp/contests/arc171/editorial/9229", + "code_source": "model", + "pid": "A3967" +} diff --git a/problems/DP-02/Atcoder/arc171_d/solution.cpp b/problems/DP-02/Atcoder/arc171_d/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..50b67e21e15620af6c8cec8c8465794c86962f4b --- /dev/null +++ b/problems/DP-02/Atcoder/arc171_d/solution.cpp @@ -0,0 +1,58 @@ +// arc171_d: D - Rolling Hash +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/arc171/editorial/9229 +// Judged AC on all 118 tests, max 0.08 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int P, B, N, M; + cin >> P >> B >> N >> M; + const int V = N + 1; + vector adj(V, 0); + for (int i = 0; i < M; ++i) { + int L, R; + cin >> L >> R; + int u = L - 1, v = R; + adj[u] |= 1 << v; + adj[v] |= 1 << u; + } + + if (P >= V) { + cout << "Yes\n"; + return 0; + } + + const int S = 1 << V; + vector independent(S, 0), dp(S, 0); + independent[0] = 1; + for (int mask = 1; mask < S; ++mask) { + int bit = mask & -mask; + int rest = mask ^ bit; + int v = __builtin_ctz((unsigned)bit); + independent[mask] = independent[rest] && ((adj[v] & rest) == 0); + if (independent[mask]) { + dp[mask] = 1; + continue; + } + + int best = 1 + dp[rest]; + // Enumerate each bipartition once: the first part contains bit. + // The partition with first part {bit} is already accounted for. + for (int sub = (rest - 1) & rest; sub && best > 2; + sub = (sub - 1) & rest) { + best = min(best, int(dp[sub | bit]) + int(dp[rest ^ sub])); + } + dp[mask] = best; + if (best > P) { + cout << "No\n"; + return 0; + } + } + + cout << "Yes\n"; + return 0; +} diff --git a/problems/DP-02/Atcoder/arc171_d/statement.md b/problems/DP-02/Atcoder/arc171_d/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..a1764093124cffa23e10469078dbe0196b0c68d1 --- /dev/null +++ b/problems/DP-02/Atcoder/arc171_d/statement.md @@ -0,0 +1,92 @@ +# D - Rolling Hash + +**Score: 600 points** + +## Problem Statement +You are given non-negative integers \(P\) and \(B\). Here, \(P\) is prime, and \(1 \leq B \leq P-1\). +For a sequence of non-negative integers \(X=(x_1,x_2,\dots,x_n)\), the hash value \(\mathrm{hash}(X)\) is defined as follows. + +\[ +\mathrm{hash}(X) = \left(\sum_{i=1}^n x_i B^{n-i}\right) \bmod P +\] + +You are given \(M\) pairs of integers \((L_1, R_1), (L_2, R_2), \dots, (L_M, R_M)\). +Is there a sequence of non-negative integers \(A=(A_1, A_2, \dots, A_N)\) of length \(N\) that satisfies the condition below? + +- For all \(i\) \((1 \leq i \leq M)\), the following condition holds: + - Let \(s\) be the sequence \((A_{L_i}, A_{L_i + 1}, \dots, A_{R_i})\) obtained by taking the \(L_i\)-th to the \(R_i\)-th elements of \(A\). Then, \(\mathrm{hash}(s) \neq 0\). + +## Constraints +- \(2 \leq P \leq 10^9\) +- \(P\) is prime. +- \(1 \leq B \leq P - 1\) +- \(1 \leq N \leq 16\) +- \(1 \leq M \leq \frac{N(N+1)}{2}\) +- \(1 \leq L_i \leq R_i \leq N\) +- \((L_i, R_i) \neq (L_j, R_j)\) if \(i \neq j\). +- All input values are integers. + +## Input +The input is given from Standard Input in the following format: + +``` +P B N M +L_1 R_1 +L_2 R_2 +... +L_M R_M +``` + +## Output +If there is a sequence that satisfies the condition in the problem statement, print `Yes`; otherwise, print `No`. + +## Sample Input 1 +``` +3 2 3 3 +1 1 +1 2 +2 3 +``` + +## Sample Output 1 +``` +Yes +``` + +The sequence \(A = (2, 0, 4)\) satisfies the condition because \(\mathrm{hash}((A_1)) = 2, \mathrm{hash}((A_1, A_2)) = 1, \mathrm{hash}((A_2, A_3)) = 1\). + +## Sample Input 2 +``` +2 1 3 3 +1 1 +2 3 +1 3 +``` + +## Sample Output 2 +``` +No +``` + +No sequence satisfies the condition. + +## Sample Input 3 +``` +998244353 986061415 6 11 +1 5 +2 2 +2 5 +2 6 +3 4 +3 5 +3 6 +4 4 +4 5 +4 6 +5 6 +``` + +## Sample Output 3 +``` +Yes +``` diff --git a/problems/DP-02/Atcoder/arc179_b/editorial.md b/problems/DP-02/Atcoder/arc179_b/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..513b10f9bf50b399e83fff60f0cd22806637f4ee --- /dev/null +++ b/problems/DP-02/Atcoder/arc179_b/editorial.md @@ -0,0 +1,23 @@ +# B - Between B and B (editorial) + +Source: https://atcoder.jp/contests/arc179/editorial/10157 by evima + +- For each \(B = 1, 2, \dots, M\), the value \(X_B\) exists between any two different occurrences of \(B\) in \(A\) (including both ends). + +This condition will be referred to simply as “the condition.” + +Let’s consider determining the elements of \(A\) from the beginning. When deciding \(A_i\), we choose \(A_i\) such that \((A_1, A_2, \dots, A_i)\) satisfies the condition. + +Therefore, let’s consider the following dynamic programming approach. + +- Let \(\mathrm{dp}[c][S]\) be the number of ways to determine the first \(c(=0,1,\dots,N)\) elements of \(A\) such that the set of possible values for \(A_{c+1}\) is \(S (\subset \{1,2,\dots,M\})\). + +First, any of \(1,2,\dots,M\) can be chosen as \(A_1\). Therefore, \(\mathrm{dp}[0][\{1,2,\dots,M\}] = 1\). + +Next, let’s consider what happens when \(c\) and \(S\) are fixed, and we decide \(A_{c+1}\) to be \(a \in S\). + +First, due to the condition that \(X_a\) must exist between any two occurrences of \(a\), we remove \(a\) from \(S\). This can be interpreted as not being allowed to add \(a\) again until \(X_a\) is added. Next, we add all \(b\) such that \(X_b = a\) to \(S\). This can be interpreted as allowing \(b\) to be added since \(X_b\) has been added. Let the new set obtained in this way be written as \(S(a)\). The transition in the dynamic programming can be written as follows: + +- \(\mathrm{dp}[c+1][S(a)] \xleftarrow{+} \mathrm{dp}[c][S] \quad (a \in S)\) + +This is a bitDP. The time complexity is \(\mathrm{O}(NM2^M)\), which is sufficiently fast under the given constraints. diff --git a/problems/DP-02/Atcoder/arc179_b/judge.json b/problems/DP-02/Atcoder/arc179_b/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..568377d939512aec9f59076716fe0b00e9ea80ad --- /dev/null +++ b/problems/DP-02/Atcoder/arc179_b/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 32, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/arc179_b/meta.json b/problems/DP-02/Atcoder/arc179_b/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..e9ba3fb60d777f168e5520ca4cbab6dc68a99197 --- /dev/null +++ b/problems/DP-02/Atcoder/arc179_b/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "arc179_b", + "contest": "arc179", + "type": "ARC", + "letter": "B", + "title": "Between B and B", + "url": "https://atcoder.jp/contests/arc179/tasks/arc179_b", + "difficulty": 1432, + "score": 500, + "time_limit_sec": 2.0, + "memory_limit_mb": 1024, + "n_tests": 32, + "editorial_url": "https://atcoder.jp/contests/arc179/editorial/10157", + "code_source": "model", + "pid": "A4013" +} diff --git a/problems/DP-02/Atcoder/arc179_b/solution.cpp b/problems/DP-02/Atcoder/arc179_b/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ff0e89f93b8f7c1c7e665732f52daceeea250f5e --- /dev/null +++ b/problems/DP-02/Atcoder/arc179_b/solution.cpp @@ -0,0 +1,56 @@ +// arc179_b: B - Between B and B +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/arc179/editorial/10157 +// Judged AC on all 32 tests, max 0.06 s of the 2 s limit (submission 1). + +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int M, N; + cin >> M >> N; + vector enable(M, 0); + for (int b = 0; b < M; ++b) { + int x; + cin >> x; + --x; + enable[x] |= 1 << b; + } + + const int MOD = 998244353; + const int states = 1 << M; + vector> transitions(states); + for (int s = 0; s < states; ++s) { + for (int a = 0; a < M; ++a) { + if (s & (1 << a)) { + transitions[s].push_back((s ^ (1 << a)) | enable[a]); + } + } + } + + vector dp(states, 0), next_dp(states, 0); + dp[states - 1] = 1; + for (int c = 0; c < N; ++c) { + fill(next_dp.begin(), next_dp.end(), 0); + for (int s = 0; s < states; ++s) { + int ways = dp[s]; + if (ways == 0) continue; + for (int t : transitions[s]) { + int value = next_dp[t] + ways; + if (value >= MOD) value -= MOD; + next_dp[t] = value; + } + } + dp.swap(next_dp); + } + + int answer = 0; + for (int ways : dp) { + answer += ways; + if (answer >= MOD) answer -= MOD; + } + cout << answer << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/arc179_b/statement.md b/problems/DP-02/Atcoder/arc179_b/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..f70593290ac17dc5fa1aa901f7ea0b61696fcbc7 --- /dev/null +++ b/problems/DP-02/Atcoder/arc179_b/statement.md @@ -0,0 +1,72 @@ +# B - Between B and B + +**Score**: 500 points + +## Problem Statement +You are given a sequence \( (X_1, X_2, \dots, X_M) \) of length \( M \) consisting of integers between \( 1 \) and \( M \), inclusive. +Find the number, modulo \( 998244353 \), of sequences \( A = (A_1, A_2, \dots, A_N) \) of length \( N \) consisting of integers between \( 1 \) and \( M \), inclusive, that satisfy the following condition: +- For each \( B = 1, 2, \dots, M \), the value \( X_B \) exists between any two different occurrences of \( B \) in \( A \) (including both ends). + +More formally, for each \( B = 1, 2, \dots, M \), the following condition must hold: +- For every pair of integers \( (l, r) \) such that \( 1 \leq l < r \leq N \) and \( A_l = A_r = B \), there exists an integer \( m \) (\( l \leq m \leq r \)) such that \( A_m = X_B \). + +## Constraints +- \( 1 \leq M \leq 10 \) +- \( 1 \leq N \leq 10^4 \) +- \( 1 \leq X_i \leq M \) +- All input values are integers. + +## Input +The input is given from Standard Input in the following format: +``` +M N +X_1 X_2 ... X_M +``` + +## Output +Print the answer. + +## Sample Input 1 +``` +3 4 +2 1 2 +``` + +## Sample Output 1 +``` +14 +``` +Here are examples of sequences \( A \) that satisfy the condition: +- \( (1, 3, 2, 3) \) +- \( (2, 1, 2, 1) \) +- \( (3, 2, 1, 3) \) + +Here are non-examples: +- \( (1, 3, 1, 3) \) + - There is no \( X_3 = 2 \) between the 3s. +- \( (2, 2, 1, 3) \) + - There is no \( X_2 = 1 \) between the 2s. + +## Sample Input 2 +``` +4 8 +1 2 3 4 +``` + +## Sample Output 2 +``` +65536 +``` +All sequences of length \( 8 \) consisting of integers between \( 1 \) and \( 4 \) satisfy the condition. +Note that when \( X_B = B \), there is always a \( B \) between two different occurrences of \( B \). + +## Sample Input 3 +``` +4 9 +2 3 4 1 +``` + +## Sample Output 3 +``` +628 +``` diff --git a/problems/DP-02/Atcoder/arc182_c/editorial.md b/problems/DP-02/Atcoder/arc182_c/editorial.md new file mode 100644 index 0000000000000000000000000000000000000000..f0363d9c0169b1f6f29cdfd816b355fd2036fb83 --- /dev/null +++ b/problems/DP-02/Atcoder/arc182_c/editorial.md @@ -0,0 +1,68 @@ +# C - Sum of Number of Divisors of Product (editorial) + +Source: https://atcoder.jp/contests/arc182/editorial/10672 by evima + +## Hints + +Hint 1 + + Recall the formula for finding the number of divisors. If you don't know it, look it up. + +Hint 2 + + The formula for the number of divisors can be expressed as a product. Consider applying a general technique for sums of products. + +Hint 3 + + It would be good to speed up a DP with several states in some way. What kind of states should it have? + +Hint 3 Supplement + + One possible method is matrix exponentiation. Although there are faster methods, matrix exponentiation with the correct states is sufficient under the constraints of this problem. + +Hint 4 + + The number of prime numbers not greater than $M$ is very small. Yes, really very small. + +Hint 4 Supplement + + To be more precise, the number of prime numbers not greater than $M$ is so small that $O(8^{\pi(M)}\log N)$ is fast enough, where $\pi(x)$ is the number of primes not greater than $x$. + +Hint 5 + + In other words, using matrix exponentiation, even a DP with $2^{\pi(M)}$ states is feasible. + +## Solution + +As a prerequisite, you need to know how to find the number of divisors of a positive integer \(x\). If \(x\) is factorized as \(p_1^{a_1}p_2^{a_2}\dots p_k^{a_k}\), the number of divisors of \(x\) is given by \((a_1+1)(a_2+1)\dots (a_k+1)\). + +By the way, even for the maximum \(M\), there are only six primes not greater than \(M\): \(2, 3, 5, 7, 11, 13\). Therefore, in this problem, the number of divisors of \(x\) can be expressed as follows: + +- \((a_1+1)(a_2+1)(a_3+1)(a_4+1)(a_5+1)(a_6+1)\), where \(x\) can be expressed as \(2^{a_1}3^{a_2}5^{a_3}7^{a_4}11^{a_5}13^{a_6}\). + +Then, the problem can be rephrased as follows: + +There are six towers of blocks. Initially, each tower has exactly one block. Perform the following operation between \(1\) and \(N\) times: + +- Choose an integer \(m\) such that \(1 \leq m \leq M\), and stack blocks on the towers as follows: + + - When \(m\) can be expressed as \(2^{a_1}3^{a_2}5^{a_3}7^{a_4}11^{a_5}13^{a_6}\), stack \(a_i\) blocks on the \(i\)-th tower. + +Find the sum of the following values over all sequences of operations, modulo \(998244353\): + +- \(\prod_{i=1}^{6}b_i\), where \(b_i\) is the number of blocks stacked on the \(i\)-th tower. + +It is easy to show that this rephrasing corresponds to the original problem. + +By the way, the value to be found for each sequence of operations can be rephrased as “the number of ways to choose exactly one block from each tower.” By performing this block selection during the operations, this problem can be solved using the following bit DP: + +- \(DP[i][S] = \) the number of ways such that the set of towers from which blocks have already been chosen matches \(S\) after the \(i\)-th operation. +- \(DP_{ans}[i] = \) the answer after the \(i\)-th operation. + +The complexity of this solution is \(O(2^{\pi(M)}N)\), where \(\pi(x)\) is the number of primes not greater than \(x\). Of course, this is far from feasible. + +However, the transitions of this DP can easily be converted into matrix exponentiation. Then, the complexity becomes \(O(8^{\pi(M)}\log N)\), which is fast enough. + +(PyPy3) + +**Bonus!**: Consider how to solve the problem quickly even when \(M \leq 30\). There seems to be a method using formal power series, but it can also be achieved by replacing matrix exponentiation with a faster method. () diff --git a/problems/DP-02/Atcoder/arc182_c/judge.json b/problems/DP-02/Atcoder/arc182_c/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..86dcdcb36c88855d39fb1cb373b0362fdf605875 --- /dev/null +++ b/problems/DP-02/Atcoder/arc182_c/judge.json @@ -0,0 +1,15 @@ +{ + "time_limit_s": 3.0, + "time_limit_source": "task page", + "memory_mb": 1024, + "memory_source": "task page", + "mode": "exact", + "validator_flags": "case_sensitive", + "comparison": "token-wise, whitespace-insensitive, case-sensitive (AtCoder's checker)", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".out", + "n_sample": null, + "n_secret": 51, + "note": "no sample/secret split: the statement's samples are among the numbered tests" +} diff --git a/problems/DP-02/Atcoder/arc182_c/meta.json b/problems/DP-02/Atcoder/arc182_c/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..aefd5eb1ca7ed8f33ce584e12a885229a7762b98 --- /dev/null +++ b/problems/DP-02/Atcoder/arc182_c/meta.json @@ -0,0 +1,16 @@ +{ + "task_id": "arc182_c", + "contest": "arc182", + "type": "ARC", + "letter": "C", + "title": "Sum of Number of Divisors of Product", + "url": "https://atcoder.jp/contests/arc182/tasks/arc182_c", + "difficulty": 2408, + "score": 600, + "time_limit_sec": 3.0, + "memory_limit_mb": 1024, + "n_tests": 51, + "editorial_url": "https://atcoder.jp/contests/arc182/editorial/10672", + "code_source": "model", + "pid": "A4032" +} diff --git a/problems/DP-02/Atcoder/arc182_c/solution.cpp b/problems/DP-02/Atcoder/arc182_c/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..991452473d070b892b17a560876f3783913f8bd7 --- /dev/null +++ b/problems/DP-02/Atcoder/arc182_c/solution.cpp @@ -0,0 +1,101 @@ +// arc182_c: C - Sum of Number of Divisors of Product +// Written by a model (gpt-6-astra) from the official editorial, https://atcoder.jp/contests/arc182/editorial/10672 +// Judged AC on all 51 tests, max 0.01 s of the 3 s limit (submission 1). + +#include +#include +using namespace std; +using mint = atcoder::modint998244353; +using Matrix = vector>; + +Matrix multiply(const Matrix& a, const Matrix& b) { + int n = (int)a.size(); + Matrix c(n, vector(n)); + for (int i = 0; i < n; ++i) { + for (int k = 0; k < n; ++k) { + if (a[i][k].val() == 0) continue; + mint x = a[i][k]; + for (int j = 0; j < n; ++j) { + c[i][j] += x * b[k][j]; + } + } + } + return c; +} + +vector apply_matrix(const Matrix& a, const vector& v) { + int n = (int)a.size(); + vector result(n); + for (int i = 0; i < n; ++i) { + for (int j = 0; j < n; ++j) { + result[i] += a[i][j] * v[j]; + } + } + return result; +} + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + unsigned long long N; + int M; + cin >> N >> M; + + vector primes; + for (int p : {2, 3, 5, 7, 11, 13}) { + if (p <= M) primes.push_back(p); + } + int k = (int)primes.size(); + int states = 1 << k; + int full = states - 1; + + // weight[S]: choices of one newly added block for each tower in S, + // summed over all possible next sequence elements. + vector weight(states); + for (int m = 1; m <= M; ++m) { + int x = m; + vector exponent(k); + for (int i = 0; i < k; ++i) { + while (x % primes[i] == 0) { + ++exponent[i]; + x /= primes[i]; + } + } + vector product(states); + product[0] = 1; + for (int mask = 1; mask < states; ++mask) { + int bit = __builtin_ctz((unsigned)mask); + product[mask] = product[mask ^ (1 << bit)] * exponent[bit]; + } + for (int mask = 0; mask < states; ++mask) { + weight[mask] += product[mask]; + } + } + + Matrix transition(states + 1, vector(states + 1)); + for (int from = 0; from < states; ++from) { + int remaining = full ^ from; + for (int add = remaining; ; add = (add - 1) & remaining) { + transition[from | add][from] = weight[add]; + if (add == 0) break; + } + } + // The extra coordinate accumulates the full-set counts for lengths 1..N. + for (int from = 0; from < states; ++from) { + transition[states][from] = transition[full][from]; + } + transition[states][states] = 1; + + // Initially each tower contains one block; any subset may select it. + vector dp(states + 1, 1); + dp[states] = 0; + while (N > 0) { + if (N & 1ULL) dp = apply_matrix(transition, dp); + N >>= 1; + if (N > 0) transition = multiply(transition, transition); + } + + cout << dp[states].val() << '\n'; + return 0; +} diff --git a/problems/DP-02/Atcoder/arc182_c/statement.md b/problems/DP-02/Atcoder/arc182_c/statement.md new file mode 100644 index 0000000000000000000000000000000000000000..fcfd84d5ef7664355f0d834360e291a8f5bd4a29 --- /dev/null +++ b/problems/DP-02/Atcoder/arc182_c/statement.md @@ -0,0 +1,57 @@ +# C - Sum of Number of Divisors of Product + +**Score:** 600 points + +## Problem Statement +An integer sequence of length between \(1\) and \(N\), inclusive, where each element is between \(1\) and \(M\), inclusive, is called a **good sequence**. +The **score** of a good sequence is defined as the number of positive divisors of \(X\), where \(X\) is the product of the elements in the sequence. +There are \(\displaystyle \sum_{k=1}^{N}M^k\) good sequences. Find the sum of the scores of all those sequences modulo \(998244353\). + +## Constraints +- \(1 \leq N \leq 10^{18}\) +- \(1 \leq M \leq 16\) +- All input values are integers. + +## Input +The input is given from Standard Input in the following format: +``` +N M +``` + +## Output +Print the answer as an integer. + +## Sample Input 1 +``` +1 7 +``` + +## Sample Output 1 +``` +16 +``` +There are seven good sequences: (1),(2),(3),(4),(5),(6),(7). Their scores are \(1,2,2,3,2,4,2\), respectively, so the answer is \(1+2+2+3+2+4+2=16\). + +## Sample Input 2 +``` +3 11 +``` + +## Sample Output 2 +``` +16095 +``` +For example, (8,11) and (1,8,2) are good sequences. Here is the process of calculating their scores: +- The product of the elements in (8,11) is \(8 \times 11 = 88\). \(88\) has eight positive divisors: \(1,2,4,8,11,22,44,88\), so the score of (8,11) is \(8\). +- The product of the elements in (1,8,2) is \(1 \times 8 \times 2 = 16\). \(16\) has five positive divisors: \(1,2,4,8,16\), so the score of (1,8,2) is \(5\). + +## Sample Input 3 +``` +81131 14 +``` + +## Sample Output 3 +``` +182955659 +``` +Remember to take the result modulo \(998244353\). diff --git a/problems/DP-02/ICPC_WF/2011/J-pyramids/data/secret-1.ans b/problems/DP-02/ICPC_WF/2011/J-pyramids/data/secret-1.ans new file mode 100644 index 0000000000000000000000000000000000000000..207f43ad5750730cfd9808328e082e48db35bca9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2011/J-pyramids/data/secret-1.ans @@ -0,0 +1,202 @@ +Case 1: 3H 3L 2H +Case 2: impossible +Case 3: 143H 35H 4H 3H +Case 4: 142H 46H 21L 7H +Case 5: 170L 99L +Case 6: 174L 81L 35H +Case 7: 136H 96L 7H +Case 8: 143H 43L 13H +Case 9: 178L 62L 19H +Case 10: 142H 58L 15H +Case 11: 142H 55L 26H +Case 12: 180L 27H 21H 16H +Case 13: 152L 123L 63H +Case 14: 180L 37L 24L +Case 15: 142H 42H 38L +Case 16: impossible +Case 17: impossible +Case 18: impossible +Case 19: impossible +Case 20: 2H +Case 21: impossible +Case 22: impossible +Case 23: impossible +Case 24: impossible +Case 25: 3L +Case 26: impossible +Case 27: impossible +Case 28: impossible +Case 29: 3H +Case 30: 3L 2H +Case 31: impossible +Case 32: impossible +Case 33: impossible +Case 34: 3H 2H +Case 35: 4L +Case 36: impossible +Case 37: impossible +Case 38: impossible +Case 39: 3H 3L +Case 40: 4L 2H +Case 41: impossible +Case 42: impossible +Case 43: impossible +Case 44: 3H 3L 2H +Case 45: 4H +Case 46: impossible +Case 47: impossible +Case 48: impossible +Case 49: 4L 3H +Case 50: 5L +Case 51: impossible +Case 52: impossible +Case 53: impossible +Case 54: 4L 3H 2H +Case 55: 5L 2H +Case 56: impossible +Case 57: impossible +Case 58: impossible +Case 59: 4H 3H +Case 60: 5L 3L +Case 61: impossible +Case 62: impossible +Case 63: impossible +Case 64: 5L 3H +Case 65: 4H 4L +Case 66: impossible +Case 67: impossible +Case 68: impossible +Case 69: 5L 3H 2H +Case 70: 5H +Case 71: 6L +Case 72: impossible +Case 73: impossible +Case 74: 5L 3H 3L +Case 75: 5H 2H +Case 76: 6L 2H +Case 77: impossible +Case 78: impossible +Case 79: 4H 4L 3H +Case 80: 5H 3L +Case 81: 6L 3L +Case 82: impossible +Case 83: impossible +Case 84: 5H 3H +Case 85: 6L 3H +Case 86: 6L 3L 2H +Case 87: impossible +Case 88: impossible +Case 89: 5H 3H 2H +Case 90: 5H 4L +Case 91: 6L 4L +Case 92: impossible +Case 93: impossible +Case 94: 5H 3H 3L +Case 95: 6L 3H 3L +Case 96: 6L 4L 2H +Case 97: impossible +Case 98: impossible +Case 99: 7L +Case 100: 5H 4H +Case 101: 6L 4H +Case 102: impossible +Case 103: impossible +Case 104: 7L 2H +Case 105: 5H 5L +Case 106: 6H +Case 107: impossible +Case 108: impossible +Case 109: 7L 3L +Case 110: 5H 5L 2H +Case 111: 6H 2H +Case 112: impossible +Case 113: 7L 3H +Case 114: 7L 3L 2H +Case 115: 6L 4H 3H +Case 116: 8L 3L +Case 117: 6H 5L 2H +Case 118: impossible +Case 119: 7L 5L 3H +Case 120: 8L 3H +Case 121: 8L 3L 2H +Case 122: 6H 5L 3L +Case 123: impossible +Case 124: 7L 5L 3H 2H +Case 125: 7L 5H +Case 126: 7H +Case 127: 6H 4H 4L +Case 128: impossible +Case 129: 7L 5L 3H 3L +Case 130: 8L 3H 3L +Case 131: 7H 2H +Case 132: 6H 5H +Case 133: 6H 6L +Case 134: 7L 4H 4L 3H +Case 135: 7L 5H 3L +Case 136: 13H 7L 5H 5L 3H +Case 137: 11H 9L 6H 3L 2H +Case 138: 11H 6H 6L 3H 3L +Case 139: 10H 6H 6L 4L 2H +Case 140: 12L 7L 3H 3L 2H +Case 141: 11L 6H 6L 3H 3L +Case 142: 8H 7L 4L 3H 2H +Case 143: 8L 6H 6L 3L 2H +Case 144: 6H 6L 5H 5L 4L 2H +Case 145: 6H 6L 5H 5L 4L +Case 146: 6H 6L 5H 4H 4L +Case 147: 6H 6L 5H 5L 3L +Case 148: 6H 6L 5H 5L 2H +Case 149: 6H 6L 5H 4L 2H +Case 150: 6H 6L 5H 3L 2H +Case 151: 7L 5H 5L 4L 3H 2H +Case 152: 7L 5H 5L 4L 3H +Case 153: 7L 5H 4H 4L 3H +Case 154: 7L 5H 5L 3H 3L +Case 155: 7L 5H 5L 3H 2H +Case 156: 7L 5H 4L 3H 2H +Case 157: 7L 5H 3H 3L 2H +Case 158: 180L +Case 159: 143H +Case 160: 179L +Case 161: 142H +Case 162: 132H 86H 29H +Case 163: 122H 131L 26L +Case 164: 101H 126L 97H +Case 165: 143H 35H +Case 166: 136H 96L +Case 167: 180L 31H 2H +Case 168: 180L 37L 14H 2H +Case 169: 180L 37L 24L +Case 170: 131H 26H 9H +Case 171: 126L 46H 21L +Case 172: 107L 30L 7L 3H +Case 173: 104H 37L 13H +Case 174: 156L 51L 11H +Case 175: 140L 35L 2H +Case 176: 111L 69H 26L +Case 177: 146L 96H 55H +Case 178: 134L 26H 9H +Case 179: 96L 21H 16L 7L +Case 180: 110H 73H 88L +Case 181: 92H 26L 10H +Case 182: 160L 50H 57L +Case 183: 74L 28H 2H +Case 184: 147L 105L 42L +Case 185: 117H 31L 4L +Case 186: 85L 38L 11H +Case 187: 60H 71L 18L +Case 188: 176L 32L 4H +Case 189: 87H 20L 8H +Case 190: 136L 87H 46L +Case 191: 163L 104L 36L +Case 192: 56L 16L +Case 193: 106L 21L 10L 6L +Case 194: 160L 37L 16H +Case 195: 122H 41H 7H +Case 196: 149L 24H 2H +Case 197: 134L 76L 9L +Case 198: 163L 61L 12L +Case 199: 82L 44H 17L +Case 200: 174L 61L 45L +Case 201: 144L 32L 8L 3H +Case 202: 154L 64L 11L diff --git a/problems/DP-02/ICPC_WF/2011/J-pyramids/data/secret-1.in b/problems/DP-02/ICPC_WF/2011/J-pyramids/data/secret-1.in new file mode 100644 index 0000000000000000000000000000000000000000..f201fcabd0161611837c9e0dec95d4feed57c46b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2011/J-pyramids/data/secret-1.in @@ -0,0 +1,203 @@ +29 +28 +999938 +999957 +999990 +999991 +999992 +999993 +999994 +999995 +999996 +999997 +999998 +999999 +1000000 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +1007 +777 +677 +557 +477 +457 +327 +282 +262 +257 +252 +247 +242 +227 +217 +213 +208 +203 +198 +193 +178 +168 +988260 +984984 +971970 +964535 +999676 +999327 +998872 +999894 +999852 +998681 +998419 +999999 +764452 +376658 +214992 +390338 +668888 +474955 +349307 +885912 +416526 +156307 +699564 +267471 +770954 +78019 +752003 +546211 +116381 +137146 +930190 +225044 +669132 +936486 +31672 +206203 +706155 +636706 +567380 +486281 +775205 +125623 +949126 +514198 +666666 +0 diff --git a/problems/DP-02/ICPC_WF/2011/J-pyramids/judge.json b/problems/DP-02/ICPC_WF/2011/J-pyramids/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..f1ef8ef7fb4dba12ed5a28b889b921cd9b22cae9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2011/J-pyramids/judge.json @@ -0,0 +1,14 @@ +{ + "time_limit_s": 10.0, + "time_limit_source": "default (10 s; the statement gives none)", + "memory_mb": 2048, + "memory_source": "default (the statement gives none)", + "mode": "exact", + "validator_flags": null, + "comparison": "Kattis default output validator: token-wise, whitespace- and case-insensitive", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".ans", + "n_sample": 0, + "n_secret": 1 +} diff --git a/problems/DP-02/ICPC_WF/2011/J-pyramids/meta.json b/problems/DP-02/ICPC_WF/2011/J-pyramids/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..377843acb7dada968ac14593af2a6dbdd8df5b19 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2011/J-pyramids/meta.json @@ -0,0 +1,9 @@ +{ + "year": "2011", + "letter": "J", + "title": "Pyramids", + "slug": "pyramids", + "source_pdf": "contest_problems.pdf", + "page_start": 19, + "page_end": 20 +} diff --git a/problems/DP-02/ICPC_WF/2011/J-pyramids/page.html b/problems/DP-02/ICPC_WF/2011/J-pyramids/page.html new file mode 100644 index 0000000000000000000000000000000000000000..6090a38a33efe9600b9531244ccaf1ef502d96d3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2011/J-pyramids/page.html @@ -0,0 +1,192 @@ + J. Pyramids | Ethan Pham
ICPC 2011
ICPC 2011

J. Pyramids

Problem ID: pyramids It is not too hard to build a pyramid if you have a lot of identical cubes. On a flat foundation you lay, say, 10 × 10 cubes in a square. Centered on top of that square you lay a 9 × 9 square of cubes. Continuing this way you end up wit...

Updated May 21, 2026
Track ICPC
Year 2011
Statement Text + PDF
TeXC++Statement textStatement PDF

Problem Statement

Formatted from the contest statement text, with sample tests broken out into copyable blocks.

It is not too hard to build a pyramid if you have a lot of identical cubes. On a flat foundation you lay, say, 10 × 10 cubes in a square. Centered on top of that square you lay a 9 × 9 square of cubes. Continuing this way you end up with a single cube, which is the top of the pyramid. The height of such a pyramid equals the length of its base, which in this case is 10. We call this a high pyramid. If you think that a high pyramid is too steep, you can proceed as follows. On the 10 × 10 base square, lay an 8 × 8 square, then a 6 × 6 square, and so on, ending with a 2 × 2 top square (if you start with a base of odd length, you end up with a single cube on top, of course). The height of this pyramid is about half the length of its base. We call this a low pyramid. Once upon a time (quite a long time ago, actually) there was a pharaoh who inherited a large number of stone cubes from his father. He ordered his architect to use all of these cubes to build a pyramid, not leaving a single one unused. The architect kindly explained that not every number of cubes can form a pyramid. With 10 cubes you can build a low pyramid with base 3. With 5 cubes you can build a high pyramid of base 2. But no pyramid can be built using exactly 7 cubes. The pharaoh was not amused, but after some thinking he came up with new restrictions.

+
  1. All cubes must be used.
  2. You may build more than one pyramid, but you must build as few pyramids as possible.
  3. All pyramids must be different.
  4. Each pyramid must have a height of at least 2.
  5. Satisfying the above, the largest of the pyramids must be as large as possible (i.e., containing the most cubes).
  6. Satisfying the above, the next-to-largest pyramid must be as large as possible.
  7. And so on...
+

Drawing figures and pictures in the sand, it took the architect quite some time to come up with the best solution. Write a program that determines how to meet the restrictions of the pharaoh, given the number of cubes.

Input

The input consists of several test cases, each one on a single line. A test case is an integer c, where 1 ≤ c ≤ 106 , giving the number of cubes available. The last test case is followed by a line containing a single zero.

+

ICPC 2011 World Finals Problem J: Pyramids

Output

For each test case, display its case number followed by the pyramids to be built. The pyramids should be ordered with the largest first. Pyramids are specified by the length of their base followed by an L for low pyramids or an H for high pyramids. If two differenct pyramids have the same number of cubes, list the high pyramid first. Print “impossible” if it is not possible to meet the requirements of the pharaoh. Follow the format of the sample output.

Sample Tests

Sample
Sample Input
  29
+  28
+  0
+
+ICPC 2011 World Finals Problem J: Pyramids
Sample Output
Case 1: 3H 3L 2H
+Case 2: impossible

Editorial

The solution write-up is rendered from the LaTeX source, with equations kept live through MathJax.

Key Observations

+
  • Write the structural observations that make the problem tractable.

  • State any useful invariant, monotonicity property, graph interpretation, or combinatorial reformulation.

  • If the constraints matter, explain exactly which part of the solution they enable.

+

Algorithm

+
  1. Describe the data structures and the state maintained by the algorithm.

  2. Explain the processing order and why it is sufficient.

  3. Mention corner cases explicitly if they affect the implementation.

+

Correctness Proof

+

We prove that the algorithm returns the correct answer.

+

Lemma 1.

+

State the first key claim.

+

Proof.

+

Provide a concise proof.

+

Lemma 2.

+

State the next claim if needed.

+

Proof.

+

Provide a concise proof.

+

Theorem.

+

The algorithm outputs the correct answer for every valid input.

+

Proof.

+

Combine the lemmas and finish the argument.

+

Complexity Analysis

+

State the running time and memory usage in terms of the input size.

+

Implementation Notes

+
  • Mention any non-obvious implementation detail that is easy to get wrong.

  • Mention numeric limits, indexing conventions, or tie-breaking rules if relevant.

Code

C++ solution used for this page.

C++

Clean code view with a raw-file link when you want the original source.

Raw file
#include <bits/stdc++.h>
+using namespace std;
+
+namespace {
+
+void solve() {
+    // Fill in the full solution logic for the problem here.
+}
+
+}  // namespace
+
+int main() {
+    ios::sync_with_stdio(false);
+    cin.tie(nullptr);
+
+    solve();
+    return 0;
+}
+

Source Files and Assets

Raw files are still available here when you want the original TeX, C++, or statement assets.

Show raw files
\ No newline at end of file diff --git a/problems/DP-02/ICPC_WF/2011/J-pyramids/solution.cpp b/problems/DP-02/ICPC_WF/2011/J-pyramids/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9c00880b52352a1907b20ebee2180908e791869e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2011/J-pyramids/solution.cpp @@ -0,0 +1,75 @@ +#include +using namespace std; + +struct Pyramid { + int cubes, base; + char kind; +}; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + vector queries; + int c, maximum = 0; + while (cin >> c && c != 0) { + queries.push_back(c); + maximum = max(maximum, c); + } + if (queries.empty()) return 0; + + vector pyramids; + for (long long base = 2; ; ++base) { + long long cubes = base * (base + 1) * (2 * base + 1) / 6; + if (cubes > maximum) break; + pyramids.push_back({(int)cubes, (int)base, 'H'}); + } + for (long long base = 3; ; ++base) { + long long cubes = base * (base + 1) * (base + 2) / 6; + if (cubes > maximum) break; + pyramids.push_back({(int)cubes, (int)base, 'L'}); + } + sort(pyramids.begin(), pyramids.end(), [](const Pyramid &a, const Pyramid &b) { + if (a.cubes != b.cubes) return a.cubes < b.cubes; + return a.kind > b.kind; // A high pyramid comes first when read backwards. + }); + + const uint16_t INF = 65535; + vector dp(maximum + 1, INF); + dp[0] = 0; + + // take[i][s] records whether the best solution using items 0..i takes i. + size_t words = (maximum + 64) / 64; + vector> take(pyramids.size(), vector(words, 0)); + int upper = 0; + for (int i = 0; i < (int)pyramids.size(); ++i) { + int weight = pyramids[i].cubes; + upper = min(maximum, upper + weight); + auto &row = take[i]; + for (int sum = upper; sum >= weight; --sum) { + int candidate = (int)dp[sum - weight] + 1; + // On a tie, including the new largest pyramid is preferable. + if (candidate <= dp[sum]) { + dp[sum] = candidate; + row[sum >> 6] |= 1ULL << (sum & 63); + } + } + } + + int caseNumber = 0; + for (int total : queries) { + cout << "Case " << ++caseNumber << ':'; + if (dp[total] == INF) { + cout << " impossible\n"; + continue; + } + int remaining = total; + for (int i = (int)pyramids.size() - 1; i >= 0 && remaining > 0; --i) { + if ((take[i][remaining >> 6] >> (remaining & 63)) & 1ULL) { + cout << ' ' << pyramids[i].base << pyramids[i].kind; + remaining -= pyramids[i].cubes; + } + } + cout << '\n'; + } +} diff --git a/problems/DP-02/ICPC_WF/2011/J-pyramids/solution.tex b/problems/DP-02/ICPC_WF/2011/J-pyramids/solution.tex new file mode 100644 index 0000000000000000000000000000000000000000..5dd78c59888b05e4a3fa63c1d863f43f0d6b22ae --- /dev/null +++ b/problems/DP-02/ICPC_WF/2011/J-pyramids/solution.tex @@ -0,0 +1,90 @@ +\documentclass[11pt]{article} +\usepackage[margin=1in]{geometry} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{amsmath,amssymb,amsthm} +\usepackage{enumitem} + +\title{ICPC World Finals 2011\\J. Pyramids} +\author{} +\date{} + +\begin{document} +\maketitle + +\section*{Problem Summary} + +Use exactly $c\le10^6$ cubes to build a minimum number of distinct pyramids, each at least two layers high. For base length $b$, a high pyramid has square layers with sides $b,b-1,\ldots,1$; a low pyramid has sides $b,b-2,\ldots$ down to the last positive value. + +Among minimum-count solutions, maximize the sorted sequence of cube counts lexicographically. Print base lengths and types largest first, with high before low at equal sizes, or \texttt{impossible}. + +\section*{Key Observations} + +\begin{itemize}[leftmargin=*] + \item Summing the squares of the layer side lengths gives + \[ + H(b)=\frac{b(b+1)(2b+1)}{6}, \qquad + L(b)=\frac{b(b+1)(b+2)}{6}. + \] + The height restriction requires $b\ge2$ for high pyramids and $b\ge3$ for low pyramids. + \item Let $C$ be the largest input cube count. Both formulas increase with $b$, so enumerate each type until its size exceeds $C$. At $C=10^6$ there are only $320$ eligible pyramids. Each is an item usable at most once, giving a minimum-cardinality, exact-sum $0/1$ knapsack problem. + \item Process items by increasing size and prefer inclusion on count ties. Taking a strictly larger item improves the first entry; items of equal size can be exchanged without changing cube counts. + \item A single count array suffices, but reconstruction needs a decision bit for every item prefix and sum. +\end{itemize} + +\section*{Algorithm} + +Read and store queries up to zero, and find $C$. Generate eligible pyramids with their sizes, bases, and types. Sort by increasing size, with low before high on ties. Let the $P$ items have weights $w_0,\ldots,w_{P-1}$. + +Initialize \texttt{dp[0]} to $0$ and all other entries to unreachable. After each item, \texttt{dp[s]} is the minimum count for sum $s$. Initialize \texttt{take[i][s]} to zero; a set bit means the chosen optimum using items $0,\ldots,i$ includes $i$. + +Process each item $i$: +\begin{enumerate}[leftmargin=*] + \item Maintain a sum bound $U$, initially $0$, and replace it by $\min(C,U+w_i)$. Larger sums cannot be formed from the processed items within the query range. + \item Visit $s=U,U-1,\ldots,w_i$. The candidate using item $i$ has count + \[ + t=\texttt{dp}[s-w_i]+1. + \] + If this candidate is reachable and $t\le\texttt{dp}[s]$, set \texttt{dp[s]} to $t$ and set \texttt{take[i][s]}. Otherwise leave the count and the zero bit unchanged. +\end{enumerate} +The descending scan keeps the remainder state unchanged until it is read, preventing reuse of the current item. The non-strict comparison prefers inclusion on a count tie. + +For query $c$, print \texttt{impossible} if \texttt{dp[c]} is unreachable. Otherwise start with remainder $s=c$ and scan indices from $P-1$ down to $0$. Whenever \texttt{take[i][s]} is set, output item $i$ and subtract $w_i$ from $s$. Move to the preceding item whether or not it was selected, stopping at $s=0$. + +\section*{Correctness Proof} + +\paragraph{Lemma 1.} +After each item is processed, \texttt{dp[s]} is the minimum number of items from that prefix summing to $s$, or is unreachable if no such subset exists. + +\paragraph{Proof.} +Initially only the empty subset is available. When processing item $i$, omitting it gives the previous optimum for $s$, while including it gives one plus the previous optimum for $s-w_i$. Since sums decrease during the scan and $w_i>0$, the remainder entry has not yet been modified for item $i$. Thus the update minimizes over exactly these two cases. Within the range $0,\ldots,C$, sums above $U$ exceed the total prefix weight and remain unreachable. Induction proves the claim. \qed + +\paragraph{Lemma 2.} +For every reachable sum and item prefix, the recorded decisions select a minimum-count subset whose nonincreasing sequence of cube counts is lexicographically largest. + +\paragraph{Proof.} +Induct on the number of processed items. The empty prefix is immediate. By induction, omitting the next item retains the best sequence for that case. Including it prepends its weight to the best minimum-count remainder sequence. All earlier weights are no larger, so this is optimal among subsets including it. + +Different counts are resolved by choosing the smaller one. If both cases have count $k$, let $A$ be the best subset omitting the current item of weight $w$. If every weight in $A$ is smaller than $w$, any size-$k$ subset including the current item has a larger first entry. Otherwise $A$ contains an earlier item of weight $w$. Replace that item by the current one: this gives a valid inclusion-case subset with the same sequence as $A$. The best inclusion sequence is at least as good as this replacement. Thus inclusion on a tie never loses the required size preference, completing the induction. \qed + +\paragraph{Theorem.} +The algorithm outputs a solution satisfying all requirements whenever one exists, and otherwise outputs \texttt{impossible}. + +\paragraph{Proof.} +The generated items are exactly the allowed pyramids small enough to occur in any query. Lemma 1 detects impossibility and minimizes the count; Lemma 2 gives the required size preferences. Reconstruction follows the stored prefix decisions, subtracting each selected weight, and reaches the initial reachable state of sum zero. Hence all cubes are used. Indices strictly decrease, so no pyramid is repeated. Scanning the sorted list backward prints decreasing sizes, with high before low at equal sizes. \qed + +\section*{Complexity Analysis} + +Let $Q$ be the number of queries. Generation and sorting take $O(P\log(P+1))$ time. Array initialization and knapsack processing take $O(C+PC)$ time. Each query scans at most $P$ items, so all query handling costs $O(Q(P+1))$. Here $P\le320$ and $C\le10^6$, and preprocessing is shared by all queries. + +The decision table uses $P\lceil(C+1)/64\rceil$ 64-bit words, or $O(PC)$ bits. Counts, item descriptions, and stored queries additionally use $O(C+P+Q)$ words. At the maximum bound, decision bits occupy about $40$ MB and the 16-bit count array about $2$ MB. + +\section*{Implementation Notes} + +\begin{itemize}[leftmargin=*] + \item Evaluate the cubic formulas in 64-bit integers before storing cube counts as ordinary integers. + \item Counts use \texttt{uint16\_t}, with \texttt{INF} equal to $65535$. Every feasible count is at most $P\le320$. Candidate addition uses an ordinary integer, so an unreachable remainder yields $65536$ and cannot pass the update test. + \item In row $i$ of \texttt{take}, sum $s$ uses word $\lfloor s/64\rfloor$ and bit $s\bmod64$. A predecessor in just the mutable DP could later point to a changed remainder, so retain the prefix rows. +\end{itemize} + +\end{document} diff --git a/problems/DP-02/ICPC_WF/2011/J-pyramids/statement.txt b/problems/DP-02/ICPC_WF/2011/J-pyramids/statement.txt new file mode 100644 index 0000000000000000000000000000000000000000..8a27ab44cc0ccf57bf93d3389cdbba91490857c2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2011/J-pyramids/statement.txt @@ -0,0 +1,51 @@ +Problem J + Pyramids + Problem ID: pyramids +It is not too hard to build a pyramid if you have a lot of identical cubes. On a flat foundation you lay, say, 10 × 10 +cubes in a square. Centered on top of that square you lay a 9 × 9 square of cubes. Continuing this way you end up +with a single cube, which is the top of the pyramid. The height of such a pyramid equals the length of its base, which +in this case is 10. We call this a high pyramid. +If you think that a high pyramid is too steep, you can proceed as follows. On the 10 × 10 base square, lay an 8 × 8 +square, then a 6 × 6 square, and so on, ending with a 2 × 2 top square (if you start with a base of odd length, you end +up with a single cube on top, of course). The height of this pyramid is about half the length of its base. We call this a +low pyramid. +Once upon a time (quite a long time ago, actually) there was a pharaoh who inherited a large number of stone cubes +from his father. He ordered his architect to use all of these cubes to build a pyramid, not leaving a single one unused. +The architect kindly explained that not every number of cubes can form a pyramid. With 10 cubes you can build a low +pyramid with base 3. With 5 cubes you can build a high pyramid of base 2. But no pyramid can be built using exactly +7 cubes. +The pharaoh was not amused, but after some thinking he came up with new restrictions. + + 1. All cubes must be used. + 2. You may build more than one pyramid, but you must build as few pyramids as possible. + 3. All pyramids must be different. + 4. Each pyramid must have a height of at least 2. + 5. Satisfying the above, the largest of the pyramids must be as large as possible (i.e., containing the most cubes). + 6. Satisfying the above, the next-to-largest pyramid must be as large as possible. + 7. And so on... + +Drawing figures and pictures in the sand, it took the architect quite some time to come up with the best solution. +Write a program that determines how to meet the restrictions of the pharaoh, given the number of cubes. + +Input + +The input consists of several test cases, each one on a single line. A test case is an integer c, where 1 ≤ c ≤ 10^6, +giving the number of cubes available. +The last test case is followed by a line containing a single zero. + +ICPC 2011 World Finals Problem J: Pyramids + +Output + +For each test case, display its case number followed by the pyramids to be built. The pyramids should be ordered +with the largest first. Pyramids are specified by the length of their base followed by an L for low pyramids or an +H for high pyramids. If two differenct pyramids have the same number of cubes, list the high pyramid first. Print +“impossible” if it is not possible to meet the requirements of the pharaoh. +Follow the format of the sample output. + + Sample input Output for the Sample Input + 29 Case 1: 3H 3L 2H + 28 Case 2: impossible + 0 + +ICPC 2011 World Finals Problem J: Pyramids diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/sample-1.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/sample-1.ans new file mode 100644 index 0000000000000000000000000000000000000000..1c6d9107b74845bdcdc9345caa15ab1dee5245d0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/sample-1.ans @@ -0,0 +1,2 @@ +Case 1: 300 +Case 2: 6 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/sample-1.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/sample-1.in new file mode 100644 index 0000000000000000000000000000000000000000..9bc917cf6c14e7b8c0718f4557f5a9f9958eb53e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/sample-1.in @@ -0,0 +1,12 @@ +5 4 +0 1 10 +1 2 20 +2 3 30 +3 4 40 +4 6 +0 1 1 +0 2 1 +0 3 1 +1 2 1 +1 3 1 +2 3 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-002-linear.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-002-linear.ans new file mode 100644 index 0000000000000000000000000000000000000000..43378bbb950338b9737f63b3d430bc66634732bd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-002-linear.ans @@ -0,0 +1 @@ +Case 1: 186 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-002-linear.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-002-linear.in new file mode 100644 index 0000000000000000000000000000000000000000..4d1e71d1273edfaedc46a94a36d36b8e3ec47d21 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-002-linear.in @@ -0,0 +1,20 @@ +20 19 +0 1 1 +1 2 2 +2 3 3 +3 4 4 +4 5 2 +5 6 3 +6 7 4 +7 8 1 +8 9 3 +9 10 4 +10 11 2 +11 12 1 +12 13 4 +13 14 2 +14 15 3 +15 16 1 +16 17 2 +17 18 3 +18 19 4 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-003-complete-18-const.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-003-complete-18-const.ans new file mode 100644 index 0000000000000000000000000000000000000000..21f9e23bba7a67fc6d3232322881eb28788dd9fe --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-003-complete-18-const.ans @@ -0,0 +1 @@ +Case 1: 40 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-003-complete-18-const.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-003-complete-18-const.in new file mode 100644 index 0000000000000000000000000000000000000000..81a9b7d3e4f5de2744640e722120b53f7bede7c9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-003-complete-18-const.in @@ -0,0 +1,156 @@ +20 155 +1 2 1 +1 3 1 +1 4 1 +1 5 1 +1 6 1 +1 7 1 +1 8 1 +1 9 1 +1 10 1 +1 11 1 +1 12 1 +1 13 1 +1 14 1 +1 15 1 +1 16 1 +1 17 1 +1 18 1 +2 3 1 +2 4 1 +2 5 1 +2 6 1 +2 7 1 +2 8 1 +2 9 1 +2 10 1 +2 11 1 +2 12 1 +2 13 1 +2 14 1 +2 15 1 +2 16 1 +2 17 1 +2 18 1 +3 4 1 +3 5 1 +3 6 1 +3 7 1 +3 8 1 +3 9 1 +3 10 1 +3 11 1 +3 12 1 +3 13 1 +3 14 1 +3 15 1 +3 16 1 +3 17 1 +3 18 1 +4 5 1 +4 6 1 +4 7 1 +4 8 1 +4 9 1 +4 10 1 +4 11 1 +4 12 1 +4 13 1 +4 14 1 +4 15 1 +4 16 1 +4 17 1 +4 18 1 +5 6 1 +5 7 1 +5 8 1 +5 9 1 +5 10 1 +5 11 1 +5 12 1 +5 13 1 +5 14 1 +5 15 1 +5 16 1 +5 17 1 +5 18 1 +6 7 1 +6 8 1 +6 9 1 +6 10 1 +6 11 1 +6 12 1 +6 13 1 +6 14 1 +6 15 1 +6 16 1 +6 17 1 +6 18 1 +7 8 1 +7 9 1 +7 10 1 +7 11 1 +7 12 1 +7 13 1 +7 14 1 +7 15 1 +7 16 1 +7 17 1 +7 18 1 +8 9 1 +8 10 1 +8 11 1 +8 12 1 +8 13 1 +8 14 1 +8 15 1 +8 16 1 +8 17 1 +8 18 1 +9 10 1 +9 11 1 +9 12 1 +9 13 1 +9 14 1 +9 15 1 +9 16 1 +9 17 1 +9 18 1 +10 11 1 +10 12 1 +10 13 1 +10 14 1 +10 15 1 +10 16 1 +10 17 1 +10 18 1 +11 12 1 +11 13 1 +11 14 1 +11 15 1 +11 16 1 +11 17 1 +11 18 1 +12 13 1 +12 14 1 +12 15 1 +12 16 1 +12 17 1 +12 18 1 +13 14 1 +13 15 1 +13 16 1 +13 17 1 +13 18 1 +14 15 1 +14 16 1 +14 17 1 +14 18 1 +15 16 1 +15 17 1 +15 18 1 +16 17 1 +16 18 1 +17 18 1 +0 1 1 +2 19 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-004-random-18-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-004-random-18-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..e0d21f34f310576b689d442f5db7a48609f2e6a9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-004-random-18-rand.ans @@ -0,0 +1 @@ +Case 1: 37320 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-004-random-18-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-004-random-18-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..aa33fb8f0bfc6c7121f2323bba0f5501837c1c76 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-004-random-18-rand.in @@ -0,0 +1,54 @@ +20 53 +0 1 510 +3 1 2107 +3 2 1140 +0 5 1447 +3 5 255 +2 6 2718 +6 5 2361 +7 3 961 +4 7 3225 +8 4 3495 +7 8 3299 +4 9 821 +5 9 1374 +9 8 1866 +3 10 2358 +10 4 1618 +7 10 147 +11 2 9 +11 5 244 +8 11 2101 +12 1 322 +12 4 127 +6 12 566 +13 1 1495 +13 2 2985 +13 4 3309 +13 6 1355 +13 10 1349 +5 14 1979 +14 6 1409 +14 8 1269 +9 14 1528 +5 15 1870 +14 15 1641 +6 16 80 +9 16 1389 +16 15 2279 +17 0 1882 +2 17 1296 +5 17 2823 +8 17 860 +17 10 3236 +17 11 863 +0 18 1809 +18 7 2247 +10 18 3343 +17 18 2702 +19 3 2672 +5 19 775 +19 8 1143 +19 16 2981 +17 19 2175 +18 19 2170 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-005-one-hotel.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-005-one-hotel.ans new file mode 100644 index 0000000000000000000000000000000000000000..c66c8a39051514536b8b5f1ea85982273dd28bb7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-005-one-hotel.ans @@ -0,0 +1 @@ +Case 1: 20 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-005-one-hotel.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-005-one-hotel.in new file mode 100644 index 0000000000000000000000000000000000000000..a6cd6252852489f456bff04f0cc0d597d72742aa --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-005-one-hotel.in @@ -0,0 +1,3 @@ +3 2 +2 1 5 +0 1 5 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-006-one-hotel.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-006-one-hotel.ans new file mode 100644 index 0000000000000000000000000000000000000000..c66c8a39051514536b8b5f1ea85982273dd28bb7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-006-one-hotel.ans @@ -0,0 +1 @@ +Case 1: 20 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-006-one-hotel.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-006-one-hotel.in new file mode 100644 index 0000000000000000000000000000000000000000..1b54da2ea486533d20c9968e749873e23b851832 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-006-one-hotel.in @@ -0,0 +1,4 @@ +3 3 +2 1 5 +0 1 5 +0 2 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-007-two-hotels.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-007-two-hotels.ans new file mode 100644 index 0000000000000000000000000000000000000000..21f9e23bba7a67fc6d3232322881eb28788dd9fe --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-007-two-hotels.ans @@ -0,0 +1 @@ +Case 1: 40 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-007-two-hotels.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-007-two-hotels.in new file mode 100644 index 0000000000000000000000000000000000000000..0f34f7d7d49f4f4fbd282761eea495d86288d4a1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-007-two-hotels.in @@ -0,0 +1,4 @@ +4 3 +2 1 5 +2 3 5 +0 1 5 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-008-two-hotels.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-008-two-hotels.ans new file mode 100644 index 0000000000000000000000000000000000000000..f11541e8931efe0384a5613b4fed5e548bef9e86 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-008-two-hotels.ans @@ -0,0 +1 @@ +Case 1: 32 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-008-two-hotels.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-008-two-hotels.in new file mode 100644 index 0000000000000000000000000000000000000000..a22553fa03e89feb31c20ecd4e4b42f144300430 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-008-two-hotels.in @@ -0,0 +1,5 @@ +4 4 +2 1 5 +2 3 5 +0 1 5 +0 3 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-009-mesh-2x3-const.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-009-mesh-2x3-const.ans new file mode 100644 index 0000000000000000000000000000000000000000..f2598d6186eac5445c196602d8c6be9a75e08790 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-009-mesh-2x3-const.ans @@ -0,0 +1 @@ +Case 1: 17 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-009-mesh-2x3-const.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-009-mesh-2x3-const.in new file mode 100644 index 0000000000000000000000000000000000000000..69b573fa934c2ea786fa3bb13043ad9d219128cd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-009-mesh-2x3-const.in @@ -0,0 +1,12 @@ +8 11 +1 2 1 +2 3 1 +4 5 1 +5 6 1 +1 0 1 +3 7 1 +4 0 1 +6 7 1 +1 4 1 +2 5 1 +3 6 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-010-mesh-2x3-const.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-010-mesh-2x3-const.ans new file mode 100644 index 0000000000000000000000000000000000000000..e2a6e559574d1c5e4ba79e10d52906175fc32d00 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-010-mesh-2x3-const.ans @@ -0,0 +1 @@ +Case 1: 16 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-010-mesh-2x3-const.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-010-mesh-2x3-const.in new file mode 100644 index 0000000000000000000000000000000000000000..70beae4a577bd504bd3e2106f9a9ba3219013219 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-010-mesh-2x3-const.in @@ -0,0 +1,13 @@ +8 12 +1 2 1 +2 3 1 +4 5 1 +5 6 1 +1 0 1 +3 7 1 +4 0 1 +6 7 1 +1 4 1 +2 5 1 +3 6 1 +0 7 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-011-mesh-3x4-const.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-011-mesh-3x4-const.ans new file mode 100644 index 0000000000000000000000000000000000000000..fea2c64f32ad30b246dffc65ccc9a00e8f553793 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-011-mesh-3x4-const.ans @@ -0,0 +1 @@ +Case 1: 27 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-011-mesh-3x4-const.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-011-mesh-3x4-const.in new file mode 100644 index 0000000000000000000000000000000000000000..c046846310a285f364f2507eed99a56cae303517 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-011-mesh-3x4-const.in @@ -0,0 +1,24 @@ +14 23 +1 2 1 +2 3 1 +3 4 1 +5 6 1 +6 7 1 +7 8 1 +9 10 1 +10 11 1 +11 12 1 +1 0 1 +4 13 1 +5 0 1 +8 13 1 +9 0 1 +12 13 1 +1 5 1 +2 6 1 +3 7 1 +4 8 1 +5 9 1 +6 10 1 +7 11 1 +8 12 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-012-mesh-3x3-const.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-012-mesh-3x3-const.ans new file mode 100644 index 0000000000000000000000000000000000000000..0f371d0d57618bc56189d3b12951231a3f925d40 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-012-mesh-3x3-const.ans @@ -0,0 +1 @@ +Case 1: 21 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-012-mesh-3x3-const.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-012-mesh-3x3-const.in new file mode 100644 index 0000000000000000000000000000000000000000..1c2be80cb1aa48c3000b1e32af3742ccf461fd97 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-012-mesh-3x3-const.in @@ -0,0 +1,20 @@ +11 19 +1 2 1 +2 3 1 +4 5 1 +5 6 1 +7 8 1 +8 9 1 +1 0 1 +3 10 1 +4 0 1 +6 10 1 +7 0 1 +9 10 1 +1 4 1 +2 5 1 +3 6 1 +4 7 1 +5 8 1 +6 9 1 +0 10 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-013-complete-3-const.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-013-complete-3-const.ans new file mode 100644 index 0000000000000000000000000000000000000000..e1172756a13cf680b98f0cd2129a9b6a1740acf7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-013-complete-3-const.ans @@ -0,0 +1 @@ +Case 1: 10 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-013-complete-3-const.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-013-complete-3-const.in new file mode 100644 index 0000000000000000000000000000000000000000..07be6ed70a777db7b708f62bd10e67360e146358 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-013-complete-3-const.in @@ -0,0 +1,6 @@ +5 5 +1 2 1 +1 3 1 +2 3 1 +0 1 1 +2 4 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-014-complete-3-const.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-014-complete-3-const.ans new file mode 100644 index 0000000000000000000000000000000000000000..a50437e1cd2dce19f55d1356d4cdc54c73738a03 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-014-complete-3-const.ans @@ -0,0 +1 @@ +Case 1: 8 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-014-complete-3-const.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-014-complete-3-const.in new file mode 100644 index 0000000000000000000000000000000000000000..6d4a64106e225b8d269e44a692466e0dcc2fdae9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-014-complete-3-const.in @@ -0,0 +1,11 @@ +5 10 +1 2 1 +1 3 1 +2 3 1 +0 1 1 +0 2 1 +0 3 1 +1 4 1 +2 4 1 +3 4 1 +0 4 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-015-complete-5-const.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-015-complete-5-const.ans new file mode 100644 index 0000000000000000000000000000000000000000..f7294cebd50663c7fbd14e91dbfd2ee93c798c55 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-015-complete-5-const.ans @@ -0,0 +1 @@ +Case 1: 14 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-015-complete-5-const.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-015-complete-5-const.in new file mode 100644 index 0000000000000000000000000000000000000000..3e07f0d0398fae4a26706ff93bc0013ca93ead72 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-015-complete-5-const.in @@ -0,0 +1,13 @@ +7 12 +1 2 1 +1 3 1 +1 4 1 +1 5 1 +2 3 1 +2 4 1 +2 5 1 +3 4 1 +3 5 1 +4 5 1 +0 1 1 +2 6 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-016-complete-5-const.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-016-complete-5-const.ans new file mode 100644 index 0000000000000000000000000000000000000000..1806a75df503ef7696819ba944778b9c256e04d2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-016-complete-5-const.ans @@ -0,0 +1 @@ +Case 1: 12 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-016-complete-5-const.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-016-complete-5-const.in new file mode 100644 index 0000000000000000000000000000000000000000..e1889b6c7c1cdb777c8d50789bf995c24fa8d87c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-016-complete-5-const.in @@ -0,0 +1,22 @@ +7 21 +1 2 1 +1 3 1 +1 4 1 +1 5 1 +2 3 1 +2 4 1 +2 5 1 +3 4 1 +3 5 1 +4 5 1 +0 1 1 +0 2 1 +0 3 1 +0 4 1 +0 5 1 +1 6 1 +2 6 1 +3 6 1 +4 6 1 +5 6 1 +0 6 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-017-random-3-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-017-random-3-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..d59824d2df9dd2893e0194c391bc7831d58061e8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-017-random-3-rand.ans @@ -0,0 +1 @@ +Case 1: 132 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-017-random-3-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-017-random-3-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..5d785f640319d500f50b69016c15d75e9bfdbc72 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-017-random-3-rand.in @@ -0,0 +1,6 @@ +5 5 +2 1 18 +3 0 2 +0 4 13 +1 4 2 +2 4 16 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-018-random-3-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-018-random-3-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..39dedc4a00ab65ae7e2760fec6281b7483977c51 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-018-random-3-rand.ans @@ -0,0 +1 @@ +Case 1: 9886 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-018-random-3-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-018-random-3-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..a7bfb4084554e2283eb750a337a377220c4677f1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-018-random-3-rand.in @@ -0,0 +1,10 @@ +5 9 +1 0 3360 +1 2 3193 +0 3 145 +1 3 2825 +3 2 1384 +4 0 388 +1 4 692 +2 4 1642 +4 3 1502 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-019-random-4-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-019-random-4-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..40b62622cb218ff5424d222eb2beb8a0c6a0ff77 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-019-random-4-rand.ans @@ -0,0 +1 @@ +Case 1: 103 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-019-random-4-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-019-random-4-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..0e7a01dc598a534b14de386fa6b7c29a7f5f961c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-019-random-4-rand.in @@ -0,0 +1,9 @@ +6 8 +1 0 12 +1 3 16 +4 0 8 +2 4 15 +3 4 1 +5 0 11 +5 1 4 +5 2 9 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-020-random-4-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-020-random-4-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..bd0a9426e7ddb668770bcfc1bd159e283908fdaa --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-020-random-4-rand.ans @@ -0,0 +1 @@ +Case 1: 8794 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-020-random-4-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-020-random-4-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..a8a722d97e7508af0e7cc954c7267015667aaa61 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-020-random-4-rand.in @@ -0,0 +1,13 @@ +6 12 +1 0 489 +2 0 1788 +1 2 227 +3 0 601 +1 3 502 +2 3 2914 +0 4 318 +4 1 1112 +2 4 1931 +4 3 680 +0 5 3117 +5 3 1954 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-021-random-5-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-021-random-5-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..169498443174f2048334b21121bf12f34f8f3592 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-021-random-5-rand.ans @@ -0,0 +1 @@ +Case 1: 85 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-021-random-5-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-021-random-5-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..06f966902f08b804343dbc5ffc581db267f646bd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-021-random-5-rand.in @@ -0,0 +1,10 @@ +7 9 +0 1 6 +2 3 13 +4 1 2 +2 4 9 +0 5 17 +5 3 5 +0 6 4 +6 4 3 +5 6 6 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-022-random-5-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-022-random-5-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..f9115950d0621efdedf353de930318b5bf71c395 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-022-random-5-rand.ans @@ -0,0 +1 @@ +Case 1: 15000 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-022-random-5-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-022-random-5-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..259b0af46b4c853fe9ccc67ea03d5f83cf95e6c3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-022-random-5-rand.in @@ -0,0 +1,20 @@ +7 19 +0 2 2567 +1 2 3497 +0 3 1033 +3 1 974 +2 3 2364 +0 4 474 +4 1 3168 +4 2 2519 +3 4 2133 +0 5 677 +1 5 1450 +2 5 3435 +5 3 644 +5 4 490 +0 6 1368 +6 1 163 +2 6 2109 +6 3 2822 +4 6 2443 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-023-random-6-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-023-random-6-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..b0ff062aef44fa97b5307d49377608db14dbf3cf --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-023-random-6-rand.ans @@ -0,0 +1 @@ +Case 1: 212 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-023-random-6-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-023-random-6-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..61f05a07b75eee5e660ffeb36102f203c2124e06 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-023-random-6-rand.in @@ -0,0 +1,13 @@ +8 12 +0 1 17 +0 3 18 +1 4 16 +4 2 16 +4 3 15 +1 5 15 +2 5 19 +0 6 10 +1 6 13 +2 6 8 +7 5 11 +6 7 5 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-024-random-6-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-024-random-6-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..ceb0fa1229d83cbaf9414d043a508e61af34de5e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-024-random-6-rand.ans @@ -0,0 +1 @@ +Case 1: 14098 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-024-random-6-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-024-random-6-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..99dec2f1289b9c64e054b4c2b3a35daeec36bf4a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-024-random-6-rand.in @@ -0,0 +1,19 @@ +8 18 +0 2 1782 +0 3 1469 +1 3 1075 +3 2 235 +0 4 41 +1 4 2425 +2 4 1061 +4 3 2890 +5 0 1885 +5 3 1994 +5 4 2387 +6 0 3516 +6 1 2877 +6 2 1248 +4 6 1504 +1 7 17 +7 4 54 +5 7 3273 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-025-random-7-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-025-random-7-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..c1ea365bb386808c50d3e4a975ff47a39681c237 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-025-random-7-rand.ans @@ -0,0 +1 @@ +Case 1: 123 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-025-random-7-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-025-random-7-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..ed2f1f4d99cf3b9920aafecb9424bb8bc922cc17 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-025-random-7-rand.in @@ -0,0 +1,19 @@ +9 18 +0 1 18 +2 0 4 +2 1 6 +0 3 2 +4 1 12 +2 4 11 +3 4 14 +3 5 20 +4 5 1 +6 0 9 +6 3 17 +7 0 7 +7 1 3 +7 2 10 +5 7 10 +3 8 6 +6 8 12 +8 7 16 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-026-random-7-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-026-random-7-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..8008885a9fb7e09a164bed2d972fea4e2e6bb78a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-026-random-7-rand.ans @@ -0,0 +1 @@ +Case 1: 12288 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-026-random-7-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-026-random-7-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..95f27b8f1da8171ec65f8fb9c682e9a9f5ac873e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-026-random-7-rand.in @@ -0,0 +1,23 @@ +9 22 +0 2 2218 +1 3 1731 +2 3 2722 +1 4 1799 +2 4 357 +3 4 2667 +3 5 512 +6 0 1006 +2 6 427 +6 3 2901 +6 5 1443 +7 0 3379 +1 7 1450 +7 3 2467 +6 7 2401 +0 8 12 +8 2 150 +3 8 407 +8 4 2128 +8 5 446 +6 8 2286 +8 7 157 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-027-random-8-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-027-random-8-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..d9700b5f9be1ce8f5a651e8f828df1a9bd05b9d7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-027-random-8-rand.ans @@ -0,0 +1 @@ +Case 1: 114 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-027-random-8-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-027-random-8-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..20b5f4755d61c2873515181f18a2f42579dec87e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-027-random-8-rand.in @@ -0,0 +1,20 @@ +10 19 +0 2 5 +0 3 17 +3 1 3 +0 4 6 +4 1 5 +4 3 1 +0 5 12 +2 5 5 +5 3 11 +2 6 15 +1 7 5 +4 7 18 +6 7 10 +2 8 3 +8 6 15 +0 9 7 +9 2 6 +9 6 6 +7 9 9 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-028-random-8-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-028-random-8-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..cb522895b47601be4898bab31a6300b4fe18dad0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-028-random-8-rand.ans @@ -0,0 +1 @@ +Case 1: 16538 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-028-random-8-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-028-random-8-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..537720f7673a23d5e1ddac38d241a8ce0812acc7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-028-random-8-rand.in @@ -0,0 +1,32 @@ +10 31 +2 0 2169 +1 3 3069 +2 3 3117 +0 4 1925 +4 2 2393 +4 3 1334 +5 0 191 +1 5 2523 +5 3 1165 +5 4 3075 +6 0 2001 +2 6 1511 +6 4 1579 +5 6 3170 +7 0 46 +1 7 186 +3 7 2997 +4 7 1339 +6 7 1237 +8 1 1486 +8 2 2412 +8 3 2911 +5 8 1103 +6 8 1276 +1 9 487 +9 2 1709 +9 3 559 +4 9 205 +9 5 2554 +9 7 3232 +9 8 3178 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-029-random-9-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-029-random-9-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..54e61a5ed71640f9daa1e83c4f84435fd9cb26e7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-029-random-9-rand.ans @@ -0,0 +1 @@ +Case 1: 220 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-029-random-9-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-029-random-9-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..ad925ce8de747c0bb857b1d36a593d0bfa7acd34 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-029-random-9-rand.in @@ -0,0 +1,22 @@ +11 21 +0 1 5 +1 2 17 +4 0 4 +1 4 12 +4 3 5 +5 2 16 +6 0 15 +1 6 7 +6 2 15 +3 6 16 +5 7 19 +0 8 1 +8 2 4 +4 8 10 +7 8 19 +3 9 20 +4 9 9 +9 6 16 +8 9 2 +1 10 13 +10 9 13 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-030-random-9-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-030-random-9-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..f4e35ce1885e498d6a79c73854316ba2f8c605e8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-030-random-9-rand.ans @@ -0,0 +1 @@ +Case 1: 9825 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-030-random-9-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-030-random-9-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..c37fcda238c8afd003a80013778854bca7ae76b8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-030-random-9-rand.in @@ -0,0 +1,35 @@ +11 34 +0 2 3042 +2 1 1132 +3 1 252 +0 4 3484 +0 5 2601 +5 1 2204 +5 2 1550 +5 4 2357 +6 0 1562 +1 6 23 +4 6 2843 +5 6 3101 +7 1 2578 +7 2 236 +4 7 3253 +7 5 90 +0 8 590 +2 8 1553 +8 3 1517 +4 8 2166 +8 5 600 +6 8 3389 +8 7 2834 +1 9 177 +3 9 345 +6 9 601 +10 0 597 +1 10 3372 +10 2 496 +10 4 1247 +10 6 23 +7 10 101 +8 10 70 +9 10 674 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-031-random-10-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-031-random-10-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..ca131cf6dfcbf0e9194f7850c2318ef8fe41e0f5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-031-random-10-rand.ans @@ -0,0 +1 @@ +Case 1: 192 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-031-random-10-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-031-random-10-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..eef8d9e4d1418a9b35c58c7ca53bf5f148965970 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-031-random-10-rand.in @@ -0,0 +1,30 @@ +12 29 +2 0 10 +3 0 7 +1 3 19 +0 5 9 +5 2 20 +5 4 17 +1 6 16 +2 6 17 +5 6 2 +7 0 10 +1 7 4 +7 2 9 +5 7 18 +0 8 14 +8 3 6 +4 8 17 +6 8 6 +0 9 9 +9 2 13 +6 9 1 +9 7 18 +10 3 6 +10 4 20 +10 8 5 +9 10 2 +0 11 16 +5 11 17 +11 8 10 +10 11 3 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-032-random-11-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-032-random-11-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..552ca26e8a3b7a6ffc4c1de44e8836bb068c1725 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-032-random-11-rand.ans @@ -0,0 +1 @@ +Case 1: 143 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-032-random-11-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-032-random-11-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..dea2d2513687d6dd43ef7a9e43acf41a06349016 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-032-random-11-rand.in @@ -0,0 +1,35 @@ +13 34 +2 0 20 +3 1 9 +2 3 7 +2 4 3 +3 4 14 +5 0 15 +5 1 6 +4 5 10 +0 6 19 +6 1 1 +0 7 11 +1 8 7 +4 8 14 +5 8 1 +8 6 6 +7 8 18 +2 9 12 +4 9 19 +8 9 2 +10 5 8 +10 7 8 +10 9 8 +2 11 3 +11 4 2 +8 11 13 +10 11 18 +12 0 8 +12 1 14 +3 12 3 +12 4 17 +5 12 2 +12 7 12 +12 8 14 +12 9 13 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-033-random-12-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-033-random-12-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..8d022ac52d0f9af38fe63d90e0cfd850f7ae489d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-033-random-12-rand.ans @@ -0,0 +1 @@ +Case 1: 206 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-033-random-12-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-033-random-12-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..760a72f6094f6159af5aaf29945ddf3416683109 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-033-random-12-rand.in @@ -0,0 +1,44 @@ +14 43 +0 1 20 +1 2 5 +3 1 2 +4 0 19 +4 1 2 +4 2 9 +4 3 16 +0 5 11 +3 5 9 +6 2 8 +6 5 17 +7 1 20 +3 7 15 +5 7 2 +1 8 20 +3 8 6 +8 4 1 +8 5 18 +8 7 4 +9 1 20 +9 2 2 +9 4 19 +9 6 4 +8 9 4 +10 0 6 +2 10 15 +3 10 16 +6 10 17 +10 7 12 +11 2 19 +9 11 16 +12 0 16 +4 12 15 +5 12 15 +12 6 13 +7 12 11 +8 12 19 +13 0 6 +13 1 5 +3 13 10 +6 13 2 +8 13 1 +13 12 17 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-034-random-13-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-034-random-13-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..1bbfd840b1cd48e88e76579da9ee7cdcd6e61677 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-034-random-13-rand.ans @@ -0,0 +1 @@ +Case 1: 177 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-034-random-13-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-034-random-13-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..2416c3228e56df20fbcaca167292c379f64e5405 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-034-random-13-rand.in @@ -0,0 +1,44 @@ +15 43 +1 0 6 +2 1 17 +1 3 6 +3 4 16 +0 5 18 +5 1 20 +0 6 13 +2 7 1 +3 7 7 +4 7 7 +5 7 12 +8 0 20 +8 1 7 +8 2 7 +8 5 20 +6 8 3 +9 0 1 +2 9 19 +9 3 12 +9 5 2 +9 6 10 +7 9 8 +10 0 6 +3 10 14 +4 10 14 +10 5 8 +5 11 11 +11 8 11 +11 10 13 +0 12 12 +12 3 17 +6 12 16 +7 12 16 +13 2 11 +13 6 3 +7 13 16 +13 12 7 +1 14 18 +6 14 10 +9 14 8 +10 14 3 +11 14 2 +14 13 14 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-035-random-14-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-035-random-14-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..43378bbb950338b9737f63b3d430bc66634732bd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-035-random-14-rand.ans @@ -0,0 +1 @@ +Case 1: 186 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-035-random-14-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-035-random-14-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..12816ca59ba2c3abb3e91fb3df384ec7715f6954 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-035-random-14-rand.in @@ -0,0 +1,48 @@ +16 47 +2 1 17 +0 3 6 +0 4 20 +2 5 6 +0 6 3 +1 6 6 +2 6 1 +7 2 10 +7 4 15 +7 6 19 +2 8 3 +4 8 11 +8 6 15 +8 7 20 +9 2 10 +4 9 1 +5 9 8 +6 9 8 +9 7 3 +10 2 12 +4 10 17 +5 10 14 +7 10 19 +8 10 15 +11 1 12 +2 11 6 +3 11 5 +11 9 11 +12 4 10 +6 12 14 +9 12 20 +12 10 11 +0 13 14 +13 3 3 +13 5 18 +6 13 15 +7 13 20 +9 13 18 +1 14 14 +14 4 10 +7 14 5 +11 14 1 +2 15 3 +15 3 11 +15 10 10 +15 11 7 +15 13 20 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-036-random-15-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-036-random-15-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..6a35cc016cea4561f49cbf3ed3465b0e74545688 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-036-random-15-rand.ans @@ -0,0 +1 @@ +Case 1: 184 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-036-random-15-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-036-random-15-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..61deb895444dcab72537000e82ea232ff3d86be4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-036-random-15-rand.in @@ -0,0 +1,55 @@ +17 54 +1 0 9 +1 2 1 +0 3 20 +1 3 15 +2 3 11 +0 4 16 +1 4 17 +4 2 11 +5 0 12 +5 1 14 +4 5 8 +6 0 9 +1 6 20 +2 7 11 +7 4 13 +5 7 10 +8 1 9 +2 8 2 +7 8 15 +9 0 13 +9 1 20 +9 2 12 +9 7 2 +0 10 15 +10 4 2 +10 5 2 +6 10 17 +10 7 11 +11 1 5 +2 11 19 +11 5 8 +7 11 10 +9 11 19 +11 10 19 +1 12 6 +2 12 12 +8 12 6 +10 12 6 +13 1 14 +13 5 15 +13 7 5 +9 13 13 +10 13 5 +13 11 3 +6 14 5 +10 14 19 +12 14 2 +2 15 18 +10 15 2 +14 15 20 +2 16 15 +16 3 4 +6 16 19 +16 8 15 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-037-random-16-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-037-random-16-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..758da058f51ec1507e846b09e8c824000723999d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-037-random-16-rand.ans @@ -0,0 +1 @@ +Case 1: 162 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-037-random-16-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-037-random-16-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..59ff5c8ed6d363e630d6b444bf88ac0994936ded --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-037-random-16-rand.in @@ -0,0 +1,67 @@ +18 66 +1 2 20 +3 0 7 +2 3 6 +0 4 16 +4 3 13 +5 1 7 +4 5 20 +0 6 16 +3 6 7 +4 6 1 +6 5 18 +1 7 1 +6 7 15 +1 8 18 +2 8 1 +4 8 10 +8 6 19 +3 9 1 +4 9 20 +5 9 6 +7 9 12 +3 10 9 +4 10 17 +8 10 7 +11 3 18 +12 0 14 +3 12 5 +6 12 7 +12 7 14 +8 12 8 +12 9 12 +12 11 15 +0 13 2 +7 13 3 +13 8 4 +13 10 11 +13 12 20 +0 14 6 +1 14 4 +3 14 16 +14 7 19 +11 14 16 +14 12 18 +13 14 11 +15 3 8 +5 15 1 +15 6 16 +15 7 6 +8 15 19 +10 15 8 +15 11 7 +12 15 3 +14 15 20 +16 1 4 +2 16 19 +3 16 14 +4 16 8 +10 16 16 +12 16 19 +15 16 6 +0 17 20 +17 3 12 +5 17 6 +17 6 2 +17 9 2 +15 17 16 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-038-random-17-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-038-random-17-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..31471a0fd12f63e88c6618ed60b1f0c31c79bf5b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-038-random-17-rand.ans @@ -0,0 +1 @@ +Case 1: 138 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-038-random-17-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-038-random-17-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..1eb45645bcb451aba9df107a08523d40353a0c28 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-038-random-17-rand.in @@ -0,0 +1,75 @@ +19 74 +2 1 8 +0 3 17 +0 4 1 +5 0 18 +5 1 14 +5 3 12 +4 5 16 +6 1 8 +7 1 2 +7 3 14 +5 7 10 +6 7 20 +0 8 18 +8 3 1 +4 8 6 +1 9 18 +2 9 6 +9 5 5 +8 9 4 +2 10 9 +10 4 8 +5 10 14 +10 6 3 +0 11 4 +11 2 20 +11 3 20 +11 9 10 +12 2 2 +4 12 9 +9 12 20 +12 10 13 +12 11 15 +4 13 9 +8 13 19 +13 9 2 +13 10 15 +13 12 19 +1 14 11 +3 14 17 +7 14 18 +14 10 4 +15 0 11 +15 2 19 +15 3 3 +15 4 11 +15 8 5 +15 10 2 +15 11 7 +15 13 1 +0 16 2 +1 16 6 +16 2 6 +4 16 17 +16 7 8 +8 16 3 +16 9 8 +11 16 9 +16 12 10 +16 13 9 +17 0 17 +17 4 8 +8 17 3 +9 17 3 +17 11 3 +17 14 15 +17 16 9 +18 1 4 +18 2 19 +18 3 3 +18 5 1 +8 18 3 +18 13 1 +18 14 7 +18 17 15 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-039-mesh-3x6-rand.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-039-mesh-3x6-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..7e6416c93c594dd52b073cd4a418f36298f55fde --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-039-mesh-3x6-rand.ans @@ -0,0 +1 @@ +Case 1: 56000 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-039-mesh-3x6-rand.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-039-mesh-3x6-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..2041aada258fc8b4b45c4266045e1ede2e5056b0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-039-mesh-3x6-rand.in @@ -0,0 +1,34 @@ +20 33 +1 2 178 +2 3 1197 +3 4 1367 +4 5 1386 +5 6 2056 +7 8 251 +8 9 2664 +9 10 2365 +10 11 1460 +11 12 844 +13 14 39 +14 15 1818 +15 16 1913 +16 17 2825 +17 18 3455 +1 0 1711 +6 19 355 +7 0 711 +12 19 3218 +13 0 3018 +18 19 2065 +1 7 11 +2 8 206 +3 9 1831 +4 10 1740 +5 11 3401 +6 12 2158 +7 13 1034 +8 14 1637 +9 15 2093 +10 16 1692 +11 17 2582 +12 18 846 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-040-mesh-4x4-const.ans b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-040-mesh-4x4-const.ans new file mode 100644 index 0000000000000000000000000000000000000000..c23a7ea2febdd42354d7b865b4c332f2fdf03297 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-040-mesh-4x4-const.ans @@ -0,0 +1 @@ +Case 1: 34 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-040-mesh-4x4-const.in b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-040-mesh-4x4-const.in new file mode 100644 index 0000000000000000000000000000000000000000..6ea772733244465ad419c159b969de698c4c6c53 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/data/secret-040-mesh-4x4-const.in @@ -0,0 +1,33 @@ +18 32 +1 2 1 +2 3 1 +3 4 1 +5 6 1 +6 7 1 +7 8 1 +9 10 1 +10 11 1 +11 12 1 +13 14 1 +14 15 1 +15 16 1 +1 0 1 +4 17 1 +5 0 1 +8 17 1 +9 0 1 +12 17 1 +13 0 1 +16 17 1 +1 5 1 +2 6 1 +3 7 1 +4 8 1 +5 9 1 +6 10 1 +7 11 1 +8 12 1 +9 13 1 +10 14 1 +11 15 1 +12 16 1 diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/judge.json b/problems/DP-02/ICPC_WF/2012/C-bus-tour/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..aa11f5bcaadd9704cfa8ae8e6631919e194a4dde --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/judge.json @@ -0,0 +1,14 @@ +{ + "time_limit_s": 10.0, + "time_limit_source": "default (10 s; the statement gives none)", + "memory_mb": 2048, + "memory_source": "default (the statement gives none)", + "mode": "exact", + "validator_flags": null, + "comparison": "Kattis default output validator: token-wise, whitespace- and case-insensitive", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".ans", + "n_sample": 1, + "n_secret": 39 +} diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/meta.json b/problems/DP-02/ICPC_WF/2012/C-bus-tour/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..def7183705dc1bc31ff807154c66561eaacdacc1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/meta.json @@ -0,0 +1,9 @@ +{ + "year": "2012", + "letter": "C", + "title": "Bus Tour", + "slug": "bus-tour", + "source_pdf": "contest_problems.pdf", + "page_start": 5, + "page_end": 6 +} diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/page.html b/problems/DP-02/ICPC_WF/2012/C-bus-tour/page.html new file mode 100644 index 0000000000000000000000000000000000000000..757e37692401d2efe47a195bbd8583e957ad5af3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/page.html @@ -0,0 +1,193 @@ + C. Bus Tour | Ethan Pham
ICPC 2012
ICPC 2012

C. Bus Tour

Problem ID: bustour Imagine you are a tourist in Warsaw and have booked a bus tour to see some amazing attraction just outside of town. The bus first drives around town for a while (a long while, since Warsaw is a big city) picking up people at their respec...

Updated May 21, 2026
Track ICPC
Year 2012
Statement Text + PDF
TeXC++Statement textStatement PDF

Problem Statement

Formatted from the contest statement text, with sample tests broken out into copyable blocks.

Imagine you are a tourist in Warsaw and have booked a bus tour to see some amazing attraction just outside of town. The bus first drives around town for a while (a long while, since Warsaw is a big city) picking up people at their respective hotels. It then proceeds to the amazing attraction, and after a few hours goes back into the city, again driving to each hotel, this time to drop people off. For some reason, whenever you do this, your hotel is always the first to be visited for pickup, and the last to be visited for dropoff, meaning that you have to suffer through two not-so-amazing sightseeing tours of all the local hotels. This is clearly not what you want to do (unless for some reason you are really into hotels), so let’s fix it. We will develop some software to enable the sightseeing company to route its bus tours more fairly—though it may sometimes mean longer total distance for everyone, but fair is fair, right? For this problem, there is a starting location (the sightseeing company headquarters), h hotels that need to be visited for pickups and dropoffs, and a destination location (the amazing attraction). We need to find a route that goes from the headquarters, through all the hotels, to the attraction, then back through all the hotels again (possibly in a different order), and finally back to the headquarters. In order to guarantee that none of the tourists (and, in particular, you) are forced to suffer through two full tours of the hotels, we require that every hotel that is visited among the first bh/2c hotels on the way to the attraction is also visited among the first bh/2c hotels on the way back. Subject to these restrictions, we would like to make the complete bus tour as short as possible. Note that these restrictions may force the bus to drive past a hotel without stopping there (this is not considered visiting) and then visit it later, as illustrated in the first sample input.

Input

The first line of each test case consists of two integers n and m satisfying 3 ≤ n ≤ 20 and 2 ≤ m, where n is the number of locations (hotels, headquarters, attraction) and m is the number of pairs of locations between which the bus can travel. The n different locations are numbered from 0 to n − 1, where 0 is the headquarters, 1 through n − 2 are the hotels, and n − 1 is the attraction. Assume that there is at most one direct connection between any pair of locations and it is possible to travel from any location to any other location (but not necessarily directly). Following the first line are m lines, each containing three integers u, v, and t such that 0 ≤ u, v ≤ n − 1, u 6= v, 1 ≤ t ≤ 3600, indicating that the bus can go directly between locations u and v in t seconds (in either direction).

Output

For each test case, display the case number and the time in seconds of the shortest possible tour.

+
Sample Input                                 Output for Sample Input
+5   4                                        Case 1: 300
+0   1   10                                   Case 2: 6
+1   2   20
+2   3   30
+3   4   40
+4   6
+0   1   1
+0   2   1
+0   3   1
+1   2   1
+1   3   1
+2   3   1

Editorial

The solution write-up is rendered from the LaTeX source, with equations kept live through MathJax.

Key Observations

+
  • Write the structural observations that make the problem tractable.

  • State any useful invariant, monotonicity property, graph interpretation, or combinatorial reformulation.

  • If the constraints matter, explain exactly which part of the solution they enable.

+

Algorithm

+
  1. Describe the data structures and the state maintained by the algorithm.

  2. Explain the processing order and why it is sufficient.

  3. Mention corner cases explicitly if they affect the implementation.

+

Correctness Proof

+

We prove that the algorithm returns the correct answer.

+

Lemma 1.

+

State the first key claim.

+

Proof.

+

Provide a concise proof.

+

Lemma 2.

+

State the next claim if needed.

+

Proof.

+

Provide a concise proof.

+

Theorem.

+

The algorithm outputs the correct answer for every valid input.

+

Proof.

+

Combine the lemmas and finish the argument.

+

Complexity Analysis

+

State the running time and memory usage in terms of the input size.

+

Implementation Notes

+
  • Mention any non-obvious implementation detail that is easy to get wrong.

  • Mention numeric limits, indexing conventions, or tie-breaking rules if relevant.

Code

C++ solution used for this page.

C++

Clean code view with a raw-file link when you want the original source.

Raw file
#include <bits/stdc++.h>
+using namespace std;
+
+namespace {
+
+void solve() {
+    // Fill in the full solution logic for the problem here.
+}
+
+}  // namespace
+
+int main() {
+    ios::sync_with_stdio(false);
+    cin.tie(nullptr);
+
+    solve();
+    return 0;
+}
+

Source Files and Assets

Raw files are still available here when you want the original TeX, C++, or statement assets.

Show raw files
\ No newline at end of file diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/solution.cpp b/problems/DP-02/ICPC_WF/2012/C-bus-tour/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e588ae749da8ffb7ff6e621b58cf621eb90e1ebb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/solution.cpp @@ -0,0 +1,82 @@ +#include +using namespace std; + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + constexpr int INF = 1000000000; + int n, m, tc = 0; + while (cin >> n >> m) { + int d[20][20]; + for (int i = 0; i < n; ++i) + for (int j = 0; j < n; ++j) + d[i][j] = (i == j ? 0 : INF); + for (int e = 0; e < m; ++e) { + int u, v, t; + cin >> u >> v >> t; + d[u][v] = d[v][u] = t; + } + for (int k = 0; k < n; ++k) + for (int i = 0; i < n; ++i) + for (int j = 0; j < n; ++j) + d[i][j] = min(d[i][j], d[i][k] + d[k][j]); + + int h = n - 2; + if (h == 1) { + cout << "Case " << ++tc << ": " << 2 * (d[0][1] + d[1][n - 1]) << '\n'; + continue; + } + + int states = 1 << h; + int half = h / 2; + int maxSize = h - half; + // dp[mask][i][s]: start at headquarters (s=0) or attraction (s=1), + // visit precisely mask, and finish at hotel i+1. + vector> dp((size_t)states * h, {INF, INF}); + for (int mask = 1; mask < states; ++mask) { + if (__builtin_popcount((unsigned)mask) > maxSize) continue; + for (int bits = mask; bits; bits &= bits - 1) { + int i = __builtin_ctz((unsigned)bits); + int prev = mask ^ (1 << i); + auto &cur = dp[(size_t)mask * h + i]; + if (prev == 0) { + cur = {d[0][i + 1], d[n - 1][i + 1]}; + continue; + } + int best0 = INF, best1 = INF; + for (int p = prev; p; p &= p - 1) { + int j = __builtin_ctz((unsigned)p); + const auto &old = dp[(size_t)prev * h + j]; + int edge = d[j + 1][i + 1]; + best0 = min(best0, old[0] + edge); + best1 = min(best1, old[1] + edge); + } + cur = {best0, best1}; + } + } + + int answer = INF; + int full = states - 1; + for (int first = 1; first < states; ++first) { + if (__builtin_popcount((unsigned)first) != half) continue; + int second = full ^ first; + int outbound = INF, inbound = INF; + for (int a = first; a; a &= a - 1) { + int i = __builtin_ctz((unsigned)a); + const auto &left = dp[(size_t)first * h + i]; + for (int b = second; b; b &= b - 1) { + int j = __builtin_ctz((unsigned)b); + const auto &right = dp[(size_t)second * h + j]; + int edge = d[i + 1][j + 1]; + // Reverse the path from the ending location through second. + outbound = min(outbound, left[0] + edge + right[1]); + inbound = min(inbound, left[1] + edge + right[0]); + } + } + answer = min(answer, outbound + inbound); + } + cout << "Case " << ++tc << ": " << answer << '\n'; + } + return 0; +} diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/solution.tex b/problems/DP-02/ICPC_WF/2012/C-bus-tour/solution.tex new file mode 100644 index 0000000000000000000000000000000000000000..371ba13b5c593d7eac9b3fc4efd86879232e74c1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/solution.tex @@ -0,0 +1,138 @@ +\documentclass[11pt]{article} +\usepackage[margin=1in]{geometry} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{amsmath,amssymb,amsthm} +\usepackage{enumitem} + +\title{ICPC World Finals 2012\\C. Bus Tour} +\author{} +\date{} + +\begin{document} +\maketitle + +\section*{Problem Summary} + +An undirected weighted graph has headquarters $Q=0$, attraction $A=n-1$, and $h=n-2$ hotels. +A tour goes from $Q$ through all hotels to $A$, then through all hotels again to $Q$. Every hotel +among the first $k=\lfloor h/2\rfloor$ pickups must be among the first $k$ dropoffs. Find the minimum +total travel time. Passing a hotel without stopping does not count as visiting. + +\section*{Key Observations} + +\begin{itemize}[leftmargin=*] + \item Replace the road network by its all-pairs shortest-path distances $d(u,v)$. Intermediate + hotels may be passed without stopping, so only the order of scheduled stops matters. + \item Both first groups have size $k$, so the fairness condition makes their sets equal. + If this common set is $S$ and its complement is $T$, both legs visit all of $S$ before all of $T$. + \item For fixed $S$, the legs are independent. Their orders, including the hotels at the boundary + between the groups, need not agree. + \item Reversing a path preserves its cost. We can therefore build either leg from two paths + starting at $Q$ and $A$, joining one to the reversal of the other. +\end{itemize} + +\section*{Algorithm} + +Let $H=\{1,\ldots,h\}$ be the hotel set and $r=h-k=\lceil h/2\rceil$. + +\begin{enumerate}[leftmargin=*] + \item Compute all distances $d(u,v)$ with Floyd--Warshall. + \item If $h=1$, fairness imposes no restriction. Output $2(d(Q,1)+d(1,A))$ and finish this case. + \item For each $s\in\{Q,A\}$, compute a subset DP table. Let $F_s(M,i)$ be the minimum cost + of starting at $s$, visiting exactly the hotels in the nonempty set $M$, and finishing at hotel + $i\in M$. Visits here mean scheduled stops. Use + \[ + F_s(\{i\},i)=d(s,i) + \] + and, for $|M|>1$, + \[ + F_s(M,i)=\min_{j\in M\setminus\{i\}} + \bigl(F_s(M\setminus\{i\},j)+d(j,i)\bigr). + \] + Process bitmasks in increasing numerical order: removing a set bit gives a smaller mask, so + dependencies are already available. Compute only sets of size at most $r$, the larger group size. + \item Enumerate every $S\subseteq H$ with $|S|=k$, and let $T=H\setminus S$. Find the cheapest + outbound and return legs separately: + \[ + O(S)=\min_{\substack{i\in S\\j\in T}} + \bigl(F_Q(S,i)+d(i,j)+F_A(T,j)\bigr), + \] + \[ + R(S)=\min_{\substack{i\in S\\j\in T}} + \bigl(F_A(S,i)+d(i,j)+F_Q(T,j)\bigr). + \] + Each formula joins a path through $S$, a connecting segment, and a reversed path through $T$. + Minimize the two legs independently: their pairs $(i,j)$ may differ. + Output the minimum of $O(S)+R(S)$ over all such sets $S$. +\end{enumerate} + +\section*{Correctness Proof} + +\paragraph{Lemma 1.} +Using shortest-path distances between scheduled stops preserves the optimal answer. + +\paragraph{Proof.} +For any fixed stop sequence, each part of a road route between consecutive stops costs at least the +corresponding shortest-path distance. Conversely, expanding each distance into a shortest path realizes +the same scheduled visits: intermediate hotels can be passed without stopping. Thus the minimum cost +for that sequence equals the sum of its distances. Minimizing over valid sequences proves the claim. \qed + +\paragraph{Lemma 2.} +Each computed $F_s(M,i)$ is the optimal cost for its specified source, hotel set, and final hotel. + +\paragraph{Proof.} +Induct on $|M|$. For a singleton, the cost is $d(s,i)$. Otherwise, any valid path has some +$j\in M\setminus\{i\}$ immediately before $i$. Its prefix costs at least +$F_s(M\setminus\{i\},j)$ by induction, followed by a segment of cost $d(j,i)$. +Conversely, an optimal prefix for any such $j$ followed by that segment is a valid path for the state. +The recurrence therefore takes the minimum over exactly all possible final choices and gives the +optimum. Every predecessor set has size at most $r$, so skipping larger masks loses no dependency. \qed + +\paragraph{Lemma 3.} +For a fixed first-group set $S$, $O(S)$ and $R(S)$ are the optimal outbound and return costs. + +\paragraph{Proof.} +Take an outbound leg visiting $S$ before $T$. Let $i$ be its last hotel in $S$ and $j$ its first in $T$. +The prefix costs at least $F_Q(S,i)$ by Lemma 2. Reversing the suffix gives a path from $A$ through +$T$ ending at $j$, so its cost is at least $F_A(T,j)$. Including the connecting distance shows that +the leg costs at least $O(S)$. +Conversely, join optimal paths for the two DP states in any candidate, reversing the second path. +The resulting leg visits exactly $S$ and then $T$ and attains that candidate cost. Hence $O(S)$ is +achievable and optimal. Exchanging the endpoints proves the result for $R(S)$. \qed + +\paragraph{Theorem.} +The algorithm returns the minimum travel time of a fair complete bus tour. + +\paragraph{Proof.} +For $h\ge2$, every fair tour has an identical size-$k$ first set $S$ on its two legs. The algorithm +enumerates this set, and Lemma 3 bounds that tour's cost below by $O(S)+R(S)$. Conversely, the two +optimal legs for any enumerated $S$ can be combined into a fair tour, since both have $S$ as their +first group and there are no further restrictions linking their orders. Thus the minimum of these +sums is exactly the optimum. For $h=1$, the explicit formula is the cost of the only stop order +$Q,1,A,1,Q$. Lemma 1 transfers both results to the original road network. \qed + +\section*{Complexity Analysis} + +Floyd--Warshall takes $O(n^3)$ time. The DP has at most $h2^h$ subset/endpoint states per source and +at most $h$ predecessor choices per state, taking $O(h^2 2^h)$ time. Joining the groups takes +$O\bigl(\binom{h}{k}k(h-k)\bigr)$ time, also bounded by $O(h^2 2^h)$. Total time per test case is +$O(n^3+h^2 2^h)$. + +The program allocates DP entries for all masks, even though it computes only those of size at most +$r$. Together with the distance matrix, this uses $O(n^2+h2^h)$ memory. Here $h\le18$. + +\section*{Implementation Notes} + +\begin{itemize}[leftmargin=*] + \item Bit $i$ represents hotel $i+1$. Both source costs are stored together at index + $\texttt{mask}\cdot h+i$ in a flat vector. Endpoint and predecessor loops iterate over set bits. + \item The complement is \texttt{full XOR first}, where $\texttt{full}=2^h-1$. For odd $h$, the + second group has one more hotel than the first. + \item A shortest path costs at most $19\cdot3600$, and a complete tour built from shortest paths + has at most $38$ segments. Costs fit in a 32-bit signed integer. The infinity value is $10^9$; + even adding two such values during Floyd--Warshall does not overflow. + \item Read until end of file and print consecutive case numbers as \texttt{Case x: answer}. +\end{itemize} + +\end{document} diff --git a/problems/DP-02/ICPC_WF/2012/C-bus-tour/statement.txt b/problems/DP-02/ICPC_WF/2012/C-bus-tour/statement.txt new file mode 100644 index 0000000000000000000000000000000000000000..933d95260d761fb8b51bc8a3c1002238b523c72c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2012/C-bus-tour/statement.txt @@ -0,0 +1,54 @@ +Problem C + Bus Tour + Problem ID: bustour +Imagine you are a tourist in Warsaw and have booked a bus tour to see some amazing attraction just +outside of town. The bus first drives around town for a while (a long while, since Warsaw is a big city) +picking up people at their respective hotels. It then proceeds to the amazing attraction, and after a few +hours goes back into the city, again driving to each hotel, this time to drop people off. +For some reason, whenever you do this, your hotel is always the first to be visited for pickup, and the +last to be visited for dropoff, meaning that you have to suffer through two not-so-amazing sightseeing +tours of all the local hotels. This is clearly not what you want to do (unless for some reason you are +really into hotels), so let’s fix it. We will develop some software to enable the sightseeing company to +route its bus tours more fairly—though it may sometimes mean longer total distance for everyone, but +fair is fair, right? +For this problem, there is a starting location (the sightseeing company headquarters), h hotels that need +to be visited for pickups and dropoffs, and a destination location (the amazing attraction). We need to +find a route that goes from the headquarters, through all the hotels, to the attraction, then back through all +the hotels again (possibly in a different order), and finally back to the headquarters. In order to guarantee +that none of the tourists (and, in particular, you) are forced to suffer through two full tours of the hotels, +we require that every hotel that is visited among the first ⌊h/2⌋ hotels on the way to the attraction is +also visited among the first ⌊h/2⌋ hotels on the way back. Subject to these restrictions, we would like to +make the complete bus tour as short as possible. Note that these restrictions may force the bus to drive +past a hotel without stopping there (this is not considered visiting) and then visit it later, as illustrated in +the first sample input. + +Input + +The first line of each test case consists of two integers n and m satisfying 3 ≤ n ≤ 20 and 2 ≤ m, where +n is the number of locations (hotels, headquarters, attraction) and m is the number of pairs of locations +between which the bus can travel. +The n different locations are numbered from 0 to n − 1, where 0 is the headquarters, 1 through n − 2 are +the hotels, and n − 1 is the attraction. Assume that there is at most one direct connection between any +pair of locations and it is possible to travel from any location to any other location (but not necessarily +directly). +Following the first line are m lines, each containing three integers u, v, and t such that 0 ≤ u, v ≤ n − 1, +u ≠ v, 1 ≤ t ≤ 3600, indicating that the bus can go directly between locations u and v in t seconds (in +either direction). + +Output + +For each test case, display the case number and the time in seconds of the shortest possible tour. + +Sample Input Output for Sample Input +5 4 Case 1: 300 +0 1 10 Case 2: 6 +1 2 20 +2 3 30 +3 4 40 +4 6 +0 1 1 +0 2 1 +0 3 1 +1 2 1 +1 3 1 +2 3 1 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-1.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-1.ans new file mode 100644 index 0000000000000000000000000000000000000000..48082f72f087ce7e6fa75b9c41d7387daecd447b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-1.ans @@ -0,0 +1 @@ +12 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-1.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-1.in new file mode 100644 index 0000000000000000000000000000000000000000..558161a5efe98affb4b85e05b11fb1e8eca52001 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-1.in @@ -0,0 +1 @@ +6 6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-2.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-2.in new file mode 100644 index 0000000000000000000000000000000000000000..90619d0123d63a3a312a0496eaf752910f9d8154 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-2.in @@ -0,0 +1 @@ +8 3 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-3.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-3.in new file mode 100644 index 0000000000000000000000000000000000000000..f45909188afc18a00b9b18a8f78237f148eca12d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-3.in @@ -0,0 +1 @@ +7 20 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-4.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-4.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-4.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-4.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-4.in new file mode 100644 index 0000000000000000000000000000000000000000..d69ecad4f4c9b19aa64952e3ea2a201bc20cbc2c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/sample-4.in @@ -0,0 +1 @@ +2 6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-001.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-001.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-001.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-001.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-001.in new file mode 100644 index 0000000000000000000000000000000000000000..2fb73a07ec2d7b737fbb6c160ff8bc78dadb6930 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-001.in @@ -0,0 +1 @@ +1 1 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-002.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-002.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-002.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-002.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-002.in new file mode 100644 index 0000000000000000000000000000000000000000..8d04f961a037117c1eaa69ac60eb363d37ae78d1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-002.in @@ -0,0 +1 @@ +1 2 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-003.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-003.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-003.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-003.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-003.in new file mode 100644 index 0000000000000000000000000000000000000000..eee8d43e090864f4135ce0d23adc39dcfa2cc180 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-003.in @@ -0,0 +1 @@ +1 100 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-004.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-004.in new file mode 100644 index 0000000000000000000000000000000000000000..0c3d73fa744ddc23b227b19a4804c84672f43fa8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-004.in @@ -0,0 +1 @@ +1 1000000000000000 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-005.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-005.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-005.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-005.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-005.in new file mode 100644 index 0000000000000000000000000000000000000000..cba3471eb57a36532843f61b9d1c3e9a8a577c4e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-005.in @@ -0,0 +1 @@ +2 1 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-006.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-006.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-006.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-006.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-006.in new file mode 100644 index 0000000000000000000000000000000000000000..78454aabfb2f18959434287fece91a9070ffa075 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-006.in @@ -0,0 +1 @@ +2 2 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-007.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-007.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-007.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-007.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-007.in new file mode 100644 index 0000000000000000000000000000000000000000..654d526942adbc55329ba991f2023b5f547357a0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-007.in @@ -0,0 +1 @@ +2 3 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-008.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-008.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-008.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-008.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-008.in new file mode 100644 index 0000000000000000000000000000000000000000..ad64e9513ffcae089ca4bef4cd8cc3c6fa6cdb65 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-008.in @@ -0,0 +1 @@ +2 101 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-009.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-009.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-009.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-009.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-009.in new file mode 100644 index 0000000000000000000000000000000000000000..5f0eddae727da771c6e04114fbca82f4b30f64e2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-009.in @@ -0,0 +1 @@ +2 1000000000000000 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-010.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-010.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-010.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-010.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-010.in new file mode 100644 index 0000000000000000000000000000000000000000..606c19ac81d33c3c51cfca1d25eb19573725db09 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-010.in @@ -0,0 +1 @@ +3 1 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-012.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-012.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-012.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-012.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-012.in new file mode 100644 index 0000000000000000000000000000000000000000..ac81dc6c529dd3ba045aa25a75933ff6b8539a39 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-012.in @@ -0,0 +1 @@ +3 3 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-013.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-013.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-013.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-013.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-013.in new file mode 100644 index 0000000000000000000000000000000000000000..ebcee1a506db729ea7b0e0b6e9b0be36806d16bd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-013.in @@ -0,0 +1 @@ +3 4 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-014.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-014.ans new file mode 100644 index 0000000000000000000000000000000000000000..b8626c4cff2849624fb67f87cd0ad72b163671ad --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-014.ans @@ -0,0 +1 @@ +4 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-014.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-014.in new file mode 100644 index 0000000000000000000000000000000000000000..99818b5e14a5b696e9ca6864fe6ee34c0695cb04 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-014.in @@ -0,0 +1 @@ +3 5 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-015.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-015.ans new file mode 100644 index 0000000000000000000000000000000000000000..1e8b314962144c26d5e0e50fd29d2ca327864913 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-015.ans @@ -0,0 +1 @@ +6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-015.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-015.in new file mode 100644 index 0000000000000000000000000000000000000000..677154a8cd44ec2bfc3c6e9cff59575b4bc0aa0c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-015.in @@ -0,0 +1 @@ +3 6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-016.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-016.ans new file mode 100644 index 0000000000000000000000000000000000000000..1e8b314962144c26d5e0e50fd29d2ca327864913 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-016.ans @@ -0,0 +1 @@ +6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-016.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-016.in new file mode 100644 index 0000000000000000000000000000000000000000..0871b0b46ec9fe33d7a99d3608001b41d41374a5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-016.in @@ -0,0 +1 @@ +3 7 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-017.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-017.ans new file mode 100644 index 0000000000000000000000000000000000000000..1e8b314962144c26d5e0e50fd29d2ca327864913 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-017.ans @@ -0,0 +1 @@ +6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-017.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-017.in new file mode 100644 index 0000000000000000000000000000000000000000..b2dc2f56a9bc897dbf64266196e6173cc2a98edf --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-017.in @@ -0,0 +1 @@ +3 8 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-018.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-018.ans new file mode 100644 index 0000000000000000000000000000000000000000..1e8b314962144c26d5e0e50fd29d2ca327864913 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-018.ans @@ -0,0 +1 @@ +6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-018.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-018.in new file mode 100644 index 0000000000000000000000000000000000000000..d39e5c5feac60fd373e005bd07a76a84ac645906 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-018.in @@ -0,0 +1 @@ +3 9 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-019.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-019.ans new file mode 100644 index 0000000000000000000000000000000000000000..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-019.ans @@ -0,0 +1 @@ +10 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-020.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-020.ans new file mode 100644 index 0000000000000000000000000000000000000000..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-020.ans @@ -0,0 +1 @@ +10 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-020.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-020.in new file mode 100644 index 0000000000000000000000000000000000000000..7ff745812d81caaa3de86ac23598a28b33cf751d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-020.in @@ -0,0 +1 @@ +3 11 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-021.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-021.ans new file mode 100644 index 0000000000000000000000000000000000000000..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-021.ans @@ -0,0 +1 @@ +10 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-021.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-021.in new file mode 100644 index 0000000000000000000000000000000000000000..ce3eb3a220b853cca5a8554639527a98a8613aae --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-021.in @@ -0,0 +1 @@ +3 12 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-022.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-022.ans new file mode 100644 index 0000000000000000000000000000000000000000..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-022.ans @@ -0,0 +1 @@ +10 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-022.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-022.in new file mode 100644 index 0000000000000000000000000000000000000000..5e199b99b42e24f3940778d38136b771e636c0cb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-022.in @@ -0,0 +1 @@ +3 13 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-023.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-023.ans new file mode 100644 index 0000000000000000000000000000000000000000..8351c19397f4fcd5238d10034fa7fa384f14d580 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-023.ans @@ -0,0 +1 @@ +14 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-024.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-024.in new file mode 100644 index 0000000000000000000000000000000000000000..df46cb4798925a9805ba8b055a43fb20741f5ca7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-024.in @@ -0,0 +1 @@ +3 100 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-025.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-025.ans new file mode 100644 index 0000000000000000000000000000000000000000..6529ff889b0cc4d1ebe65cdc6a21ec584859d931 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-025.ans @@ -0,0 +1 @@ +98 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-025.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-025.in new file mode 100644 index 0000000000000000000000000000000000000000..476374dfb61d7d11ce9d9fb914c508a400878031 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-025.in @@ -0,0 +1 @@ +3 101 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-026.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-026.ans new file mode 100644 index 0000000000000000000000000000000000000000..d54642de64daa9f9c6bba5ae247df443b45be9ff --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-026.ans @@ -0,0 +1 @@ +999999999999998 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-026.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-026.in new file mode 100644 index 0000000000000000000000000000000000000000..92d9f735fd1438a3841fbe72a39b20daed2cbf75 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-026.in @@ -0,0 +1 @@ +3 1000000000000000 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-028.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-028.ans new file mode 100644 index 0000000000000000000000000000000000000000..066bca4442ff849604751ab57d70914cd71c3dc0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-028.ans @@ -0,0 +1 @@ +27689512102098 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-028.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-028.in new file mode 100644 index 0000000000000000000000000000000000000000..a8181f4b7667462ee1abd8b5c2601e681a35f666 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-028.in @@ -0,0 +1 @@ +3 27689512102101 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-029.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-029.ans new file mode 100644 index 0000000000000000000000000000000000000000..df4621433db257329b17bec70238c543e60482ef --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-029.ans @@ -0,0 +1 @@ +627492507326550 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-029.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-029.in new file mode 100644 index 0000000000000000000000000000000000000000..99eeb0514fd1855dd5349f45a4e3a1a924ac5468 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-029.in @@ -0,0 +1 @@ +3 627492507326550 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-030.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-030.ans new file mode 100644 index 0000000000000000000000000000000000000000..a442d01397085d39729ff3dec6cacb0565b3cb69 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-030.ans @@ -0,0 +1 @@ +507200966015914 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-030.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-030.in new file mode 100644 index 0000000000000000000000000000000000000000..2a680dd4e3a806aeb4ad8dfdbd853426f690fa17 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-030.in @@ -0,0 +1 @@ +3 507200966015915 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-031.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-031.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-031.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-031.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-031.in new file mode 100644 index 0000000000000000000000000000000000000000..b05461b1ba727d91054ac49487ae1ab1ceeb4967 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-031.in @@ -0,0 +1 @@ +4 1 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-032.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-032.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-032.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-032.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-032.in new file mode 100644 index 0000000000000000000000000000000000000000..805e7f5a05abb0767d277398dd810d64910d282f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-032.in @@ -0,0 +1 @@ +4 2 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-033.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-033.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-033.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-034.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-034.ans new file mode 100644 index 0000000000000000000000000000000000000000..b8626c4cff2849624fb67f87cd0ad72b163671ad --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-034.ans @@ -0,0 +1 @@ +4 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-034.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-034.in new file mode 100644 index 0000000000000000000000000000000000000000..8835c0701f66f328251eac951d4278ae8acd00a1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-034.in @@ -0,0 +1 @@ +4 4 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-035.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-035.ans new file mode 100644 index 0000000000000000000000000000000000000000..1e8b314962144c26d5e0e50fd29d2ca327864913 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-035.ans @@ -0,0 +1 @@ +6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-035.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-035.in new file mode 100644 index 0000000000000000000000000000000000000000..1a99162ed9cdd1b90006cbd4f07e2a2bd3f404d4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-035.in @@ -0,0 +1 @@ +4 5 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-036.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-036.ans new file mode 100644 index 0000000000000000000000000000000000000000..45a4fb75db864000d01701c0f7a51864bd4daabf --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-036.ans @@ -0,0 +1 @@ +8 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-036.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-036.in new file mode 100644 index 0000000000000000000000000000000000000000..9290688fa7995d643a841e69083fc3f1316a0ef8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-036.in @@ -0,0 +1 @@ +4 6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-037.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-037.ans new file mode 100644 index 0000000000000000000000000000000000000000..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-037.ans @@ -0,0 +1 @@ +10 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-038.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-038.ans new file mode 100644 index 0000000000000000000000000000000000000000..48082f72f087ce7e6fa75b9c41d7387daecd447b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-038.ans @@ -0,0 +1 @@ +12 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-038.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-038.in new file mode 100644 index 0000000000000000000000000000000000000000..7dfbee1ba298ba75b0413655c18cbcf5dfc2dbc0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-038.in @@ -0,0 +1 @@ +4 8 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-039.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-039.in new file mode 100644 index 0000000000000000000000000000000000000000..aaf5572743f91ee0e66fe625c32d99558da08230 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-039.in @@ -0,0 +1 @@ +4 9 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-040.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-040.in new file mode 100644 index 0000000000000000000000000000000000000000..6af3f94382e9642d1772a8f149e6f2600f572f76 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-040.in @@ -0,0 +1 @@ +4 10 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-042.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-042.ans new file mode 100644 index 0000000000000000000000000000000000000000..209e3ef4b6247ce746048d5711befda46206d235 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-042.ans @@ -0,0 +1 @@ +20 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-042.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-042.in new file mode 100644 index 0000000000000000000000000000000000000000..2e18a59c6f617145ff60c20773faa83e86c12ffe --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-042.in @@ -0,0 +1 @@ +4 12 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-043.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-043.ans new file mode 100644 index 0000000000000000000000000000000000000000..2bd5a0a98a36cc08ada88b804d3be047e6aa5b8a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-043.ans @@ -0,0 +1 @@ +22 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-043.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-043.in new file mode 100644 index 0000000000000000000000000000000000000000..501894899e1c8901dfbfe7ef3a3ef15dedb2ba64 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-043.in @@ -0,0 +1 @@ +4 13 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-044.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-044.ans new file mode 100644 index 0000000000000000000000000000000000000000..a45fd52cc5891570d6299fab38643103c3955474 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-044.ans @@ -0,0 +1 @@ +24 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-044.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-044.in new file mode 100644 index 0000000000000000000000000000000000000000..596ff9526d723785f058e38ee19136f99403f837 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-044.in @@ -0,0 +1 @@ +4 14 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-045.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-045.ans new file mode 100644 index 0000000000000000000000000000000000000000..0f11735ff87032009232b8fcba70c8e355c61a37 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-045.ans @@ -0,0 +1 @@ +196 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-046.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-046.in new file mode 100644 index 0000000000000000000000000000000000000000..240b54381d77cc8056106da8b88a398da02ed669 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-046.in @@ -0,0 +1 @@ +4 101 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-047.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-047.ans new file mode 100644 index 0000000000000000000000000000000000000000..48b8b5e99b6da470c2b6a90a77c11213ac73473f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-047.ans @@ -0,0 +1 @@ +1999999999999996 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-047.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-047.in new file mode 100644 index 0000000000000000000000000000000000000000..8c0404800a202ff22e2e11ed18d4ebca59794303 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-047.in @@ -0,0 +1 @@ +4 1000000000000000 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-048.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-048.ans new file mode 100644 index 0000000000000000000000000000000000000000..f1450163810ff5cea30f58400a25c5ccb46a4b82 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-048.ans @@ -0,0 +1 @@ +240870750463768 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-048.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-048.in new file mode 100644 index 0000000000000000000000000000000000000000..a6855bfc287a16d6c161f59fcf803d4bc2f3afd2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-048.in @@ -0,0 +1 @@ +4 120435375231886 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-049.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-049.ans new file mode 100644 index 0000000000000000000000000000000000000000..fed59e2b692b5bf49ca0497cac97d8e45db7a299 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-049.ans @@ -0,0 +1 @@ +1068314739293982 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-050.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-050.in new file mode 100644 index 0000000000000000000000000000000000000000..41983482ba7dbd7ad90f7069a99c5926bb890f39 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-050.in @@ -0,0 +1 @@ +4 235651167000750 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-051.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-051.ans new file mode 100644 index 0000000000000000000000000000000000000000..16a1a1c68c7f4baad66ff038496a9e1b73411e52 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-051.ans @@ -0,0 +1 @@ +69896236674370 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-051.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-051.in new file mode 100644 index 0000000000000000000000000000000000000000..179eb20c2f67ffeb82c45d0b1651cfc91d1a7da4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-051.in @@ -0,0 +1 @@ +4 34948118337187 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-052.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-052.ans new file mode 100644 index 0000000000000000000000000000000000000000..4e7f227b32fffe13b17c109bd14d7d2fe8d31b11 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-052.ans @@ -0,0 +1 @@ +1725681365490576 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-053.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-053.ans new file mode 100644 index 0000000000000000000000000000000000000000..cb129589e085315483af2c5b226a2b1b29582b81 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-053.ans @@ -0,0 +1 @@ +868707532261574 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-053.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-053.in new file mode 100644 index 0000000000000000000000000000000000000000..b4702822e387bba59427add86f9f73eace1e53f1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-053.in @@ -0,0 +1 @@ +4 434353766130789 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-054.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-054.in new file mode 100644 index 0000000000000000000000000000000000000000..2c3e36b56c13943c0b4452e45c0f58d406a76285 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-054.in @@ -0,0 +1 @@ +5 1 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-055.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-055.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-055.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-056.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-056.ans new file mode 100644 index 0000000000000000000000000000000000000000..b8626c4cff2849624fb67f87cd0ad72b163671ad --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-056.ans @@ -0,0 +1 @@ +4 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-056.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-056.in new file mode 100644 index 0000000000000000000000000000000000000000..3303b14c866c1efcb0e7bf3ccc416e5a33d89af0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-056.in @@ -0,0 +1 @@ +5 3 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-057.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-057.in new file mode 100644 index 0000000000000000000000000000000000000000..0f64a0cb9f54508ddc866bfe93dac511a5f10974 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-057.in @@ -0,0 +1 @@ +5 4 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-058.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-058.ans new file mode 100644 index 0000000000000000000000000000000000000000..45a4fb75db864000d01701c0f7a51864bd4daabf --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-058.ans @@ -0,0 +1 @@ +8 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-059.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-059.ans new file mode 100644 index 0000000000000000000000000000000000000000..48082f72f087ce7e6fa75b9c41d7387daecd447b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-059.ans @@ -0,0 +1 @@ +12 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-059.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-059.in new file mode 100644 index 0000000000000000000000000000000000000000..e605fb09576858f177be31a77eb690c0191c0182 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-059.in @@ -0,0 +1 @@ +5 6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-060.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-060.ans new file mode 100644 index 0000000000000000000000000000000000000000..8351c19397f4fcd5238d10034fa7fa384f14d580 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-060.ans @@ -0,0 +1 @@ +14 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-060.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-060.in new file mode 100644 index 0000000000000000000000000000000000000000..149a6b3213f3e0a3e12ea4aac0776d890ff8b3e6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-060.in @@ -0,0 +1 @@ +5 7 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-061.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-061.ans new file mode 100644 index 0000000000000000000000000000000000000000..3c032078a4a21c5c51d3c93d91717c1dabbb8cd0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-061.ans @@ -0,0 +1 @@ +18 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-061.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-061.in new file mode 100644 index 0000000000000000000000000000000000000000..c1dc547ae1e6af058132b0452c42d35102e2e7f3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-061.in @@ -0,0 +1 @@ +5 8 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-062.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-062.ans new file mode 100644 index 0000000000000000000000000000000000000000..209e3ef4b6247ce746048d5711befda46206d235 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-062.ans @@ -0,0 +1 @@ +20 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-062.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-062.in new file mode 100644 index 0000000000000000000000000000000000000000..74f680b8a996b7aff9372849876936cb597550e2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-062.in @@ -0,0 +1 @@ +5 9 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-063.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-063.ans new file mode 100644 index 0000000000000000000000000000000000000000..2bd5a0a98a36cc08ada88b804d3be047e6aa5b8a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-063.ans @@ -0,0 +1 @@ +22 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-064.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-064.ans new file mode 100644 index 0000000000000000000000000000000000000000..a45fd52cc5891570d6299fab38643103c3955474 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-064.ans @@ -0,0 +1 @@ +24 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-064.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-064.in new file mode 100644 index 0000000000000000000000000000000000000000..c8522d01be20b0715092d8f2e61298c4cb3fde2e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-064.in @@ -0,0 +1 @@ +5 11 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-065.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-065.ans new file mode 100644 index 0000000000000000000000000000000000000000..9902f17848a8974ab57d57999b74a63198fe6e23 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-065.ans @@ -0,0 +1 @@ +28 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-065.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-065.in new file mode 100644 index 0000000000000000000000000000000000000000..beb6529a908a23004298af8d4cc65bf7d5d98c01 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-065.in @@ -0,0 +1 @@ +5 12 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-066.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-066.ans new file mode 100644 index 0000000000000000000000000000000000000000..64bb6b746dceaf12b0ba8c08f310b0426babde44 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-066.ans @@ -0,0 +1 @@ +30 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-066.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-066.in new file mode 100644 index 0000000000000000000000000000000000000000..06984c2273d94a93548aa08c2402c374dce09cd5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-066.in @@ -0,0 +1 @@ +5 13 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-067.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-067.ans new file mode 100644 index 0000000000000000000000000000000000000000..a7873645902455c63d166fdcaa4b2fe565f6de7d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-067.ans @@ -0,0 +1 @@ +34 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-067.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-067.in new file mode 100644 index 0000000000000000000000000000000000000000..ed100ae2be56afb172d164c5656fd5a1da0fc220 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-067.in @@ -0,0 +1 @@ +5 14 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-068.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-068.ans new file mode 100644 index 0000000000000000000000000000000000000000..a7873645902455c63d166fdcaa4b2fe565f6de7d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-068.ans @@ -0,0 +1 @@ +34 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-068.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-068.in new file mode 100644 index 0000000000000000000000000000000000000000..dbe3ea5b86370ce67269e77cbecb35dd75efddb5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-068.in @@ -0,0 +1 @@ +5 15 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-069.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-069.ans new file mode 100644 index 0000000000000000000000000000000000000000..e522732c77ec94723e739d22f28df549b0231f5f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-069.ans @@ -0,0 +1 @@ +38 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-069.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-069.in new file mode 100644 index 0000000000000000000000000000000000000000..ad3f5422a953f38934c4ba6037cab6efd2351c09 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-069.in @@ -0,0 +1 @@ +5 16 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-070.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-070.ans new file mode 100644 index 0000000000000000000000000000000000000000..425151f3a411f5e088d7753e7c8d016303b1b9d1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-070.ans @@ -0,0 +1 @@ +40 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-070.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-070.in new file mode 100644 index 0000000000000000000000000000000000000000..2cb4d875364b469ce5695a4444f0b83049aa9ddd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-070.in @@ -0,0 +1 @@ +5 17 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-071.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-071.ans new file mode 100644 index 0000000000000000000000000000000000000000..c739b42c4d2ce23786c5350641d0adbf5fa7d6b2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-071.ans @@ -0,0 +1 @@ +44 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-071.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-071.in new file mode 100644 index 0000000000000000000000000000000000000000..27a200b669cb62210d55268be782fc2450118b73 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-071.in @@ -0,0 +1 @@ +5 18 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-072.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-072.ans new file mode 100644 index 0000000000000000000000000000000000000000..9e5feb5256930f3cae636754eef8a244ede164eb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-072.ans @@ -0,0 +1 @@ +46 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-072.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-072.in new file mode 100644 index 0000000000000000000000000000000000000000..ffe0e4b6db1b33278219f4774ba2b9456990d63f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-072.in @@ -0,0 +1 @@ +5 19 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-073.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-073.in new file mode 100644 index 0000000000000000000000000000000000000000..97caab9054fa7e6fe8a70e2f9feac242126f1af3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-073.in @@ -0,0 +1 @@ +5 20 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-074.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-074.ans new file mode 100644 index 0000000000000000000000000000000000000000..e373ee695f6e76d7d3f8f8c4e92d1d60995352e5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-074.ans @@ -0,0 +1 @@ +50 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-074.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-074.in new file mode 100644 index 0000000000000000000000000000000000000000..98bf4134412260ea93a1a86f674b6af4fa9a22a4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-074.in @@ -0,0 +1 @@ +5 21 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-075.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-075.ans new file mode 100644 index 0000000000000000000000000000000000000000..fb1e7bc86996a80d4a16529b990adda1d3434c92 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-075.ans @@ -0,0 +1 @@ +54 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-075.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-075.in new file mode 100644 index 0000000000000000000000000000000000000000..90a464840fef88d78896ade420504230efd8a4a2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-075.in @@ -0,0 +1 @@ +5 22 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-076.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-076.ans new file mode 100644 index 0000000000000000000000000000000000000000..f6b91e0e1f8dddaac700b51aa7a66f29fc135a02 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-076.ans @@ -0,0 +1 @@ +56 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-076.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-076.in new file mode 100644 index 0000000000000000000000000000000000000000..90a32d4287a0aaa8e7fe4bc1d01a5cf4bf1591fe --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-076.in @@ -0,0 +1 @@ +5 23 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-077.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-077.ans new file mode 100644 index 0000000000000000000000000000000000000000..abdfb053e41e2af75ba7e11f82b4ef0c312566a7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-077.ans @@ -0,0 +1 @@ +60 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-077.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-077.in new file mode 100644 index 0000000000000000000000000000000000000000..ce21fa77a2ba709931e71ac23036b947011706ab --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-077.in @@ -0,0 +1 @@ +5 24 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-078.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-078.ans new file mode 100644 index 0000000000000000000000000000000000000000..abdfb053e41e2af75ba7e11f82b4ef0c312566a7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-078.ans @@ -0,0 +1 @@ +60 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-078.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-078.in new file mode 100644 index 0000000000000000000000000000000000000000..27d61655fd081f2ecfe0b5bc5afaa0706289f8c8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-078.in @@ -0,0 +1 @@ +5 25 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-080.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-080.ans new file mode 100644 index 0000000000000000000000000000000000000000..69a893aa31141827125ddaaee26966b7aed3de74 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-080.ans @@ -0,0 +1 @@ +66 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-080.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-080.in new file mode 100644 index 0000000000000000000000000000000000000000..35ab9f19d2a11464819075bd48e5e15aa869c8fb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-080.in @@ -0,0 +1 @@ +5 27 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-081.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-081.ans new file mode 100644 index 0000000000000000000000000000000000000000..2bbd69c2e548374bb9a87e06a2cfe52136f28465 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-081.ans @@ -0,0 +1 @@ +70 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-081.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-081.in new file mode 100644 index 0000000000000000000000000000000000000000..d1ff18d42226ca535d06f2e627234c8a529614d7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-081.in @@ -0,0 +1 @@ +5 28 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-082.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-082.ans new file mode 100644 index 0000000000000000000000000000000000000000..ea70ce013438b2e42d5297cf39110708d9cfe033 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-082.ans @@ -0,0 +1 @@ +72 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-082.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-082.in new file mode 100644 index 0000000000000000000000000000000000000000..94ee3a3415ffe77d1e12f53cae3668d912308e61 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-082.in @@ -0,0 +1 @@ +5 29 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-083.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-083.ans new file mode 100644 index 0000000000000000000000000000000000000000..9183bf03fccab013c0805dd51f7ea97bbb86de5d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-083.ans @@ -0,0 +1 @@ +256 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-083.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-083.in new file mode 100644 index 0000000000000000000000000000000000000000..579d92bf8ac1a0429541a46bd331e88992261f52 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-083.in @@ -0,0 +1 @@ +5 100 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-084.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-084.ans new file mode 100644 index 0000000000000000000000000000000000000000..8c9cf7e266378af268211e18b93630fc37caaec9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-084.ans @@ -0,0 +1 @@ +258 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-084.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-084.in new file mode 100644 index 0000000000000000000000000000000000000000..831607afb4b1ef33019d8010e96e4c163bb68db8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-084.in @@ -0,0 +1 @@ +5 101 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-086.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-086.ans new file mode 100644 index 0000000000000000000000000000000000000000..45f86dc63b5e8c0f7d6756249bbd97a72b192d92 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-086.ans @@ -0,0 +1 @@ +1373289685611632 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-086.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-086.in new file mode 100644 index 0000000000000000000000000000000000000000..c7f928a9c7cd9e0d937df2ddd1ce7761bd30def5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-086.in @@ -0,0 +1 @@ +5 528188340619860 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-087.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-087.ans new file mode 100644 index 0000000000000000000000000000000000000000..fee74e21c520b4c81cf7fc5ec8f1ddf126499266 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-087.ans @@ -0,0 +1 @@ +1193110466054622 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-087.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-087.in new file mode 100644 index 0000000000000000000000000000000000000000..9109ec4ecc39edb1e2538c0b9783540367fed3df --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-087.in @@ -0,0 +1 @@ +5 458888640790241 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-088.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-088.ans new file mode 100644 index 0000000000000000000000000000000000000000..314f55df7f963d6c1f453e90ab9820dad0e53ec4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-088.ans @@ -0,0 +1 @@ +1661240948521182 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-088.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-088.in new file mode 100644 index 0000000000000000000000000000000000000000..d2855ec6dd05bada90cc8668367201818599a0ef --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-088.in @@ -0,0 +1 @@ +5 638938826354302 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-089.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-089.ans new file mode 100644 index 0000000000000000000000000000000000000000..6397bfde8e5550b09fdfa143031b8762d6e7d7a7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-089.ans @@ -0,0 +1 @@ +1991570446335864 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-089.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-089.in new file mode 100644 index 0000000000000000000000000000000000000000..67040ebc2b513e2b19edcc43f8bf6ad5bac5eb83 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-089.in @@ -0,0 +1 @@ +5 765988633206103 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-090.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-090.ans new file mode 100644 index 0000000000000000000000000000000000000000..fe9bac877dca63222c795f9b3e6c9be84ab68cbd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-090.ans @@ -0,0 +1 @@ +205341270181016 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-090.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-090.in new file mode 100644 index 0000000000000000000000000000000000000000..205cddb910c9674eb6f08190b36f9f56955900ee --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-090.in @@ -0,0 +1 @@ +5 78977411608084 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-091.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-091.ans new file mode 100644 index 0000000000000000000000000000000000000000..be51b6db109f6dea240133af335bceddc331eaf6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-091.ans @@ -0,0 +1 @@ +428114975907380 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-091.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-091.in new file mode 100644 index 0000000000000000000000000000000000000000..2c4f49c9d01c31ad177148f258f8e6886de9c8e1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-091.in @@ -0,0 +1 @@ +5 164659606118225 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-092.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-092.ans new file mode 100644 index 0000000000000000000000000000000000000000..dce52d01901f0f4e247f4495479c511803ee2620 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-092.ans @@ -0,0 +1 @@ +525288583743312 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-092.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-092.in new file mode 100644 index 0000000000000000000000000000000000000000..c76b95da583318774bf65e452bec11f33f9e65ca --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-092.in @@ -0,0 +1 @@ +5 202034070670506 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-093.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-093.ans new file mode 100644 index 0000000000000000000000000000000000000000..be2917154486852319ce7efeacb2e70ec8304048 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-093.ans @@ -0,0 +1 @@ +1117953675714630 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-094.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-094.ans new file mode 100644 index 0000000000000000000000000000000000000000..5513c21a704ef21979c050901431e801a33460e7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-094.ans @@ -0,0 +1 @@ +1529064954814558 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-095.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-095.ans new file mode 100644 index 0000000000000000000000000000000000000000..f8c91484bf17c6bc1fabf383fc6d3efe76b6cd3e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-095.ans @@ -0,0 +1 @@ +878387513658792 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-095.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-095.in new file mode 100644 index 0000000000000000000000000000000000000000..8498745e1985a0a0f5289e832d5da2c1c5276085 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-095.in @@ -0,0 +1 @@ +5 337841351407229 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-096.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-096.ans new file mode 100644 index 0000000000000000000000000000000000000000..8f9501398e22bb4bbe658055f727707426242b8b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-096.ans @@ -0,0 +1 @@ +2486273183699470 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-096.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-096.in new file mode 100644 index 0000000000000000000000000000000000000000..1a7702dcbfbf6cedba3b5fca2ef5a3b97f0a25d6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-096.in @@ -0,0 +1 @@ +5 956258916807490 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-097.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-097.ans new file mode 100644 index 0000000000000000000000000000000000000000..40c67c74afbef2d6c54760f4f502842d727687fe --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-097.ans @@ -0,0 +1 @@ +1231328256773652 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-097.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-097.in new file mode 100644 index 0000000000000000000000000000000000000000..91591afa8726437a706260696a9c1369779d1f99 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-097.in @@ -0,0 +1 @@ +5 473587791066791 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-098.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-098.ans new file mode 100644 index 0000000000000000000000000000000000000000..90c958cb5909c611bd66fed7ee03f65ec8b75f5d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-098.ans @@ -0,0 +1 @@ +1175749148149760 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-099.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-099.ans new file mode 100644 index 0000000000000000000000000000000000000000..794e46a760b33393ecf79173e3c26c1a1d6929a7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-099.ans @@ -0,0 +1 @@ +752548123019138 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-099.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-099.in new file mode 100644 index 0000000000000000000000000000000000000000..ea9001fd8f4259dd1b2e98217b61223c66697b60 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-099.in @@ -0,0 +1 @@ +5 289441585776593 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-100.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-100.ans new file mode 100644 index 0000000000000000000000000000000000000000..d78e96b4be671acbe1fe8a8829f7140ad0a1a49e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-100.ans @@ -0,0 +1 @@ +1516643570661318 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-100.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-100.in new file mode 100644 index 0000000000000000000000000000000000000000..de0c455e846c24f9af9e211396b4b0d0c3b78101 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-100.in @@ -0,0 +1 @@ +5 583324450254354 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-101.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-101.ans new file mode 100644 index 0000000000000000000000000000000000000000..53f9138dfc01264621c12da3f5bf9be901338785 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-101.ans @@ -0,0 +1 @@ +416138476278182 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-101.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-101.in new file mode 100644 index 0000000000000000000000000000000000000000..3e22a1326181a3385fe0bf2a3c94f822bdc761cd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-101.in @@ -0,0 +1 @@ +5 160053260106995 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-102.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-102.ans new file mode 100644 index 0000000000000000000000000000000000000000..08ddb44ce727aa3cb1c0059b15a5a9619c8de92d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-102.ans @@ -0,0 +1 @@ +588525315706990 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-102.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-102.in new file mode 100644 index 0000000000000000000000000000000000000000..66489ec2906a3569c95d6f70124874f9fb29434b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-102.in @@ -0,0 +1 @@ +5 226355890656536 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-103.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-103.ans new file mode 100644 index 0000000000000000000000000000000000000000..3f60ee97c4cddfe5133d8b41b786cda1ac5879aa --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-103.ans @@ -0,0 +1 @@ +829763402218388 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-103.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-103.in new file mode 100644 index 0000000000000000000000000000000000000000..4ac9833690c88d381c57135cc5240c61fbb5eb69 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-103.in @@ -0,0 +1 @@ +5 319139770083997 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-104.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-104.ans new file mode 100644 index 0000000000000000000000000000000000000000..b9bf3866b1319999bf6f2ed2e2990d2666fd62fa --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-104.ans @@ -0,0 +1 @@ +1586367049207140 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-104.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-104.in new file mode 100644 index 0000000000000000000000000000000000000000..a32f879883256eecc59530ff5b956c02b80e058f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-104.in @@ -0,0 +1 @@ +5 610141172771978 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-105.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-105.ans new file mode 100644 index 0000000000000000000000000000000000000000..6d0cdade9a78b877aa9ff6d826c606a417bc7fea --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-105.ans @@ -0,0 +1 @@ +2306786646312298 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-105.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-105.in new file mode 100644 index 0000000000000000000000000000000000000000..7ad11410c2a1db59cfdc969673fdfbe5f25b3d3d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-105.in @@ -0,0 +1 @@ +5 887225633197039 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-106.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-106.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-106.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-106.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-106.in new file mode 100644 index 0000000000000000000000000000000000000000..afbc0d7c5ad83a2f235dd094730c661821449a2f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-106.in @@ -0,0 +1 @@ +6 1 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-107.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-107.in new file mode 100644 index 0000000000000000000000000000000000000000..edce53aaab07d1e84cae7cb3ada36005ca0e255f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-107.in @@ -0,0 +1 @@ +6 2 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-108.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-108.ans new file mode 100644 index 0000000000000000000000000000000000000000..1e8b314962144c26d5e0e50fd29d2ca327864913 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-108.ans @@ -0,0 +1 @@ +6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-109.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-109.ans new file mode 100644 index 0000000000000000000000000000000000000000..45a4fb75db864000d01701c0f7a51864bd4daabf --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-109.ans @@ -0,0 +1 @@ +8 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-109.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-109.in new file mode 100644 index 0000000000000000000000000000000000000000..9efb403ac19b10bb1044ee6f241a1af54f353edb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-109.in @@ -0,0 +1 @@ +6 4 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-112.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-112.ans new file mode 100644 index 0000000000000000000000000000000000000000..3c032078a4a21c5c51d3c93d91717c1dabbb8cd0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-112.ans @@ -0,0 +1 @@ +18 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-113.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-113.ans new file mode 100644 index 0000000000000000000000000000000000000000..2bd5a0a98a36cc08ada88b804d3be047e6aa5b8a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-113.ans @@ -0,0 +1 @@ +22 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-113.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-113.in new file mode 100644 index 0000000000000000000000000000000000000000..20a8108cdfe136b0c97700da9a3f06a55bcb51fb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-113.in @@ -0,0 +1 @@ +6 8 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-114.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-114.ans new file mode 100644 index 0000000000000000000000000000000000000000..a45fd52cc5891570d6299fab38643103c3955474 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-114.ans @@ -0,0 +1 @@ +24 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-114.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-114.in new file mode 100644 index 0000000000000000000000000000000000000000..4c7907f9ed995225a618e238435cf68b9cf6cd06 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-114.in @@ -0,0 +1 @@ +6 9 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-115.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-115.ans new file mode 100644 index 0000000000000000000000000000000000000000..9902f17848a8974ab57d57999b74a63198fe6e23 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-115.ans @@ -0,0 +1 @@ +28 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-115.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-115.in new file mode 100644 index 0000000000000000000000000000000000000000..86cd92d889d8a4becdfd70c1c6feea25e894127b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-115.in @@ -0,0 +1 @@ +6 10 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-116.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-116.ans new file mode 100644 index 0000000000000000000000000000000000000000..f5c89552bd3e62bfce023a230e90d141f7a46b2f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-116.ans @@ -0,0 +1 @@ +32 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-116.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-116.in new file mode 100644 index 0000000000000000000000000000000000000000..9b90a89edde31545c8b4081da7cb97e2b037ead2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-116.in @@ -0,0 +1 @@ +6 11 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-117.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-117.ans new file mode 100644 index 0000000000000000000000000000000000000000..7facc89938bbc5635e3d36ffa56b4c85e9b07db8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-117.ans @@ -0,0 +1 @@ +36 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-117.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-117.in new file mode 100644 index 0000000000000000000000000000000000000000..fa617cb0d166a8801f12ee1798e195611d02e16d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-117.in @@ -0,0 +1 @@ +6 12 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-118.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-118.ans new file mode 100644 index 0000000000000000000000000000000000000000..e522732c77ec94723e739d22f28df549b0231f5f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-118.ans @@ -0,0 +1 @@ +38 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-118.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-118.in new file mode 100644 index 0000000000000000000000000000000000000000..06ff32d385e777796e9ac882fa056f12a225b637 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-118.in @@ -0,0 +1 @@ +6 13 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-119.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-119.ans new file mode 100644 index 0000000000000000000000000000000000000000..d81cc0710eb6cf9efd5b920a8453e1e07157b6cd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-119.ans @@ -0,0 +1 @@ +42 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-120.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-120.ans new file mode 100644 index 0000000000000000000000000000000000000000..9e5feb5256930f3cae636754eef8a244ede164eb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-120.ans @@ -0,0 +1 @@ +46 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-120.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-120.in new file mode 100644 index 0000000000000000000000000000000000000000..a5049783c2584d2773a27039fd830eb31f161396 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-120.in @@ -0,0 +1 @@ +6 15 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-121.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-121.ans new file mode 100644 index 0000000000000000000000000000000000000000..e373ee695f6e76d7d3f8f8c4e92d1d60995352e5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-121.ans @@ -0,0 +1 @@ +50 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-121.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-121.in new file mode 100644 index 0000000000000000000000000000000000000000..1f3c6f84575fd9db0e0387584c19576bba2893af --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-121.in @@ -0,0 +1 @@ +6 16 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-122.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-122.ans new file mode 100644 index 0000000000000000000000000000000000000000..fb1e7bc86996a80d4a16529b990adda1d3434c92 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-122.ans @@ -0,0 +1 @@ +54 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-122.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-122.in new file mode 100644 index 0000000000000000000000000000000000000000..f749cecdc47059754f46c15b5c67d06876573c42 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-122.in @@ -0,0 +1 @@ +6 17 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-123.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-123.ans new file mode 100644 index 0000000000000000000000000000000000000000..8c61d23e125b800e69cb950b09e23c06f728fff9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-123.ans @@ -0,0 +1 @@ +58 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-123.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-123.in new file mode 100644 index 0000000000000000000000000000000000000000..4b0adabe0cbca6031b2b02b7142e28e77823d4aa --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-123.in @@ -0,0 +1 @@ +6 18 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-124.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-124.ans new file mode 100644 index 0000000000000000000000000000000000000000..a8fa06e1be7da01425d2be19da24595de2fa02c2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-124.ans @@ -0,0 +1 @@ +62 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-124.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-124.in new file mode 100644 index 0000000000000000000000000000000000000000..f7eeb9f49dad329f83d2847265c5af21be6bd4e5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-124.in @@ -0,0 +1 @@ +6 19 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-125.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-125.ans new file mode 100644 index 0000000000000000000000000000000000000000..69a893aa31141827125ddaaee26966b7aed3de74 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-125.ans @@ -0,0 +1 @@ +66 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-125.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-125.in new file mode 100644 index 0000000000000000000000000000000000000000..25864eee3de4a7039e65e310ce45c05e4feb9b8c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-125.in @@ -0,0 +1 @@ +6 20 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-126.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-126.ans new file mode 100644 index 0000000000000000000000000000000000000000..2bbd69c2e548374bb9a87e06a2cfe52136f28465 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-126.ans @@ -0,0 +1 @@ +70 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-126.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-126.in new file mode 100644 index 0000000000000000000000000000000000000000..8a35b56b7557857e70b1d6e3e6f6d273aece0167 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-126.in @@ -0,0 +1 @@ +6 21 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-127.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-127.ans new file mode 100644 index 0000000000000000000000000000000000000000..fff0a2476aa5c8e60a3ef21cfc66e0cc670920be --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-127.ans @@ -0,0 +1 @@ +74 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-128.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-128.ans new file mode 100644 index 0000000000000000000000000000000000000000..8e14edce9ccd63cedb63bd0c07f8b829438a6c8a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-128.ans @@ -0,0 +1 @@ +78 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-128.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-128.in new file mode 100644 index 0000000000000000000000000000000000000000..df92ffc5578fa99865e86ab8d7d2beb7d582fb2b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-128.in @@ -0,0 +1 @@ +6 23 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-129.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-129.ans new file mode 100644 index 0000000000000000000000000000000000000000..aeccadf78362abd1f808e39f898b6fefa0f1dcec --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-129.ans @@ -0,0 +1 @@ +386 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-130.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-130.ans new file mode 100644 index 0000000000000000000000000000000000000000..6f8a8c5efaa6fec8adcc4f393b0b1dbb342c4d6a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-130.ans @@ -0,0 +1 @@ +390 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-130.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-130.in new file mode 100644 index 0000000000000000000000000000000000000000..c015692562cf1ad108af1ce9462b407f06cc81c1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-130.in @@ -0,0 +1 @@ +6 101 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-131.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-131.ans new file mode 100644 index 0000000000000000000000000000000000000000..b1ea8435402a400412992a8b9ce033d073d4d235 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-131.ans @@ -0,0 +1 @@ +3999999999999986 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-131.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-131.in new file mode 100644 index 0000000000000000000000000000000000000000..32c0545782f5c7b65c994302fa43e6e82e2f59b4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-131.in @@ -0,0 +1 @@ +6 1000000000000000 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-132.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-132.ans new file mode 100644 index 0000000000000000000000000000000000000000..a11fb862d304c15aa8c379c82397c020669d8779 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-132.ans @@ -0,0 +1 @@ +1819429526946026 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-132.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-132.in new file mode 100644 index 0000000000000000000000000000000000000000..bae6fb7e098db956c589d4790767d647f5d122fc --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-132.in @@ -0,0 +1 @@ +6 454857381736510 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-133.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-133.ans new file mode 100644 index 0000000000000000000000000000000000000000..c42e0f46514bc450b551c455abec416d002bb989 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-133.ans @@ -0,0 +1 @@ +1049392284967590 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-133.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-133.in new file mode 100644 index 0000000000000000000000000000000000000000..290eb06396ce785ef7d3f6260df32f68f682c568 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-133.in @@ -0,0 +1 @@ +6 262348071241901 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-134.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-134.ans new file mode 100644 index 0000000000000000000000000000000000000000..8d2e6bee6df37f1f27aa95de6b6bc5968bf70142 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-134.ans @@ -0,0 +1 @@ +1039295871395362 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-135.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-135.ans new file mode 100644 index 0000000000000000000000000000000000000000..17dcbdfd9497f75252c2624b46f2b2aebd170b6f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-135.ans @@ -0,0 +1 @@ +761775667913942 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-135.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-135.in new file mode 100644 index 0000000000000000000000000000000000000000..0dc051bed0c2dc6759074ca0cb1c9683c8436952 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-135.in @@ -0,0 +1 @@ +6 190443916978489 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-136.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-136.ans new file mode 100644 index 0000000000000000000000000000000000000000..5cd85cc6e64a396ece0cd33fb22d02d6f8683194 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-136.ans @@ -0,0 +1 @@ +474456492058794 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-136.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-136.in new file mode 100644 index 0000000000000000000000000000000000000000..e1ccb6071c97e5b011661777862462f493fb161e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-136.in @@ -0,0 +1 @@ +6 118614123014702 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-137.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-137.ans new file mode 100644 index 0000000000000000000000000000000000000000..cd645add6e9864dc3bf1df157757547be54f6b06 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-137.ans @@ -0,0 +1 @@ +576745406101582 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-137.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-137.in new file mode 100644 index 0000000000000000000000000000000000000000..7ba8c3dacfbb8707c9ccedf008196161a400b7eb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-137.in @@ -0,0 +1 @@ +6 144186351525399 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-138.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-138.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-138.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-138.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-138.in new file mode 100644 index 0000000000000000000000000000000000000000..ddcbc88bbd91224989859c06654e27d67b38d368 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-138.in @@ -0,0 +1 @@ +7 1 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-139.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-139.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-139.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-139.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-139.in new file mode 100644 index 0000000000000000000000000000000000000000..ef82d441a0fa32949817f6dc557c897242663e4e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-139.in @@ -0,0 +1 @@ +7 2 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-140.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-140.ans new file mode 100644 index 0000000000000000000000000000000000000000..1e8b314962144c26d5e0e50fd29d2ca327864913 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-140.ans @@ -0,0 +1 @@ +6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-141.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-141.ans new file mode 100644 index 0000000000000000000000000000000000000000..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-141.ans @@ -0,0 +1 @@ +10 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-141.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-141.in new file mode 100644 index 0000000000000000000000000000000000000000..883251633a21a0f0722f7aa96da5ae023fa2df5c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-141.in @@ -0,0 +1 @@ +7 4 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-142.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-142.ans new file mode 100644 index 0000000000000000000000000000000000000000..8351c19397f4fcd5238d10034fa7fa384f14d580 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-142.ans @@ -0,0 +1 @@ +14 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-142.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-142.in new file mode 100644 index 0000000000000000000000000000000000000000..e5a3ec49418e6bf3b4c330fbd798b8077295142e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-142.in @@ -0,0 +1 @@ +7 5 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-143.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-143.ans new file mode 100644 index 0000000000000000000000000000000000000000..3c032078a4a21c5c51d3c93d91717c1dabbb8cd0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-143.ans @@ -0,0 +1 @@ +18 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-143.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-143.in new file mode 100644 index 0000000000000000000000000000000000000000..6cf602ef91906fb883aba334047f552127efce0e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-143.in @@ -0,0 +1 @@ +7 6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-144.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-144.ans new file mode 100644 index 0000000000000000000000000000000000000000..a45fd52cc5891570d6299fab38643103c3955474 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-144.ans @@ -0,0 +1 @@ +24 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-144.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-144.in new file mode 100644 index 0000000000000000000000000000000000000000..11c8dd7f2c36bdd2f4603cd9e82c497036c78f61 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-144.in @@ -0,0 +1 @@ +7 7 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-145.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-145.ans new file mode 100644 index 0000000000000000000000000000000000000000..6f4247a6255c99f420d1df558d68745592862ff7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-145.ans @@ -0,0 +1 @@ +26 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-145.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-145.in new file mode 100644 index 0000000000000000000000000000000000000000..d0f2aade42a279fe8df32c991ade97cd15afa097 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-145.in @@ -0,0 +1 @@ +7 8 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-146.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-146.ans new file mode 100644 index 0000000000000000000000000000000000000000..f5c89552bd3e62bfce023a230e90d141f7a46b2f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-146.ans @@ -0,0 +1 @@ +32 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-146.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-146.in new file mode 100644 index 0000000000000000000000000000000000000000..a5b6096201d6b1d532a4301f492b7736cdde9c91 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-146.in @@ -0,0 +1 @@ +7 9 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-147.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-147.ans new file mode 100644 index 0000000000000000000000000000000000000000..7facc89938bbc5635e3d36ffa56b4c85e9b07db8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-147.ans @@ -0,0 +1 @@ +36 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-147.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-147.in new file mode 100644 index 0000000000000000000000000000000000000000..2d1ae061beacd4f50d590b2074db56cd1bb53f0a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-147.in @@ -0,0 +1 @@ +7 10 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-148.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-148.ans new file mode 100644 index 0000000000000000000000000000000000000000..d81cc0710eb6cf9efd5b920a8453e1e07157b6cd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-148.ans @@ -0,0 +1 @@ +42 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-148.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-148.in new file mode 100644 index 0000000000000000000000000000000000000000..156c17825369979aae8e5918ab92b0b01f6a15db --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-148.in @@ -0,0 +1 @@ +7 11 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-149.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-149.ans new file mode 100644 index 0000000000000000000000000000000000000000..c739b42c4d2ce23786c5350641d0adbf5fa7d6b2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-149.ans @@ -0,0 +1 @@ +44 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-149.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-149.in new file mode 100644 index 0000000000000000000000000000000000000000..e1e56cc0d0697078234209158deb199b1a4aae0c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-149.in @@ -0,0 +1 @@ +7 12 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-150.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-150.ans new file mode 100644 index 0000000000000000000000000000000000000000..21e72e8ac3d7e23bd6532b5f1f4a6bdf8362e6cf --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-150.ans @@ -0,0 +1 @@ +48 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-150.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-150.in new file mode 100644 index 0000000000000000000000000000000000000000..d6741981416c4710be20c5c61fe8208200cee1e2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-150.in @@ -0,0 +1 @@ +7 13 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-151.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-151.in new file mode 100644 index 0000000000000000000000000000000000000000..873b5094d29653ccd7305f39abfc9e1df575b2f4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-151.in @@ -0,0 +1 @@ +7 14 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-152.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-152.ans new file mode 100644 index 0000000000000000000000000000000000000000..8c61d23e125b800e69cb950b09e23c06f728fff9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-152.ans @@ -0,0 +1 @@ +58 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-152.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-152.in new file mode 100644 index 0000000000000000000000000000000000000000..818d02aa2ae0f534da21f6b46e2c0b67a5e966bd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-152.in @@ -0,0 +1 @@ +7 15 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-153.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-153.ans new file mode 100644 index 0000000000000000000000000000000000000000..a8fa06e1be7da01425d2be19da24595de2fa02c2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-153.ans @@ -0,0 +1 @@ +62 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-154.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-154.ans new file mode 100644 index 0000000000000000000000000000000000000000..69a893aa31141827125ddaaee26966b7aed3de74 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-154.ans @@ -0,0 +1 @@ +66 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-154.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-154.in new file mode 100644 index 0000000000000000000000000000000000000000..daa71dc22118e68b92cd2062b5f18ffb67c63761 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-154.in @@ -0,0 +1 @@ +7 17 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-155.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-155.ans new file mode 100644 index 0000000000000000000000000000000000000000..ea70ce013438b2e42d5297cf39110708d9cfe033 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-155.ans @@ -0,0 +1 @@ +72 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-156.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-156.ans new file mode 100644 index 0000000000000000000000000000000000000000..fff0a2476aa5c8e60a3ef21cfc66e0cc670920be --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-156.ans @@ -0,0 +1 @@ +74 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-156.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-156.in new file mode 100644 index 0000000000000000000000000000000000000000..a5131f5a04d3c6850670c09a5b22b22ee9f7fc4d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-156.in @@ -0,0 +1 @@ +7 19 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-158.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-158.ans new file mode 100644 index 0000000000000000000000000000000000000000..871727de1fd703d0c4aab92017011c373e795b67 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-158.ans @@ -0,0 +1 @@ +84 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-158.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-158.in new file mode 100644 index 0000000000000000000000000000000000000000..d8a9d6a547e08d626d72467307ed7a47798ad969 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-158.in @@ -0,0 +1 @@ +7 21 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-159.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-159.ans new file mode 100644 index 0000000000000000000000000000000000000000..d22307c427b8327474aa1a2e1de926b73e70b33c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-159.ans @@ -0,0 +1 @@ +88 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-159.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-159.in new file mode 100644 index 0000000000000000000000000000000000000000..10880e58eef3eaa45a217d347770782ed2d2bcbf --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-159.in @@ -0,0 +1 @@ +7 22 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-160.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-160.in new file mode 100644 index 0000000000000000000000000000000000000000..5cadfb4293b57b3580ca883a9bba1d80b03a6855 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-160.in @@ -0,0 +1 @@ +7 23 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-161.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-161.ans new file mode 100644 index 0000000000000000000000000000000000000000..6529ff889b0cc4d1ebe65cdc6a21ec584859d931 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-161.ans @@ -0,0 +1 @@ +98 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-162.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-162.in new file mode 100644 index 0000000000000000000000000000000000000000..560bbd2004a3317e3ff1ceb35b84a18795a5088c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-162.in @@ -0,0 +1 @@ +7 25 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-163.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-163.ans new file mode 100644 index 0000000000000000000000000000000000000000..fe4afb0df8641d6de901cdde04199e4507534d0d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-163.ans @@ -0,0 +1 @@ +106 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-163.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-163.in new file mode 100644 index 0000000000000000000000000000000000000000..1f7690c2869ba50e2b74f40c346ab8310a0baf9d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-163.in @@ -0,0 +1 @@ +7 26 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-164.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-164.ans new file mode 100644 index 0000000000000000000000000000000000000000..194b81caae1cb16aa059ce147a1e2e74206999af --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-164.ans @@ -0,0 +1 @@ +112 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-165.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-165.ans new file mode 100644 index 0000000000000000000000000000000000000000..dee79f109407cb2e27fe0399e8976556a3cba004 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-165.ans @@ -0,0 +1 @@ +114 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-165.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-165.in new file mode 100644 index 0000000000000000000000000000000000000000..2a4ce085357f51a3e268b532c74e804756a631de --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-165.in @@ -0,0 +1 @@ +7 28 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-166.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-166.ans new file mode 100644 index 0000000000000000000000000000000000000000..415196e47f5324354b6e706ca5813567fa6c3784 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-166.ans @@ -0,0 +1 @@ +118 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-167.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-167.ans new file mode 100644 index 0000000000000000000000000000000000000000..fc902f4f956b349ac5763a01f37a53ee607614d5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-167.ans @@ -0,0 +1 @@ +124 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-167.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-167.in new file mode 100644 index 0000000000000000000000000000000000000000..8f4d397fddcdcf0ee2fe5f2bee14a4a85bc57874 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-167.in @@ -0,0 +1 @@ +7 30 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-168.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-168.ans new file mode 100644 index 0000000000000000000000000000000000000000..a949a93dfcca659638ff00284e1d1703accef77a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-168.ans @@ -0,0 +1 @@ +128 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-168.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-168.in new file mode 100644 index 0000000000000000000000000000000000000000..ace87069118b762e2dfe97552675a2c12985970a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-168.in @@ -0,0 +1 @@ +7 31 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-169.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-169.ans new file mode 100644 index 0000000000000000000000000000000000000000..fd03ab2a61f407d4bd9068d6faf07cb898805cc0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-169.ans @@ -0,0 +1 @@ +130 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-169.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-169.in new file mode 100644 index 0000000000000000000000000000000000000000..f8bbdd0b072d6477b9cf4ac1599f302cac0bb6ac --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-169.in @@ -0,0 +1 @@ +7 32 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-170.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-170.ans new file mode 100644 index 0000000000000000000000000000000000000000..7296f257eb19026f79767a2458bdf63ff9c29e51 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-170.ans @@ -0,0 +1 @@ +136 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-170.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-170.in new file mode 100644 index 0000000000000000000000000000000000000000..9725c2e9a665b43e1ed0e280ff081bc83246fcf0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-170.in @@ -0,0 +1 @@ +7 33 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-171.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-171.ans new file mode 100644 index 0000000000000000000000000000000000000000..dee261df401d48661df8ba5474c1d1c7c258d3e5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-171.ans @@ -0,0 +1 @@ +140 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-171.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-171.in new file mode 100644 index 0000000000000000000000000000000000000000..7c5208b54e734e6613f11abb5f610ce43ed4637f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-171.in @@ -0,0 +1 @@ +7 34 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-172.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-172.ans new file mode 100644 index 0000000000000000000000000000000000000000..a29644e57ed8718497f53748fe4433ed7d7bdf79 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-172.ans @@ -0,0 +1 @@ +144 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-172.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-172.in new file mode 100644 index 0000000000000000000000000000000000000000..e78fd01b5a3ee23cefd490540d4a7a7079148e21 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-172.in @@ -0,0 +1 @@ +7 35 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-173.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-173.in new file mode 100644 index 0000000000000000000000000000000000000000..4e844dc06d4ecc6fdc919669561f9afabe510bdc --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-173.in @@ -0,0 +1 @@ +7 36 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-174.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-174.ans new file mode 100644 index 0000000000000000000000000000000000000000..a2ecc456eb06120f6114115ff025d2b43be1e110 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-174.ans @@ -0,0 +1 @@ +154 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-174.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-174.in new file mode 100644 index 0000000000000000000000000000000000000000..21f0fd9a190c8fa2198802feffa688ed93cd6d1b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-174.in @@ -0,0 +1 @@ +7 37 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-175.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-175.ans new file mode 100644 index 0000000000000000000000000000000000000000..4c5c8078521783358203b859d5c7e9b7d9d524d4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-175.ans @@ -0,0 +1 @@ +158 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-175.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-175.in new file mode 100644 index 0000000000000000000000000000000000000000..f2901dd169379347c73cf4884752111dd7f9f1dc --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-175.in @@ -0,0 +1 @@ +7 38 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-176.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-176.ans new file mode 100644 index 0000000000000000000000000000000000000000..0234b515ea012b4f7f5ea4d892800d5c81979f22 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-176.ans @@ -0,0 +1 @@ +162 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-176.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-176.in new file mode 100644 index 0000000000000000000000000000000000000000..892b4de15147e3005bd533ddef072e99014ac89d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-176.in @@ -0,0 +1 @@ +7 39 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-177.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-177.ans new file mode 100644 index 0000000000000000000000000000000000000000..cdffbbc4e9042cb038492c253206237c321a506a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-177.ans @@ -0,0 +1 @@ +166 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-177.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-177.in new file mode 100644 index 0000000000000000000000000000000000000000..b4d2c31de3c216908fd30a5f04484e9998b5b06b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-177.in @@ -0,0 +1 @@ +7 40 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-178.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-178.ans new file mode 100644 index 0000000000000000000000000000000000000000..2cd1cfa2cfe0f845d31839e6c8500e55df8fad41 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-178.ans @@ -0,0 +1 @@ +170 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-178.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-178.in new file mode 100644 index 0000000000000000000000000000000000000000..7e3342a0015a1dbf74d98c307870e238a207383f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-178.in @@ -0,0 +1 @@ +7 41 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-179.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-179.ans new file mode 100644 index 0000000000000000000000000000000000000000..1057e9a27306e3e5567c601c522f00dc5ed6698e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-179.ans @@ -0,0 +1 @@ +176 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-179.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-179.in new file mode 100644 index 0000000000000000000000000000000000000000..4f5080a1354b2fbca89aaa4928bc7428b82132d5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-179.in @@ -0,0 +1 @@ +7 42 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-180.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-180.ans new file mode 100644 index 0000000000000000000000000000000000000000..3af99eeec11bbfeb1fc5514129c2cd6e97503dbd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-180.ans @@ -0,0 +1 @@ +180 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-181.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-181.ans new file mode 100644 index 0000000000000000000000000000000000000000..dc37bbdb81e6e655634abce71b4849e48bbce785 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-181.ans @@ -0,0 +1 @@ +184 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-181.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-181.in new file mode 100644 index 0000000000000000000000000000000000000000..52fef5f8a6d7aceb8a36b8ad9726a3f77217c0fb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-181.in @@ -0,0 +1 @@ +7 44 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-182.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-182.ans new file mode 100644 index 0000000000000000000000000000000000000000..e702a30b33b0d510da43b5348fb9c1ef43e39dd2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-182.ans @@ -0,0 +1 @@ +188 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-183.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-183.ans new file mode 100644 index 0000000000000000000000000000000000000000..86a0307199419a10492c4e4a044feb9f6580c607 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-183.ans @@ -0,0 +1 @@ +192 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-183.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-183.in new file mode 100644 index 0000000000000000000000000000000000000000..5087b0673a885ce5ce6fca3e205c59438971a809 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-183.in @@ -0,0 +1 @@ +7 46 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-184.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-184.in new file mode 100644 index 0000000000000000000000000000000000000000..d76f1bde627c856159f479e668710fc441c795f0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-184.in @@ -0,0 +1 @@ +7 47 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-185.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-185.ans new file mode 100644 index 0000000000000000000000000000000000000000..08839f6bb296e888d311d8ea2f35f7ff82dd3f2d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-185.ans @@ -0,0 +1 @@ +200 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-186.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-186.ans new file mode 100644 index 0000000000000000000000000000000000000000..ad03f7c5a871d69ea237b7ad0cbff1b20d6db654 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-186.ans @@ -0,0 +1 @@ +204 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-186.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-186.in new file mode 100644 index 0000000000000000000000000000000000000000..86a32acfa3fbfd1da3732ae8e5a5bf2b8a298c99 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-186.in @@ -0,0 +1 @@ +7 49 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-187.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-187.ans new file mode 100644 index 0000000000000000000000000000000000000000..cd7da05e3d264bd30a49a5f2c4c647a4ee0d3ec3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-187.ans @@ -0,0 +1 @@ +210 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-187.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-187.in new file mode 100644 index 0000000000000000000000000000000000000000..73e4eace9424b5a192981123e4df9fa0d4c1a6e1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-187.in @@ -0,0 +1 @@ +7 50 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-188.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-188.in new file mode 100644 index 0000000000000000000000000000000000000000..34bb0d14a540a613c671987e00ab41ff635cd71c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-188.in @@ -0,0 +1 @@ +7 51 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-189.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-189.in new file mode 100644 index 0000000000000000000000000000000000000000..ab78441f257ab8fb679fdc183e881f2e23217928 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-189.in @@ -0,0 +1 @@ +7 52 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-190.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-190.ans new file mode 100644 index 0000000000000000000000000000000000000000..c200906efd24ec5e783bee7f23b5d7c941b0c12c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-190.ans @@ -0,0 +1 @@ +222 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-190.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-190.in new file mode 100644 index 0000000000000000000000000000000000000000..254bf79a773aaa7a15cb81b13b035e6ff7d36b82 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-190.in @@ -0,0 +1 @@ +7 53 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-191.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-191.ans new file mode 100644 index 0000000000000000000000000000000000000000..f4146713e25d00d72eae114f1e68ace5f1d4291f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-191.ans @@ -0,0 +1 @@ +226 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-191.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-191.in new file mode 100644 index 0000000000000000000000000000000000000000..79532161df253e6becbc30dae3762ebcc4902fcf --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-191.in @@ -0,0 +1 @@ +7 54 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-192.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-192.ans new file mode 100644 index 0000000000000000000000000000000000000000..7c022aedd2727a0a82f74d783431c9cd293a295f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-192.ans @@ -0,0 +1 @@ +232 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-192.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-192.in new file mode 100644 index 0000000000000000000000000000000000000000..5f48a7f4880274b5b2824a736830bfc7d9bcf6ee --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-192.in @@ -0,0 +1 @@ +7 55 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-193.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-193.in new file mode 100644 index 0000000000000000000000000000000000000000..06133331ccff6a1c35d606bed98a922feae4407b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-193.in @@ -0,0 +1 @@ +7 56 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-194.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-194.ans new file mode 100644 index 0000000000000000000000000000000000000000..eb08bc0b0bc3abec5c48e80643fc18fb4ced16a0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-194.ans @@ -0,0 +1 @@ +240 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-194.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-194.in new file mode 100644 index 0000000000000000000000000000000000000000..5bbb40b7126e50f85cbbacb2bc47c15e2840a8a6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-194.in @@ -0,0 +1 @@ +7 57 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-195.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-195.ans new file mode 100644 index 0000000000000000000000000000000000000000..7f05eede23a03229008ee16a4b734bd4fb277bfb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-195.ans @@ -0,0 +1 @@ +244 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-195.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-195.in new file mode 100644 index 0000000000000000000000000000000000000000..6e073b6954d1d3561749af0be63fda6b63fc3616 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-195.in @@ -0,0 +1 @@ +7 58 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-196.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-196.ans new file mode 100644 index 0000000000000000000000000000000000000000..5d0b6c4108d5adfbece68e72fa0228b43b41c968 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-196.ans @@ -0,0 +1 @@ +248 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-196.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-196.in new file mode 100644 index 0000000000000000000000000000000000000000..fc5980a2624bbc9feb056b8d676d470e7ed72066 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-196.in @@ -0,0 +1 @@ +7 59 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-197.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-197.ans new file mode 100644 index 0000000000000000000000000000000000000000..f1aaa90592d0bda201d0977f17666ab4167bfbd8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-197.ans @@ -0,0 +1 @@ +254 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-197.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-197.in new file mode 100644 index 0000000000000000000000000000000000000000..7f6c2e977ce80ba2893fd8b3774076d8dda52f5c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-197.in @@ -0,0 +1 @@ +7 60 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-198.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-198.in new file mode 100644 index 0000000000000000000000000000000000000000..321d63ae7c5379e65201b1bf20ed1afa1810e6a6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-198.in @@ -0,0 +1 @@ +7 61 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-199.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-199.ans new file mode 100644 index 0000000000000000000000000000000000000000..98da127e3c80bd39010cc3666c7c9148c049c70c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-199.ans @@ -0,0 +1 @@ +260 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-199.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-199.in new file mode 100644 index 0000000000000000000000000000000000000000..eae58b8ccd40b69d188bc1f9999bc04301ec36ab --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-199.in @@ -0,0 +1 @@ +7 62 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-200.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-200.ans new file mode 100644 index 0000000000000000000000000000000000000000..c1d1ffbb7d52b971c049a380aa46c6f62ccf3d46 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-200.ans @@ -0,0 +1 @@ +266 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-201.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-201.ans new file mode 100644 index 0000000000000000000000000000000000000000..67f3f23eca8eac181c5a0e2f8da2a535eba9f5a3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-201.ans @@ -0,0 +1 @@ +270 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-202.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-202.ans new file mode 100644 index 0000000000000000000000000000000000000000..d4d5a4b7bda6bb26be3318913fab3ab993d91be6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-202.ans @@ -0,0 +1 @@ +274 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-202.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-202.in new file mode 100644 index 0000000000000000000000000000000000000000..5cf6dae6336985be2acab1fb817b168873cb9198 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-202.in @@ -0,0 +1 @@ +7 65 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-203.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-203.ans new file mode 100644 index 0000000000000000000000000000000000000000..3d242f5550527823ae7ff1a2272bf2940c2ad285 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-203.ans @@ -0,0 +1 @@ +278 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-203.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-203.in new file mode 100644 index 0000000000000000000000000000000000000000..fb2f72a0279dc51421a4190b6118f0c1550b29fb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-203.in @@ -0,0 +1 @@ +7 66 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-204.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-204.ans new file mode 100644 index 0000000000000000000000000000000000000000..e01062f1f81da9f3bc114a66ef7ba54d59f06074 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-204.ans @@ -0,0 +1 @@ +282 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-204.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-204.in new file mode 100644 index 0000000000000000000000000000000000000000..2ebd79ad900df1654a435d69b3f42adff6deb83b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-204.in @@ -0,0 +1 @@ +7 67 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-205.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-205.ans new file mode 100644 index 0000000000000000000000000000000000000000..c20f657478d231ff33eca814afe2e8f8afa4c9ab --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-205.ans @@ -0,0 +1 @@ +286 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-205.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-205.in new file mode 100644 index 0000000000000000000000000000000000000000..88efa86aa8d44988f439dab6385e751202144ca5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-205.in @@ -0,0 +1 @@ +7 68 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-206.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-206.ans new file mode 100644 index 0000000000000000000000000000000000000000..8408670ab73ed18753e35cf3c38d607e953cb078 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-206.ans @@ -0,0 +1 @@ +290 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-206.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-206.in new file mode 100644 index 0000000000000000000000000000000000000000..17ed4388dd936203fadd137946b1b14137c9bfb3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-206.in @@ -0,0 +1 @@ +7 69 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-207.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-207.ans new file mode 100644 index 0000000000000000000000000000000000000000..9530e048789a149106a6ed160a04e9a3ae977d56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-207.ans @@ -0,0 +1 @@ +296 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-207.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-207.in new file mode 100644 index 0000000000000000000000000000000000000000..5b2b0e799e5cd41faeb70570e7a34f25f1c05274 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-207.in @@ -0,0 +1 @@ +7 70 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-208.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-208.ans new file mode 100644 index 0000000000000000000000000000000000000000..9524ef4993feceb3bebf11243848a646f264b425 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-208.ans @@ -0,0 +1 @@ +424 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-208.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-208.in new file mode 100644 index 0000000000000000000000000000000000000000..6a0b51f2bcaeba933249fe8577a55d2bcc622832 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-208.in @@ -0,0 +1 @@ +7 100 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-209.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-209.ans new file mode 100644 index 0000000000000000000000000000000000000000..43d371afdd3dc0e2254a507b5a6d7371e10e9860 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-209.ans @@ -0,0 +1 @@ +428 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-209.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-209.in new file mode 100644 index 0000000000000000000000000000000000000000..b6cd441e8aeed39ae6f1564607a4889c9274da9e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-209.in @@ -0,0 +1 @@ +7 101 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-210.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-210.ans new file mode 100644 index 0000000000000000000000000000000000000000..22bab14984cca0a80ff9e8b57d2c6694d464ca43 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-210.ans @@ -0,0 +1 @@ +4303030303030298 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-210.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-210.in new file mode 100644 index 0000000000000000000000000000000000000000..4dd44dbbe12332e289b2f092aaf223c22a75d724 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-210.in @@ -0,0 +1 @@ +7 1000000000000000 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-211.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-211.in new file mode 100644 index 0000000000000000000000000000000000000000..2b329f1dd4df71b57243d8e7135b27a49ee84586 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-211.in @@ -0,0 +1 @@ +7 684386034684694 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-212.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-212.in new file mode 100644 index 0000000000000000000000000000000000000000..df7fdac3a2800d5edf2147193c520fd12f301674 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-212.in @@ -0,0 +1 @@ +7 514936432217396 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-213.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-213.in new file mode 100644 index 0000000000000000000000000000000000000000..ae96e998ffcac266ae786e8801dd11e25702fe92 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-213.in @@ -0,0 +1 @@ +7 237417385076589 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-214.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-214.in new file mode 100644 index 0000000000000000000000000000000000000000..7cec6591b3f929a42aee35ff4a20cddaaecf08b6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-214.in @@ -0,0 +1 @@ +7 351902188064761 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-215.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-215.ans new file mode 100644 index 0000000000000000000000000000000000000000..a28dfebc86477466363c83da1c291eae730fbb08 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-215.ans @@ -0,0 +1 @@ +66524487603530 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-215.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-215.in new file mode 100644 index 0000000000000000000000000000000000000000..ca4317998d97371c0860b1d304e6eb809eb4b85b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-215.in @@ -0,0 +1 @@ +7 15459916133216 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-216.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-216.ans new file mode 100644 index 0000000000000000000000000000000000000000..925c335f8122abd64a05e3ef1c5c809b6db6911e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-216.ans @@ -0,0 +1 @@ +3451112021231176 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-216.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-216.in new file mode 100644 index 0000000000000000000000000000000000000000..6ca3fd826c4b4cd80a6a45cfdf2fc4fabbe5bdc9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-216.in @@ -0,0 +1 @@ +7 802018990849500 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-217.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-217.ans new file mode 100644 index 0000000000000000000000000000000000000000..e76a51295943d0efd4d84a7b51b975b26f3bcacb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-217.ans @@ -0,0 +1 @@ +3370109172208680 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-217.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-217.in new file mode 100644 index 0000000000000000000000000000000000000000..29e39c91c86b03878958692b1cf3d5e2584e8f61 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-217.in @@ -0,0 +1 @@ +7 783194385090751 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-218.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-218.ans new file mode 100644 index 0000000000000000000000000000000000000000..8d3d49e786de702d25342bc240d9332e795e1051 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-218.ans @@ -0,0 +1 @@ +2719128877062266 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-218.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-218.in new file mode 100644 index 0000000000000000000000000000000000000000..48c6e78b5417af458b3b6ac78e579f9465b03b42 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-218.in @@ -0,0 +1 @@ +7 631910231993345 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-219.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-219.ans new file mode 100644 index 0000000000000000000000000000000000000000..2812b1a166f84e46c71b082393bacf3cddd3dad3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-219.ans @@ -0,0 +1 @@ +2986654017868132 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-219.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-219.in new file mode 100644 index 0000000000000000000000000000000000000000..a7c517f225df1993d43bade4490a2f03571f22c6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-219.in @@ -0,0 +1 @@ +7 694081567532736 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-220.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-220.ans new file mode 100644 index 0000000000000000000000000000000000000000..6b3b60d0a2ba6d1a1f777324a73bf0774b6a7cb2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-220.ans @@ -0,0 +1 @@ +2830428412801738 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-220.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-220.in new file mode 100644 index 0000000000000000000000000000000000000000..00b843f35ce07300fb07c15a10850486761c6695 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-220.in @@ -0,0 +1 @@ +7 657775617059560 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-221.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-221.in new file mode 100644 index 0000000000000000000000000000000000000000..ddf1b06aa9b4ca06afa0153e2fcb7cc2d8d100a8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-221.in @@ -0,0 +1 @@ +7 220364193138716 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-222.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-222.in new file mode 100644 index 0000000000000000000000000000000000000000..0b786518ed1ba74e1107e335545fbf40c34bc957 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-222.in @@ -0,0 +1 @@ +7 814116614884167 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-223.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-223.in new file mode 100644 index 0000000000000000000000000000000000000000..97e81bee37c6304df16d6d729a8d41c463ee6969 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-223.in @@ -0,0 +1 @@ +7 356206387754362 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-224.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-224.ans new file mode 100644 index 0000000000000000000000000000000000000000..5e331a157d551983b4f192e7335dac9a0c53aa92 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-224.ans @@ -0,0 +1 @@ +3034454445888122 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-224.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-224.in new file mode 100644 index 0000000000000000000000000000000000000000..7adb7acec050572581f31f8c54e31faaccb68224 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-224.in @@ -0,0 +1 @@ +7 705190117706396 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-225.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-225.ans new file mode 100644 index 0000000000000000000000000000000000000000..f07460017897efcdf13ff6c1affe7460dba49691 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-225.ans @@ -0,0 +1 @@ +1416972253493200 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-225.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-225.in new file mode 100644 index 0000000000000000000000000000000000000000..a51bb4a0bcc9173b083b79897ffd4d6e1a43c1ac --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-225.in @@ -0,0 +1 @@ +7 329296368769548 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-226.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-226.ans new file mode 100644 index 0000000000000000000000000000000000000000..665b22af41656de5e33117c54b9d3079bfd2ea08 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-226.ans @@ -0,0 +1 @@ +2533937307764418 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-226.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-226.in new file mode 100644 index 0000000000000000000000000000000000000000..522ef31c52797a3b0831045ca37e6bda542cdf4c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-226.in @@ -0,0 +1 @@ +7 588872754621310 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-227.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-227.ans new file mode 100644 index 0000000000000000000000000000000000000000..6550a0bdd0fbc9fae7cc67c19c76f8034549e45b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-227.ans @@ -0,0 +1 @@ +4130880431387958 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-227.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-227.in new file mode 100644 index 0000000000000000000000000000000000000000..6734b4dcd343efcc5dd3ce69608c8f76f990661c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-227.in @@ -0,0 +1 @@ +7 959993339688752 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-228.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-228.ans new file mode 100644 index 0000000000000000000000000000000000000000..e24cf847511920a6b7f97dd9778ada02986ad47e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-228.ans @@ -0,0 +1 @@ +1074705788974006 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-228.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-228.in new file mode 100644 index 0000000000000000000000000000000000000000..f0578b5e6dbdacc515afb440eedce1e9df68542a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-228.in @@ -0,0 +1 @@ +7 249755570677059 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-229.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-229.ans new file mode 100644 index 0000000000000000000000000000000000000000..a683929ec28fde62a8c51017a670698246e626e9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-229.ans @@ -0,0 +1 @@ +118740224449026 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-230.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-230.ans new file mode 100644 index 0000000000000000000000000000000000000000..c927bf0cd332d8cee0f5afa45daf00ab6f6b7dc0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-230.ans @@ -0,0 +1 @@ +3712362233547596 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-230.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-230.in new file mode 100644 index 0000000000000000000000000000000000000000..37632cc676347cbec400082d117587e15abc68e4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-230.in @@ -0,0 +1 @@ +7 862732068359654 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-231.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-231.ans new file mode 100644 index 0000000000000000000000000000000000000000..9fa2fd3c694451b032ca78c4dd1772ba599b29b3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-231.ans @@ -0,0 +1 @@ +943109092711410 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-231.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-231.in new file mode 100644 index 0000000000000000000000000000000000000000..6eeb9a72a84c164fb7d95f5d8fad3a4a3b222759 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-231.in @@ -0,0 +1 @@ +7 219173239855470 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-232.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-232.ans new file mode 100644 index 0000000000000000000000000000000000000000..eeeed009649e5b43f1ee977c703266275daf5443 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-232.ans @@ -0,0 +1 @@ +3899236230975270 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-233.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-233.ans new file mode 100644 index 0000000000000000000000000000000000000000..cd687d354f153330e96faa299846c51a1544c221 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-233.ans @@ -0,0 +1 @@ +2401271902349804 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-233.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-233.in new file mode 100644 index 0000000000000000000000000000000000000000..5a2fa760a23dfa6c3d105ccb08875867296b69bd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-233.in @@ -0,0 +1 @@ +7 558042061813688 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-234.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-234.ans new file mode 100644 index 0000000000000000000000000000000000000000..a83984fa529d51e4316117dcf336f1a4a1ab0e93 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-234.ans @@ -0,0 +1 @@ +2477773449033518 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-234.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-234.in new file mode 100644 index 0000000000000000000000000000000000000000..336990c76194ab258a4d1eb33ef142f44d858de8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-234.in @@ -0,0 +1 @@ +7 575820590268354 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-235.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-235.ans new file mode 100644 index 0000000000000000000000000000000000000000..2175480152860ffb389bfe5255c3e6fd15f8a490 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-235.ans @@ -0,0 +1 @@ +3536697328403296 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-235.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-235.in new file mode 100644 index 0000000000000000000000000000000000000000..85b09b039efc05d3afb0a2daf838425fd8c2edd2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-235.in @@ -0,0 +1 @@ +7 821908534065556 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-236.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-236.ans new file mode 100644 index 0000000000000000000000000000000000000000..1d0988bd4ec65765a75f577753e7b6e6ccf792fc --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-236.ans @@ -0,0 +1 @@ +3859730634749962 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-236.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-236.in new file mode 100644 index 0000000000000000000000000000000000000000..e30a8a139e2ff2cb81700994886439fbaca7c9b4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-236.in @@ -0,0 +1 @@ +7 896979654554570 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-237.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-237.in new file mode 100644 index 0000000000000000000000000000000000000000..dfd4cfad968d253514644f96a45b76b0fb08252f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-237.in @@ -0,0 +1 @@ +7 278271519959955 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-238.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-238.ans new file mode 100644 index 0000000000000000000000000000000000000000..81e6fa153e4d32a4b6fe58584c402f8e7cce8a8e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-238.ans @@ -0,0 +1 @@ +3663786106291526 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-238.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-238.in new file mode 100644 index 0000000000000000000000000000000000000000..b44f7aadc0fcc23ca077740edbe482057cba46de --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-238.in @@ -0,0 +1 @@ +7 851443250053666 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-239.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-239.ans new file mode 100644 index 0000000000000000000000000000000000000000..b3b43798bb0a9454916c31472a7cf7229b827553 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-239.ans @@ -0,0 +1 @@ +2805411466424146 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-239.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-239.in new file mode 100644 index 0000000000000000000000000000000000000000..4c30c72d831587130c8e88b1bd065641ea77e8b9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-239.in @@ -0,0 +1 @@ +7 651961819661951 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-240.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-240.ans new file mode 100644 index 0000000000000000000000000000000000000000..d1ef884e08f26ab74fd627e394997d9c63d287ad --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-240.ans @@ -0,0 +1 @@ +1134427194500610 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-240.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-240.in new file mode 100644 index 0000000000000000000000000000000000000000..441bad6445682842ba4410725a59dbd6fac5de89 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-240.in @@ -0,0 +1 @@ +7 263634488862819 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-241.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-241.ans new file mode 100644 index 0000000000000000000000000000000000000000..8e6fa60aecb175a1ce5163b3a05bec9f64b1049f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-241.ans @@ -0,0 +1 @@ +3160170358135324 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-241.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-241.in new file mode 100644 index 0000000000000000000000000000000000000000..e2f1436d54785fb45cdc6b78a6b61cd27e6d9686 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-241.in @@ -0,0 +1 @@ +7 734405787453985 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-242.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-242.ans new file mode 100644 index 0000000000000000000000000000000000000000..19ada4de5b643d8a10a65487698424c0b5e4506f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-242.ans @@ -0,0 +1 @@ +2988374430429870 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-242.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-242.in new file mode 100644 index 0000000000000000000000000000000000000000..48581ecc414edb11471e1521e8e1437167851ade --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-242.in @@ -0,0 +1 @@ +7 694481381719619 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-243.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-243.ans new file mode 100644 index 0000000000000000000000000000000000000000..a6890d1c4b4ed325dc33f7bf2c2fd6cac371c508 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-243.ans @@ -0,0 +1 @@ +2780649810257588 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-243.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-243.in new file mode 100644 index 0000000000000000000000000000000000000000..983f13ebded94a09d52af43fc9dc0cda3728d37a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-243.in @@ -0,0 +1 @@ +7 646207350271131 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-244.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-244.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-244.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-245.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-245.ans new file mode 100644 index 0000000000000000000000000000000000000000..573541ac9702dd3969c9bc859d2b91ec1f7e6e56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-245.ans @@ -0,0 +1 @@ +0 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-247.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-247.ans new file mode 100644 index 0000000000000000000000000000000000000000..48082f72f087ce7e6fa75b9c41d7387daecd447b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-247.ans @@ -0,0 +1 @@ +12 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-247.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-247.in new file mode 100644 index 0000000000000000000000000000000000000000..18bc02678d193629d8fd901fd613aa2668086a88 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-247.in @@ -0,0 +1 @@ +8 4 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-248.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-248.ans new file mode 100644 index 0000000000000000000000000000000000000000..3c032078a4a21c5c51d3c93d91717c1dabbb8cd0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-248.ans @@ -0,0 +1 @@ +18 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-248.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-248.in new file mode 100644 index 0000000000000000000000000000000000000000..cfe1ce6be153750877a93771c2183ae2dd5cba83 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-248.in @@ -0,0 +1 @@ +8 5 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-249.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-249.ans new file mode 100644 index 0000000000000000000000000000000000000000..2bd5a0a98a36cc08ada88b804d3be047e6aa5b8a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-249.ans @@ -0,0 +1 @@ +22 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-249.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-249.in new file mode 100644 index 0000000000000000000000000000000000000000..25bf1347ee5411deaaf3532637d6568e29bdb7b6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-249.in @@ -0,0 +1 @@ +8 6 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-250.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-250.ans new file mode 100644 index 0000000000000000000000000000000000000000..6f4247a6255c99f420d1df558d68745592862ff7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-250.ans @@ -0,0 +1 @@ +26 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-251.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-251.ans new file mode 100644 index 0000000000000000000000000000000000000000..f5c89552bd3e62bfce023a230e90d141f7a46b2f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-251.ans @@ -0,0 +1 @@ +32 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-251.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-251.in new file mode 100644 index 0000000000000000000000000000000000000000..99ca15399f960d2c36bd34b24db2178857aca917 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-251.in @@ -0,0 +1 @@ +8 8 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-252.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-252.ans new file mode 100644 index 0000000000000000000000000000000000000000..7facc89938bbc5635e3d36ffa56b4c85e9b07db8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-252.ans @@ -0,0 +1 @@ +36 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-252.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-252.in new file mode 100644 index 0000000000000000000000000000000000000000..5438c83d4e9e8a3ae6f48151bdcc401241a6e261 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-252.in @@ -0,0 +1 @@ +8 9 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-253.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-253.ans new file mode 100644 index 0000000000000000000000000000000000000000..d81cc0710eb6cf9efd5b920a8453e1e07157b6cd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-253.ans @@ -0,0 +1 @@ +42 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-253.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-253.in new file mode 100644 index 0000000000000000000000000000000000000000..3933c1f854201be886d45544b1716c9fba0c69a0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-253.in @@ -0,0 +1 @@ +8 10 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-254.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-254.ans new file mode 100644 index 0000000000000000000000000000000000000000..9e5feb5256930f3cae636754eef8a244ede164eb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-254.ans @@ -0,0 +1 @@ +46 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-254.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-254.in new file mode 100644 index 0000000000000000000000000000000000000000..202d3da17e238b7a3a138005d9ae380fc6e29a32 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-254.in @@ -0,0 +1 @@ +8 11 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-255.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-255.ans new file mode 100644 index 0000000000000000000000000000000000000000..0691f67b202a873c99bdb9b99e15a667cb916a5b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-255.ans @@ -0,0 +1 @@ +52 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-255.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-255.in new file mode 100644 index 0000000000000000000000000000000000000000..131a6791bdcc9b8578c85a3823510ceb3d8225fd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-255.in @@ -0,0 +1 @@ +8 12 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-256.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-256.ans new file mode 100644 index 0000000000000000000000000000000000000000..8c61d23e125b800e69cb950b09e23c06f728fff9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-256.ans @@ -0,0 +1 @@ +58 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-256.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-256.in new file mode 100644 index 0000000000000000000000000000000000000000..d139cb85dcfdfef0020af1c86c56edc900e4c033 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-256.in @@ -0,0 +1 @@ +8 13 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-257.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-257.in new file mode 100644 index 0000000000000000000000000000000000000000..fd8ae6bf2afa9dda3ddc5de94a1c4e4666b9d4cd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-257.in @@ -0,0 +1 @@ +8 14 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-258.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-258.ans new file mode 100644 index 0000000000000000000000000000000000000000..2bbd69c2e548374bb9a87e06a2cfe52136f28465 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-258.ans @@ -0,0 +1 @@ +70 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-258.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-258.in new file mode 100644 index 0000000000000000000000000000000000000000..1accda1fff18676a7c74cbb49ca00c9c07f0c3ef --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-258.in @@ -0,0 +1 @@ +8 15 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-259.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-259.in new file mode 100644 index 0000000000000000000000000000000000000000..901a53006893b770d9a0cbd177272632097cd3a9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-259.in @@ -0,0 +1 @@ +8 16 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-260.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-260.ans new file mode 100644 index 0000000000000000000000000000000000000000..d15a2cc44e31b14c65264271b81072e5ba0e1634 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-260.ans @@ -0,0 +1 @@ +80 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-260.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-260.in new file mode 100644 index 0000000000000000000000000000000000000000..433ac27ce723c770c564e51ac72cd9e5b0da4e07 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-260.in @@ -0,0 +1 @@ +8 17 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-261.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-261.ans new file mode 100644 index 0000000000000000000000000000000000000000..d22307c427b8327474aa1a2e1de926b73e70b33c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-261.ans @@ -0,0 +1 @@ +88 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-261.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-261.in new file mode 100644 index 0000000000000000000000000000000000000000..463e1200f0c5f19972dc3cf5bd7740e536aa3e7c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-261.in @@ -0,0 +1 @@ +8 18 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-262.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-262.in new file mode 100644 index 0000000000000000000000000000000000000000..c814482d93854a89e8bfb8e56b20d81354d5020c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-262.in @@ -0,0 +1 @@ +8 19 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-263.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-263.in new file mode 100644 index 0000000000000000000000000000000000000000..b7671d72044a47615bb91a5c58199ad0d1b5205e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-263.in @@ -0,0 +1 @@ +8 20 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-265.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-265.in new file mode 100644 index 0000000000000000000000000000000000000000..0b62a7ae5208237f3f1c6689cdb87ce3723244ae --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-265.in @@ -0,0 +1 @@ +8 22 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-266.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-266.ans new file mode 100644 index 0000000000000000000000000000000000000000..4699eb3cc96c4eea1beac608039022c3ec7acfe6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-266.ans @@ -0,0 +1 @@ +116 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-267.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-267.ans new file mode 100644 index 0000000000000000000000000000000000000000..fc902f4f956b349ac5763a01f37a53ee607614d5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-267.ans @@ -0,0 +1 @@ +124 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-267.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-267.in new file mode 100644 index 0000000000000000000000000000000000000000..e5d807a106d3d2bbac8af6e0f7d8fce0dfdd44a5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-267.in @@ -0,0 +1 @@ +8 24 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-268.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-268.ans new file mode 100644 index 0000000000000000000000000000000000000000..4eb9d0d9dbd22693f9e87417c047bc97df268ebf --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-268.ans @@ -0,0 +1 @@ +580 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-269.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-269.ans new file mode 100644 index 0000000000000000000000000000000000000000..af368af278cf299c3d8b4956588c7ded1978af68 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-269.ans @@ -0,0 +1 @@ +584 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-269.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-269.in new file mode 100644 index 0000000000000000000000000000000000000000..5fe1249300678a5134a14da0575cfa6f4e63dc87 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-269.in @@ -0,0 +1 @@ +8 101 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-270.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-270.ans new file mode 100644 index 0000000000000000000000000000000000000000..5fe621e49cb888408d8fe05493bc14d123ad87a7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-270.ans @@ -0,0 +1 @@ +5999999999999980 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-270.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-270.in new file mode 100644 index 0000000000000000000000000000000000000000..c735c9170b62b4b43a6025d4734208adedcc53fd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-270.in @@ -0,0 +1 @@ +8 1000000000000000 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-271.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-271.ans new file mode 100644 index 0000000000000000000000000000000000000000..562091da7d920eea1783c11750ca248a2c2313ca --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-271.ans @@ -0,0 +1 @@ +1415118425781568 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-271.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-271.in new file mode 100644 index 0000000000000000000000000000000000000000..f27f6b22904e84045040509ea474df7151919956 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-271.in @@ -0,0 +1 @@ +8 235853070963598 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-272.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-272.ans new file mode 100644 index 0000000000000000000000000000000000000000..8456ed94f4538b77ca42514e8107071c8c2abed3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-272.ans @@ -0,0 +1 @@ +5916388081386284 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-272.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-272.in new file mode 100644 index 0000000000000000000000000000000000000000..806ee62926f3d594f7e98441c2a0c209ccf30130 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-272.in @@ -0,0 +1 @@ +8 986064680231051 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-273.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-273.ans new file mode 100644 index 0000000000000000000000000000000000000000..288e2dac3fe1039213117bb64902e8a48d5e3872 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-273.ans @@ -0,0 +1 @@ +2306437781918164 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-274.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-274.ans new file mode 100644 index 0000000000000000000000000000000000000000..88581d2de8257d6b78c085569767a65e6f8e75b7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-274.ans @@ -0,0 +1 @@ +468761656384856 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-274.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-274.in new file mode 100644 index 0000000000000000000000000000000000000000..44639b251dbf3660a9000ffafd3ee486d12fa232 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-274.in @@ -0,0 +1 @@ +8 78126942730813 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-275.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-275.ans new file mode 100644 index 0000000000000000000000000000000000000000..2f6646fa88d2d1a03a91c554f82daa0f7e6a68f6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-275.ans @@ -0,0 +1 @@ +5235708432770056 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-275.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-275.in new file mode 100644 index 0000000000000000000000000000000000000000..c0c9e333a09f37adc2b8eabb53bc7575f16b3b6e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-275.in @@ -0,0 +1 @@ +8 872618072128346 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-276.ans b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-276.ans new file mode 100644 index 0000000000000000000000000000000000000000..6a822b4dd52e022883a55f0711371ff1a60b5fd3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-276.ans @@ -0,0 +1 @@ +4696506473877970 diff --git a/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-276.in b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-276.in new file mode 100644 index 0000000000000000000000000000000000000000..80c6aea6ff95e27aefe3ab1ed5db49badd3dc642 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2018/J-uncrossed-knights-tour/data/secret-276.in @@ -0,0 +1 @@ +8 782751078979665 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/sample-1.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/sample-1.ans new file mode 100644 index 0000000000000000000000000000000000000000..920a1396648024dd8985b3cafa24d7156e3b2610 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/sample-1.ans @@ -0,0 +1 @@ +43 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/sample-1.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/sample-1.in new file mode 100644 index 0000000000000000000000000000000000000000..da5fcf07d4217543f480dec1086e960c22f1f60c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/sample-1.in @@ -0,0 +1,4 @@ +3 10 2 +15 1 +2 2 +9 1 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-0018-break-slack.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-0018-break-slack.ans new file mode 100644 index 0000000000000000000000000000000000000000..c67f579c9a811e9614857067f83cdfc7434920bf --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-0018-break-slack.ans @@ -0,0 +1 @@ +93 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-0018-break-slack.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-0018-break-slack.in new file mode 100644 index 0000000000000000000000000000000000000000..c4300598f4d0d5c6be74d5a69c71c7e66d1ff819 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-0018-break-slack.in @@ -0,0 +1,8 @@ +7 3 2 +2 1 +3 17 +11 15 +11 7 +14 5 +11 20 +1 17 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-01.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-01.ans new file mode 100644 index 0000000000000000000000000000000000000000..e522732c77ec94723e739d22f28df549b0231f5f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-01.ans @@ -0,0 +1 @@ +38 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-01.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-01.in new file mode 100644 index 0000000000000000000000000000000000000000..b673f8cfa27b358fb28ecd6d3817abeefe8feb4c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-01.in @@ -0,0 +1,4 @@ +3 5 3 +2 2 +5 5 +7 1 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-02.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-02.ans new file mode 100644 index 0000000000000000000000000000000000000000..8eeea055a51b41653c685fd051a48aad58ab02b5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-02.ans @@ -0,0 +1 @@ +40635 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-02.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-02.in new file mode 100644 index 0000000000000000000000000000000000000000..a064b2a8ac23ab0399bcf6d624ba1c39d14bfd34 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-02.in @@ -0,0 +1,13 @@ +12 138 903 +1 2000 +2 2000 +4 2000 +8 2000 +1 2000 +2 2000 +4 2000 +8 2000 +1 2000 +2 2000 +4 2000 +8 2000 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-03-break-short.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-03-break-short.ans new file mode 100644 index 0000000000000000000000000000000000000000..b28d0fed1a2070cf078a05650dc9094a76cebe4c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-03-break-short.ans @@ -0,0 +1 @@ +1018602 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-03-break-short.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-03-break-short.in new file mode 100644 index 0000000000000000000000000000000000000000..b35ef1cf247ca00d331858843746f21d536c8413 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-03-break-short.in @@ -0,0 +1,600 @@ +599 2 2 +402 298 +404 297 +406 296 +408 295 +410 294 +412 293 +414 292 +416 291 +418 290 +420 289 +422 288 +424 287 +426 286 +428 285 +430 284 +432 283 +434 282 +436 281 +438 280 +440 279 +442 278 +444 277 +446 276 +448 275 +450 274 +452 273 +454 272 +456 271 +458 270 +460 269 +462 268 +464 267 +466 266 +468 265 +470 264 +472 263 +474 262 +476 261 +478 260 +480 259 +482 258 +484 257 +486 256 +488 255 +490 254 +492 253 +494 252 +496 251 +498 250 +500 249 +502 248 +504 247 +506 246 +508 245 +510 244 +512 243 +514 242 +516 241 +518 240 +520 239 +522 238 +524 237 +526 236 +528 235 +530 234 +532 233 +534 232 +536 231 +538 230 +540 229 +542 228 +544 227 +546 226 +548 225 +550 224 +552 223 +554 222 +556 221 +558 220 +560 219 +562 218 +564 217 +566 216 +568 215 +570 214 +572 213 +574 212 +576 211 +578 210 +580 209 +582 208 +584 207 +586 206 +588 205 +590 204 +592 203 +594 202 +596 201 +598 200 +600 199 +602 198 +604 197 +606 196 +608 195 +610 194 +612 193 +614 192 +616 191 +618 190 +620 189 +622 188 +624 187 +626 186 +628 185 +630 184 +632 183 +634 182 +636 181 +638 180 +640 179 +642 178 +644 177 +646 176 +648 175 +650 174 +652 173 +654 172 +656 171 +658 170 +660 169 +662 168 +664 167 +666 166 +668 165 +670 164 +672 163 +674 162 +676 161 +678 160 +680 159 +682 158 +684 157 +686 156 +688 155 +690 154 +692 153 +694 152 +696 151 +698 150 +700 149 +702 148 +704 147 +706 146 +708 145 +710 144 +712 143 +714 142 +716 141 +718 140 +720 139 +722 138 +724 137 +726 136 +728 135 +730 134 +732 133 +734 132 +736 131 +738 130 +740 129 +742 128 +744 127 +746 126 +748 125 +750 124 +752 123 +754 122 +756 121 +758 120 +760 119 +762 118 +764 117 +766 116 +768 115 +770 114 +772 113 +774 112 +776 111 +778 110 +780 109 +782 108 +784 107 +786 106 +788 105 +790 104 +792 103 +794 102 +796 101 +798 100 +800 99 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-04.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-04.ans new file mode 100644 index 0000000000000000000000000000000000000000..f1bc51c274bb3f64665e7d7b7c0cdcaa4c33ba6d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-04.ans @@ -0,0 +1 @@ +122820000 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-04.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-04.in new file mode 100644 index 0000000000000000000000000000000000000000..a7c03e3246bf6f0d73776db7716cc817d4e67b6f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-04.in @@ -0,0 +1,331 @@ +330 2000 2000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-05.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-05.ans new file mode 100644 index 0000000000000000000000000000000000000000..659400d33daaf63d252d6a1c7e82653ea8d39d6b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-05.ans @@ -0,0 +1 @@ +877 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-05.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-05.in new file mode 100644 index 0000000000000000000000000000000000000000..71a36de4804a96be60dcd4e6bb0b7710a35f1ad2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-05.in @@ -0,0 +1,21 @@ +20 3 5 +13 3 +11 13 +12 16 +18 12 +8 39 +16 38 +29 27 +25 40 +13 62 +19 58 +28 53 +46 24 +52 14 +30 55 +56 15 +12 98 +63 15 +33 68 +27 90 +30 91 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-06.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-06.ans new file mode 100644 index 0000000000000000000000000000000000000000..d86a7d0d39a21245d61dc86d63efebe50e6720ac --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-06.ans @@ -0,0 +1 @@ +198494444 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-06.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-06.in new file mode 100644 index 0000000000000000000000000000000000000000..cd573d3d1dc71f33175d9fc2ba16b6f71f3131d3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-06.in @@ -0,0 +1,242 @@ +241 726 797 +1979 952485 +796 438071 +926 145882 +186 38938 +1506 573987 +1704 715938 +1814 1600 +1339 737416 +481 883184 +236 291074 +1303 660045 +796 906613 +323 817487 +143 623998 +365 754193 +1380 748425 +1502 865985 +1897 367697 +714 685543 +1907 350084 +1817 628647 +1688 327185 +1507 462003 +1441 741266 +1882 544931 +1045 889375 +1169 880318 +1338 320429 +1168 606063 +1347 536790 +241 868193 +1691 217471 +889 325679 +1625 678474 +1275 538545 +447 560306 +207 645631 +318 6758 +1819 409545 +1516 869140 +1740 468899 +1700 344982 +1404 52737 +1577 124701 +1479 573284 +385 110604 +710 134605 +1059 374245 +531 415335 +1183 35223 +1449 125057 +460 682613 +1185 230018 +791 787835 +1582 586199 +774 610620 +1679 998998 +1335 928579 +1975 346812 +1791 560563 +1669 407847 +1044 529488 +543 611333 +1628 991430 +1135 967360 +1334 874374 +1138 146731 +1635 821502 +1487 839999 +652 913988 +409 319366 +175 276487 +769 842300 +1031 954033 +1915 761836 +1321 892040 +1811 471954 +1705 61193 +1765 983819 +1369 96164 +1837 630854 +335 860554 +153 887896 +1917 328550 +1571 846042 +323 506838 +1615 902319 +59 756760 +204 643634 +1838 789106 +194 763816 +1700 943591 +911 566650 +1048 559361 +883 23850 +423 146705 +425 708103 +1898 205206 +250 919964 +835 615532 +1308 604226 +1645 237739 +1578 501695 +1390 78287 +311 296935 +1529 527045 +1485 574824 +1411 71197 +309 980811 +1309 205818 +266 936382 +579 703030 +1030 958996 +283 834713 +60 286155 +788 527182 +391 139102 +1655 931008 +1491 216992 +60 215206 +540 41539 +549 489375 +539 476667 +378 841626 +1703 854060 +751 214915 +446 993194 +1013 720554 +630 466022 +1403 19130 +1465 269724 +294 986861 +1612 541045 +1087 177882 +1101 245996 +1820 766031 +1727 843975 +1383 364687 +1773 152783 +744 262136 +327 480533 +1284 394144 +936 161385 +1786 172247 +1803 933658 +1429 723831 +1516 689436 +1832 67455 +1926 181226 +1955 153085 +543 501114 +864 827027 +1657 264739 +684 815336 +1019 933194 +1423 155185 +1404 516436 +1239 351899 +53 277965 +476 7115 +1881 944844 +4 91405 +1215 849816 +127 752012 +380 256549 +1097 104603 +632 875710 +21 883600 +627 833631 +175 283457 +1856 967985 +78 117198 +1659 775560 +1792 723774 +212 497015 +1117 130945 +69 553825 +1124 252751 +916 340628 +641 608355 +802 674594 +457 359113 +1874 34368 +39 227718 +1431 883920 +927 154817 +138 266952 +1529 289213 +1995 445658 +1481 898935 +1856 478753 +91 488472 +1149 875097 +177 846319 +1222 659686 +1926 603362 +655 501203 +1088 166682 +1272 902460 +1939 210388 +1706 172422 +342 516294 +553 81796 +833 518958 +128 768912 +1428 448456 +93 568747 +584 34312 +1592 392176 +1685 269916 +665 35169 +696 964144 +870 685989 +86 389945 +1743 699172 +1839 720654 +848 802805 +446 287362 +940 505553 +1498 415851 +1221 948466 +984 663226 +1524 676938 +216 75420 +414 989545 +1256 504796 +203 910437 +446 789673 +544 926815 +1845 467595 +285 88066 +508 351681 +134 480663 +824 159557 +1343 763810 +1435 242732 +126 334384 +641 102594 +777 395757 +106 753569 +512 734669 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-07-break-short-onufry.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-07-break-short-onufry.ans new file mode 100644 index 0000000000000000000000000000000000000000..bd3b9792c5927cee9d1d47c7b856c185dd8038e2 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-07-break-short-onufry.ans @@ -0,0 +1 @@ +1259901 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-07-break-short-onufry.desc b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-07-break-short-onufry.desc new file mode 100644 index 0000000000000000000000000000000000000000..fda1c51a00838249650437a2fc776d5e315e044c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-07-break-short-onufry.desc @@ -0,0 +1,25 @@ +From Onufry: + +I'll use your "deadline" terminology, so I'll describe a quest using a deadline +and a XP value (instead of an XP value and the value before the XPs get added). +And I'll try to construct a counter-example. Let's set C = V = 2 - so all the +XP values I can reach in the "bonus points" phase are even, and I can set the +deadline to an arbitrary even value. Just to simplify the argument, let's +divide all the XP values by 2 (since they've all been multiplied by C = 2 for +the bonus values), and then I can set the deadline at an arbitrary integer. + +First, take a number of quests with XP values - respectively - 201, 202, 203, +204, 205, ..., 400, and 10 quests with value 200; all with a deadline of 1999. +Using these, I can get any value in the range [200, 1999] (and, of course, +zero). + +Then, take 199 quests with value 1999, and deadline of 399,900. Using these +quests, I'll be able to get values [2199, 3998], then [4198, 5997], and so on, +until [398001, 399800]. + +Then, take 200 quests with value 2000, and a deadline of 400,000. Now, +obviously, starting from zero I can use these 200 quests to get 400,000, and I +can't get any more (since that's the deadline), so that's the correct solution. +However, I can get there only starting from zero - since all the other numbers +I formed thus far are not divisible by 2000. And I have 200 blocks of these +numbers, each containing 1800 numbers - so, that's how far I have to look back. diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-07-break-short-onufry.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-07-break-short-onufry.in new file mode 100644 index 0000000000000000000000000000000000000000..030dacd8643a1a8e4e2b30c8e4731a10d53758e6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-07-break-short-onufry.in @@ -0,0 +1,610 @@ +609 2 2 +201 1799 +202 1798 +203 1797 +204 1796 +205 1795 +206 1794 +207 1793 +208 1792 +209 1791 +210 1790 +211 1789 +212 1788 +213 1787 +214 1786 +215 1785 +216 1784 +217 1783 +218 1782 +219 1781 +220 1780 +221 1779 +222 1778 +223 1777 +224 1776 +225 1775 +226 1774 +227 1773 +228 1772 +229 1771 +230 1770 +231 1769 +232 1768 +233 1767 +234 1766 +235 1765 +236 1764 +237 1763 +238 1762 +239 1761 +240 1760 +241 1759 +242 1758 +243 1757 +244 1756 +245 1755 +246 1754 +247 1753 +248 1752 +249 1751 +250 1750 +251 1749 +252 1748 +253 1747 +254 1746 +255 1745 +256 1744 +257 1743 +258 1742 +259 1741 +260 1740 +261 1739 +262 1738 +263 1737 +264 1736 +265 1735 +266 1734 +267 1733 +268 1732 +269 1731 +270 1730 +271 1729 +272 1728 +273 1727 +274 1726 +275 1725 +276 1724 +277 1723 +278 1722 +279 1721 +280 1720 +281 1719 +282 1718 +283 1717 +284 1716 +285 1715 +286 1714 +287 1713 +288 1712 +289 1711 +290 1710 +291 1709 +292 1708 +293 1707 +294 1706 +295 1705 +296 1704 +297 1703 +298 1702 +299 1701 +300 1700 +301 1699 +302 1698 +303 1697 +304 1696 +305 1695 +306 1694 +307 1693 +308 1692 +309 1691 +310 1690 +311 1689 +312 1688 +313 1687 +314 1686 +315 1685 +316 1684 +317 1683 +318 1682 +319 1681 +320 1680 +321 1679 +322 1678 +323 1677 +324 1676 +325 1675 +326 1674 +327 1673 +328 1672 +329 1671 +330 1670 +331 1669 +332 1668 +333 1667 +334 1666 +335 1665 +336 1664 +337 1663 +338 1662 +339 1661 +340 1660 +341 1659 +342 1658 +343 1657 +344 1656 +345 1655 +346 1654 +347 1653 +348 1652 +349 1651 +350 1650 +351 1649 +352 1648 +353 1647 +354 1646 +355 1645 +356 1644 +357 1643 +358 1642 +359 1641 +360 1640 +361 1639 +362 1638 +363 1637 +364 1636 +365 1635 +366 1634 +367 1633 +368 1632 +369 1631 +370 1630 +371 1629 +372 1628 +373 1627 +374 1626 +375 1625 +376 1624 +377 1623 +378 1622 +379 1621 +380 1620 +381 1619 +382 1618 +383 1617 +384 1616 +385 1615 +386 1614 +387 1613 +388 1612 +389 1611 +390 1610 +391 1609 +392 1608 +393 1607 +394 1606 +395 1605 +396 1604 +397 1603 +398 1602 +399 1601 +400 1600 +200 1800 +200 1800 +200 1800 +200 1800 +200 1800 +200 1800 +200 1800 +200 1800 +200 1800 +200 1800 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +1999 397992 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 +2000 398001 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-09-primes.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-09-primes.ans new file mode 100644 index 0000000000000000000000000000000000000000..0bd9abdfa14977d9fa91af5afcda5f921ad024dc --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-09-primes.ans @@ -0,0 +1 @@ +1957429653 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-09-primes.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-09-primes.in new file mode 100644 index 0000000000000000000000000000000000000000..71acc935c7b31db9332cdaba041541a4ba4ffcc5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-09-primes.in @@ -0,0 +1,1856 @@ +1855 1951 1993 +1933 623343 +1997 551161 +1979 972274 +1951 507351 +1979 991140 +1979 921103 +1951 503322 +1979 508257 +1901 953277 +1933 527915 +1949 527007 +1951 669633 +1931 566637 +1951 879044 +1907 582244 +1913 870529 +1949 919534 +1987 638722 +1997 904985 +1949 560983 +1997 898791 +1993 911820 +1931 731231 +1993 986340 +1901 820104 +1997 683866 +1901 828730 +1907 660307 +1907 716581 +1993 992406 +1997 773024 +1973 805272 +1979 838980 +1979 953178 +1907 663533 +1979 935794 +1993 700624 +1979 633150 +1997 932590 +1951 700133 +1993 561501 +1973 761713 +1997 890422 +1907 850536 +1987 532579 +1901 638540 +1987 885060 +1951 945101 +1951 585774 +1913 886493 +1973 689839 +1949 645790 +1979 616696 +1913 681943 +1933 869452 +1993 782763 +1987 691131 +1931 922266 +1997 635609 +1973 566815 +1997 818840 +1913 968694 +1913 771714 +1931 818184 +1987 695688 +1933 658101 +1973 810777 +1999 507640 +1973 601896 +1913 516486 +1973 667512 +1979 796152 +1933 636940 +1907 710933 +1901 600890 +1933 972278 +1901 988269 +1973 718229 +1993 947329 +1973 859208 +1951 999593 +1987 504103 +1993 959433 +1949 882264 +1973 901172 +1931 584428 +1979 737430 +1907 591435 +1993 963995 +1997 726492 +1999 522369 +1913 954415 +1901 746951 +1907 905258 +1979 530003 +1997 561257 +1987 974020 +1951 659240 +1933 843473 +1933 960880 +1999 693825 +1931 642380 +1987 772911 +1993 567608 +1979 973390 +1999 724260 +1913 642131 +1973 734460 +1993 514096 +1987 999364 +1901 858404 +1949 595584 +1951 976109 +1949 714515 +1999 811928 +1913 501388 +1973 736902 +1933 611806 +1949 761109 +1987 767681 +1901 522156 +1931 515980 +1993 692067 +1949 689603 +1949 994742 +1973 847494 +1999 661004 +1913 615594 +1999 915238 +1949 661609 +1949 967924 +1901 606223 +1973 689002 +1993 598552 +1973 893836 +1973 994191 +1987 876988 +1997 759567 +1973 860241 +1973 529113 +1949 647022 +1973 949046 +1913 705141 +1979 814153 +1987 652199 +1973 850136 +1933 762997 +1901 776607 +1973 847949 +1999 504500 +1999 888190 +1907 750487 +1913 695720 +1987 869604 +1997 917612 +1931 918283 +1993 697902 +1979 501450 +1913 613589 +1949 598264 +1931 747440 +1997 967286 +1913 875098 +1997 835800 +1999 693811 +1933 713075 +1993 944411 +1933 640132 +1913 782847 +1993 729205 +1997 851807 +1993 696782 +1933 859359 +1999 817151 +1913 651255 +1913 726062 +1913 728962 +1931 990827 +1987 883520 +1993 668005 +1931 729093 +1993 826985 +1901 511102 +1987 635111 +1949 855452 +1913 994977 +1999 755071 +1999 980580 +1993 528630 +1987 907741 +1979 740184 +1931 759672 +1987 861137 +1973 581441 +1913 743392 +1999 802853 +1951 962089 +1913 624870 +1901 708568 +1913 819266 +1993 671093 +1973 840757 +1979 992354 +1933 823695 +1979 538314 +1907 616041 +1973 850484 +1907 894309 +1901 595230 +1931 866642 +1949 914544 +1907 742300 +1913 988893 +1901 978481 +1999 956538 +1979 646134 +1913 940799 +1933 677443 +1933 750620 +1987 527579 +1933 889882 +1931 509125 +1973 720283 +1949 723848 +1933 603265 +1901 654270 +1951 589926 +1933 666891 +1949 704611 +1907 567005 +1933 688208 +1999 612139 +1949 591148 +1999 614925 +1951 970648 +1979 880324 +1987 897186 +1993 943275 +1949 785228 +1931 769061 +1901 903319 +1979 966406 +1907 843703 +1993 681630 +1949 767998 +1931 703294 +1913 772861 +1951 789534 +1951 592610 +1901 678302 +1951 833861 +1951 797965 +1951 578973 +1973 955703 +1973 812337 +1931 972658 +1979 896578 +1993 910089 +1933 625642 +1913 828275 +1993 803585 +1973 877026 +1979 502311 +1949 715070 +1931 526028 +1951 876234 +1973 773294 +1993 743921 +1933 758658 +1913 782050 +1979 944804 +1933 673123 +1913 777948 +1901 944126 +1997 925195 +1987 555378 +1931 617821 +1979 562497 +1901 916545 +1933 968621 +1979 685408 +1951 743147 +1931 588563 +1933 938463 +1931 937831 +1979 637695 +1993 976145 +1997 974578 +1987 896675 +1913 645249 +1901 571028 +1997 740210 +1987 938623 +1973 714832 +1949 935005 +1999 641022 +1999 799992 +1907 602844 +1993 794787 +1913 670986 +1901 951664 +1949 960937 +1931 837476 +1999 590180 +1951 640041 +1999 580222 +1993 765009 +1949 820858 +1949 921649 +1949 941481 +1951 941504 +1907 604316 +1973 655837 +1973 867909 +1951 902161 +1931 931379 +1931 661377 +1993 861526 +1933 593831 +1907 527565 +1949 526690 +1999 530160 +1951 554076 +1949 537194 +1901 642120 +1901 554840 +1997 958241 +1987 682759 +1913 896272 +1973 828648 +1907 594456 +1973 722805 +1951 519505 +1949 926393 +1951 518450 +1951 681724 +1993 988016 +1913 790765 +1907 809753 +1997 680427 +1993 651271 +1951 968166 +1993 565203 +1997 838267 +1997 772430 +1973 544710 +1993 959750 +1933 902590 +1973 519378 +1949 766066 +1973 781761 +1979 943142 +1979 728020 +1951 653233 +1901 931765 +1993 782786 +1973 789927 +1913 599844 +1999 538357 +1931 882155 +1973 887840 +1913 536882 +1979 789437 +1933 883383 +1973 670449 +1999 965657 +1907 625365 +1901 580863 +1933 669322 +1913 714497 +1931 531654 +1987 512970 +1999 535896 +1901 915983 +1999 888317 +1907 765582 +1901 642809 +1979 657618 +1933 811126 +1979 793747 +1973 903287 +1931 799529 +1907 987499 +1931 853002 +1999 904167 +1907 975178 +1907 724413 +1931 767144 +1933 954218 +1901 991315 +1973 780581 +1913 600062 +1999 799268 +1979 629043 +1997 896485 +1933 535237 +1901 615664 +1907 970248 +1999 815972 +1979 646848 +1913 599217 +1999 905739 +1999 622926 +1979 880908 +1949 831606 +1931 606467 +1949 800890 +1993 836471 +1987 631574 +1973 925619 +1973 898757 +1907 999535 +1997 864816 +1949 973935 +1979 831471 +1987 924331 +1949 753385 +1951 645048 +1973 696732 +1987 601656 +1979 696724 +1999 719750 +1979 554461 +1987 553149 +1993 847121 +1933 596599 +1931 644026 +1987 805413 +1931 651283 +1997 987949 +1999 981704 +1999 644705 +1979 950693 +1999 736779 +1997 623593 +1999 906160 +1933 923808 +1987 744212 +1993 910302 +1949 829898 +1973 892047 +1949 741414 +1949 643718 +1933 506511 +1973 830014 +1949 787847 +1933 593974 +1973 773653 +1933 651131 +1907 676372 +1979 560511 +1933 776080 +1933 559151 +1933 729433 +1931 786875 +1949 939803 +1913 542305 +1993 712961 +1901 715275 +1999 538396 +1933 690079 +1913 946416 +1973 968932 +1901 545863 +1907 706746 +1907 552050 +1907 789054 +1999 893909 +1907 740755 +1949 506595 +1933 902354 +1999 529420 +1913 782077 +1949 915613 +1987 530850 +1979 784398 +1973 743751 +1907 963908 +1987 628705 +1949 768375 +1973 697648 +1999 855896 +1901 937113 +1997 811434 +1949 987811 +1913 604977 +1973 996880 +1913 767591 +1993 500004 +1931 572778 +1987 849698 +1987 927611 +1949 804991 +1949 841344 +1993 687077 +1931 516925 +1999 528417 +1973 906071 +1979 909438 +1901 723192 +1987 628775 +1993 783388 +1913 940513 +1973 652343 +1931 750751 +1987 697388 +1931 855710 +1997 790098 +1993 663321 +1951 796058 +1979 752752 +1949 971633 +1979 973461 +1999 756523 +1951 868470 +1951 548272 +1973 738906 +1907 688858 +1907 515892 +1913 754493 +1933 791626 +1931 547500 +1949 699610 +1931 653921 +1901 751970 +1979 699642 +1907 903030 +1913 725086 +1979 817248 +1907 939154 +1997 599075 +1979 725627 +1913 732941 +1993 779166 +1907 634962 +1901 924854 +1949 695509 +1949 617639 +1973 569205 +1931 929300 +1999 510944 +1907 569240 +1993 596476 +1951 567751 +1901 960196 +1987 683554 +1933 944190 +1973 906782 +1993 828982 +1951 774007 +1907 863435 +1901 749252 +1979 632767 +1973 807107 +1951 978656 +1951 806794 +1931 704414 +1997 814449 +1951 742857 +1973 984321 +1973 722131 +1999 906960 +1997 835315 +1901 766831 +1993 565707 +1997 993172 +1913 610252 +1999 585274 +1987 767031 +1907 894773 +1987 581391 +1993 929189 +1951 750248 +1913 598775 +1987 734485 +1949 596449 +1993 676878 +1913 787293 +1931 816550 +1933 965886 +1901 559913 +1907 936166 +1949 598988 +1997 540675 +1997 966031 +1901 767843 +1997 976635 +1933 715928 +1901 504345 +1907 626260 +1999 586163 +1979 874233 +1979 959631 +1913 634941 +1907 589570 +1949 904716 +1949 519683 +1931 993723 +1933 995633 +1907 534215 +1999 909316 +1901 990711 +1987 607772 +1997 600719 +1973 837955 +1999 678232 +1933 718210 +1901 936262 +1987 901333 +1933 925209 +1951 728027 +1999 631472 +1951 519064 +1931 989402 +1949 597625 +1907 926507 +1993 727262 +1913 816502 +1931 664485 +1949 574274 +1973 992715 +1949 665637 +1979 707828 +1913 883520 +1997 685742 +1913 741319 +1973 660050 +1913 784987 +1987 644942 +1973 623717 +1999 615519 +1993 673765 +1999 732888 +1987 884557 +1913 928690 +1913 712627 +1993 998070 +1999 800070 +1907 699460 +1993 960741 +1949 677941 +1949 864257 +1987 548777 +1901 771416 +1987 719872 +1933 774072 +1931 609465 +1913 778340 +1979 700149 +1993 557616 +1979 879922 +1993 591963 +1907 627371 +1901 690878 +1997 854212 +1993 885443 +1987 917401 +1997 645986 +1993 738445 +1901 709101 +1987 610037 +1901 808460 +1951 913245 +1907 545349 +1901 759230 +1931 973375 +1999 960064 +1901 897906 +1993 791154 +1999 752579 +1997 503258 +1987 710200 +1907 886213 +1979 603204 +1973 579013 +1949 532992 +1987 807134 +1951 830135 +1933 694461 +1999 752647 +1973 957208 +1933 539747 +1993 745819 +1933 631835 +1999 509555 +1933 761121 +1987 587321 +1933 804806 +1907 844352 +1933 750824 +1901 895673 +1907 618766 +1913 614213 +1901 649978 +1979 505681 +1999 848854 +1951 827756 +1973 546346 +1913 899731 +1901 825875 +1999 956415 +1907 886862 +1987 893145 +1951 997178 +1949 856542 +1901 965079 +1997 823274 +1979 998324 +1951 611526 +1913 822898 +1931 668907 +1993 580679 +1949 988253 +1949 939420 +1907 967522 +1979 674522 +1987 648251 +1913 784731 +1993 669836 +1901 803097 +1913 559462 +1907 644293 +1931 643867 +1973 679155 +1931 843075 +1907 852880 +1907 972632 +1907 958654 +1997 851995 +1951 687442 +1913 868615 +1997 667125 +1949 517196 +1913 968959 +1901 682057 +1973 869468 +1993 980712 +1913 573082 +1987 912580 +1951 994963 +1951 603637 +1999 641053 +1987 903796 +1907 848414 +1901 639127 +1949 726593 +1907 814972 +1999 842554 +1993 654148 +1993 778490 +1931 755794 +1999 600469 +1933 827174 +1951 972238 +1999 697496 +1987 639916 +1933 516997 +1979 989840 +1997 655789 +1907 772684 +1931 647920 +1901 999096 +1973 776147 +1933 789202 +1931 657747 +1901 816440 +1951 933750 +1933 823082 +1993 899858 +1907 815311 +1979 702681 +1901 733871 +1999 629885 +1997 557103 +1907 597863 +1973 506235 +1907 909793 +1907 845115 +1973 561042 +1901 934123 +1997 562006 +1933 736513 +1931 554434 +1931 702788 +1987 693447 +1951 946881 +1951 534593 +1949 698295 +1933 825943 +1931 658333 +1907 536496 +1999 604308 +1913 767165 +1901 902151 +1999 551120 +1973 572399 +1901 943752 +1987 905605 +1973 957724 +1979 677362 +1999 796370 +1931 689749 +1951 590967 +1901 884521 +1949 864855 +1931 835210 +1933 927188 +1999 950745 +1951 836998 +1997 538277 +1913 794012 +1913 957136 +1987 612130 +1987 736456 +1997 928220 +1933 512205 +1949 527277 +1931 974625 +1913 747070 +1907 895225 +1907 876534 +1987 747547 +1951 592784 +1951 565822 +1931 583558 +1999 790577 +1933 605665 +1949 844254 +1907 721763 +1913 588766 +1901 614264 +1999 540912 +1901 508172 +1951 585848 +1973 609092 +1931 753064 +1913 554613 +1979 929752 +1993 640928 +1913 621427 +1949 611981 +1993 904390 +1933 942488 +1949 591928 +1987 711317 +1901 752859 +1987 545082 +1913 540868 +1999 783211 +1913 899280 +1901 834681 +1907 548825 +1997 905365 +1997 652870 +1987 757940 +1949 776818 +1973 671169 +1901 624701 +1931 505705 +1979 608736 +1907 641008 +1951 793220 +1997 917653 +1931 952658 +1997 981929 +1999 558293 +1901 867495 +1979 763196 +1999 884569 +1999 631709 +1999 915085 +1901 794072 +1907 532502 +1913 905639 +1993 786041 +1907 710793 +1973 617637 +1993 871685 +1993 983409 +1913 793108 +1907 524940 +1987 659930 +1901 513112 +1907 821884 +1979 826635 +1933 869141 +1949 732504 +1993 716431 +1951 739030 +1901 644435 +1999 622007 +1933 746544 +1931 828924 +1907 713687 +1951 800683 +1949 872194 +1987 672036 +1979 830603 +1999 908578 +1913 764592 +1999 544858 +1901 762458 +1933 624216 +1993 631827 +1993 938557 +1979 982719 +1997 935749 +1951 929156 +1931 714749 +1949 888426 +1949 904916 +1901 610046 +1999 547401 +1973 668334 +1997 712888 +1901 921280 +1949 912424 +1931 958502 +1979 814836 +1931 939866 +1999 517957 +1999 936655 +1933 900298 +1901 754184 +1987 762761 +1901 692041 +1933 860263 +1951 710591 +1987 745228 +1999 783543 +1999 996205 +1901 541859 +1997 764508 +1913 677333 +1931 789597 +1997 927303 +1979 553986 +1913 746689 +1999 572195 +1931 830968 +1997 950429 +1999 775430 +1999 645244 +1951 934490 +1907 554885 +1931 892489 +1973 999543 +1951 698802 +1933 532228 +1931 930083 +1931 840868 +1949 882766 +1997 892212 +1931 858524 +1979 691707 +1913 812006 +1973 901788 +1987 507210 +1907 635422 +1931 553474 +1973 598336 +1901 834380 +1933 701799 +1933 992778 +1951 559811 +1901 736371 +1997 949401 +1999 660968 +1979 600596 +1993 697384 +1987 922572 +1979 526933 +1901 604119 +1973 853732 +1951 863789 +1999 701063 +1993 699921 +1999 771494 +1913 678046 +1901 995106 +1999 637383 +1993 779398 +1913 522626 +1951 934494 +1907 716176 +1949 928995 +1993 540323 +1973 624447 +1901 931841 +1931 617736 +1933 748346 +1907 821734 +1993 705738 +1979 659261 +1973 620921 +1931 655934 +1973 724870 +1951 806061 +1913 898703 +1907 877954 +1907 680848 +1987 887108 +1901 984420 +1951 572540 +1951 752735 +1979 843092 +1949 785571 +1973 662288 +1933 670427 +1951 809429 +1933 855180 +1997 735759 +1901 627395 +1931 532795 +1931 696468 +1933 617554 +1979 845762 +1901 646996 +1913 890187 +1907 963688 +1913 556610 +1979 855975 +1901 923387 +1907 727763 +1973 871278 +1931 550867 +1997 999091 +1999 537469 +1997 832074 +1993 616085 +1913 551797 +1997 752701 +1999 939877 +1997 543334 +1993 916879 +1987 643359 +1999 931073 +1901 847640 +1979 698534 +1987 809262 +1901 550672 +1949 586887 +1999 602760 +1999 648660 +1973 623068 +1979 681855 +1933 758776 +1901 823844 +1951 541895 +1993 802085 +1931 852902 +1931 879487 +1931 855924 +1987 742660 +1979 991055 +1987 788253 +1987 827208 +1999 795934 +1933 821010 +1979 737127 +1933 691384 +1949 616437 +1951 787455 +1933 611405 +1951 551568 +1933 958741 +1973 701357 +1951 674069 +1949 609645 +1999 885276 +1973 742625 +1933 914994 +1973 959272 +1993 621341 +1949 736214 +1901 602214 +1997 973899 +1987 654180 +1931 811019 +1973 531775 +1933 811084 +1997 717404 +1951 923978 +1997 552493 +1931 753863 +1907 784257 +1913 813009 +1901 995831 +1987 716226 +1933 619057 +1913 715000 +1933 945618 +1907 702948 +1993 995473 +1999 999657 +1901 505955 +1951 655471 +1907 977041 +1999 911253 +1933 923689 +1907 718599 +1951 629963 +1933 914837 +1901 520312 +1951 517327 +1993 872493 +1999 578693 +1949 866974 +1933 574332 +1933 717475 +1997 546542 +1979 721967 +1997 616994 +1913 536164 +1949 876570 +1997 618822 +1933 643195 +1987 622474 +1901 854401 +1951 792482 +1987 997365 +1933 709957 +1933 802844 +1951 938364 +1999 602174 +1951 941673 +1901 717945 +1907 638706 +1931 989614 +1949 612225 +1949 975346 +1907 620856 +1907 755668 +1913 809618 +1901 780563 +1999 672322 +1979 995468 +1949 792573 +1997 521188 +1973 743491 +1901 963959 +1951 622213 +1997 553440 +1973 921137 +1931 753976 +1987 546311 +1907 784521 +1993 798083 +1951 967464 +1913 601965 +1987 680364 +1901 877599 +1993 703626 +1979 912846 +1999 954952 +1973 842916 +1901 631510 +1997 960457 +1913 644653 +1951 761208 +1933 565336 +1997 692385 +1933 936490 +1997 965432 +1901 836178 +1949 804190 +1973 594086 +1993 502943 +1907 508115 +1933 791698 +1951 581694 +1979 970779 +1997 612797 +1979 768513 +1993 864626 +1949 938113 +1913 526571 +1949 563411 +1933 968704 +1907 755875 +1993 607366 +1949 718071 +1901 526149 +1901 851765 +1933 907033 +1993 881419 +1987 619361 +1999 739565 +1997 658850 +1999 709610 +1907 917892 +1901 558885 +1997 686947 +1901 645203 +1931 767103 +1913 553051 +1901 811711 +1993 882200 +1931 739425 +1973 643969 +1933 623825 +1979 954607 +1913 594345 +1901 881285 +1973 831970 +1987 856802 +1931 607463 +1987 937127 +1901 893377 +1987 788186 +1979 923869 +1999 784901 +1901 965935 +1913 794117 +1993 693659 +1933 547332 +1979 893937 +1951 906047 +1951 575053 +1949 609987 +1901 757747 +1913 759922 +1913 996401 +1993 954813 +1933 552761 +1993 638472 +1973 891856 +1951 919063 +1913 940635 +1949 866521 +1933 559314 +1949 801323 +1901 645514 +1907 957959 +1931 726300 +1999 621177 +1913 513878 +1999 863473 +1933 884549 +1907 522994 +1951 920445 +1951 599334 +1973 823454 +1913 565262 +1987 788205 +1931 582356 +1901 996215 +1999 631754 +1931 842119 +1979 853748 +1973 839151 +1951 925587 +1997 716531 +1987 931440 +1907 979587 +1999 673596 +1907 781009 +1987 534063 +1979 846533 +1997 722521 +1987 743050 +1973 769871 +1931 854237 +1933 709715 +1979 872438 +1933 833025 +1997 849536 +1933 774344 +1931 536899 +1931 851465 +1993 946524 +1993 983084 +1993 762433 +1999 916842 +1999 878716 +1901 848208 +1993 762021 +1993 623987 +1979 500489 +1993 523992 +1907 894658 +1979 582189 +1913 833049 +1951 629701 +1997 856602 +1949 730850 +1997 520163 +1931 561768 +1931 545650 +1979 709150 +1997 785316 +1979 783179 +1951 879776 +1973 879778 +1901 512309 +1933 736890 +1949 528197 +1999 921384 +1901 809719 +1949 626942 +1913 850569 +1973 615278 +1993 915520 +1907 864546 +1949 565974 +1951 797860 +1993 702992 +1973 798340 +1949 543872 +1993 999905 +1931 822396 +1907 798141 +1999 702087 +1987 534522 +1907 627422 +1987 561146 +1997 853720 +1987 940625 +1993 798266 +1907 965528 +1933 852702 +1931 977606 +1997 787969 +1951 778146 +1973 874981 +1931 636925 +1951 704869 +1987 706252 +1973 527302 +1933 954761 +1997 828683 +1999 797245 +1979 716472 +1987 567564 +1993 698320 +1987 885514 +1997 784554 +1901 531851 +1949 942339 +1933 929136 +1973 749459 +1913 614001 +1931 731610 +1999 949122 +1949 545897 +1913 927797 +1987 976926 +1993 539518 +1931 824574 +1993 513759 +1931 777020 +1993 670776 +1973 975153 +1901 677438 +1931 827619 +1973 744864 +1913 947080 +1973 542574 +1973 773146 +1997 627469 +1901 922967 +1997 649506 +1907 675581 +1999 860307 +1993 670490 +1949 538456 +1987 887186 +1993 800389 +1933 641686 +1949 747257 +1993 984944 +1931 914862 +1933 914833 +1987 976523 +1931 763714 +1949 514291 +1949 699240 +1951 817607 +1913 925160 +1901 769386 +1901 603221 +1993 654588 +1901 946455 +1951 547481 +1933 759582 +1973 749144 +1993 915668 +1979 906515 +1907 765988 +1951 530174 +1973 684766 +1999 539980 +1913 560887 +1999 683699 +1987 716974 +1949 904148 +1913 609748 +1933 973701 +1997 711298 +1993 600509 +1931 608615 +1901 958378 +1973 515488 +1913 888405 +1901 742220 +1993 606802 +1907 757794 +1901 870997 +1907 899844 +1913 725464 +1951 619083 +1913 542749 +1931 506011 +1951 592130 +1913 605149 +1933 996787 +1907 832512 +1933 944374 +1987 783639 +1987 624264 +1987 875314 +1949 668268 +1999 910250 +1987 658867 +1997 866781 +1979 735178 +1951 573015 +1933 790793 +1979 514031 +1987 739418 +1933 896359 +1933 766200 +1997 857985 +1997 586661 +1949 846635 +1907 502062 +1931 540445 +1973 995804 +1931 865614 +1973 583898 +1979 934896 +1907 916378 +1993 949543 +1999 892213 +1979 609737 +1987 555125 +1973 812563 +1979 714602 +1997 648939 +1999 920060 +1987 858186 +1949 508979 +1913 710921 +1951 878177 +1997 839261 +1907 514084 +1993 690619 +1901 603798 +1913 656296 +1973 893497 +1913 582814 +1931 501678 +1973 776144 +1993 571929 +1979 746370 +1997 897787 +1913 994275 +1933 559819 +1993 986907 +1997 958067 +1951 958575 +1901 972651 +1979 809189 +1931 699598 +1931 707300 +1997 583593 +1997 906925 +1931 960121 +1979 724541 +1949 789869 +1993 806046 +1973 660108 +1901 865904 +1931 646041 +1931 789659 +1993 877067 +1907 751461 +1913 997718 +1993 926662 +1913 759802 +1931 680299 +1901 777552 +1999 847913 +1907 625080 +1901 795137 +1987 982219 +1987 850492 +1949 908503 +1913 791163 +1949 799056 +1999 704721 +1993 997494 +1987 944786 +1979 917298 +1973 654619 +1999 945196 +1901 948593 +1999 791674 +1933 533295 +1987 839700 +1913 573002 +1931 616576 +1901 621239 +1907 993449 +1949 945968 +1931 616561 +1987 876701 +1933 751915 +1931 681698 +1913 756933 +1933 670378 +1979 739703 +1933 802233 +1997 810404 +1951 698008 +1913 751480 +1987 719845 +1931 902128 +1951 571836 +1913 758711 +1987 917702 +1949 595652 +1931 761757 +1993 673421 +1933 711661 +1999 807872 +1913 799719 +1901 563520 +1933 561786 +1931 743351 +1901 703401 +1907 774477 +1913 926688 +1973 791176 +1999 934765 +1901 791433 +1907 990852 +1993 958278 +1913 521280 +1951 869249 +1907 789837 +1973 920536 +1933 748336 +1913 748094 +1973 515713 +1907 909080 +1993 733908 +1913 571720 +1933 756327 +1993 716952 +1901 591556 +1931 719550 +1999 788608 +1933 599558 +1979 882045 +1931 589634 +1993 995636 +1913 830194 +1999 620800 +1933 740265 +1901 616112 +1913 704728 +1901 725269 +1973 902701 +1987 921201 +1993 612859 +1999 678123 +1931 837436 +1949 980477 +1931 611634 +1907 787112 +1999 814698 +1949 932214 +1901 642339 +1999 569343 +1997 888353 +1999 914702 +1987 783573 +1933 759574 +1987 953035 +1913 919919 +1949 903809 +1993 971989 +1973 712050 +1949 668056 +1999 709350 +1913 825647 +1949 836935 +1913 932439 +1907 501346 +1901 870934 +1907 692147 +1987 712224 +1997 751744 +1933 872660 +1951 668425 +1933 951171 +1987 987544 +1979 981243 +1931 897106 +1951 962637 +1979 681175 +1973 970362 +1913 951521 +1901 950757 +1931 840519 +1913 959831 +1907 931564 +1949 904703 +1949 548589 +1997 666632 +1951 834611 +1931 795251 +1997 875398 +1913 859595 +1901 572514 +1993 785117 +1933 510727 +1907 701215 +1987 854069 +1931 920233 +1997 569688 +1951 522746 +1997 747643 +1907 918944 +1949 647138 +1999 635123 +1913 810163 +1997 922059 +1913 971301 +1973 681479 +1931 635348 +1951 987041 +1949 679300 +1951 590634 +1999 627557 +1999 595313 +1987 653590 +1973 964115 +1997 812053 +1999 799677 +1907 917276 +1949 671616 +1949 783755 +1993 681796 +1901 924692 +1973 722250 +1973 849592 +1999 953940 +1913 719522 +1973 515204 +1933 911024 +1979 634992 +1993 833732 +1973 536510 +1913 623500 +1973 808684 +1987 994462 +1931 841209 +1997 776526 +1987 827778 +1993 587361 +1933 717320 +1987 620534 +1901 939655 +1931 635089 +1993 544323 +1973 948784 +1933 784304 +1913 880619 +1933 933533 +1979 748524 +1901 738979 +1913 527242 +1901 897016 +1951 933473 +1993 865677 +1907 609624 +1987 750801 +1913 875969 +1901 784739 +1993 511578 +1979 735059 +1949 617306 +1901 960331 +1987 782975 +1979 940575 +1931 810369 +1999 669781 +1999 822928 +1933 961764 +1949 523524 +1987 970818 +1931 596559 +1973 707986 +1987 711618 +1951 998029 +1973 803112 +1999 510423 +1999 676148 +1949 834817 +1997 520105 +1997 636212 +1913 918929 +1987 752717 +1949 581611 +1951 825074 +1987 651916 +1993 600187 +1979 593246 +1979 546463 +1949 908513 +1973 621466 +1933 652590 +1933 959129 +1973 512949 +1901 901798 +1973 641509 +1973 696322 +1997 931545 +1973 732171 +1979 917939 +1907 968349 +1993 682222 +1931 855042 +1907 568749 +1997 529484 +1997 611843 +1901 923013 +1949 611157 +1931 933530 +1931 545782 +1993 993556 +1949 804428 +1949 546601 +1949 565257 +1979 658991 +1951 547960 +1973 821726 +1901 532287 +1997 962667 +1933 611846 +1999 756779 +1951 768186 +1907 892094 +1979 769591 +1993 868037 +1913 565979 +1901 685421 +1931 991235 +1999 967431 +1949 989887 +1907 803152 +1997 795634 +1931 842410 +1933 664290 +1913 857924 +1979 520218 +1993 949791 +1913 881593 +1913 817568 +1993 575881 +1997 927072 +1951 769560 +1949 842353 +1997 974258 +1993 661352 +1907 842620 +1993 595307 +1931 572481 +1931 770879 +1949 979792 +1979 787444 +1993 813293 +1907 624212 +1931 764330 +1913 834589 +1997 932504 +1999 859656 +1913 886885 +1993 740207 +1973 664826 +1931 933681 +1979 950386 +1987 821951 +1913 765718 +1933 845864 +1979 724621 +1933 696851 +1933 974152 +1997 618222 +1901 574427 +1993 753196 +1933 721663 +1913 642102 +1931 565883 +1931 672834 +1951 794263 +1979 583386 +1993 998241 +1931 611143 +1973 870629 +1951 913985 +1901 680973 +1979 982230 +1993 717320 +1907 507147 +1993 744587 +1979 766327 +1933 809301 +1993 870241 +1951 543428 +1997 664511 +1949 563924 +1999 748042 +1999 562875 +1913 992652 +1979 861508 +1913 618472 +1999 585624 +1931 799733 +1997 646504 +1901 545886 +1931 841864 +1987 833684 +1901 866642 +1979 619880 +1901 898087 +1949 555212 +1993 535103 +1931 675101 +1933 635064 +1931 605993 +1979 638349 +1933 678336 +1979 580995 +1987 794893 +1993 590721 +1931 654503 +1907 620672 +1931 787956 +1933 692344 +1949 899356 +1907 587478 +1951 660869 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-10.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-10.ans new file mode 100644 index 0000000000000000000000000000000000000000..58a52fc23a802042bc9c9e2dc4efda53ae085dc4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-10.ans @@ -0,0 +1 @@ +2003000000 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-10.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-10.in new file mode 100644 index 0000000000000000000000000000000000000000..3a70fde8e00b3ba7be7eba74710b6120ae4dce65 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-10.in @@ -0,0 +1,2001 @@ +2000 2000 2000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 +2000 1000000 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-11.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-11.ans new file mode 100644 index 0000000000000000000000000000000000000000..27daff21cae599b0544848a4acc3ed434a711018 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-11.ans @@ -0,0 +1 @@ +1333506735 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-11.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-11.in new file mode 100644 index 0000000000000000000000000000000000000000..ef451bbb15dc555231fc0059481bdaa55acd7b84 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-11.in @@ -0,0 +1,1981 @@ +1980 1999 1997 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 +1 1000000 +2 1000000 +4 1000000 +8 1000000 +16 1000000 +32 1000000 +64 1000000 +128 1000000 +256 1000000 +512 1000000 +1024 1000000 +2000 1000000 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-12-rand.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-12-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..5e43a1e9d398d5d08bf1a3f378e5fb99b6655af7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-12-rand.ans @@ -0,0 +1 @@ +1846305011 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-12-rand.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-12-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..b17fc0200908824e72346be33aa053f0c8d650b9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-12-rand.in @@ -0,0 +1,1999 @@ +1998 1843 1510 +1171 493664 +1736 97345 +801 129462 +1237 204412 +1302 557576 +415 65733 +1950 1192 +1161 474486 +49 669344 +1246 583750 +1270 536209 +786 560155 +1908 125671 +1191 946843 +421 273090 +893 496353 +1933 87506 +1325 505034 +885 490773 +1209 611430 +212 131811 +210 988388 +1418 50898 +1471 27037 +1169 126846 +1530 858449 +855 686336 +878 120123 +691 156848 +607 181497 +1298 214571 +1555 728186 +1567 386798 +1792 777452 +1057 724082 +451 601461 +622 930756 +538 792623 +1544 301767 +123 191131 +1655 313673 +447 580448 +1260 459887 +667 275633 +1813 864931 +1842 573788 +1136 466358 +1526 321135 +1594 466091 +988 215842 +879 214180 +388 311300 +1600 399311 +1794 796705 +1395 852014 +1234 945600 +363 15567 +1567 685408 +1504 598462 +1694 338187 +1570 398148 +596 815069 +1364 932928 +634 911443 +504 2882 +231 961582 +1322 84658 +328 294669 +720 554773 +1278 213925 +536 175798 +997 621637 +749 20425 +109 793930 +721 931738 +1541 620873 +1854 996357 +108 170504 +875 408659 +1157 776239 +677 411323 +1261 838172 +920 894595 +696 652303 +1087 352688 +93 833384 +61 413874 +1199 834273 +746 934753 +1420 343995 +769 438209 +1933 669840 +698 809882 +1029 773306 +641 478735 +390 215337 +1890 620448 +141 424476 +1502 445191 +895 101618 +1470 890725 +1608 631509 +1838 737795 +370 738782 +345 934675 +535 947264 +433 175182 +1482 470116 +1771 896148 +1229 946400 +1580 663601 +531 286925 +624 233753 +1598 431368 +765 685499 +420 757855 +387 110065 +264 155563 +1718 881132 +1179 634790 +1225 978405 +179 907250 +1829 208960 +1712 574213 +1376 652643 +227 513512 +1544 722014 +1439 143357 +1122 922181 +1568 791307 +292 202426 +621 707573 +58 13858 +1396 480841 +545 136662 +1456 626675 +301 598618 +1872 297908 +290 870266 +1139 76040 +1078 243015 +1837 654483 +1124 237014 +1427 294598 +674 452822 +854 364278 +1282 454142 +169 536816 +1628 72828 +626 302314 +1697 775998 +1634 263352 +417 47948 +1013 447796 +897 599975 +859 862094 +347 891520 +653 348247 +1171 51784 +763 595322 +951 38827 +1816 493154 +608 205460 +345 990007 +428 543094 +861 150046 +713 260578 +425 678564 +1404 975558 +1288 361874 +1659 713491 +526 883604 +1018 510643 +590 698507 +1727 555071 +366 476191 +843 817478 +22 533206 +1405 623823 +683 237397 +1564 313763 +747 671313 +1918 576007 +175 339640 +418 276588 +509 664157 +1449 102490 +1491 99651 +438 630585 +281 210851 +989 681090 +306 93156 +6 269999 +1074 110947 +904 623363 +138 240202 +352 403479 +729 246161 +357 84240 +985 329792 +396 163794 +175 779692 +1857 473037 +1325 838505 +688 554421 +869 115097 +1121 114691 +78 787732 +968 771946 +1882 293167 +1058 97018 +1883 396110 +1085 110693 +953 714093 +1463 993870 +252 390895 +1913 318953 +671 35515 +1728 614191 +1655 91591 +538 772035 +469 861556 +684 196266 +1384 447041 +1233 159444 +185 371332 +1775 228171 +462 184817 +359 379880 +386 86495 +976 465404 +1354 239483 +934 383930 +813 581709 +1675 760828 +1823 184337 +1086 239432 +1210 805859 +106 449274 +801 634785 +365 414027 +605 993491 +1632 985975 +1034 470492 +836 679438 +492 966392 +711 677256 +988 464193 +241 239897 +1223 897746 +58 501339 +1256 795271 +791 279172 +1049 241746 +1186 359370 +1737 118811 +340 188767 +217 396296 +1177 932768 +360 849775 +1585 900716 +829 304000 +1809 115628 +101 417380 +919 780649 +98 5455 +108 392152 +505 681890 +1724 33406 +1145 164690 +1792 893289 +1721 659396 +1368 174829 +1565 532612 +1570 922260 +1750 544110 +1913 753778 +1593 532604 +1036 780183 +1990 904771 +1506 670934 +965 43592 +1513 18255 +193 105494 +1552 243922 +1727 91825 +1690 180890 +464 188456 +827 383285 +1330 412012 +343 149099 +1325 711461 +1848 478773 +1953 346541 +603 124166 +1110 622289 +1226 64001 +407 413268 +1963 828879 +1040 617376 +333 504699 +562 382893 +253 465854 +796 331965 +136 511233 +989 408914 +34 398165 +260 8889 +1678 895727 +1990 655112 +1431 610092 +1546 806714 +1395 776732 +639 519927 +436 348610 +1395 355129 +283 387390 +1313 9122 +1648 861554 +154 679782 +1095 711949 +1254 449759 +1500 773460 +580 696492 +501 234923 +1364 222983 +747 684410 +691 55867 +1408 819168 +1785 386137 +690 396389 +1020 299916 +7 171590 +1422 538377 +548 185544 +1377 125892 +1257 157080 +1742 457414 +1465 815287 +1789 558811 +960 677353 +223 153130 +1038 717309 +1112 588190 +614 299299 +767 540503 +1006 938329 +1951 863086 +1443 958731 +526 952365 +1317 688965 +1986 275165 +285 972941 +1639 387416 +1808 271148 +1841 866617 +420 690708 +5 545848 +1250 591604 +1990 648269 +1791 68781 +330 212883 +1852 536000 +675 99928 +836 89181 +302 888035 +1290 941147 +356 303448 +1250 162546 +774 114225 +1733 390068 +184 1727 +1751 448782 +306 479227 +1043 942832 +672 762995 +1140 784662 +224 520113 +1389 970035 +1001 394132 +845 159237 +1214 827920 +1560 29609 +1189 381593 +146 410549 +1727 955670 +1548 198791 +738 903249 +400 664300 +1471 252165 +1983 590039 +1153 337702 +1837 171630 +1710 381785 +1795 659116 +1714 726071 +839 150958 +1437 982578 +349 512403 +1155 906668 +1555 300879 +1469 583441 +1837 446109 +1103 187605 +1066 624944 +1720 612973 +5 318461 +1915 851579 +1838 997874 +1390 287439 +169 282174 +60 662222 +1979 295639 +1615 707787 +772 15512 +1834 160403 +1313 910422 +1225 781334 +612 878283 +1573 949737 +1228 351770 +1758 670713 +495 104769 +314 10077 +1758 724537 +782 787953 +713 227267 +485 210855 +560 892520 +591 917852 +801 748314 +512 105242 +1904 195017 +176 981192 +1447 962176 +577 843935 +1881 9360 +1159 298409 +1466 362819 +1030 966973 +1117 651593 +554 154952 +198 282487 +1119 404528 +568 248032 +895 953764 +1388 993869 +51 154975 +856 883515 +1992 857644 +862 584508 +450 122122 +182 313536 +724 31053 +846 724412 +1081 886392 +1193 938726 +1905 966682 +1873 330503 +1044 147971 +697 103178 +573 389220 +1619 448424 +1011 407755 +1257 632795 +80 584427 +1750 768766 +777 874059 +133 868263 +116 851281 +414 614252 +95 997399 +1128 925774 +438 813855 +927 882187 +1192 21886 +652 122365 +178 946961 +1069 643570 +1156 439739 +1750 23803 +841 294435 +1127 120819 +593 104002 +1766 585731 +1997 373232 +1819 80088 +657 239069 +390 824507 +282 64905 +1075 148059 +1117 389363 +922 848117 +136 531813 +1582 546581 +1828 124074 +501 669816 +340 266050 +1165 324529 +1956 891633 +1431 996683 +180 677465 +328 731455 +1597 599632 +1438 769606 +493 430940 +1133 761381 +966 739487 +871 275876 +1175 987411 +58 505293 +900 701754 +232 364290 +1308 4420 +44 826770 +347 307912 +1794 276846 +1939 358869 +988 982972 +410 882245 +851 932021 +284 804300 +218 132353 +1196 387595 +1542 841271 +1599 884173 +1663 22292 +1428 376033 +108 120580 +1019 941373 +26 508870 +738 547619 +826 288603 +1745 735370 +448 49326 +1602 343608 +167 911504 +1280 938235 +1630 554276 +1424 843114 +1455 601899 +345 866563 +594 79486 +1317 318584 +631 226416 +227 737639 +1462 341337 +421 384934 +1332 642099 +93 394423 +6 380411 +1687 338911 +34 988022 +1565 420232 +462 719725 +1302 685674 +1574 273532 +437 315375 +213 917009 +1779 664613 +1663 948706 +771 898310 +775 876624 +1419 87135 +400 161486 +828 365405 +270 935264 +1071 846799 +5 65398 +1347 301299 +47 966495 +847 181008 +1793 982484 +940 193315 +1481 56562 +1014 11457 +1067 486517 +1409 417929 +828 838029 +1752 619304 +733 351176 +133 847022 +1228 182492 +561 228017 +1937 686681 +386 948863 +1207 648768 +1989 575737 +1730 754042 +42 981950 +1451 207836 +960 487383 +171 264478 +969 372181 +1741 646318 +907 862431 +837 441969 +650 598971 +882 105568 +429 962952 +1712 738498 +1788 475757 +1341 215660 +859 969660 +1689 754566 +503 994227 +1725 668886 +1834 819161 +718 337831 +1322 337601 +1073 282229 +351 578277 +225 602650 +1697 871086 +311 347627 +797 350718 +933 538624 +457 941689 +362 363919 +1652 70848 +128 477398 +725 151288 +44 897314 +1508 113308 +689 9159 +1964 995030 +468 785067 +1006 375531 +567 429812 +1586 478569 +324 424103 +1494 935190 +839 248025 +702 410462 +952 366446 +861 458659 +734 843551 +1108 736832 +1661 169561 +432 518761 +1641 697929 +675 970319 +1003 113241 +1583 63854 +790 646291 +1911 98531 +687 115652 +1873 89338 +1656 235655 +1825 377162 +199 777990 +819 480875 +378 726276 +938 228746 +1589 919534 +726 863066 +715 537703 +746 241647 +185 520917 +1625 228360 +1438 257691 +1446 925643 +1089 103947 +456 464140 +420 742272 +82 548809 +1553 388149 +1456 614057 +1851 532236 +969 923073 +1266 599701 +681 468104 +622 890675 +1866 612380 +195 483148 +1921 984833 +1024 268721 +1017 538238 +1663 365209 +1427 819888 +182 420536 +359 117752 +1668 154039 +1441 174626 +748 671391 +543 58999 +1472 860973 +203 732858 +1693 339894 +1492 21134 +1708 547668 +954 159246 +1696 942246 +1130 990941 +1230 385154 +365 238051 +726 402551 +1015 792926 +1417 694660 +631 471006 +46 441935 +200 271862 +415 954127 +1082 932778 +220 599404 +329 586698 +410 345751 +1414 986648 +850 638913 +1543 190070 +565 989882 +1690 833321 +123 629304 +890 240668 +512 419422 +1218 872453 +1872 681245 +773 790994 +1195 57896 +147 260549 +393 556947 +1654 600085 +1000 251466 +416 177198 +1937 291932 +15 936393 +877 345138 +38 604972 +173 670700 +1302 799982 +1774 818413 +1712 732082 +466 185819 +970 654941 +1690 216182 +81 469074 +1533 487484 +682 326652 +590 158566 +89 165368 +398 920829 +1326 785675 +612 320836 +1392 560518 +1958 188129 +521 813103 +1049 604737 +744 601361 +1270 370796 +1901 407347 +302 45910 +1091 495751 +740 243490 +832 737215 +1391 46947 +1145 578210 +1962 481897 +1218 457632 +1381 185957 +1042 267943 +1866 860592 +435 971459 +1245 938644 +1197 778116 +1841 477193 +400 442192 +963 22985 +1197 459155 +1487 387396 +353 691412 +1378 33863 +261 461630 +1927 460797 +1137 641470 +1788 228646 +1389 330224 +1233 488182 +1115 872599 +431 538420 +1914 144325 +1330 987930 +526 284645 +1605 575926 +815 438664 +1742 215769 +1284 201083 +853 916859 +70 931222 +1078 466103 +1674 66024 +550 503236 +1854 352910 +1800 283333 +554 614434 +1228 480945 +1027 789448 +1419 226544 +1937 365603 +92 883997 +836 69241 +967 778975 +1755 73955 +308 265064 +656 623339 +258 196888 +1420 833233 +299 716484 +337 237935 +1567 489210 +1556 235209 +275 213218 +961 502335 +701 959120 +267 935391 +1302 965959 +12 576033 +2 676002 +1685 92654 +78 172610 +1044 104036 +1819 33707 +1649 20678 +391 688733 +66 846796 +135 89086 +1455 805763 +581 524150 +88 297927 +62 275084 +516 454272 +1721 236897 +693 869435 +1138 363609 +5 606783 +1515 144597 +1382 743808 +1674 178023 +1519 287397 +952 7951 +1987 628664 +1283 921393 +1114 728954 +1483 887652 +766 115975 +941 969818 +173 501845 +463 318291 +87 857521 +1611 343670 +1670 552452 +1976 368413 +1925 450058 +837 531403 +1390 640415 +544 652148 +767 787633 +1934 227985 +57 443073 +1111 373259 +904 382797 +1790 368436 +489 6129 +909 703768 +108 749061 +734 161068 +665 877777 +595 735253 +248 695270 +1760 654778 +910 5690 +877 680001 +1936 83552 +544 960898 +1080 464591 +1840 22813 +704 679319 +317 62473 +519 679854 +1846 837034 +1171 418835 +493 497128 +660 953599 +997 681520 +56 68001 +1912 239860 +1087 158613 +1246 130897 +814 467757 +374 41134 +333 635287 +782 450184 +390 646405 +357 546815 +899 443515 +210 390784 +246 528183 +1625 320928 +652 1964 +1867 956726 +1135 66214 +1632 796576 +1365 459333 +928 759706 +1584 71063 +1099 789709 +727 247152 +877 670307 +1100 486201 +110 559878 +435 944542 +1190 617365 +1673 315727 +1039 354504 +744 688042 +581 904035 +1737 68242 +1883 337706 +1076 803069 +1377 977424 +146 687544 +1702 738914 +1509 742994 +1309 315211 +879 494599 +1688 190714 +85 504645 +1193 774644 +286 860061 +1206 382099 +1955 750164 +1425 594524 +1136 789959 +945 209335 +369 857352 +786 616991 +1973 329054 +1020 6004 +1750 408436 +538 837551 +1199 727797 +647 297155 +1141 376772 +1889 498007 +1420 443579 +629 495246 +313 266824 +1969 328832 +734 791092 +1572 755040 +1212 248584 +1123 981214 +459 559748 +1548 787801 +1265 115432 +529 769072 +1511 683513 +1032 881449 +1051 110854 +622 753974 +1801 83821 +1045 192992 +553 508900 +1467 242295 +1444 25256 +495 677141 +1277 2679 +1749 490172 +789 72294 +1975 788587 +369 122176 +1291 187856 +1799 428398 +916 584723 +1757 966610 +1263 832820 +1903 768911 +1318 50945 +562 807097 +860 388393 +1421 303569 +939 759895 +1962 782433 +255 49485 +1565 351856 +1009 43731 +699 487068 +1305 504423 +1666 888787 +446 120976 +1010 768212 +1190 41471 +574 852766 +1544 719601 +270 985140 +569 64535 +1184 807344 +1582 627796 +1532 647477 +649 244514 +1464 877801 +1642 180853 +1112 113460 +1541 722055 +610 85364 +1116 505804 +1376 229885 +1365 622702 +719 338983 +1285 159560 +521 443423 +662 344758 +918 20013 +1101 240841 +809 231191 +750 76406 +1763 872681 +1508 708013 +1909 337487 +685 293602 +1049 618093 +593 514415 +240 577357 +969 527330 +1362 143090 +1934 253978 +1754 132486 +1176 269204 +166 5722 +1765 819562 +271 667620 +1023 260838 +1157 102144 +655 709499 +995 673574 +250 568373 +1955 918433 +747 590359 +1815 613131 +1217 706518 +1625 443655 +1798 38051 +1083 707672 +1178 888634 +1934 61620 +1574 993610 +309 385828 +363 557356 +1567 309779 +1986 611683 +449 477768 +688 37574 +1345 7255 +1965 448756 +42 188197 +1851 399614 +419 890557 +1119 863240 +242 733720 +1668 481404 +14 882968 +1611 997043 +272 145323 +118 623369 +1728 651543 +248 244183 +1625 28358 +1674 483694 +535 328366 +3 38256 +1503 305851 +1337 822199 +592 893499 +1008 253804 +794 907926 +922 154515 +1217 407212 +180 368700 +303 646108 +60 536608 +1862 764753 +613 988447 +1913 734871 +1463 12858 +442 671368 +149 32646 +1362 165403 +1671 930116 +270 936270 +1443 594524 +1944 338683 +1618 994231 +960 943145 +1579 168502 +619 125635 +1995 509031 +863 253894 +578 177394 +1141 376540 +1717 242438 +1275 98348 +1695 899143 +157 472007 +783 14804 +1525 54039 +359 664799 +393 700534 +569 413388 +581 625012 +100 243623 +1719 990440 +871 254334 +1409 524318 +1991 603607 +1070 39551 +919 89086 +1932 150122 +1466 550109 +1735 409810 +1633 816756 +184 730221 +1425 279444 +252 456281 +1947 217789 +1504 324256 +541 937818 +133 274514 +304 510986 +651 654968 +495 572676 +173 405332 +921 942914 +1230 243126 +1766 480330 +1340 109167 +1529 990665 +1821 255809 +1410 505051 +1141 905949 +737 961371 +1852 843843 +166 474630 +923 688423 +630 660151 +245 844210 +310 222082 +1717 998552 +1736 470267 +1984 224020 +543 563890 +1161 724024 +1156 670045 +1804 923488 +515 864720 +147 430537 +1524 844484 +1148 424757 +1009 869567 +1024 503627 +146 234882 +900 980270 +503 714860 +587 683421 +939 980466 +1070 954521 +1335 323694 +1485 827549 +1482 149068 +1964 657292 +1073 180696 +1733 274680 +1159 566058 +371 817942 +1368 443926 +1554 258534 +519 204810 +665 275267 +1306 586156 +387 251839 +374 563114 +1714 390152 +706 648749 +495 477486 +1182 442644 +894 691629 +713 114107 +247 765438 +752 691466 +1887 74166 +1339 18618 +1814 372162 +862 109389 +580 785733 +616 238628 +132 696226 +1160 836956 +1415 65216 +76 925195 +614 240620 +1399 401251 +789 67503 +286 566494 +1953 191220 +992 238005 +91 250888 +713 4874 +466 708634 +132 987755 +463 796174 +1487 750770 +289 689947 +409 87835 +139 751948 +821 934705 +396 136553 +1098 766536 +1001 281206 +1489 793030 +237 731580 +1141 474706 +676 130879 +268 666426 +929 486442 +1520 4068 +1656 666394 +769 749449 +1362 923139 +465 758972 +1991 107057 +1789 653576 +748 267203 +1610 956601 +303 899408 +1869 908685 +1863 57145 +465 559779 +1425 782593 +1894 185132 +1882 596506 +14 258822 +750 802728 +1748 745588 +1504 883485 +1459 91313 +1015 232393 +1574 165324 +1546 374550 +586 71441 +197 807007 +1650 975552 +1221 746204 +160 493293 +17 115717 +434 241762 +533 183136 +1495 833582 +711 345482 +869 832202 +656 398524 +1858 487963 +703 333467 +851 418712 +1970 575152 +1182 207087 +955 278341 +1136 93276 +1285 117542 +881 524655 +1483 474134 +1056 699697 +1183 341082 +1059 155090 +779 260927 +1598 546968 +1778 159060 +952 858056 +1509 981246 +1203 591630 +965 165911 +515 326982 +995 14018 +807 187438 +189 852346 +1099 379861 +220 619223 +438 951613 +853 162716 +1913 231688 +1430 465788 +1178 473030 +119 6581 +865 364982 +1574 194934 +699 258771 +1845 822464 +1793 51554 +1921 699622 +1222 387244 +662 507789 +13 274927 +597 733910 +1030 831762 +1754 167486 +701 459981 +1368 369333 +711 15299 +620 867802 +1226 202751 +994 34127 +458 252009 +370 524801 +114 521932 +759 745811 +1186 69135 +936 641750 +1701 489660 +501 858811 +97 785629 +246 556659 +1180 386137 +1870 356578 +1587 532167 +1025 921633 +679 780115 +1148 170132 +1031 62556 +1258 488424 +1259 901484 +1812 682108 +955 931921 +422 754892 +1618 679912 +1267 764506 +420 708583 +166 413011 +1935 932073 +1866 350037 +932 1011 +445 940933 +1991 799899 +867 910959 +144 495827 +136 204359 +886 814124 +1286 655749 +1731 614329 +1435 259701 +318 896501 +1721 662920 +1997 888939 +1985 283185 +1857 673185 +1972 592208 +155 896125 +729 353592 +700 551119 +865 997732 +1520 308162 +1013 414736 +1412 841607 +1482 710766 +1133 986910 +1660 605844 +1871 996415 +1080 710256 +1180 304259 +1333 629246 +1114 42516 +883 310083 +1170 722533 +1331 998096 +251 589139 +1256 876286 +1435 761938 +445 711045 +1638 488722 +123 416737 +1262 347480 +1269 948021 +1540 441683 +601 389873 +1576 116300 +1660 730085 +1582 367396 +415 856355 +1824 240245 +594 992062 +1272 80779 +48 733407 +1420 114177 +660 86370 +1392 143565 +506 933679 +1855 181217 +501 402734 +424 588988 +708 570265 +542 287839 +622 611002 +643 97292 +896 58891 +296 960356 +1756 910238 +1130 86259 +85 690962 +1636 39115 +1750 98347 +723 972400 +1030 408384 +219 312316 +864 573974 +375 590305 +1149 964585 +406 344720 +670 280911 +1841 492099 +1363 546979 +1846 342156 +727 172195 +1348 121234 +815 982026 +1260 771688 +1315 831731 +179 6323 +1752 206106 +1605 56781 +430 139333 +1463 363536 +1598 17774 +748 219526 +1861 668057 +1384 649466 +368 27015 +1643 254507 +1756 191491 +1285 956126 +1058 20058 +511 249359 +1044 759767 +1137 340803 +454 547851 +1502 675792 +197 503836 +349 227100 +364 77488 +1842 349649 +1600 235069 +1874 842102 +1231 819351 +1140 171719 +979 406886 +56 564460 +664 457373 +1941 211579 +343 536657 +1717 727266 +825 609924 +1266 283960 +446 244000 +278 729420 +1031 889605 +456 663013 +505 706642 +614 323367 +439 963396 +439 664384 +1996 729097 +663 869052 +1800 196777 +1619 442603 +452 966655 +87 1821 +1240 29242 +140 266836 +1517 823360 +1504 118492 +1169 5818 +1295 609567 +675 275038 +47 345250 +982 13130 +1192 403357 +1263 618484 +1930 823574 +118 155330 +1426 337092 +1060 941687 +1093 962189 +1710 970553 +863 376687 +848 74464 +701 815170 +1346 818712 +219 346611 +1329 649184 +387 494573 +1989 458721 +253 937078 +1274 647274 +190 253972 +292 780356 +869 564315 +1904 300849 +1363 992825 +1307 270522 +1342 486250 +14 862318 +898 736991 +243 264573 +1652 668692 +1383 624693 +1783 623803 +1786 842077 +310 602958 +931 525078 +843 343795 +874 307805 +832 965343 +523 614604 +367 184482 +25 261919 +815 775611 +1427 275941 +58 870319 +1385 164132 +1357 247554 +1650 139748 +924 472591 +797 433801 +296 349300 +1990 835360 +1779 985539 +1682 251131 +269 714962 +719 174641 +215 966603 +1967 355415 +55 788767 +1288 593815 +1171 130848 +725 586354 +394 952802 +667 428776 +1820 869990 +1385 663983 +1113 351411 +189 966007 +528 117748 +552 303144 +756 353613 +118 82301 +865 190301 +1882 139669 +1344 185371 +940 504519 +1781 436558 +833 204472 +237 924091 +68 862199 +35 147808 +628 722775 +1051 12347 +10 116964 +1379 853535 +440 610807 +64 568273 +1427 865908 +396 597114 +980 722532 +812 46493 +317 784797 +885 782155 +1015 322429 +1057 559423 +1606 411774 +1744 876771 +287 512263 +1304 83191 +1835 226798 +658 116830 +646 388321 +800 157453 +222 567194 +1241 270216 +1893 757829 +1904 137762 +1697 218317 +517 644612 +1901 572063 +358 963315 +1574 253350 +638 564519 +236 916258 +230 881561 +608 671921 +1829 224805 +1410 18239 +619 544164 +1343 85490 +1877 397853 +444 239065 +1129 974292 +213 536480 +89 53209 +961 883852 +1842 145476 +321 792230 +970 584927 +1602 528978 +995 735289 +1817 356483 +1933 992956 +1278 165772 +1338 542040 +996 31804 +619 616078 +503 450734 +1094 137878 +98 7290 +1130 29112 +593 340840 +1571 322181 +649 256606 +1461 608435 +607 390193 +1381 300742 +1301 483609 +1137 647905 +1576 36979 +1002 540289 +1091 563904 +885 256777 +521 468614 +25 286754 +1932 717330 +1761 95627 +1757 789022 +614 230195 +340 683583 +338 41675 +1644 849249 +279 733685 +1283 805649 +932 835192 +384 802122 +1085 214694 +745 204062 +160 625249 +526 71228 +1446 521537 +1043 441450 +1737 593901 +1060 557927 +322 906547 +1334 671036 +1399 858624 +1515 267991 +1721 181337 +1009 469057 +923 319061 +1034 668727 +417 97530 +828 728515 +824 188909 +1209 510356 +1635 876800 +118 143010 +1962 817963 +139 939305 +1559 580101 +1345 194372 +430 118529 +1153 384779 +1834 80927 +378 657989 +908 717757 +1056 652703 +123 998270 +1370 588118 +1799 63070 +1337 866728 +70 141368 +1918 512798 +772 824349 +1761 761677 +333 825561 +1728 850619 +365 814634 +1915 656876 +167 665663 +1554 206808 +1210 188964 +1043 309974 +1361 908056 +1254 526620 +125 946533 +463 799450 +889 726753 +456 656024 +1788 984157 +317 356488 +625 57704 +1876 976598 +393 992495 +1220 829280 +212 569890 +155 936074 +447 380554 +1031 485580 +143 78024 +1448 998303 +850 757279 +786 907066 +499 885802 +776 647297 +720 268973 +949 395919 +98 27676 +934 421245 +1072 761170 +362 447607 +43 533218 +860 355313 +279 89860 +1947 999775 +154 212737 +1367 160764 +1630 601413 +644 882640 +780 299827 +239 863314 +13 811186 +106 293571 +282 914043 +1693 529646 +315 182058 +1915 19727 +45 239028 +612 264839 +1234 621062 +957 427921 +146 29621 +397 707828 +1247 661489 +1072 842017 +1095 715997 +645 819406 +26 837304 +1898 849292 +1457 696583 +635 804677 +1204 262626 +1963 321781 +639 101643 +1649 807809 +651 351070 +1999 982820 +1289 318353 +1605 823668 +1853 843919 +1625 389044 +64 489313 +804 522027 +550 844328 +404 380540 +1137 206439 +1933 793095 +1723 380068 +953 563565 +527 314462 +760 701107 +522 672507 +1285 285562 +1067 877219 +1870 672194 +1410 153109 +1426 638550 +466 651896 +65 237045 +566 293349 +1039 562977 +1603 799822 +395 890221 +1310 620708 +1861 426927 +748 241752 +671 614966 +1001 259340 +520 164491 +221 847433 +1659 663727 +990 450980 +1785 723344 +1562 684172 +383 957069 +1671 168383 +558 409049 +1233 755808 +1340 612327 +206 463695 +1995 947515 +294 168615 +1924 976181 +1692 491535 +1050 650191 +1737 380641 +1270 58879 +831 417491 +453 716659 +1091 582871 +135 908813 +157 851752 +812 690572 +1486 453205 +56 393314 +908 913870 +1763 685632 +383 39484 +226 276404 +1812 525652 +1873 46994 +1112 878769 +1100 703236 +708 126575 +1184 774228 +122 670404 +410 326412 +1813 130526 +980 563967 +52 335052 +1354 765027 +266 830106 +194 960162 +52 468059 +1274 161579 +1600 351530 +821 458961 +272 301639 +498 571439 +310 974345 +57 351430 +281 656454 +1286 306312 +241 937584 +861 488885 +595 892590 +422 101736 +389 802889 +396 605110 +788 480134 +1141 418632 +1365 678122 +1825 639999 +428 855340 +688 647316 +1476 541432 +1878 891844 +1729 665566 +131 487105 +1703 563948 +501 34539 +1258 612092 +277 785620 +521 77501 +479 467447 +118 857692 +1318 469802 +1934 961743 +217 569119 +586 760442 +829 977064 +1029 308704 +520 469146 +1486 72784 +818 555773 +1242 532177 +327 308421 +131 941590 +1940 363425 +402 986411 +1693 683412 +1393 232207 +1753 819159 +1709 348318 +1934 969886 +1335 728961 +1339 719820 +1193 260282 +1108 344225 +1 796078 +1647 814119 +670 996573 +1312 106035 +1042 117739 +1443 928953 +1520 961010 +1757 228668 +1077 207732 +1750 413991 +229 675651 +249 157953 +1989 435150 +95 785295 +605 940229 +1450 557602 +934 628551 +400 577934 +1799 285684 +1156 86552 +1212 833699 +42 733286 +1710 164219 +1903 225350 +145 488156 +805 123596 +343 71441 +1521 763862 +1285 824982 +685 802352 +732 496588 +578 499611 +1942 815286 +187 43515 +587 386122 +1935 712478 +1418 580656 +1903 557071 +1124 73167 +1139 742127 +1262 925965 +1059 285937 +1003 525993 +286 70729 +1086 354429 +528 646180 +274 26501 +711 762735 +984 447074 +1800 550861 +56 972826 +1665 243495 +1171 995071 +1497 745537 +409 653004 +814 589754 +1836 81214 +517 944087 +1557 820487 +306 680982 +782 45023 +542 473863 +737 936305 +1603 252398 +892 864203 +680 637554 +1560 599721 +1487 487939 +1195 596902 +32 170196 +1179 831582 +595 508639 +680 75504 +1016 437238 +1134 657570 +1701 85590 +651 733049 +1944 529 +171 828046 +706 622017 +470 270298 +314 128711 +494 362089 +1474 322642 +527 279464 +1700 131047 +382 933331 +696 143938 +620 155515 +282 124028 +1055 244011 +1803 866810 +1039 79186 +1358 457316 +1046 750117 +40 2862 +514 953952 +406 688068 +1350 469112 +358 188852 +1822 587139 +1009 178493 +1301 530437 +914 268659 +1988 237685 +829 648268 +1440 989941 +1440 11155 +1880 998023 +1139 556169 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-13-rand.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-13-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..c929f0a6a9373c6d8b764a6aef2e657a1bb322b0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-13-rand.ans @@ -0,0 +1 @@ +54489909 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-13-rand.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-13-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..e7442ed86f005e86424e1c5b795f67cf4ff51fa8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-13-rand.in @@ -0,0 +1,1776 @@ +1775 474 31 +117 304008 +148 38326 +1433 538349 +876 501613 +1282 93349 +1327 525666 +272 907118 +810 995006 +937 702971 +1249 571286 +1989 358967 +380 774800 +1735 62664 +1620 633158 +1984 692575 +1827 590138 +153 307304 +476 392153 +1239 193592 +931 760956 +213 153626 +1765 335272 +1500 750509 +608 960690 +1277 58738 +583 225649 +601 732110 +1932 757052 +1679 279028 +924 651326 +386 931 +1179 661603 +473 531787 +5 431716 +1810 830128 +307 241925 +424 753615 +918 978633 +935 654398 +22 960559 +1794 128603 +884 371920 +396 362990 +698 6277 +1414 821653 +392 129460 +592 773211 +387 775023 +595 383060 +134 203126 +1520 461822 +1392 132762 +1465 684155 +1603 392590 +272 670077 +107 191085 +1040 628318 +1371 223634 +106 169519 +557 19596 +646 315896 +817 440082 +880 510028 +847 12512 +202 274870 +1725 95208 +1524 866292 +987 595257 +24 465702 +746 191313 +1424 358501 +1049 653721 +1352 962533 +73 558529 +199 764930 +1548 188312 +51 14056 +344 866331 +477 4185 +1507 468519 +5 959413 +1745 819790 +140 942100 +1169 241393 +500 610937 +4 509617 +1735 836477 +968 300671 +714 861092 +1964 34316 +71 129281 +1993 484391 +798 517526 +1544 718351 +1936 456886 +443 693652 +460 714165 +819 254002 +520 442001 +1496 597061 +479 271930 +49 533041 +1273 757322 +92 221376 +470 853472 +1374 441087 +318 443750 +275 723900 +289 581726 +152 697692 +213 935022 +867 484655 +1316 398899 +685 327405 +376 331010 +1003 682058 +1945 586940 +1555 942634 +1449 393916 +795 483345 +1418 229079 +1370 827854 +1725 640369 +1346 507990 +1180 230179 +969 944890 +830 763791 +1222 629641 +824 405913 +1980 664748 +1236 915300 +857 481418 +689 660570 +1107 767652 +525 181921 +1626 199511 +368 576158 +197 633173 +1259 839306 +616 512088 +297 93100 +1804 844925 +1308 907615 +106 483197 +1168 660541 +287 644072 +485 162316 +1656 852427 +1925 880027 +1346 726254 +1233 950663 +791 178408 +38 107478 +1098 524244 +1462 137985 +998 404410 +695 469302 +459 55001 +347 279749 +1010 730823 +837 149773 +327 713785 +548 634822 +1627 724176 +1973 225166 +1654 69146 +306 643075 +397 856819 +673 541780 +1358 608235 +1521 891624 +1051 723284 +1652 848932 +71 683607 +1832 953236 +1640 214247 +375 342921 +186 344519 +29 306142 +1390 552201 +189 956253 +1332 644090 +875 351573 +457 196402 +1021 293863 +1360 266935 +1589 712049 +1593 388174 +260 94008 +1842 595935 +263 71391 +1672 296294 +1306 928294 +1305 554365 +727 894155 +1651 870344 +1677 286584 +1503 744112 +291 472272 +454 52373 +479 44511 +1330 235356 +1618 832832 +1144 341612 +1632 344351 +1705 473497 +1525 94434 +1023 193153 +1261 213478 +772 834420 +1526 885696 +294 733048 +1735 273738 +1153 389768 +265 374435 +1213 678074 +617 553320 +1962 14581 +1447 253930 +314 936552 +868 489122 +1675 485548 +1305 649024 +234 132033 +1113 223765 +1855 754776 +600 169422 +471 349391 +793 383307 +1573 422199 +1683 22451 +1030 250921 +268 956052 +1342 851532 +1890 125816 +1741 642319 +825 60831 +1909 718135 +366 504376 +915 263734 +376 304973 +853 641367 +676 601289 +1704 955994 +132 550551 +8 205591 +618 398125 +1759 986357 +1749 373536 +1024 983121 +1253 62845 +573 172597 +272 302067 +1332 459454 +749 345620 +1249 589755 +945 155298 +1683 481917 +1729 598005 +1452 550596 +249 136212 +545 412906 +45 218423 +833 78008 +1326 869636 +42 819214 +1334 175470 +543 747502 +616 954063 +928 499646 +1035 783359 +1048 592881 +982 729074 +1214 894792 +963 525140 +713 937857 +1 565470 +1444 783592 +26 746199 +797 837793 +1269 759800 +1529 322914 +1402 176470 +1564 89364 +146 446002 +1232 485045 +44 227470 +237 620381 +842 335565 +682 478735 +993 953084 +165 998786 +415 118880 +836 983901 +1470 319084 +900 903549 +242 219222 +1355 287470 +1008 742396 +607 298172 +327 483226 +1164 538082 +191 681741 +103 636415 +8 661077 +569 546633 +1962 212901 +1772 70854 +378 150533 +1596 118104 +1355 101849 +1694 644698 +690 814212 +473 349398 +1092 314994 +384 502587 +1757 558232 +1003 715166 +160 784296 +349 685085 +183 247028 +1265 334765 +1632 597185 +1728 833579 +383 973693 +20 666690 +1823 506543 +713 249903 +897 3706 +1034 118631 +92 386650 +6 513323 +1360 21167 +547 251022 +1889 549023 +1270 967133 +722 842172 +983 638762 +843 523487 +214 436771 +974 400117 +224 107964 +1222 522787 +1542 66937 +595 518156 +1065 676528 +901 248546 +1332 596514 +332 32934 +1562 599567 +1494 180630 +163 744434 +1118 266600 +1247 166925 +1131 798587 +345 617098 +384 975195 +1577 909048 +92 736124 +1966 107381 +1967 250152 +681 822422 +1135 784167 +326 738203 +531 503953 +1524 702183 +65 712514 +1774 768451 +1424 571421 +256 667748 +154 259402 +791 762914 +1586 164765 +185 587688 +1096 171885 +1976 132148 +182 644050 +1703 688410 +1120 965835 +295 276814 +726 700994 +1875 860579 +1138 541190 +1545 849736 +1357 630566 +304 24994 +1728 554961 +900 400168 +1028 958347 +625 759753 +180 221019 +75 485269 +425 789879 +1765 634510 +451 253300 +1385 873351 +427 359527 +283 813465 +1064 90833 +194 79513 +537 355190 +1185 959534 +1700 383178 +1853 105750 +1927 848179 +1929 957640 +1599 983605 +1565 876923 +390 300613 +457 887071 +1857 178428 +1769 784935 +1331 183192 +992 494141 +311 738408 +1432 101560 +1227 88104 +334 554851 +1902 603634 +1105 243252 +743 940825 +240 822603 +1480 821036 +420 208726 +1361 715489 +21 957102 +1326 422654 +627 550102 +731 234959 +831 912014 +1192 651603 +364 467928 +432 308507 +1651 902189 +1409 497153 +1023 719784 +1805 237650 +1564 316325 +1257 303869 +1535 759380 +3 955504 +711 446115 +1228 89316 +320 550120 +286 898725 +1664 812498 +1117 586833 +50 604040 +78 613196 +748 463638 +1726 860329 +1044 446049 +1458 44628 +810 327073 +549 431941 +937 345842 +1657 742725 +361 601357 +607 944391 +376 864642 +272 320931 +755 43496 +1740 711637 +1532 775585 +472 467723 +1589 971273 +855 652599 +435 879650 +621 720156 +1277 626546 +590 20576 +801 84536 +947 920888 +1609 316442 +1254 649790 +1324 315515 +1635 627564 +1784 123269 +1122 712026 +41 610765 +1448 968375 +284 492899 +11 158381 +969 427728 +513 489797 +356 920204 +1115 492778 +976 69373 +34 567516 +1128 175924 +1371 796391 +1024 952556 +1919 66295 +1684 620145 +1643 86186 +825 540505 +465 735444 +564 601580 +564 293125 +972 688829 +1715 225401 +1359 301995 +1643 288702 +711 677741 +358 231194 +1369 316097 +1304 546262 +72 690093 +490 808138 +1301 605622 +754 60583 +814 736522 +110 476337 +1843 631566 +1476 188754 +1971 876361 +716 213511 +512 788187 +856 371570 +1548 948161 +535 212137 +56 48441 +1864 2278 +1175 574790 +918 310245 +1962 343368 +1346 989163 +824 789160 +259 349061 +1491 79978 +312 153416 +941 928950 +831 600805 +1302 158399 +309 906013 +106 448058 +889 523318 +1219 554754 +1069 813276 +1031 752389 +224 741363 +362 987228 +528 562455 +838 204545 +370 7676 +145 120661 +237 732298 +326 270084 +1254 683969 +352 486180 +1863 669597 +1001 17923 +1794 97878 +486 611860 +259 310326 +1777 702407 +272 452378 +1127 172151 +1801 320562 +889 135060 +1455 930838 +1100 831219 +580 808231 +1965 294675 +585 244435 +1344 400377 +1977 77339 +136 741148 +420 867022 +1642 610662 +1101 810940 +464 127862 +1274 813997 +978 471975 +1299 817251 +162 95839 +829 100246 +724 593061 +28 505695 +1045 880301 +957 354189 +742 871184 +1876 654365 +1556 799206 +1067 789830 +1000 326099 +160 759327 +1395 779600 +805 141109 +321 163500 +1103 668297 +1638 230168 +1125 385870 +1918 363216 +833 908298 +398 330838 +950 980045 +1119 787592 +211 559267 +1218 13979 +1982 234446 +1907 548536 +1772 228599 +812 600537 +1192 436720 +525 497099 +610 658178 +1693 300684 +1029 112093 +1749 870928 +687 614478 +79 311004 +177 162285 +1540 634758 +182 716645 +384 298569 +1035 327015 +1925 46878 +832 715117 +1836 927462 +1966 642001 +587 433095 +1830 557115 +974 706504 +1669 215375 +31 857420 +427 792702 +490 488922 +1889 252776 +838 717399 +274 22033 +595 448414 +1110 567548 +1916 348415 +1835 380702 +851 942221 +342 911752 +1888 432978 +1718 805494 +1354 175490 +1870 174007 +1673 299116 +656 96270 +825 563079 +1347 55672 +360 394962 +1653 301328 +1139 63556 +1462 346604 +750 99400 +1575 364163 +164 560858 +62 370531 +140 179550 +392 108403 +284 894702 +596 506474 +1739 236755 +1734 554451 +21 678762 +278 147099 +1057 461722 +357 860411 +575 344121 +702 38758 +440 382368 +1739 345317 +1729 913058 +1848 576603 +1875 562683 +1833 580229 +1859 507408 +710 716860 +1357 538921 +1761 116555 +1364 380126 +1877 937367 +474 859118 +1970 654452 +1969 39197 +733 533743 +1561 814628 +869 684969 +1845 173243 +847 967536 +1889 673609 +247 885571 +1329 809069 +834 250374 +1097 161902 +593 692817 +871 302994 +1791 538777 +206 86700 +457 435917 +1617 472249 +603 376942 +133 257615 +959 394006 +1497 92554 +1282 89842 +1458 974129 +1520 77435 +1991 856204 +1261 151716 +1249 740020 +1225 717033 +848 100852 +792 187433 +1142 849200 +114 880187 +949 678044 +1551 601407 +1045 975048 +1653 26179 +1594 255917 +871 771485 +1812 945584 +961 262056 +713 803666 +51 783687 +488 688931 +608 843309 +452 747504 +1506 638907 +550 979771 +635 275230 +554 368144 +275 72322 +1508 382687 +195 173571 +431 728534 +806 129679 +892 321799 +1372 866530 +630 243975 +1060 810269 +968 425308 +1474 663634 +1488 954065 +1556 89148 +1989 432526 +767 484943 +1463 426603 +263 372863 +1648 473777 +1990 22535 +1018 29044 +1179 83278 +240 859551 +1577 140838 +1029 375101 +7 751605 +542 429766 +1298 237995 +1152 280554 +759 465048 +1607 331915 +1801 401722 +323 588619 +947 719152 +176 801993 +158 737627 +260 422255 +1261 112419 +1121 844199 +687 333333 +1644 756379 +1343 227517 +1884 432882 +1257 570038 +45 125767 +584 508794 +1129 844473 +1747 95638 +1544 313574 +1198 847892 +1286 857458 +1406 986492 +1602 193216 +1476 661938 +893 370228 +840 607108 +1344 175221 +896 952439 +1049 648089 +571 12974 +197 879035 +985 572021 +339 695341 +395 22921 +1219 952983 +391 76363 +287 398099 +320 804732 +1912 58887 +154 437676 +471 848580 +1449 869479 +1745 157946 +1339 729450 +1575 10130 +681 20533 +60 242678 +1553 909708 +920 208097 +359 377891 +321 319597 +467 453569 +905 579051 +1398 774365 +1638 628351 +320 719492 +901 866384 +1258 675514 +116 33268 +1131 831595 +300 361105 +140 199826 +106 876679 +400 111050 +368 952706 +664 569501 +516 190648 +1159 291055 +1761 946589 +748 401368 +1291 181753 +411 275213 +1677 972448 +301 682451 +1581 455652 +1492 991883 +296 138372 +1932 864492 +124 247262 +1222 213994 +629 13040 +1117 393764 +1434 508289 +258 560053 +1840 404482 +1426 465978 +2 878132 +1239 408534 +590 619349 +435 619528 +527 741932 +399 818706 +272 287408 +347 647454 +1456 761983 +1054 43167 +165 133714 +525 832271 +616 539991 +1048 142349 +74 22285 +1099 482977 +728 83794 +1039 962046 +1236 245170 +1872 840668 +1665 45093 +289 158128 +1549 179039 +1185 611643 +145 23660 +100 588123 +11 309861 +1105 972050 +1431 983812 +523 314953 +720 997672 +921 469655 +32 204930 +1480 8457 +1535 579663 +1962 5877 +1281 364848 +43 829797 +880 563614 +1433 678966 +1192 567664 +434 455951 +353 551264 +466 553285 +825 443953 +1853 336289 +663 286669 +1929 627615 +501 844158 +1463 174253 +373 254397 +894 796858 +1086 129925 +1587 509010 +1398 609917 +1533 458437 +1266 668162 +97 611648 +1035 250509 +1695 107175 +1807 987827 +1815 27516 +183 788985 +1916 440849 +1274 632231 +1083 417891 +175 508923 +886 442790 +143 250522 +241 725802 +1265 164344 +1452 534345 +1637 622810 +216 82545 +1536 336711 +372 581317 +1853 81689 +996 555928 +1334 989126 +327 612350 +410 862701 +1791 971071 +1587 423377 +1487 168784 +1462 580019 +1896 534272 +769 202016 +1127 512046 +1515 909862 +1687 786302 +1626 809885 +1681 855181 +614 108440 +143 127029 +1979 152436 +845 490377 +1624 708188 +555 432192 +102 807885 +93 938791 +812 422660 +1698 98864 +844 809123 +1442 740669 +1119 582752 +1246 425198 +1005 266630 +1399 458531 +1438 643065 +1804 570054 +1217 10367 +1523 158794 +1256 919614 +376 966764 +332 476260 +1735 633075 +1527 729942 +550 817259 +317 693438 +151 479390 +846 74877 +1177 251694 +1425 97611 +625 745834 +748 406231 +1945 604131 +977 10598 +376 123597 +654 566968 +82 307269 +296 802633 +144 818389 +1496 812393 +1428 754095 +1836 187065 +348 756288 +1064 785597 +1419 239674 +588 930381 +992 122804 +1214 114550 +1511 596007 +1929 796063 +506 19669 +220 862489 +562 936380 +1762 586929 +414 929813 +1643 130154 +536 458861 +1366 312739 +1180 638422 +791 704776 +802 154987 +734 10694 +1684 395174 +266 347688 +1304 591349 +827 175178 +187 514806 +370 949710 +813 35001 +239 201129 +1700 933094 +1419 244449 +542 401775 +1830 673390 +55 798847 +78 843967 +290 838882 +971 609778 +529 246140 +1630 967278 +606 29927 +132 101408 +677 75112 +108 611951 +934 214813 +63 105266 +1683 915512 +298 189457 +1432 651624 +1488 313728 +676 290151 +1901 780689 +148 325150 +560 52835 +974 276736 +1400 836351 +1948 209271 +570 328742 +687 690473 +1515 625403 +1776 76536 +980 569194 +543 680138 +1869 512832 +853 236807 +375 165358 +725 640092 +1399 142466 +579 217775 +1774 520670 +1327 479866 +1871 79456 +550 298023 +152 820494 +442 805120 +610 743093 +1426 46359 +1970 166038 +132 131692 +1409 121988 +116 573496 +1877 247894 +1180 489254 +909 111561 +981 129266 +1190 64961 +1589 324845 +1446 366046 +918 803691 +504 216900 +189 268065 +74 524692 +1417 521464 +1382 40766 +749 186706 +1565 196147 +1970 365827 +1562 387492 +1113 224594 +233 20635 +1855 120433 +1074 357619 +1096 747884 +1253 776513 +771 379845 +482 771868 +1062 882558 +853 486234 +39 805459 +1356 784073 +871 164969 +520 215548 +1491 731055 +340 196064 +49 733386 +467 856565 +980 453659 +47 635140 +122 250013 +447 226254 +559 226458 +1634 75229 +745 12259 +1450 644026 +182 471900 +1086 403025 +923 910654 +1779 734680 +1988 161615 +1939 332389 +1659 778293 +811 353485 +1124 166864 +1885 731559 +640 71465 +50 362747 +1014 756703 +839 994140 +1050 816179 +1943 820244 +1954 704075 +135 485327 +536 491290 +413 12524 +1875 311258 +1978 272316 +581 315324 +784 777313 +1574 751002 +1797 554077 +609 394943 +803 759634 +1577 356644 +310 675942 +1549 632310 +786 75673 +1580 580428 +1916 705164 +369 663859 +1209 929405 +60 853469 +154 165162 +587 176982 +1801 46194 +1973 326648 +1272 812764 +1772 261180 +1842 839663 +673 693897 +1485 527134 +404 120498 +867 476351 +1286 689785 +1411 680918 +1325 182222 +733 469411 +1519 131568 +1279 272343 +589 618857 +1474 472660 +1995 446518 +171 364565 +1797 753028 +264 268836 +382 444512 +378 113707 +1877 954448 +1251 246721 +519 939029 +281 917270 +1374 579212 +719 823755 +1245 558416 +1082 361063 +1288 387705 +1168 522061 +1568 51974 +1622 867655 +575 298080 +858 938054 +1061 761065 +1582 565310 +276 914716 +608 69728 +746 95025 +1103 59994 +1476 403641 +1502 371324 +1010 423331 +909 538330 +1277 874178 +239 710691 +530 618388 +1513 875649 +183 635639 +1576 503477 +417 86263 +269 927883 +1904 250703 +813 188314 +713 208552 +1116 281715 +1345 150658 +177 138893 +1387 757018 +473 63466 +1468 692810 +64 569858 +1502 833670 +1130 284794 +1335 715254 +440 890636 +1658 245457 +12 823883 +339 924073 +1436 746352 +455 794695 +291 634535 +264 868379 +302 252737 +1575 143055 +869 528406 +1358 692294 +1595 262751 +1705 632592 +552 69587 +340 368652 +220 749871 +674 69217 +1862 145945 +882 737981 +1426 556601 +1518 16963 +1939 415279 +1822 347439 +1371 289710 +1129 303222 +271 284614 +1769 695244 +985 142419 +1719 501393 +1254 117956 +1724 451433 +1569 676561 +1862 92945 +1853 767138 +1798 698219 +937 349985 +851 667115 +1806 750725 +1832 797657 +1109 509822 +1189 293841 +656 95515 +386 278247 +1277 548552 +1534 211056 +626 571719 +928 184114 +191 683102 +100 470521 +1759 415436 +106 981856 +1034 321144 +1169 967672 +627 794348 +345 544574 +542 880177 +5 481620 +152 501691 +1956 685005 +46 473860 +1588 20510 +632 51874 +1289 315816 +1640 444384 +1031 774833 +1892 995118 +1395 347134 +1359 389509 +1983 505369 +1769 817962 +196 242260 +1221 192589 +416 974112 +165 417970 +346 702023 +601 874091 +566 807812 +1935 355485 +595 265753 +1362 251246 +1623 695895 +205 650046 +1625 489690 +212 844473 +622 962640 +82 863146 +685 859173 +893 309349 +1644 175424 +1716 413890 +1878 216190 +1385 834065 +1660 802808 +638 957956 +369 386686 +1994 635703 +1896 650177 +586 972204 +175 356897 +1220 700265 +486 433868 +1249 408149 +749 897063 +1267 952482 +1412 516124 +16 932862 +1358 814776 +1170 242944 +245 436036 +211 291188 +779 129088 +455 18137 +905 836795 +717 836593 +1092 802781 +419 666393 +1368 13391 +391 376785 +1612 959763 +794 515609 +1792 6328 +861 632223 +219 445618 +1086 189686 +501 626825 +927 528870 +30 665909 +1754 311836 +470 883814 +1008 990356 +1853 516953 +387 478738 +1940 151441 +248 939485 +1431 116613 +140 401063 +934 441733 +616 555451 +288 973245 +267 981010 +1559 462799 +1372 17060 +1941 52280 +1963 239931 +629 331782 +253 532739 +362 122278 +1269 481949 +835 479602 +1356 937817 +1267 433576 +1578 11636 +715 435431 +1110 200146 +661 820029 +1806 75511 +1543 282090 +607 769145 +329 12380 +1455 649261 +1737 459481 +975 291099 +1054 117952 +570 773753 +1670 935424 +1999 307419 +46 40029 +1390 536719 +1585 571742 +1663 507202 +1173 957514 +1364 396628 +436 828421 +883 372113 +788 803436 +718 149054 +1687 596112 +304 934839 +1865 389903 +1130 437481 +857 408854 +1078 722940 +444 991363 +1219 885505 +498 476164 +1956 976430 +822 345076 +1710 897297 +1308 36155 +283 96115 +1680 646450 +1409 82497 +1036 181485 +159 296645 +709 495029 +447 475700 +693 797860 +366 35380 +1971 132266 +1589 434730 +647 336044 +1545 613688 +164 29950 +836 490214 +1435 860756 +1385 745315 +895 926247 +1224 827456 +1010 464573 +1848 382016 +1720 389101 +433 839996 +1107 244716 +1148 454900 +25 81063 +1408 486350 +1504 225764 +1311 27844 +1066 343613 +1042 161264 +647 65008 +1850 142570 +78 301564 +1807 865354 +1665 80047 +1274 165546 +1949 975318 +1685 682317 +963 665422 +109 944000 +942 953560 +844 467387 +84 782189 +1686 537893 +70 402092 +1445 120305 +334 71802 +348 436419 +1545 331122 +661 814356 +1091 71696 +764 820278 +1458 73473 +1817 383796 +442 951709 +582 11687 +726 746742 +1964 594143 +1230 574729 +674 670505 +832 439428 +1424 283837 +872 108528 +1600 887538 +1167 368367 +1427 460736 +1613 99479 +538 652425 +245 416973 +226 578532 +253 486268 +1091 777441 +1917 760404 +1150 916398 +1307 272458 +1886 718838 +722 364527 +1235 443304 +227 635131 +575 966658 +1572 807706 +637 913890 +1252 531673 +1012 539040 +1813 809432 +1934 723978 +391 373522 +1120 35882 +528 184596 +800 942564 +253 317632 +1610 845681 +1097 401973 +239 273606 +867 960580 +907 497802 +77 228751 +1425 731791 +225 962927 +601 236740 +867 822308 +1991 701676 +559 461568 +1936 261159 +1025 860390 +153 488433 +334 882711 +1191 354444 +1052 339769 +1372 376141 +164 764266 +1385 449595 +1165 948466 +774 660971 +388 167582 +337 316878 +400 271618 +518 800524 +1004 963539 +687 532048 +410 850126 +776 327736 +442 401899 +170 845036 +902 757748 +1358 670801 +1795 367589 +398 664039 +1147 520983 +1904 591540 +1522 393160 +1848 607267 +1288 152726 +1417 67959 +1925 756509 +1732 695621 +1928 980866 +1885 722267 +597 225148 +914 433771 +613 78573 +1373 233141 +792 530189 +1123 530127 +1628 234478 +126 287923 +1088 57834 +1752 815903 +105 208061 +137 689976 +1585 942415 +1094 238549 +1360 35634 +1671 986624 +974 234712 +1300 925276 +869 942971 +1686 298006 +1928 185337 +956 52918 +300 422924 +1716 772525 +1593 568978 +1798 492112 +343 497785 +1321 475520 +521 467581 +1524 824181 +991 722978 +617 192738 +1202 316589 +91 461886 +1050 574344 +1342 115436 +1991 570526 +188 592337 +1872 554936 +1315 897809 +1031 921610 +1711 763828 +1789 494612 +1283 49575 +1053 676163 +1723 666961 +1680 436915 +860 861525 +1508 444535 +63 456996 +173 403364 +103 777380 +541 418959 +1296 669503 +1063 72386 +1056 377859 +1796 309996 +1164 904573 +788 285517 +107 810329 +1928 414664 +1722 729563 +1575 16816 +1432 980375 +886 953649 +447 122203 +40 115722 +512 811157 +1944 289748 +1872 664727 +843 54722 +1365 667975 +1543 990554 +353 44879 +441 51239 +53 259636 +1771 138880 +1584 371905 +1076 204802 +1380 484100 +1001 981587 +410 541168 +779 870555 +435 863546 +1992 213402 +29 739800 +1161 739891 +776 875039 +1783 970592 +65 763354 +1410 628113 +1983 760248 +417 746295 +1524 92972 +491 728416 +1048 319683 +1490 380110 +1018 282370 +1517 610264 +624 107842 +52 909107 +348 533350 +697 230180 +1193 268805 +1020 6685 +524 115893 +598 769855 +956 262700 +92 1032 +1401 467896 +1292 995443 +1730 218179 +813 555923 +719 619892 +725 853634 +726 642218 +1633 28192 +625 858077 +204 824400 +870 424519 +741 851557 +97 700244 +331 77687 +537 619954 +1440 47133 +1829 408142 +1229 351590 +1335 506075 +1616 341070 +1885 605726 +1927 441071 +913 662196 +1060 433431 +1698 966692 +1619 565135 +1308 829458 +103 325617 +34 912508 +1956 730996 +940 698992 +1151 100544 +1821 391331 +573 33203 +981 838220 +1170 948128 +11 480480 +301 638036 +1658 943875 +1815 264306 +553 271869 +445 976401 +117 926340 +1068 204572 +394 549107 +476 764085 +830 277439 +1172 383856 +619 158033 +1738 906241 +702 582579 +1867 531825 +1955 42292 +243 590946 +694 409303 +744 575358 +743 852940 +281 143979 +1679 526844 +1163 63353 +841 536105 +829 271887 +852 883731 +233 645132 +478 256691 +1986 479065 +1719 269385 +1869 70024 +1073 218281 +1914 840902 +853 686430 +1759 587234 +715 163052 +1006 75343 +1347 843486 +1548 141487 +800 194991 +1430 240860 +554 937702 +1902 249742 +1586 180571 +1199 491575 +1660 516403 +97 423675 +205 432890 +152 32530 +259 686665 +1634 778016 +386 113057 +351 503401 +452 932978 +1655 880806 +520 691135 +759 501815 +1894 781671 +1761 90380 +1623 260807 +1426 263512 +1684 598172 +196 226983 +1156 612051 +1704 576716 +624 484781 +1501 62681 +1049 478897 +1179 443325 +988 168971 +1811 685705 +1102 765981 +1819 644502 +1219 829324 +89 343466 +692 397568 +1663 827286 +523 220574 +163 665745 +1585 560663 +1260 713322 +1057 945215 +1768 194909 +653 827001 +1178 866069 +1320 394473 +287 931550 +968 734948 +1372 336620 +72 198472 +252 356891 +624 333638 +924 27599 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-14-rand.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-14-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..ea47043e261f847183c0dd7637d5a3e320abaf31 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-14-rand.ans @@ -0,0 +1 @@ +82074764 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-14-rand.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-14-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..f83d0f4ea0d40723253cd74f7bca3a17526e6625 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-14-rand.in @@ -0,0 +1,1819 @@ +1818 1285 46 +1389 209192 +1858 490830 +546 476806 +1235 271014 +200 50153 +312 403247 +14 614316 +1325 678103 +1578 80187 +1761 49061 +873 952924 +1724 877902 +1764 532606 +1713 588388 +451 171133 +296 601504 +1047 863720 +892 263300 +17 426080 +1420 486368 +1093 390243 +1270 379115 +165 349491 +63 569740 +605 589672 +28 920054 +1880 766411 +624 860170 +668 111362 +1528 113837 +210 656977 +1609 189888 +311 966820 +1636 107869 +1537 993882 +1851 331653 +1102 893097 +862 51453 +391 521586 +1153 8953 +437 757837 +99 869559 +1672 911732 +819 621626 +889 199512 +769 957916 +419 342082 +1308 991434 +452 824087 +1336 291502 +965 854154 +775 572237 +346 30081 +1669 63046 +148 293671 +379 338972 +1207 585273 +1194 825824 +1473 931371 +1067 571606 +1990 948884 +150 770317 +647 674642 +1791 100385 +465 548460 +67 615679 +1278 969135 +895 700647 +923 354091 +883 209062 +1094 791300 +657 868001 +341 605082 +696 914969 +1011 254214 +1128 492144 +787 538644 +442 629663 +223 804359 +1290 9790 +1651 965504 +1024 108060 +709 988067 +707 122669 +935 3644 +1478 43046 +154 244670 +1436 783948 +1996 673496 +1587 524894 +1796 391464 +1788 79618 +1554 944465 +1589 262473 +1200 122493 +281 761747 +1676 488873 +1004 460650 +1192 286542 +658 693413 +1485 336941 +1962 759785 +768 867949 +939 393688 +97 584244 +105 235971 +1895 508253 +174 274181 +649 51039 +1875 926112 +66 611993 +468 679082 +1027 799232 +1835 578929 +1433 149591 +756 314122 +896 267574 +1374 642432 +532 179243 +747 670831 +793 210378 +1961 632458 +1521 678513 +1649 473554 +941 313869 +1200 483674 +529 835591 +1705 667453 +599 399583 +1506 971251 +1185 164892 +1634 829623 +992 178488 +1154 984027 +1942 917618 +490 493212 +1738 532700 +1625 964321 +215 253791 +1158 297994 +1168 927881 +504 811403 +1890 983845 +563 117153 +286 683988 +177 630946 +908 980007 +675 613407 +1277 473727 +631 437098 +921 58153 +381 174275 +949 98199 +825 262298 +1678 933393 +763 453188 +1384 439175 +1613 533945 +1435 141562 +1118 365036 +1460 470305 +140 639107 +1773 995869 +1751 792518 +1841 553253 +587 463474 +86 937116 +1360 787050 +390 200262 +1393 609560 +1988 308394 +1008 610867 +288 401600 +1440 74080 +1200 615005 +616 703662 +1432 42397 +547 518922 +1842 217447 +1673 395581 +1043 64347 +1120 559637 +382 413410 +835 297020 +759 358573 +635 745285 +1141 570883 +459 995426 +1901 866439 +1227 687770 +623 276368 +543 789834 +77 27645 +1005 43570 +1743 527245 +680 442097 +485 120312 +1540 432285 +583 453176 +1550 864985 +569 937108 +2 336451 +46 830420 +1818 830800 +1580 159762 +1738 576532 +1285 22285 +991 363599 +1350 681128 +1898 426893 +1266 725342 +117 329470 +985 496288 +1766 92341 +1647 15193 +1327 323569 +532 867733 +615 917192 +5 941502 +990 737950 +449 355059 +775 30363 +644 102624 +1783 263277 +40 182099 +336 762874 +430 775655 +1817 632125 +1618 294211 +1017 175048 +911 665903 +513 884844 +232 413262 +991 426359 +1898 397445 +1340 977299 +1048 945955 +260 350658 +782 928597 +1568 383608 +1575 677707 +1279 978954 +1464 255530 +60 262910 +52 841832 +1194 571025 +953 441541 +186 402853 +1744 561608 +1159 808631 +1426 336870 +1126 962581 +584 920604 +1069 287269 +1431 242423 +1107 642157 +1203 972257 +644 552263 +1797 660054 +1301 15877 +1125 621352 +453 471165 +941 47766 +852 714222 +1962 16042 +628 755034 +1363 437192 +488 620436 +1255 392113 +1682 297660 +1251 951640 +1141 328454 +872 483444 +52 937989 +1387 475308 +19 558770 +193 420950 +236 927445 +438 583443 +1265 8040 +1380 294522 +1974 904783 +61 218251 +242 156831 +409 317977 +1858 960356 +16 450321 +955 443640 +1214 920214 +1965 22099 +438 698596 +1577 829690 +1703 983004 +1145 648153 +1631 989468 +55 612323 +1038 184328 +1522 957937 +683 364471 +905 5000 +1938 829168 +368 562301 +694 773639 +458 184556 +1553 821383 +1590 621326 +307 230702 +113 301629 +1008 722488 +1817 469072 +363 98033 +1533 581917 +91 726088 +792 328863 +569 143624 +1688 499938 +1500 998358 +1389 175702 +455 220243 +523 3270 +274 662459 +969 178109 +1347 529256 +1372 25405 +1882 408056 +646 294362 +851 882879 +1417 48520 +503 964217 +189 745336 +1604 299842 +886 66075 +1164 523831 +1907 676370 +1768 368528 +1939 923680 +316 351626 +1733 147629 +55 750854 +969 824917 +1966 618876 +375 544827 +125 439107 +854 136492 +1318 617692 +994 43763 +185 917689 +259 964386 +1355 718431 +341 189803 +482 2822 +840 688837 +570 382018 +1235 758076 +1698 984236 +990 827264 +1476 3288 +195 837768 +1464 794742 +1028 168198 +1106 422364 +796 974148 +510 732407 +176 984640 +240 495500 +1178 896820 +1473 140366 +444 353679 +619 577982 +572 80031 +1876 368651 +224 403723 +1998 366081 +397 320532 +795 9649 +377 152617 +1718 548482 +1581 424808 +731 111254 +1018 325384 +1609 627180 +1288 369495 +1646 861889 +521 174821 +62 826898 +1607 897662 +679 903013 +1351 172952 +1063 460308 +767 920490 +1479 809455 +399 742802 +74 460587 +874 452273 +1274 57352 +179 233652 +224 739999 +1155 68441 +1308 398026 +1252 873268 +144 678705 +627 583374 +1376 516784 +1316 653795 +196 991083 +855 114520 +842 197639 +501 73435 +1456 357886 +154 961478 +1068 49774 +1046 467541 +1163 504524 +885 382481 +1534 897077 +1076 202454 +262 508448 +877 2110 +515 843529 +1516 643235 +37 35176 +1380 453427 +36 759516 +1287 762634 +1037 664242 +83 854904 +763 943264 +1232 758911 +603 367268 +1974 332370 +1616 532006 +1418 18603 +1741 144513 +633 296838 +1173 605485 +1310 864591 +570 315494 +980 711750 +1103 839313 +666 50261 +708 700671 +1498 737341 +729 972294 +297 823728 +1171 581277 +1571 587075 +1677 420995 +1247 618391 +983 108143 +160 870993 +1614 876498 +1582 441472 +157 447334 +1705 553746 +1311 389630 +1525 665820 +1337 7689 +1820 272634 +1286 864157 +1765 894779 +783 707049 +92 22060 +1650 957178 +323 251152 +647 348502 +1352 581913 +776 891796 +7 839507 +1330 158948 +419 746343 +853 785948 +703 90926 +1333 714816 +1725 560717 +1240 251150 +518 161800 +1986 451882 +358 373199 +1563 336232 +1735 874770 +1010 993688 +1947 463143 +1275 528600 +1603 123083 +171 94799 +1569 69667 +1043 233882 +1008 787338 +1221 82835 +1833 508566 +864 509994 +1981 672180 +1784 251909 +293 428457 +374 120667 +1556 107022 +854 368098 +818 253062 +1483 177199 +1199 294478 +1409 312584 +1256 323718 +1356 700079 +1346 253935 +793 705738 +760 803415 +1103 385904 +1900 917896 +1801 267597 +407 228370 +1393 283332 +503 509173 +428 84895 +1679 294511 +53 782709 +704 60571 +879 39397 +1566 54993 +1831 362540 +1875 841604 +1843 721641 +723 532279 +1301 457051 +1895 264542 +355 454383 +1324 660175 +425 422620 +1329 425014 +1448 959577 +115 894124 +606 117017 +1458 827021 +743 57256 +1041 770517 +113 789955 +672 613372 +1411 915421 +134 26347 +740 294894 +1194 20381 +1860 884581 +1741 666232 +1155 38059 +1771 480193 +524 312746 +1877 314422 +960 386579 +467 276032 +902 162705 +566 400614 +1125 362971 +1124 433929 +394 982134 +321 131082 +68 364837 +228 189983 +271 470689 +1556 923063 +1706 808732 +1755 618620 +1441 256523 +1088 424667 +1665 484734 +214 848516 +1154 706288 +1945 483107 +913 935971 +1895 628464 +1681 827066 +632 627776 +1712 186563 +1740 450292 +1847 184751 +47 976573 +345 484125 +30 612066 +741 930884 +125 968241 +897 354536 +963 239403 +646 698250 +1508 358959 +692 426541 +859 701215 +935 20391 +834 618491 +1447 537763 +1793 332521 +415 904579 +1117 113086 +1066 565075 +355 462308 +39 375944 +1518 302955 +850 200802 +56 144135 +1008 700342 +121 69099 +348 689809 +138 746952 +440 690434 +253 920084 +1368 624623 +1734 911247 +101 470649 +954 821098 +1083 663842 +206 897429 +414 241018 +241 156739 +1731 963766 +805 730531 +1746 450220 +1916 99105 +35 223839 +737 313184 +1317 604760 +16 198148 +1211 921413 +1534 194208 +7 77864 +460 23495 +1608 58685 +1370 657450 +428 638273 +361 122102 +1640 484419 +628 154742 +724 699771 +262 345928 +263 680943 +1046 276252 +1816 906720 +560 327600 +43 903737 +515 149298 +397 227751 +1171 885622 +726 720758 +269 543713 +1505 199802 +1867 100757 +276 879744 +1362 98463 +573 122099 +1563 120058 +1961 68881 +513 901605 +1362 571334 +1703 462728 +547 295045 +1161 727059 +837 231333 +363 50435 +364 779130 +1658 264710 +1082 852602 +1981 959131 +1140 931879 +588 43230 +1438 345948 +1232 431250 +870 61050 +1718 923777 +943 116601 +1098 683715 +512 120812 +1530 655344 +96 23902 +238 595181 +1651 40733 +144 33198 +506 22665 +106 244586 +372 803628 +575 554764 +1606 928789 +1105 735519 +320 965745 +1773 608274 +421 824375 +754 256467 +133 924884 +192 362902 +176 802476 +1094 729636 +217 539544 +10 714905 +1435 829629 +1193 862218 +1198 41183 +1707 554871 +969 785687 +1962 190428 +465 955424 +148 489102 +521 407640 +1710 550767 +1358 802339 +247 67412 +1935 578050 +1314 235473 +1329 95076 +388 361620 +33 377270 +395 532885 +1574 248379 +1409 953338 +522 701690 +574 246554 +882 578365 +473 355158 +176 130546 +1183 321767 +53 693013 +1994 944720 +1695 948023 +309 397323 +1473 529976 +466 183207 +1143 532361 +20 360569 +1937 177427 +936 383812 +1366 398680 +834 803914 +712 468093 +1315 117745 +640 998680 +896 785461 +776 650863 +1023 544912 +404 998030 +1988 149150 +1682 903064 +45 798666 +1363 577877 +1250 290058 +1017 510084 +647 322254 +1557 709081 +143 119900 +497 760439 +1753 270712 +275 767200 +846 567063 +319 729804 +726 962120 +662 738548 +281 552177 +1191 886249 +666 846765 +1452 559914 +693 585213 +199 140947 +1661 947331 +189 870930 +1344 107212 +123 8432 +1769 603761 +1476 867238 +1868 121675 +1183 740264 +1134 508929 +249 520560 +1177 264376 +1027 422168 +1521 490560 +463 642630 +259 352769 +853 496763 +252 297589 +582 623930 +344 877795 +1313 193106 +1285 925504 +993 32437 +1338 49743 +1181 842964 +594 830759 +1370 42768 +502 460513 +1403 286141 +1845 286737 +1534 771064 +1369 760795 +1805 27506 +23 794525 +1426 331038 +1636 804243 +1331 402051 +1089 4445 +1307 301391 +895 627895 +421 739823 +1168 91733 +1594 117926 +442 871707 +603 853085 +1156 787160 +1555 479833 +1212 200903 +1274 102566 +177 562608 +176 303644 +1180 301551 +1611 672516 +1506 147620 +1271 687568 +603 894488 +1147 408893 +257 429081 +1226 886071 +636 662834 +1301 218299 +103 727865 +1288 503150 +594 548816 +1497 117476 +958 264174 +547 71479 +573 742252 +11 813171 +1921 127564 +106 864171 +201 842896 +1966 177441 +16 465542 +710 2802 +1057 212383 +1091 330513 +86 305724 +1239 956125 +867 379678 +775 535245 +1502 299790 +64 164728 +1061 185437 +830 785554 +407 525928 +960 52428 +263 110294 +968 572926 +1007 238731 +1381 12922 +507 853724 +1358 38534 +1524 160583 +1308 316670 +1358 727221 +182 264 +918 340790 +1216 559843 +1680 801021 +457 820253 +52 244141 +1199 634354 +630 415082 +669 874655 +568 795569 +282 445163 +1828 968715 +409 657633 +577 911307 +1162 883867 +94 918264 +1357 120100 +348 152841 +517 858716 +263 110274 +436 81608 +1703 905204 +1160 361957 +539 368429 +1880 935126 +1810 446598 +992 285305 +1313 587672 +207 254268 +1478 76024 +1473 741454 +1402 280906 +783 253023 +1051 609494 +351 496849 +1482 211396 +524 682406 +1148 712527 +1569 671940 +513 732650 +1942 201903 +1184 76816 +798 246362 +63 121184 +1824 884725 +1624 27627 +367 825507 +865 918407 +566 277743 +1303 216485 +546 377391 +1359 533188 +1627 761342 +726 940163 +605 95642 +1966 559674 +1195 247695 +1243 485813 +561 866028 +630 960131 +702 72038 +1773 153057 +475 495278 +959 31339 +1275 384583 +296 593855 +428 271779 +879 432566 +527 209450 +337 68141 +1194 355708 +1971 294160 +536 514411 +208 166810 +1416 566554 +513 200428 +1521 242248 +277 388124 +947 508631 +825 13599 +1504 834623 +1192 244507 +1754 947887 +1004 587797 +1537 188945 +924 643997 +343 618272 +1854 134749 +1563 919683 +1636 379172 +23 772845 +1915 707702 +1034 166534 +488 657755 +1502 688282 +1884 390159 +779 947235 +1495 434561 +1595 844496 +171 688654 +1824 184697 +1114 358562 +1685 454145 +191 714968 +1039 366826 +1672 74045 +931 870185 +1015 682075 +686 884120 +1685 416932 +1488 818650 +555 782344 +1264 81042 +1945 62621 +324 548576 +1539 802313 +1592 138471 +1298 597101 +1246 17213 +1387 281299 +1720 549128 +1676 303176 +343 617051 +266 871813 +1504 366978 +1452 278883 +1378 430751 +1071 413773 +569 229994 +96 9043 +842 361803 +614 198523 +731 625433 +1829 3664 +31 37778 +1597 176611 +1157 549578 +24 934234 +685 830266 +1584 690404 +514 197955 +1915 292325 +1630 894840 +67 625472 +980 586984 +1641 980970 +1905 758694 +1298 611671 +812 264421 +854 683072 +618 204056 +1333 432 +856 501781 +1691 614754 +1584 636633 +1519 777799 +471 263903 +188 123860 +1541 928434 +1235 170246 +94 377406 +198 748282 +1031 961911 +1069 242372 +1074 401000 +1019 180457 +516 265788 +528 872102 +264 369269 +524 790507 +713 696353 +1861 456544 +999 62112 +565 777063 +39 441896 +430 554743 +1791 222820 +1628 898681 +394 386812 +202 963756 +1728 271786 +806 260414 +201 683365 +774 166508 +646 299983 +174 548260 +1660 407053 +445 114665 +1878 473143 +1015 642411 +1068 147841 +1282 742721 +1436 684902 +107 582106 +350 209546 +1478 587607 +301 857594 +1590 237196 +229 842017 +1232 451196 +1722 289968 +1416 581247 +1661 155779 +364 42441 +1927 651544 +839 769704 +1619 840087 +1705 152181 +1597 601764 +1729 754235 +339 12821 +1047 60604 +854 793212 +1015 683670 +1778 333734 +1220 919080 +884 75243 +223 166173 +736 921380 +524 461157 +3 568046 +372 626949 +721 394209 +59 892911 +1097 216396 +276 506448 +1711 657173 +383 437768 +212 267534 +1591 433168 +1504 757470 +582 981835 +1013 743494 +1961 428030 +1278 893923 +1066 908205 +645 784704 +281 235913 +97 73642 +40 748876 +1222 857626 +487 8287 +686 579541 +1345 199690 +541 203556 +48 870022 +1739 659668 +189 369625 +1452 503844 +1706 853366 +456 140070 +1750 419727 +506 711202 +876 904350 +1201 684086 +189 395117 +1518 300033 +770 330221 +1793 40345 +905 340556 +1794 946649 +1033 261093 +1012 58529 +277 542310 +1726 539622 +236 528814 +1706 679082 +1472 899371 +1536 690543 +540 596352 +843 827432 +1318 959652 +1729 493375 +968 157491 +518 983785 +1142 347859 +1540 609538 +1408 563723 +236 106206 +870 212434 +1405 882316 +720 645924 +678 827839 +83 761098 +1866 597394 +1689 447941 +1953 278845 +455 798698 +1202 443479 +961 600244 +660 250224 +878 490813 +1404 561316 +1437 379964 +1136 648443 +1654 837205 +907 954321 +449 429086 +1101 9586 +962 584693 +1023 867250 +1722 949213 +715 225530 +1005 671446 +1026 121506 +254 508107 +412 333149 +1461 18130 +350 427093 +1374 766840 +1159 132180 +22 716129 +457 562115 +774 315671 +366 139494 +911 51777 +61 833553 +1376 794087 +485 671660 +674 136914 +1296 849009 +1237 294337 +252 285152 +264 255050 +271 365996 +1112 637181 +535 710582 +488 719152 +785 649374 +172 974903 +32 443049 +575 64778 +918 37697 +1467 947331 +1860 227502 +912 475510 +710 395283 +1901 335421 +467 131428 +1421 781124 +443 532227 +152 479245 +982 894501 +1861 801347 +520 83213 +1636 670227 +14 649978 +1890 830680 +1065 141185 +283 660817 +142 199136 +1965 620234 +1156 571110 +111 200720 +1858 866113 +528 952930 +716 965644 +860 802545 +1843 82184 +1629 550789 +1080 70872 +825 467556 +428 475338 +1366 601203 +507 551601 +1307 620706 +580 635282 +413 495620 +823 524286 +1371 777749 +31 548662 +365 388028 +1991 297665 +508 18819 +107 952744 +82 434617 +1944 990854 +1230 34757 +330 583396 +116 380319 +274 12539 +548 284296 +1128 558252 +884 639916 +257 410726 +1077 547304 +1657 112961 +849 501214 +889 410424 +1352 236569 +465 223104 +1977 474906 +1173 782229 +1541 18458 +1841 7678 +1384 559141 +1366 898689 +158 647074 +235 978793 +875 69059 +1847 836729 +210 597777 +1270 382380 +83 353119 +1893 534814 +732 113145 +298 480180 +366 205613 +509 778712 +1418 639295 +839 924576 +70 562508 +697 311302 +1065 454797 +1174 262828 +1962 519415 +1171 462969 +706 816600 +2 390570 +229 734333 +1888 151659 +1751 709562 +614 655798 +372 206504 +1619 534515 +218 273741 +1086 310185 +701 205108 +1368 894873 +1312 195027 +903 660788 +260 696269 +1434 64453 +130 260927 +133 285475 +1137 540877 +386 267262 +403 891434 +1954 796368 +516 968765 +1909 355515 +447 938946 +1512 218224 +215 502651 +630 751311 +489 919652 +1459 391344 +58 936091 +353 362241 +1977 647893 +363 799310 +1248 220799 +1260 798257 +1856 173546 +253 505287 +1716 922369 +688 98875 +1308 308220 +1501 77854 +1857 387040 +1472 558578 +376 68799 +1315 39415 +98 256711 +1542 483429 +348 615844 +910 275180 +1487 808247 +1564 309803 +1860 988549 +177 572883 +1904 556954 +1844 956582 +541 271310 +1548 960871 +1103 530327 +935 35880 +1238 805392 +319 505451 +624 903899 +1494 149544 +1636 136107 +1468 361873 +136 128172 +658 147604 +1596 484496 +1893 516424 +447 399237 +630 105684 +379 933276 +839 736218 +1976 363383 +1448 736798 +1661 970152 +183 634103 +555 412726 +1485 743838 +1623 183242 +511 672610 +1340 607983 +1457 524744 +1505 249995 +785 144535 +1534 554126 +1605 660311 +1888 612892 +1606 844028 +1251 525378 +1702 126137 +1615 640341 +1513 255133 +610 63530 +1945 725901 +1313 60789 +376 516194 +594 749290 +1015 642953 +1837 901324 +542 831781 +1310 103401 +1541 327791 +1235 376023 +1900 829127 +1598 223258 +988 295107 +182 624168 +1372 205763 +1752 454186 +886 680275 +1666 399948 +1182 174525 +1620 82457 +1805 369837 +1159 135341 +1225 333218 +252 393795 +1774 883529 +642 430215 +1351 670755 +1292 323872 +702 952832 +841 615199 +837 171488 +596 604947 +826 908120 +1159 473886 +1217 504073 +760 230990 +787 766142 +82 847871 +1552 366240 +1524 580583 +1399 572268 +629 394531 +1889 408366 +894 304475 +1474 883862 +1597 806722 +366 876556 +1874 287792 +601 101604 +837 574909 +717 689287 +1183 309026 +1411 151053 +1539 498707 +824 564526 +762 789838 +1007 69753 +1 966339 +393 269057 +213 808067 +1314 397851 +1682 897666 +908 875436 +400 875411 +171 172443 +189 365754 +217 606004 +215 853576 +1185 517533 +1700 184256 +676 183310 +410 517877 +1210 118097 +29 278565 +1367 820197 +837 156174 +1901 805813 +332 317127 +308 820368 +686 697121 +184 914954 +1558 679739 +1663 219660 +105 600199 +1920 531990 +70 566102 +746 403972 +356 423245 +1868 31904 +165 545386 +1701 88848 +1401 249054 +62 643198 +1184 300393 +951 849293 +62 192739 +682 301126 +207 957184 +1045 1282 +1067 370524 +378 548604 +1693 767079 +1568 967325 +461 751281 +163 432334 +1931 61195 +1799 131152 +1449 408569 +1189 474250 +28 301285 +1942 988588 +1019 674339 +1583 768473 +223 80004 +42 196269 +1473 242322 +776 599241 +1657 142174 +1068 495249 +207 3447 +1755 745624 +574 237519 +1790 788529 +1261 499918 +319 241946 +1763 762986 +1649 972748 +1684 269249 +1664 293037 +1482 39953 +773 434568 +4 458955 +1334 79761 +665 262710 +564 723510 +394 519416 +452 341889 +1846 77070 +1792 291467 +1497 823515 +1790 670732 +1567 330398 +1859 472860 +1554 750004 +1856 110121 +1965 592245 +446 838728 +1631 256638 +1114 873122 +1254 184666 +1097 345429 +1139 774163 +508 466082 +435 332538 +169 246443 +381 134819 +1895 291020 +1240 353661 +1279 763288 +1985 697191 +1944 713376 +662 439363 +1244 645750 +1937 59671 +172 541695 +1078 721161 +155 82109 +646 687749 +834 673621 +1407 184335 +1536 359919 +874 903645 +1782 464279 +575 865704 +702 904353 +1817 46774 +140 204356 +1148 235954 +1962 828624 +676 560103 +1639 727121 +700 945999 +63 710322 +1591 605167 +877 104694 +61 932813 +774 368386 +1894 178844 +840 324295 +1185 678351 +703 800825 +949 407570 +989 27913 +606 729450 +257 103797 +77 147389 +1265 353221 +1634 31574 +879 208174 +585 746699 +1521 352602 +743 310759 +77 365425 +1749 750504 +1336 916007 +1899 655457 +1790 76977 +618 97690 +159 934648 +53 137094 +719 45942 +450 944619 +1058 801098 +1186 416708 +246 268570 +1425 59929 +840 427305 +1392 282344 +796 731252 +1146 193326 +1279 886664 +116 59396 +1856 540313 +832 212274 +1114 535869 +1900 55903 +1629 903674 +1473 389969 +319 197042 +122 939246 +108 378262 +569 474444 +215 47209 +1045 212871 +534 567374 +1814 275905 +246 616026 +570 73598 +628 444527 +1675 87766 +1099 104586 +823 104321 +758 371439 +1117 43676 +1783 562782 +691 771078 +579 967922 +705 988300 +1990 921921 +502 215607 +460 979842 +552 200614 +1889 600367 +754 676680 +712 69556 +1776 935795 +1618 838584 +1187 109578 +786 288355 +817 267901 +389 77251 +804 790940 +1013 550164 +1883 731216 +352 696692 +780 8215 +1785 517134 +19 809894 +1008 868927 +1023 952990 +628 641437 +1201 606934 +1556 75961 +683 996025 +1554 274809 +785 539731 +107 106433 +549 330894 +1521 479866 +200 548471 +1327 205011 +1057 494421 +1445 198305 +1070 84929 +835 743513 +1929 309542 +243 836635 +1351 694718 +1768 688107 +3 120676 +85 306901 +12 633536 +1431 318153 +90 147541 +1435 82607 +806 228867 +1959 265438 +1274 411722 +1385 276152 +1193 304448 +178 528845 +1545 819377 +1123 218793 +1495 374874 +165 843583 +1318 100020 +309 117079 +1753 97802 +917 570293 +17 194599 +1145 146253 +788 797216 +1524 893862 +1617 299001 +1020 649484 +1383 598730 +904 364235 +1811 943463 +1711 534590 +1785 878963 +928 281098 +1412 810080 +1727 334738 +623 375646 +987 977301 +1620 234307 +1084 499866 +1634 574411 +1866 711654 +1735 163318 +1835 44021 +1974 388404 +776 673893 +1641 161317 +79 850999 +215 635652 +1870 383836 +349 691489 +1311 255013 +602 994980 +1312 948812 +1459 771818 +925 651150 +855 938723 +1386 501839 +235 785255 +1019 827692 +1320 27021 +419 224092 +1754 69350 +445 643380 +272 615030 +1877 728126 +465 594834 +1742 205613 +377 680965 +1133 955587 +376 755449 +1197 938568 +1041 301401 +1232 27827 +649 230589 +80 778303 +684 537252 +448 394063 +583 23609 +465 733720 +111 423533 +86 918313 +1189 232428 +1702 865044 +1318 640409 +368 80132 +379 42538 +1686 657703 +12 725928 +700 976765 +401 890353 +390 781859 +1178 654767 +858 170943 +1420 266804 +184 32694 +946 227229 +300 703740 +544 73803 +930 598117 +1989 353237 +1506 107205 +783 292782 +175 767194 +868 460411 +1209 926467 +1789 290805 +481 801275 +227 470259 +1717 335910 +660 73071 +588 83681 +674 536329 +120 505987 +1918 988559 +200 123878 +1840 968573 +314 829939 +1126 851372 +547 161754 +1059 358936 +204 304458 +1255 594255 +516 338186 +830 890948 +770 791543 +1269 318342 +1983 419357 +982 808193 +77 445029 +8 441356 +1322 670472 +1500 448317 +851 4285 +179 161329 +1837 803535 +470 387625 +1207 554143 +1654 257128 +1684 717984 +1662 633767 +150 190134 +1439 515383 +1809 710757 +637 530795 +149 511955 +1094 658026 +1215 950313 +444 338385 +1705 529156 +1067 966636 +1986 739899 +269 807652 +23 6569 +500 620362 +892 885600 +1286 427886 +1782 141627 +267 286713 +1794 325923 +367 547501 +253 500705 +955 268552 +1947 250119 +640 749775 +1194 789245 +283 321276 +1 61556 +1704 8499 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-15-rand.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-15-rand.ans new file mode 100644 index 0000000000000000000000000000000000000000..c4495aece2664dc5668e6708fdcdc3d55c5f6041 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-15-rand.ans @@ -0,0 +1 @@ +1336750642 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-15-rand.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-15-rand.in new file mode 100644 index 0000000000000000000000000000000000000000..86a7d1655a6cbb1d575fe5fd73884cdb0b6d1f91 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-15-rand.in @@ -0,0 +1,1125 @@ +1124 1336 1333 +1320 302623 +782 797205 +66 75102 +1060 55011 +1142 807756 +1556 162511 +1007 807645 +630 945231 +1213 145685 +214 370347 +6 989289 +1245 564575 +1 870329 +1727 84622 +1444 391559 +887 497910 +1178 221391 +575 430477 +1592 417150 +1925 254040 +1494 364351 +799 173145 +1525 335288 +1011 399830 +335 437509 +451 625881 +304 481205 +1738 914443 +903 678826 +1210 863028 +1782 815241 +108 886052 +1582 941109 +1033 774228 +57 804055 +1122 387006 +792 832074 +1961 880748 +1944 306096 +767 230871 +817 470982 +1387 814688 +331 976212 +1212 17749 +34 725527 +376 69040 +221 496417 +412 865483 +1855 296527 +639 22440 +1852 591906 +1277 399515 +1243 915284 +907 400305 +92 174680 +1295 394868 +478 418334 +1029 919021 +1708 257331 +1698 623390 +942 787151 +1741 500612 +1550 319899 +610 334785 +1114 427156 +1572 682961 +192 909853 +1950 15088 +906 875947 +572 362524 +1976 93139 +1274 288115 +786 287252 +1652 32441 +332 675073 +1816 610192 +1760 181130 +1838 958466 +5 501763 +247 666058 +696 733263 +131 227303 +1720 31334 +582 969556 +980 164467 +1366 220672 +809 842808 +640 552085 +939 105542 +1777 570066 +772 439693 +1865 157951 +719 466557 +1443 447765 +26 350644 +1281 334428 +994 463563 +1234 81265 +1561 833679 +1058 806747 +884 344990 +104 454614 +985 489341 +1759 339300 +47 968042 +1521 858422 +1360 925651 +703 357915 +276 460495 +1016 575720 +1034 874726 +458 304005 +539 434273 +879 597820 +1472 168627 +1994 67237 +1419 824999 +369 467929 +1816 184393 +818 217939 +624 431725 +1357 213873 +1347 922438 +1016 174670 +329 811662 +322 156007 +94 971166 +989 403163 +1984 336564 +1936 89589 +1113 416676 +217 683526 +342 117659 +1521 191913 +1188 413699 +1235 423357 +1191 128365 +472 309276 +1231 183546 +1221 192925 +1046 230044 +434 30150 +792 282752 +980 318006 +783 589016 +1137 684050 +729 298633 +1397 811488 +559 442503 +566 812625 +1329 864877 +716 109902 +661 337948 +1248 538703 +461 245588 +1837 968781 +1948 896230 +471 87326 +974 746960 +1418 80111 +153 714878 +264 692767 +967 807508 +1102 626320 +57 694954 +1523 728000 +1141 528110 +1129 763730 +1480 677906 +1231 962235 +1644 281581 +1503 880357 +1818 38359 +251 127943 +243 16316 +823 855051 +980 46748 +765 92798 +800 940306 +472 566784 +1510 441094 +1965 543491 +672 979220 +303 253734 +419 622 +361 510217 +578 520832 +1238 101510 +805 477051 +1690 124568 +1866 648240 +1404 338545 +923 273048 +281 797312 +1929 614846 +1703 191874 +652 927422 +149 318044 +1045 648719 +1913 465871 +350 987683 +313 189233 +407 412709 +1491 481113 +60 52394 +1081 96573 +6 733757 +512 554962 +1215 750915 +490 421916 +692 875572 +1279 990848 +811 97802 +871 213752 +4 700157 +7 115566 +92 484501 +1682 116587 +1088 429655 +1947 920140 +1272 320629 +1050 243684 +175 728416 +1814 669879 +851 746916 +265 9517 +730 595723 +1708 151474 +1342 513691 +1285 949507 +932 95144 +1223 700476 +1468 731934 +440 645830 +1313 174139 +615 288017 +1061 674234 +474 907465 +47 639716 +755 312648 +1863 977579 +866 470267 +1341 593275 +916 60160 +822 747018 +1518 105683 +177 812565 +279 82404 +1433 869129 +414 730901 +114 512352 +1470 167837 +1046 637082 +1808 809087 +1932 837465 +1766 643947 +1965 992252 +661 720214 +723 774839 +1540 641893 +1777 374039 +1985 842001 +607 133263 +1113 766407 +165 350655 +174 85851 +1647 988526 +1899 650796 +20 57959 +579 925692 +22 717026 +518 76976 +119 831468 +123 211530 +1049 429313 +626 137534 +1091 693029 +310 107708 +110 825962 +1514 928013 +1642 946542 +859 294237 +1451 917208 +1351 43293 +1560 761545 +884 298440 +966 564903 +1381 66830 +1336 849175 +71 869682 +158 608342 +1118 697535 +532 438597 +760 797584 +943 899615 +789 887944 +422 169174 +655 87554 +1374 983810 +599 414262 +71 140102 +102 874650 +1175 864042 +550 70577 +1128 513254 +1346 749709 +332 363093 +806 260006 +1052 371877 +179 996563 +962 616268 +1352 753066 +711 624184 +1991 580717 +1907 366779 +596 756933 +371 262775 +1241 202668 +119 170512 +245 19779 +326 152539 +169 502037 +1798 860156 +154 136706 +1203 596122 +1518 103127 +305 443744 +463 517081 +271 235265 +1130 692451 +266 269316 +1794 932798 +235 232944 +59 800730 +641 701738 +1081 552991 +946 734577 +1164 780437 +18 488215 +883 934866 +924 175649 +736 828165 +1994 382118 +1836 404927 +1875 135662 +19 676454 +313 537953 +155 328197 +1101 864154 +912 919883 +317 321221 +262 367285 +786 825579 +1845 989409 +1089 588775 +346 316446 +365 234084 +514 604633 +417 805620 +1720 275518 +1307 637441 +1614 94084 +1491 891507 +1 352450 +129 897875 +1156 213599 +714 44818 +686 719686 +1992 689565 +434 325931 +1578 148307 +279 912 +1436 400847 +1411 54057 +1744 542532 +1135 219014 +1388 383334 +54 372881 +1770 299217 +1190 738274 +570 631071 +1240 267045 +588 507310 +1913 516730 +1371 772708 +1555 637344 +1742 969493 +1120 846567 +1725 829898 +31 966748 +596 82897 +453 649529 +1796 17811 +1098 920616 +1236 713447 +338 187971 +1365 410109 +1136 222501 +537 912118 +525 540562 +1625 361713 +443 899090 +609 600206 +1701 349390 +500 469762 +1647 584940 +216 782069 +162 330772 +23 677264 +554 910926 +672 782986 +626 337327 +688 8940 +749 335143 +1954 816189 +151 262728 +1885 921815 +1351 960638 +1693 167469 +1970 352024 +1652 363992 +1667 643028 +1557 802205 +239 547757 +1828 554852 +369 994097 +1292 327359 +263 765078 +353 942421 +1803 426400 +523 338800 +2000 840098 +313 534860 +1514 357145 +1755 654028 +1063 247844 +1692 545680 +1193 482497 +1843 808104 +1064 682352 +800 889039 +796 237300 +892 527159 +1240 786005 +1021 722884 +604 291215 +470 997337 +120 786922 +1613 786503 +161 867234 +516 901990 +1026 893175 +1643 501779 +288 946399 +805 948795 +632 561160 +785 399789 +746 115050 +1571 884262 +411 512134 +381 40660 +1744 963332 +1981 124937 +1955 63256 +1152 588058 +748 423927 +894 166922 +1937 439098 +1143 775915 +1369 20012 +632 540703 +1633 566730 +1046 82185 +1231 777879 +1146 100031 +315 766645 +959 884442 +47 386625 +1311 761595 +1073 55072 +544 885773 +94 935874 +1845 859733 +1678 79199 +361 744632 +1465 549996 +1955 214754 +1112 625191 +388 210826 +338 753596 +1423 263977 +196 90892 +1469 105342 +1006 49332 +1749 53108 +1322 401302 +1164 201650 +1709 636617 +414 561800 +615 73068 +1978 742212 +1485 474630 +1427 78334 +1494 792091 +1133 964958 +1114 553029 +1653 98766 +1602 590296 +606 724239 +1029 752749 +1770 126402 +1984 620585 +748 816338 +1459 48501 +243 701890 +420 628671 +1190 158863 +1583 418234 +1368 425418 +1905 528161 +1636 684526 +41 85536 +860 560428 +1845 40187 +1722 609515 +699 176884 +1819 693928 +1796 147996 +542 737287 +52 822379 +1866 587962 +1798 975782 +696 214694 +1006 659063 +1874 708395 +152 595349 +1676 995343 +1204 687611 +16 586539 +1358 390142 +1027 381123 +994 746408 +827 839117 +405 941829 +757 252523 +315 882125 +523 958213 +897 509968 +336 187603 +1400 928671 +735 527924 +789 862314 +66 768430 +1029 978295 +1376 820205 +874 903764 +1158 571601 +807 676546 +1108 94386 +439 33200 +794 3242 +1313 621377 +1897 676810 +304 945234 +1036 902990 +419 158675 +299 490581 +1849 884233 +939 254463 +1899 994751 +7 400557 +772 711053 +991 733691 +1667 568096 +685 789680 +148 64564 +267 99266 +213 555069 +1643 831476 +176 396970 +1427 39974 +190 471118 +700 709758 +297 949223 +384 704262 +402 691822 +426 733595 +682 365874 +796 196806 +410 328623 +1954 705665 +430 512568 +1850 577814 +1835 893291 +1946 27118 +1738 9388 +1375 9127 +1682 581834 +1500 898510 +1465 291998 +1975 108854 +624 766725 +1030 652914 +1218 77939 +204 735137 +704 142588 +1481 762868 +598 259948 +682 101502 +1140 660157 +1399 258629 +1644 603918 +300 468534 +842 757677 +418 122954 +1483 692361 +558 561733 +235 471792 +1788 204428 +719 61304 +1170 832111 +740 548089 +625 58972 +695 412955 +178 134458 +423 308915 +258 624101 +1402 916249 +613 784074 +1555 242781 +192 160686 +1947 71972 +1191 14464 +1321 719958 +1840 183971 +1936 162842 +990 406122 +1719 18620 +657 877487 +1169 963472 +1371 446868 +844 591935 +293 800255 +1403 886457 +1127 502160 +220 261324 +474 491240 +1493 810991 +1339 815559 +419 218456 +1985 86140 +530 822076 +1817 531038 +1057 399505 +329 419534 +1454 907220 +959 804553 +889 980496 +137 306155 +1984 565233 +848 341122 +924 502371 +1233 702160 +1569 835153 +744 619817 +268 914543 +95 820952 +1256 881797 +130 957927 +537 338292 +23 95687 +528 787382 +247 886430 +1977 818729 +1736 656434 +944 189656 +1467 649072 +629 377898 +142 118388 +1641 110859 +1566 870371 +240 753899 +1426 695100 +764 954564 +1259 556192 +920 176463 +496 373544 +1104 791606 +712 463259 +1425 965937 +453 137767 +930 372409 +1019 346546 +1916 393526 +301 499199 +1088 98925 +1462 460824 +1384 232496 +1124 154294 +1015 618716 +265 591896 +1424 61479 +486 830655 +405 913828 +1713 610450 +501 907334 +36 719918 +668 963239 +1474 563091 +1192 979745 +366 177968 +1379 696559 +167 571618 +687 951758 +1371 897264 +1812 607937 +365 131860 +367 493997 +740 730128 +180 314616 +707 382431 +1730 596001 +1526 733603 +1835 365633 +296 453450 +492 719401 +147 326191 +959 17908 +101 474648 +1100 239389 +423 780207 +303 497828 +523 71380 +1971 181172 +941 261813 +979 780337 +1789 465539 +1519 411313 +1914 288501 +1091 7387 +1487 834893 +1767 304901 +1566 96046 +246 972978 +640 258763 +803 596744 +1759 387129 +1993 214620 +1904 421783 +472 11429 +1310 119857 +1621 390258 +583 28458 +974 920176 +427 548582 +1623 130904 +633 615223 +478 288970 +1762 56231 +632 811717 +1854 160043 +1916 343848 +36 749420 +954 681816 +1418 244161 +1498 283952 +1997 200174 +764 675103 +1190 847829 +855 18411 +479 529117 +1622 490238 +1072 572046 +531 217000 +848 731264 +423 224381 +115 558982 +162 745853 +599 294719 +519 912242 +1964 803100 +1864 394400 +191 497415 +284 704699 +1706 685052 +1338 130399 +377 632792 +1437 581138 +2000 110558 +1365 133223 +275 62998 +1729 50043 +1199 764294 +181 225642 +507 259444 +924 231691 +1231 267804 +770 202203 +157 428934 +1377 358031 +723 593306 +1608 699783 +216 64074 +1129 597134 +1044 789631 +1570 688476 +1958 446156 +1070 241692 +1100 818041 +848 778109 +663 837408 +360 126533 +197 484412 +1689 477186 +1451 673637 +961 175496 +218 771105 +1710 93912 +1315 741929 +340 84370 +314 319039 +847 299531 +769 230214 +1309 626217 +1256 764352 +1740 925970 +1332 62303 +648 642752 +359 433123 +1194 996022 +1199 905545 +560 36466 +1249 779734 +702 719560 +1287 644336 +902 729405 +874 580411 +1306 942053 +847 202024 +632 938763 +1437 9417 +996 97846 +1507 4369 +1294 977463 +1533 257393 +46 205378 +85 806012 +1960 591402 +561 797668 +1060 347303 +570 748533 +1899 59146 +309 351219 +1314 479427 +1368 111605 +1200 586301 +1227 287654 +1002 323072 +1292 194017 +1531 757849 +1528 734614 +863 487443 +1252 815631 +1256 175757 +1762 314950 +1404 981632 +1004 61185 +305 364302 +1378 181572 +542 25141 +17 137177 +1535 875085 +27 614204 +1410 442595 +292 471537 +58 846587 +537 518332 +668 132149 +33 642576 +460 841476 +1253 645983 +347 594052 +1127 772927 +861 646321 +1503 852003 +888 577933 +176 613283 +476 600555 +1055 929336 +1347 775340 +1419 221816 +836 997604 +1598 649060 +1415 786704 +1228 10076 +559 463463 +951 941233 +1613 658717 +1761 325912 +840 956251 +1326 804873 +352 20808 +1417 625984 +1326 271596 +577 31705 +640 65236 +136 938969 +1114 995332 +156 903805 +779 761651 +1812 219178 +1403 464518 +628 603753 +1957 633207 +331 704052 +1711 255388 +974 206073 +1143 75809 +1956 990053 +875 739623 +713 558539 +223 622973 +1452 201526 +875 602323 +1100 778178 +1960 784362 +31 29709 +58 759244 +408 470223 +1196 61748 +54 875460 +1279 80797 +1708 896326 +875 998007 +1866 844678 +1595 995964 +89 75785 +458 602072 +962 243560 +1911 12838 +1907 628212 +1111 486521 +842 333321 +826 333390 +1399 91273 +768 809672 +334 582172 +960 72608 +629 20786 +1167 905501 +274 479132 +932 46463 +245 79330 +1257 492584 +1548 882633 +512 310102 +337 936371 +1078 389963 +1093 263387 +1454 685098 +925 463980 +1057 846403 +1260 518564 +79 151095 +673 163798 +588 362689 +1989 306596 +490 60819 +811 789163 +72 800654 +1299 143128 +477 252856 +859 790903 +1027 240690 +267 41083 +729 762668 +1377 275926 +489 201539 +1042 960620 +566 506124 +1784 157887 +344 821713 +672 868695 +1395 384121 +272 554011 +461 452678 +1516 13027 +1231 652297 +760 117239 +1833 485894 +883 784376 +1990 711393 +106 792024 +1666 435853 +443 355356 +1234 555803 +145 124973 +1325 105396 +1555 118268 +726 892605 +917 104896 +990 770706 +561 619759 +106 581332 +406 971061 +1142 838077 +1522 857617 +1939 360623 +1615 534771 +987 810532 +745 261653 +1489 369982 +126 737410 +673 297927 +1117 239918 +319 864424 +1340 962928 +42 414274 +1326 214998 +1818 235491 +628 795594 +1042 623143 +1470 617771 +1129 656869 +1681 778212 +643 304949 +164 75530 +900 964478 +431 146236 +1578 527763 +978 12053 +39 631365 +314 597387 +180 863287 +209 801234 +1500 19349 +501 858173 +134 527014 +21 494963 +830 241722 +1508 138736 +990 970753 +68 32700 +458 994150 +1279 569176 +1714 856812 +102 580928 +742 901062 +1833 129656 +1522 999081 +1132 471790 +1508 691342 +245 238999 +1134 521031 +539 204870 +260 596253 +639 998344 +394 436934 +372 832919 +816 867715 +1905 544945 +1739 907102 +87 369975 +1370 258299 +841 185075 +666 171234 +1578 619300 +1529 878467 +282 273431 +1417 618367 +174 37209 +548 118045 +177 534079 +1598 342029 +1497 710165 +1903 379311 +839 742952 +441 840637 +736 775441 +1071 702899 +622 922275 +1991 362194 +1254 736128 +743 423627 +392 243820 +1759 302154 +443 52496 +207 788009 +165 895945 +1630 183765 +511 106514 +505 228808 +1925 708104 +676 602171 +307 470680 +215 573153 +484 547481 +560 212502 +1010 858578 +351 905173 +98 777077 +445 878289 +1045 632171 +1832 31914 +894 617025 +759 386198 +583 8917 +1135 853328 +842 153923 +1879 990512 +1585 913779 +1105 314754 +1209 333536 +441 571442 +1402 27050 +427 137549 +391 561422 +361 108733 +1050 21665 +323 608362 +1907 324975 +700 325931 +715 632853 +355 843072 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-16.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-16.ans new file mode 100644 index 0000000000000000000000000000000000000000..b6fe5121474d84bfa68cdb581eb07c8716fedd77 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-16.ans @@ -0,0 +1 @@ +7998000 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-16.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-16.in new file mode 100644 index 0000000000000000000000000000000000000000..98c964d9d2561082598f314f4d41572d9106dbc0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-16.in @@ -0,0 +1,2001 @@ +2000 2000 2000 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 +2000 1 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-17-break-short.ans b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-17-break-short.ans new file mode 100644 index 0000000000000000000000000000000000000000..f341a02ea5d985c5401f27e8364fbc6e7f34b630 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-17-break-short.ans @@ -0,0 +1 @@ +3054404 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-17-break-short.in b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-17-break-short.in new file mode 100644 index 0000000000000000000000000000000000000000..e1c0111bbdc6b39fdaf432c7aca31a6a438f9ca7 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/data/secret-17-break-short.in @@ -0,0 +1,1798 @@ +1797 2 2 +402 298 +404 297 +406 296 +408 295 +410 294 +412 293 +414 292 +416 291 +418 290 +420 289 +422 288 +424 287 +426 286 +428 285 +430 284 +432 283 +434 282 +436 281 +438 280 +440 279 +442 278 +444 277 +446 276 +448 275 +450 274 +452 273 +454 272 +456 271 +458 270 +460 269 +462 268 +464 267 +466 266 +468 265 +470 264 +472 263 +474 262 +476 261 +478 260 +480 259 +482 258 +484 257 +486 256 +488 255 +490 254 +492 253 +494 252 +496 251 +498 250 +500 249 +502 248 +504 247 +506 246 +508 245 +510 244 +512 243 +514 242 +516 241 +518 240 +520 239 +522 238 +524 237 +526 236 +528 235 +530 234 +532 233 +534 232 +536 231 +538 230 +540 229 +542 228 +544 227 +546 226 +548 225 +550 224 +552 223 +554 222 +556 221 +558 220 +560 219 +562 218 +564 217 +566 216 +568 215 +570 214 +572 213 +574 212 +576 211 +578 210 +580 209 +582 208 +584 207 +586 206 +588 205 +590 204 +592 203 +594 202 +596 201 +598 200 +600 199 +602 198 +604 197 +606 196 +608 195 +610 194 +612 193 +614 192 +616 191 +618 190 +620 189 +622 188 +624 187 +626 186 +628 185 +630 184 +632 183 +634 182 +636 181 +638 180 +640 179 +642 178 +644 177 +646 176 +648 175 +650 174 +652 173 +654 172 +656 171 +658 170 +660 169 +662 168 +664 167 +666 166 +668 165 +670 164 +672 163 +674 162 +676 161 +678 160 +680 159 +682 158 +684 157 +686 156 +688 155 +690 154 +692 153 +694 152 +696 151 +698 150 +700 149 +702 148 +704 147 +706 146 +708 145 +710 144 +712 143 +714 142 +716 141 +718 140 +720 139 +722 138 +724 137 +726 136 +728 135 +730 134 +732 133 +734 132 +736 131 +738 130 +740 129 +742 128 +744 127 +746 126 +748 125 +750 124 +752 123 +754 122 +756 121 +758 120 +760 119 +762 118 +764 117 +766 116 +768 115 +770 114 +772 113 +774 112 +776 111 +778 110 +780 109 +782 108 +784 107 +786 106 +788 105 +790 104 +792 103 +794 102 +796 101 +798 100 +800 99 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +1998 98951 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +2000 99000 +402 100298 +404 100297 +406 100296 +408 100295 +410 100294 +412 100293 +414 100292 +416 100291 +418 100290 +420 100289 +422 100288 +424 100287 +426 100286 +428 100285 +430 100284 +432 100283 +434 100282 +436 100281 +438 100280 +440 100279 +442 100278 +444 100277 +446 100276 +448 100275 +450 100274 +452 100273 +454 100272 +456 100271 +458 100270 +460 100269 +462 100268 +464 100267 +466 100266 +468 100265 +470 100264 +472 100263 +474 100262 +476 100261 +478 100260 +480 100259 +482 100258 +484 100257 +486 100256 +488 100255 +490 100254 +492 100253 +494 100252 +496 100251 +498 100250 +500 100249 +502 100248 +504 100247 +506 100246 +508 100245 +510 100244 +512 100243 +514 100242 +516 100241 +518 100240 +520 100239 +522 100238 +524 100237 +526 100236 +528 100235 +530 100234 +532 100233 +534 100232 +536 100231 +538 100230 +540 100229 +542 100228 +544 100227 +546 100226 +548 100225 +550 100224 +552 100223 +554 100222 +556 100221 +558 100220 +560 100219 +562 100218 +564 100217 +566 100216 +568 100215 +570 100214 +572 100213 +574 100212 +576 100211 +578 100210 +580 100209 +582 100208 +584 100207 +586 100206 +588 100205 +590 100204 +592 100203 +594 100202 +596 100201 +598 100200 +600 100199 +602 100198 +604 100197 +606 100196 +608 100195 +610 100194 +612 100193 +614 100192 +616 100191 +618 100190 +620 100189 +622 100188 +624 100187 +626 100186 +628 100185 +630 100184 +632 100183 +634 100182 +636 100181 +638 100180 +640 100179 +642 100178 +644 100177 +646 100176 +648 100175 +650 100174 +652 100173 +654 100172 +656 100171 +658 100170 +660 100169 +662 100168 +664 100167 +666 100166 +668 100165 +670 100164 +672 100163 +674 100162 +676 100161 +678 100160 +680 100159 +682 100158 +684 100157 +686 100156 +688 100155 +690 100154 +692 100153 +694 100152 +696 100151 +698 100150 +700 100149 +702 100148 +704 100147 +706 100146 +708 100145 +710 100144 +712 100143 +714 100142 +716 100141 +718 100140 +720 100139 +722 100138 +724 100137 +726 100136 +728 100135 +730 100134 +732 100133 +734 100132 +736 100131 +738 100130 +740 100129 +742 100128 +744 100127 +746 100126 +748 100125 +750 100124 +752 100123 +754 100122 +756 100121 +758 100120 +760 100119 +762 100118 +764 100117 +766 100116 +768 100115 +770 100114 +772 100113 +774 100112 +776 100111 +778 100110 +780 100109 +782 100108 +784 100107 +786 100106 +788 100105 +790 100104 +792 100103 +794 100102 +796 100101 +798 100100 +800 100099 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +1998 198951 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +2000 199000 +402 200298 +404 200297 +406 200296 +408 200295 +410 200294 +412 200293 +414 200292 +416 200291 +418 200290 +420 200289 +422 200288 +424 200287 +426 200286 +428 200285 +430 200284 +432 200283 +434 200282 +436 200281 +438 200280 +440 200279 +442 200278 +444 200277 +446 200276 +448 200275 +450 200274 +452 200273 +454 200272 +456 200271 +458 200270 +460 200269 +462 200268 +464 200267 +466 200266 +468 200265 +470 200264 +472 200263 +474 200262 +476 200261 +478 200260 +480 200259 +482 200258 +484 200257 +486 200256 +488 200255 +490 200254 +492 200253 +494 200252 +496 200251 +498 200250 +500 200249 +502 200248 +504 200247 +506 200246 +508 200245 +510 200244 +512 200243 +514 200242 +516 200241 +518 200240 +520 200239 +522 200238 +524 200237 +526 200236 +528 200235 +530 200234 +532 200233 +534 200232 +536 200231 +538 200230 +540 200229 +542 200228 +544 200227 +546 200226 +548 200225 +550 200224 +552 200223 +554 200222 +556 200221 +558 200220 +560 200219 +562 200218 +564 200217 +566 200216 +568 200215 +570 200214 +572 200213 +574 200212 +576 200211 +578 200210 +580 200209 +582 200208 +584 200207 +586 200206 +588 200205 +590 200204 +592 200203 +594 200202 +596 200201 +598 200200 +600 200199 +602 200198 +604 200197 +606 200196 +608 200195 +610 200194 +612 200193 +614 200192 +616 200191 +618 200190 +620 200189 +622 200188 +624 200187 +626 200186 +628 200185 +630 200184 +632 200183 +634 200182 +636 200181 +638 200180 +640 200179 +642 200178 +644 200177 +646 200176 +648 200175 +650 200174 +652 200173 +654 200172 +656 200171 +658 200170 +660 200169 +662 200168 +664 200167 +666 200166 +668 200165 +670 200164 +672 200163 +674 200162 +676 200161 +678 200160 +680 200159 +682 200158 +684 200157 +686 200156 +688 200155 +690 200154 +692 200153 +694 200152 +696 200151 +698 200150 +700 200149 +702 200148 +704 200147 +706 200146 +708 200145 +710 200144 +712 200143 +714 200142 +716 200141 +718 200140 +720 200139 +722 200138 +724 200137 +726 200136 +728 200135 +730 200134 +732 200133 +734 200132 +736 200131 +738 200130 +740 200129 +742 200128 +744 200127 +746 200126 +748 200125 +750 200124 +752 200123 +754 200122 +756 200121 +758 200120 +760 200119 +762 200118 +764 200117 +766 200116 +768 200115 +770 200114 +772 200113 +774 200112 +776 200111 +778 200110 +780 200109 +782 200108 +784 200107 +786 200106 +788 200105 +790 200104 +792 200103 +794 200102 +796 200101 +798 200100 +800 200099 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +1998 298951 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 +2000 299000 diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/judge.json b/problems/DP-02/ICPC_WF/2020/I-quests/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..a70ad41bd84869939a9a64255009ddb1c3f3e6c9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/judge.json @@ -0,0 +1,14 @@ +{ + "time_limit_s": 10.0, + "time_limit_source": "statement", + "memory_mb": 2048, + "memory_source": "default (the statement gives none)", + "mode": "exact", + "validator_flags": null, + "comparison": "Kattis default output validator: token-wise, whitespace- and case-insensitive", + "validator": null, + "tests_dir": "data", + "answer_suffix": ".ans", + "n_sample": 1, + "n_secret": 17 +} diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/meta.json b/problems/DP-02/ICPC_WF/2020/I-quests/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..e39815e42a367799c23df5ad307df12c4c1889b4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/meta.json @@ -0,0 +1,9 @@ +{ + "year": "2020", + "letter": "I", + "title": "Quests", + "slug": "quests", + "source_pdf": "contest_problems.pdf", + "page_start": 17, + "page_end": 18 +} diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/page.html b/problems/DP-02/ICPC_WF/2020/I-quests/page.html new file mode 100644 index 0000000000000000000000000000000000000000..46d6cb53083da45b92e0237cbfc8b2b895f0e735 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/page.html @@ -0,0 +1,255 @@ + I. Quests | Ethan Pham
ICPC 2020
ICPC 2020

I. Quests

To relax before competing in the ICPC World Finals, you have decided to play a computer game called Quests. You have played it a number of times already, and now you want to achieve a perfect playthrough—to prepare for your perfect playthrough of the finals...

Updated May 21, 2026
Track ICPC
Year 2020
Statement Text + PDF
TeXC++Statement textStatement PDF

Problem Statement

Formatted from the contest statement text, with sample tests broken out into copyable blocks.

Time limit 10 seconds

To relax before competing in the ICPC World Finals, you have decided to play a computer game called Quests. You have played it a number of times already, and now you want to achieve a perfect playthrough—to prepare for your perfect playthrough of the finals! In the game, you have to complete a number of quests, and you earn experience points (XPs) for com- pleting each one. The total number of XPs you have earned at any time determines your current level. You reach a new level for every v XPs that you earn. Formally, your level at any time is the largest integer L such that you have at least L · v XPs. Each quest is assigned a number x of XPs and a target difficulty level d. If you complete the quest when your level is at least d, you earn x XPs. However, if you complete the quest when your level is less than d, you will earn c · x XPs. The constant c is an XP multiplier that results in a bonus for completing a quest when you are at a lower level than the recommended level d. You know all the n quests and their respective x and d numbers by heart (and you know the numbers v and c as well—you have played this game a lot). You are also skilled enough to complete any quest, regardless of its target difficulty level and your level. You want to complete all the quests in an order that will allow you to earn the largest possible number of XPs. For example in the sample input, the maximum XPs you can earn is 43, which is done as follows. First complete the second quest (you earn 4 XPs, because you are at level 0, and you completed a quest with target difficulty level 2). Then complete the first quest (you earn 30 XPs, because you are still at level 0, and the target difficulty level is 1). With 34 XPs, you are now level 3. Finally, complete the third quest (for which you earn 9 XPs, without the multiplier, since you are already at level 3).

Input

The first line of input contains three integers n, v, and c, where n (1 ≤ n ≤ 2 000) is the number of quests in the game, v (1 ≤ v ≤ 2 000) is the number of XPs required to reach each level, and c (2 ≤ c ≤ 2 000) is the XP multiplier for completing a quest before reaching its target difficulty level. Following that are n lines, each of which contains two integers x and d describing one quest, where x (1 ≤ x ≤ 2 000) is the number of XPs you earn for completing that quest if you are at or above its target difficulty level and d (1 ≤ di ≤ 106 ) is the target difficulty level for that quest.

Output

Output the maximum possible number of XPs you could earn by finishing all the quests.

Sample Tests

Sample 1
Sample Input
3 10 2
+15 1
+2 2
+9 1
Sample Output
43

Editorial

The solution write-up is rendered from the LaTeX source, with equations kept live through MathJax.

Key Observations

+
  • If a quest receives the multiplier, all quests done before it also receive the multiplier. Therefore in an optimal order, all multiplied quests come first, and all non-multiplied quests come after them.

  • Let $Y$ be the sum of the base XP values of the multiplied quests already completed. Then the actual XP earned so far is exactly $cY$. So quest $i$ with parameters $(x_i,d_i)$ can still be multiplied exactly when \[ cY < d_i v. \]

  • This is equivalent to \[ Y \le \left\lfloor \frac{d_i v - 1}{c} \right\rfloor. \] So if we only look at multiplied quests, quest $i$ behaves like a job with:

    +
    • processing time $x_i$,

    • value $x_i$,

    • latest allowed start time \[ A_i = \left\lfloor \frac{d_i v - 1}{c} \right\rfloor. \]

    • Turning a start-time bound into an ordinary completion deadline gives \[ D_i = A_i + x_i. \] Then a set of multiplied quests is feasible iff it can be scheduled so that every selected job finishes by its deadline $D_i$.

    • This is now a standard deadline knapsack: after sorting by deadline, if total selected processing becomes $s$, then quest $i$ may be the last selected quest exactly when \[ s \le D_i. \]

    +

    Algorithm

    +
    1. For every quest compute \[ D_i = \left\lfloor \frac{d_i v - 1}{c} \right\rfloor + x_i. \] Also compute the base total \[ B = \sum x_i. \]

    2. Sort the quests by increasing $D_i$.

    3. Let reachable[s] mean: after processing some prefix of the sorted quests, there exists a feasible set of multiplied quests whose total base-XP sum is exactly $s$. Initially only reachable[0] is true.

    4. Process quests in sorted order. For quest $i$, update the bitset as a $0/1$ knapsack transition: from every reachable sum $s-x_i$, we may reach $s$ if \[ s \le D_i. \]

    5. Let $S$ be the largest reachable sum after all quests. Then the final answer is \[ B + (c-1)S, \] because every multiplied quest contributes an extra $(c-1)x_i$ above its base reward.

    +

    Correctness Proof

    +

    We prove that the algorithm returns the correct answer.

    +

    Lemma 1.

    +

    There exists an optimal playthrough in which every multiplied quest is done before every non-multiplied quest.

    +

    Proof.

    +

    Every quest always contributes its base reward $x$. Doing a non-multiplied quest earlier can only increase the current XP and level, which can never help a later quest receive the multiplier. So if a non-multiplied quest appears before a multiplied one, swapping them cannot decrease the reward of either quest. By repeatedly applying this swap, we obtain an optimal order with all multiplied quests first. □

    +

    Lemma 2.

    +

    If quest $i$ is multiplied after previously multiplied quests with total base-XP sum $Y$, then this is possible exactly when \[ Y \le \left\lfloor \frac{d_i v - 1}{c} \right\rfloor. \]

    +

    Proof.

    +

    By Lemma 1, only multiplied quests matter before quest $i$. If their base-XP sum is $Y$, the actual XP already earned is $cY$. Quest $i$ is multiplied exactly when the current level is less than $d_i$, i.e. \[ cY < d_i v. \] Since all quantities are integers, this is equivalent to \[ Y \le \left\lfloor \frac{d_i v - 1}{c} \right\rfloor. \] □

    +

    Lemma 3.

    +

    A set of multiplied quests is feasible iff, after giving each quest deadline \[ D_i = \left\lfloor \frac{d_i v - 1}{c} \right\rfloor + x_i, \] it can be scheduled so that every selected quest finishes by its deadline.

    +

    Proof.

    +

    For a selected quest $i$, let $Y$ be the total base-XP sum of earlier selected quests. By Lemma 2, quest $i$ is feasible exactly when $Y \le A_i$, where \[ A_i = \left\lfloor \frac{d_i v - 1}{c} \right\rfloor. \] Since quest $i$ itself contributes $x_i$, this is equivalent to \[ Y + x_i \le A_i + x_i = D_i. \] But $Y+x_i$ is exactly the completion time of quest $i$ in the scaled scheduling model. □

    +

    Lemma 4.

    +

    After sorting quests by nondecreasing deadlines, the bitset DP computes exactly all feasible total base-XP sums of multiplied quests.

    +

    Proof.

    +

    For ordinary single-machine scheduling with deadlines, every feasible subset is feasible in nondecreasing-deadline order. So when processing quests in that order, a total sum $s$ is feasible exactly when there exists a feasible sum $s-x_i$ from earlier quests and \[ s \le D_i. \] This is exactly the transition implemented by the DP. Therefore the final bitset contains precisely all feasible multiplied-base-XP totals. □

    +

    Theorem.

    +

    The algorithm outputs the correct answer for every valid input.

    +

    Proof.

    +

    By Lemma 1, we may restrict attention to a prefix of multiplied quests. By Lemma 3, choosing that prefix is equivalent to choosing a feasible subset in the deadline model. By Lemma 4, the DP finds the maximum possible total base-XP sum $S$ of such a subset. Each quest always contributes its base reward, and each multiplied quest contributes an additional $(c-1)x$. Hence the maximum final XP is exactly \[ \sum x_i + (c-1)S, \] which is what the algorithm outputs. □

    +

    Complexity Analysis

    +

    Let \[ X = \sum x_i \le 4\,000\,000. \] The bitset has $X+1$ states. Each of the $n$ transitions is a bitset shift-and-OR, so the running time is \[ O\!\left(n \cdot \frac{X}{64}\right), \] and the memory usage is $O(X)$ bits.

    +

    Implementation Notes

    +
    • The DP is done with a manual dynamic bitset for speed.

    • The scaled deadline \[ \left\lfloor \frac{d_i v - 1}{c} \right\rfloor \] must use 64-bit arithmetic.

    • Sorting by deadline and then by smaller $x$ is harmless and keeps equal-deadline handling stable.

Code

C++ solution used for this page.

C++

Clean code view with a raw-file link when you want the original source.

Raw file
#include <bits/stdc++.h>
+using namespace std;
+
+namespace {
+
+struct Quest {
+    int x;
+    int deadline;
+};
+
+void solve() {
+    int n, v, c;
+    cin >> n >> v >> c;
+
+    vector<Quest> quests(n);
+    int sum_x = 0;
+    long long base_xp = 0;
+
+    for (int i = 0; i < n; ++i) {
+        int x, d;
+        cin >> x >> d;
+        long long latest_start = (1LL * d * v - 1) / c;
+        quests[i] = {x, int(latest_start + x)};
+        sum_x += x;
+        base_xp += x;
+    }
+
+    sort(quests.begin(), quests.end(), [](const Quest& a, const Quest& b) {
+        if (a.deadline != b.deadline) {
+            return a.deadline < b.deadline;
+        }
+        return a.x < b.x;
+    });
+
+    vector<unsigned long long> reachable((sum_x >> 6) + 1, 0);
+    reachable[0] = 1ULL;
+    int max_reachable = 0;
+
+    for (const Quest& quest : quests) {
+        int shift = quest.x;
+        int limit = min(sum_x, quest.deadline);
+        int target_max = min(limit, max_reachable + shift);
+        int word_shift = shift >> 6;
+        int bit_shift = shift & 63;
+
+        for (int word = target_max >> 6; word >= word_shift; --word) {
+            unsigned long long value = reachable[word - word_shift] << bit_shift;
+            if (bit_shift != 0 && word - word_shift - 1 >= 0) {
+                value |= reachable[word - word_shift - 1] >> (64 - bit_shift);
+            }
+            reachable[word] |= value;
+        }
+
+        reachable[target_max >> 6] &= (~0ULL) >> (63 - (target_max & 63));
+        max_reachable = target_max;
+    }
+
+    int best_bonus_sum = 0;
+    for (int s = max_reachable; s >= 0; --s) {
+        if ((reachable[s >> 6] >> (s & 63)) & 1ULL) {
+            best_bonus_sum = s;
+            break;
+        }
+    }
+
+    cout << base_xp + 1LL * (c - 1) * best_bonus_sum << '\n';
+}
+
+}  // namespace
+
+int main() {
+    ios::sync_with_stdio(false);
+    cin.tie(nullptr);
+
+    solve();
+    return 0;
+}
+

Source Files and Assets

Raw files are still available here when you want the original TeX, C++, or statement assets.

Show raw files
\ No newline at end of file diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/solution.cpp b/problems/DP-02/ICPC_WF/2020/I-quests/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b90b301a092b2f9b0a2550dae62060a028eab184 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/solution.cpp @@ -0,0 +1,77 @@ +#include +using namespace std; + +namespace { + +struct Quest { + int x; + int deadline; +}; + +void solve() { + int n, v, c; + cin >> n >> v >> c; + + vector quests(n); + int sum_x = 0; + long long base_xp = 0; + + for (int i = 0; i < n; ++i) { + int x, d; + cin >> x >> d; + long long latest_start = (1LL * d * v - 1) / c; + quests[i] = {x, int(latest_start + x)}; + sum_x += x; + base_xp += x; + } + + sort(quests.begin(), quests.end(), [](const Quest& a, const Quest& b) { + if (a.deadline != b.deadline) { + return a.deadline < b.deadline; + } + return a.x < b.x; + }); + + vector reachable((sum_x >> 6) + 1, 0); + reachable[0] = 1ULL; + int max_reachable = 0; + + for (const Quest& quest : quests) { + int shift = quest.x; + int limit = min(sum_x, quest.deadline); + int target_max = min(limit, max_reachable + shift); + int word_shift = shift >> 6; + int bit_shift = shift & 63; + + for (int word = target_max >> 6; word >= word_shift; --word) { + unsigned long long value = reachable[word - word_shift] << bit_shift; + if (bit_shift != 0 && word - word_shift - 1 >= 0) { + value |= reachable[word - word_shift - 1] >> (64 - bit_shift); + } + reachable[word] |= value; + } + + reachable[target_max >> 6] &= (~0ULL) >> (63 - (target_max & 63)); + max_reachable = target_max; + } + + int best_bonus_sum = 0; + for (int s = max_reachable; s >= 0; --s) { + if ((reachable[s >> 6] >> (s & 63)) & 1ULL) { + best_bonus_sum = s; + break; + } + } + + cout << base_xp + 1LL * (c - 1) * best_bonus_sum << '\n'; +} + +} // namespace + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + solve(); + return 0; +} diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/solution.tex b/problems/DP-02/ICPC_WF/2020/I-quests/solution.tex new file mode 100644 index 0000000000000000000000000000000000000000..b1ef4a949153e05404f5062652b74155cc057cfd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/solution.tex @@ -0,0 +1,201 @@ +\documentclass[11pt]{article} +\usepackage[margin=1in]{geometry} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{amsmath,amssymb,amsthm} +\usepackage{enumitem} + +\title{ICPC World Finals 2020\\I. Quests} +\author{} +\date{} + +\begin{document} +\maketitle + +\section*{Problem Summary} + +Each quest has base XP $x$ and target level $d$. +If we complete it while our current level is below $d$, we earn $cx$ instead of $x$. +We may do the quests in any order, and we want to maximize the final total XP. + +Since the base $x$ is earned no matter what, the real problem is to maximize the total base-XP value of +the quests that still receive the multiplier. + +\section*{Key Observations} + +\begin{itemize}[leftmargin=*] + \item If a quest receives the multiplier, all quests done before it also receive the multiplier. + Therefore in an optimal order, all multiplied quests come first, and all non-multiplied quests come + after them. + \item Let $Y$ be the sum of the base XP values of the multiplied quests already completed. + Then the actual XP earned so far is exactly $cY$. + So quest $i$ with parameters $(x_i,d_i)$ can still be multiplied exactly when + \[ + cY < d_i v. + \] + \item This is equivalent to + \[ + Y \le \left\lfloor \frac{d_i v - 1}{c} \right\rfloor. + \] + So if we only look at multiplied quests, quest $i$ behaves like a job with: + \begin{itemize}[leftmargin=*] + \item processing time $x_i$, + \item value $x_i$, + \item latest allowed \emph{start time} + \[ + A_i = \left\lfloor \frac{d_i v - 1}{c} \right\rfloor. + \] + \end{itemize} + \item Turning a start-time bound into an ordinary completion deadline gives + \[ + D_i = A_i + x_i. + \] + Then a set of multiplied quests is feasible iff it can be scheduled so that every selected job finishes + by its deadline $D_i$. + \item This is now a standard deadline knapsack: + after sorting by deadline, if total selected processing becomes $s$, then quest $i$ may be the last + selected quest exactly when + \[ + s \le D_i. + \] +\end{itemize} + +\section*{Algorithm} + +\begin{enumerate}[leftmargin=*] + \item For every quest compute + \[ + D_i = \left\lfloor \frac{d_i v - 1}{c} \right\rfloor + x_i. + \] + Also compute the base total + \[ + B = \sum x_i. + \] + \item Sort the quests by increasing $D_i$. + \item Let \texttt{reachable[s]} mean: + after processing some prefix of the sorted quests, there exists a feasible set of multiplied quests whose + total base-XP sum is exactly $s$. + Initially only \texttt{reachable[0]} is true. + \item Process quests in sorted order. For quest $i$, update the bitset as a $0/1$ knapsack transition: + from every reachable sum $s-x_i$, we may reach $s$ if + \[ + s \le D_i. + \] + \item Let $S$ be the largest reachable sum after all quests. Then the final answer is + \[ + B + (c-1)S, + \] + because every multiplied quest contributes an extra $(c-1)x_i$ above its base reward. +\end{enumerate} + +\section*{Correctness Proof} + +We prove that the algorithm returns the correct answer. + +\paragraph{Lemma 1.} +There exists an optimal playthrough in which every multiplied quest is done before every non-multiplied +quest. + +\paragraph{Proof.} +Every quest always contributes its base reward $x$. +Doing a non-multiplied quest earlier can only increase the current XP and level, which can never help a +later quest receive the multiplier. +So if a non-multiplied quest appears before a multiplied one, swapping them cannot decrease the reward of +either quest. +By repeatedly applying this swap, we obtain an optimal order with all multiplied quests first. \qed + +\paragraph{Lemma 2.} +If quest $i$ is multiplied after previously multiplied quests with total base-XP sum $Y$, then this is +possible exactly when +\[ + Y \le \left\lfloor \frac{d_i v - 1}{c} \right\rfloor. +\] + +\paragraph{Proof.} +By Lemma 1, only multiplied quests matter before quest $i$. +If their base-XP sum is $Y$, the actual XP already earned is $cY$. +Quest $i$ is multiplied exactly when the current level is less than $d_i$, i.e. +\[ + cY < d_i v. +\] +Since all quantities are integers, this is equivalent to +\[ + Y \le \left\lfloor \frac{d_i v - 1}{c} \right\rfloor. +\] +\qed + +\paragraph{Lemma 3.} +A set of multiplied quests is feasible iff, after giving each quest deadline +\[ + D_i = \left\lfloor \frac{d_i v - 1}{c} \right\rfloor + x_i, +\] +it can be scheduled so that every selected quest finishes by its deadline. + +\paragraph{Proof.} +For a selected quest $i$, let $Y$ be the total base-XP sum of earlier selected quests. +By Lemma 2, quest $i$ is feasible exactly when $Y \le A_i$, where +\[ + A_i = \left\lfloor \frac{d_i v - 1}{c} \right\rfloor. +\] +Since quest $i$ itself contributes $x_i$, this is equivalent to +\[ + Y + x_i \le A_i + x_i = D_i. +\] +But $Y+x_i$ is exactly the completion time of quest $i$ in the scaled scheduling model. \qed + +\paragraph{Lemma 4.} +After sorting quests by nondecreasing deadlines, the bitset DP computes exactly all feasible total +base-XP sums of multiplied quests. + +\paragraph{Proof.} +For ordinary single-machine scheduling with deadlines, every feasible subset is feasible in +nondecreasing-deadline order. +So when processing quests in that order, a total sum $s$ is feasible exactly when there exists a feasible +sum $s-x_i$ from earlier quests and +\[ + s \le D_i. +\] +This is exactly the transition implemented by the DP. +Therefore the final bitset contains precisely all feasible multiplied-base-XP totals. \qed + +\paragraph{Theorem.} +The algorithm outputs the correct answer for every valid input. + +\paragraph{Proof.} +By Lemma 1, we may restrict attention to a prefix of multiplied quests. +By Lemma 3, choosing that prefix is equivalent to choosing a feasible subset in the deadline model. +By Lemma 4, the DP finds the maximum possible total base-XP sum $S$ of such a subset. +Each quest always contributes its base reward, and each multiplied quest contributes an additional +$(c-1)x$. +Hence the maximum final XP is exactly +\[ + \sum x_i + (c-1)S, +\] +which is what the algorithm outputs. \qed + +\section*{Complexity Analysis} + +Let +\[ + X = \sum x_i \le 4\,000\,000. +\] +The bitset has $X+1$ states. +Each of the $n$ transitions is a bitset shift-and-OR, so the running time is +\[ + O\!\left(n \cdot \frac{X}{64}\right), +\] +and the memory usage is $O(X)$ bits. + +\section*{Implementation Notes} + +\begin{itemize}[leftmargin=*] + \item The DP is done with a manual dynamic bitset for speed. + \item The scaled deadline + \[ + \left\lfloor \frac{d_i v - 1}{c} \right\rfloor + \] + must use 64-bit arithmetic. + \item Sorting by deadline and then by smaller $x$ is harmless and keeps equal-deadline handling stable. +\end{itemize} + +\end{document} diff --git a/problems/DP-02/ICPC_WF/2020/I-quests/statement.txt b/problems/DP-02/ICPC_WF/2020/I-quests/statement.txt new file mode 100644 index 0000000000000000000000000000000000000000..720bca71490868d60910dc808b0f3f7c3b7e5a5c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2020/I-quests/statement.txt @@ -0,0 +1,42 @@ +Problem I + Quests + Time limit: 10 seconds +To relax before competing in the ICPC World Finals, you have decided to play a computer game +called Quests. You have played it a number of times already, and now you want to achieve a perfect +playthrough—to prepare for your perfect playthrough of the finals! +In the game, you have to complete a number of quests, and you earn experience points (XPs) for com- +pleting each one. The total number of XPs you have earned at any time determines your current level. +You reach a new level for every v XPs that you earn. Formally, your level at any time is the largest +integer L such that you have at least L · v XPs. +Each quest is assigned a number x of XPs and a target difficulty level d. If you complete the quest when +your level is at least d, you earn x XPs. However, if you complete the quest when your level is less than +d, you will earn c · x XPs. The constant c is an XP multiplier that results in a bonus for completing a +quest when you are at a lower level than the recommended level d. +You know all the n quests and their respective x and d numbers by heart (and you know the numbers +v and c as well—you have played this game a lot). You are also skilled enough to complete any quest, +regardless of its target difficulty level and your level. You want to complete all the quests in an order +that will allow you to earn the largest possible number of XPs. +For example in the sample input, the maximum XPs you can earn is 43, which is done as follows. First +complete the second quest (you earn 4 XPs, because you are at level 0, and you completed a quest with +target difficulty level 2). Then complete the first quest (you earn 30 XPs, because you are still at level 0, +and the target difficulty level is 1). With 34 XPs, you are now level 3. Finally, complete the third quest +(for which you earn 9 XPs, without the multiplier, since you are already at level 3). + +Input + +The first line of input contains three integers n, v, and c, where n (1 ≤ n ≤ 2 000) is the number +of quests in the game, v (1 ≤ v ≤ 2 000) is the number of XPs required to reach each level, and c +(2 ≤ c ≤ 2 000) is the XP multiplier for completing a quest before reaching its target difficulty level. +Following that are n lines, each of which contains two integers x and d describing one quest, where x +(1 ≤ x ≤ 2 000) is the number of XPs you earn for completing that quest if you are at or above its target +difficulty level and d (1 ≤ di ≤ 10^6) is the target difficulty level for that quest. + +Output + +Output the maximum possible number of XPs you could earn by finishing all the quests. + +Sample Input 1 Sample Output 1 +3 10 2 43 +15 1 +2 2 +9 1 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-1.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-1.ans new file mode 100644 index 0000000000000000000000000000000000000000..e7d83b2aeb57e8b6a8271a82b6d7da187956e7d1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-1.ans @@ -0,0 +1,3 @@ +1.000000 +1 +2 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-1.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-1.in new file mode 100644 index 0000000000000000000000000000000000000000..2bd042fec1abb6bc62e907827118c848702ae056 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-1.in @@ -0,0 +1,5 @@ +2 +0 1 +1 0 +1 1 +0 0 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-2.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-2.ans new file mode 100644 index 0000000000000000000000000000000000000000..097e949d0a3f7b62e10b0d8c54acf12f34eb3ae5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-2.ans @@ -0,0 +1,3 @@ +2.236068 +4 +2 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-2.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-2.in new file mode 100644 index 0000000000000000000000000000000000000000..fa0171aeb3abc428038c438f64838dffed3acc57 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-2.in @@ -0,0 +1,5 @@ +2 +0 1 +-1 -1 +1 0 +2 2 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-3.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-3.ans new file mode 100644 index 0000000000000000000000000000000000000000..01f4510ff97c5e0291ca3055a92958a65ba82abb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-3.ans @@ -0,0 +1,4 @@ +1.414214 +1 +2 +3 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-3.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-3.in new file mode 100644 index 0000000000000000000000000000000000000000..fa8ac9f1c5ff54f60356cd92569476bb402ce35d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/sample-3.in @@ -0,0 +1,7 @@ +3 +0 0 +1 1 +2 2 +3 3 +4 4 +5 5 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-000.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-000.ans new file mode 100644 index 0000000000000000000000000000000000000000..bf36dd5ec3aef8de5ce7d7a2ca0fe68ccf602df0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-000.ans @@ -0,0 +1,2 @@ +1.00000000000000000000 +1 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-000.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-000.in new file mode 100644 index 0000000000000000000000000000000000000000..87c2661506fa3661a5e900d47807a9995f08b77a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-000.in @@ -0,0 +1,3 @@ +1 +0 0 +0 1 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-001.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-001.ans new file mode 100644 index 0000000000000000000000000000000000000000..bf36dd5ec3aef8de5ce7d7a2ca0fe68ccf602df0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-001.ans @@ -0,0 +1,2 @@ +1.00000000000000000000 +1 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-001.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-001.in new file mode 100644 index 0000000000000000000000000000000000000000..b2d7a0125ff8def41acd0dd178d4169e1258dc58 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-001.in @@ -0,0 +1,3 @@ +1 +0 0 +1 0 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-002.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-002.ans new file mode 100644 index 0000000000000000000000000000000000000000..d43ad220a4d6a742c44e986ad994ff61b644abdc --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-002.ans @@ -0,0 +1,2 @@ +2828427124.74619007110595703125 +1 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-002.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-002.in new file mode 100644 index 0000000000000000000000000000000000000000..882f0607f53c2a2de64e19d1428875192c18cd56 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-002.in @@ -0,0 +1,3 @@ +1 +-1000000000 -1000000000 +1000000000 1000000000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-003.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-003.ans new file mode 100644 index 0000000000000000000000000000000000000000..d43ad220a4d6a742c44e986ad994ff61b644abdc --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-003.ans @@ -0,0 +1,2 @@ +2828427124.74619007110595703125 +1 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-003.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-003.in new file mode 100644 index 0000000000000000000000000000000000000000..e560ed973a99d5fafcc709f46a0da46f3b792e5a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-003.in @@ -0,0 +1,3 @@ +1 +1000000000 -1000000000 +-1000000000 1000000000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-004.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-004.ans new file mode 100644 index 0000000000000000000000000000000000000000..5007e21eb3fca0164b167a7cb3b996eb76b5241a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-004.ans @@ -0,0 +1,3 @@ +2000000000.00000000000000000000 +1 +2 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-004.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-004.in new file mode 100644 index 0000000000000000000000000000000000000000..14bad1486d28e10e703ee19caa02c72569f38128 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-004.in @@ -0,0 +1,5 @@ +2 +-1000000000 -1000000000 +-1000000000 1000000000 +1000000000 -1000000000 +1000000000 1000000000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-005.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-005.ans new file mode 100644 index 0000000000000000000000000000000000000000..d96555c2fd3e61cff2b7353d2780a40013ffc9d3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-005.ans @@ -0,0 +1,6 @@ +8.24621125123532117129 +1 +3 +7 +8 +10 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-005.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-005.in new file mode 100644 index 0000000000000000000000000000000000000000..ebaf7739efa79327de1d068adef916057f2a0b6a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-005.in @@ -0,0 +1,11 @@ +5 +4 -1 +14 -16 +-7 7 +4 -17 +-2 -12 +2 20 +12 -8 +10 -3 +8 -17 +13 3 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-006.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-006.ans new file mode 100644 index 0000000000000000000000000000000000000000..53863a61283c0e41a683a451adccc0569199caa8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-006.ans @@ -0,0 +1,6 @@ +6.40312423743284853117 +1 +3 +4 +5 +6 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-006.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-006.in new file mode 100644 index 0000000000000000000000000000000000000000..0959c5c5cd0224a0583ec9824c114589f53307f8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-006.in @@ -0,0 +1,11 @@ +5 +9 -18 +17 8 +2 -18 +7 1 +3 4 +7 -18 +-6 -3 +-9 -2 +-2 0 +-12 -5 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-007.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-007.ans new file mode 100644 index 0000000000000000000000000000000000000000..1ce74bf6bb74204368b7d782bccfec1433e807e6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-007.ans @@ -0,0 +1,6 @@ +12.08304597359457233097 +2 +3 +4 +5 +7 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-007.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-007.in new file mode 100644 index 0000000000000000000000000000000000000000..b96c20fdf67015669c25e1ea4c9660daa9a052dc --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-007.in @@ -0,0 +1,11 @@ +5 +-20 17 +5 -19 +14 4 +3 -10 +-6 -8 +0 14 +8 -11 +-7 8 +-14 20 +3 9 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-008.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-008.ans new file mode 100644 index 0000000000000000000000000000000000000000..1a95eefd4c03547db5740a7df95362149e72f380 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-008.ans @@ -0,0 +1,6 @@ +16.15549442140351033004 +1 +5 +7 +8 +9 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-008.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-008.in new file mode 100644 index 0000000000000000000000000000000000000000..b23b2c77e34235e8472d69e9a0787c05b1b2f1c3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-008.in @@ -0,0 +1,11 @@ +5 +1 12 +2 -9 +-17 -8 +-17 18 +7 17 +-3 -6 +3 17 +10 7 +3 9 +-20 20 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-009.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-009.ans new file mode 100644 index 0000000000000000000000000000000000000000..c2111cd9552c8da7ae3a6323855fc99f64f7a4a0 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-009.ans @@ -0,0 +1,501 @@ +71.30918594402827181966 +2 +6 +7 +8 +13 +15 +16 +17 +19 +21 +22 +23 +27 +28 +30 +31 +35 +36 +37 +38 +40 +42 +46 +48 +50 +53 +54 +55 +56 +57 +61 +62 +67 +69 +72 +73 +75 +76 +77 +79 +80 +81 +82 +83 +84 +89 +93 +98 +99 +100 +103 +104 +106 +108 +109 +110 +111 +113 +114 +116 +118 +119 +120 +123 +126 +128 +131 +133 +140 +142 +143 +144 +145 +147 +151 +155 +161 +162 +163 +164 +165 +167 +168 +170 +172 +174 +175 +178 +180 +183 +184 +186 +188 +190 +191 +194 +195 +201 +203 +204 +205 +208 +210 +212 +213 +214 +218 +219 +221 +222 +226 +229 +230 +231 +232 +233 +235 +236 +240 +241 +242 +243 +249 +250 +252 +254 +255 +256 +257 +259 +262 +263 +264 +271 +273 +274 +279 +283 +284 +288 +291 +292 +293 +294 +299 +301 +302 +303 +305 +307 +308 +309 +311 +312 +313 +314 +315 +316 +317 +321 +323 +324 +325 +327 +333 +334 +336 +337 +338 +341 +342 +343 +346 +347 +348 +349 +350 +353 +355 +356 +361 +363 +367 +368 +370 +371 +375 +377 +379 +382 +383 +385 +386 +389 +390 +391 +392 +396 +397 +399 +400 +404 +406 +414 +415 +420 +422 +423 +424 +425 +431 +433 +435 +438 +440 +442 +443 +445 +446 +449 +450 +452 +458 +461 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +477 +480 +482 +484 +485 +492 +493 +496 +497 +502 +503 +504 +505 +507 +508 +509 +510 +515 +517 +519 +520 +522 +523 +525 +527 +531 +532 +533 +535 +536 +540 +541 +542 +543 +545 +546 +552 +555 +557 +558 +559 +561 +562 +565 +567 +568 +572 +575 +576 +577 +579 +580 +582 +584 +587 +588 +590 +597 +598 +600 +605 +607 +611 +612 +613 +614 +616 +617 +618 +619 +620 +623 +625 +626 +627 +629 +630 +631 +634 +640 +641 +644 +647 +648 +651 +654 +655 +656 +657 +658 +661 +666 +667 +671 +672 +673 +675 +676 +678 +681 +686 +687 +693 +695 +696 +697 +700 +701 +703 +705 +706 +707 +712 +717 +718 +720 +722 +723 +724 +725 +726 +728 +729 +731 +732 +734 +735 +741 +743 +744 +745 +746 +747 +748 +749 +751 +753 +754 +756 +761 +762 +765 +767 +769 +771 +772 +773 +774 +775 +777 +778 +779 +781 +782 +783 +784 +785 +787 +789 +790 +791 +793 +794 +796 +798 +800 +801 +804 +807 +808 +809 +811 +815 +816 +818 +821 +825 +826 +827 +829 +834 +835 +836 +837 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +852 +854 +855 +857 +859 +860 +861 +862 +863 +864 +868 +872 +874 +875 +880 +884 +885 +886 +891 +895 +896 +899 +900 +901 +902 +904 +905 +907 +908 +909 +910 +912 +913 +914 +915 +920 +922 +924 +925 +926 +928 +931 +934 +935 +938 +939 +942 +944 +945 +946 +949 +951 +953 +954 +958 +959 +963 +967 +968 +971 +974 +975 +976 +977 +979 +981 +989 +990 +993 +995 +997 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-009.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-009.in new file mode 100644 index 0000000000000000000000000000000000000000..220c3cb15a4f8898a2360d134f3cd696dc71311d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-009.in @@ -0,0 +1,1001 @@ +500 +723 391 +-200 323 +386 739 +-615 627 +-179 -813 +699 -505 +483 -346 +-729 -169 +-481 -894 +-658 -888 +-175 839 +-780 -701 +-715 -202 +-931 -923 +-470 -23 +769 122 +-368 177 +-266 -179 +259 946 +-878 945 +-341 169 +-901 37 +-384 198 +-155 -219 +-876 -867 +-332 -197 +398 -179 +81 -72 +-456 -424 +231 -30 +514 -65 +-823 585 +494 779 +-643 -705 +211 297 +69 -829 +22 267 +506 -313 +-521 -867 +-283 816 +-1000 568 +608 -106 +-651 -23 +-497 652 +-488 939 +-550 31 +-227 -96 +285 -691 +-512 507 +237 -231 +-916 512 +134 639 +-12 66 +-900 382 +882 -123 +383 348 +813 -606 +222 -321 +-187 828 +909 426 +-32 -222 +559 -210 +-507 -969 +928 -485 +697 481 +-911 -700 +871 217 +-92 -137 +-549 431 +966 889 +-211 853 +544 -409 +35 -597 +-211 -607 +470 457 +266 -669 +-916 18 +38 679 +38 384 +917 -255 +824 -243 +60 -865 +398 -844 +21 -900 +970 883 +-822 -556 +334 621 +-211 -601 +901 -83 +-643 725 +948 376 +-159 -395 +-643 98 +-680 542 +836 382 +-905 -584 +254 871 +754 -546 +-282 796 +141 -63 +345 747 +903 534 +771 -100 +754 -868 +41 724 +-311 305 +-218 192 +809 114 +-270 252 +746 -906 +3 -291 +-694 -541 +-899 -85 +889 35 +-211 -889 +-219 583 +-807 -721 +520 -417 +744 239 +-441 103 +-966 -908 +-976 194 +-292 810 +373 -759 +-319 -841 +715 -975 +-876 746 +179 -134 +-110 908 +-327 -135 +447 -185 +552 500 +701 -862 +621 -678 +-730 -635 +694 762 +816 402 +260 636 +-193 -614 +136 55 +-87 -574 +-251 386 +175 242 +344 -388 +662 -969 +-451 602 +283 -539 +850 430 +-67 -833 +-588 -122 +531 -86 +-219 -341 +695 854 +-512 717 +-98 361 +-449 -945 +341 580 +-591 -634 +-826 -462 +-754 -663 +322 342 +794 -762 +1 291 +871 -152 +704 -159 +-617 -652 +41 -35 +615 -949 +383 -967 +483 347 +-123 724 +743 -818 +-402 -331 +419 -252 +758 -690 +758 421 +310 847 +-866 18 +57 673 +595 -859 +3 618 +-351 -439 +856 -672 +-298 487 +-987 850 +-17 -724 +628 848 +-284 560 +-358 951 +85 -240 +-448 402 +-362 -220 +546 -765 +980 4 +208 -889 +-151 -859 +704 874 +-178 -126 +-732 972 +-838 -417 +7 -864 +-284 -376 +777 286 +-33 344 +517 94 +-595 694 +-867 -723 +-10 -464 +686 402 +-140 81 +-444 -633 +830 59 +381 -880 +18 -213 +-131 698 +-983 -899 +-594 746 +102 223 +698 -61 +-157 846 +985 -897 +965 -257 +-519 995 +-819 877 +-218 53 +-294 394 +-933 -844 +-91 696 +-339 572 +308 214 +782 60 +-862 226 +120 42 +-660 -314 +182 932 +-101 107 +-354 -164 +403 918 +-373 930 +-54 -974 +-266 344 +321 -478 +895 -742 +-247 -742 +-119 -651 +400 739 +-308 -230 +986 686 +640 51 +926 -160 +-174 -929 +733 -740 +-92 -595 +776 -212 +363 -172 +-1 -963 +364 91 +-885 -913 +543 186 +-682 -601 +-544 580 +-84 134 +433 -231 +723 -886 +-481 776 +264 644 +-370 928 +289 728 +-995 60 +-379 -441 +-280 644 +-668 -581 +254 312 +-614 345 +-192 765 +603 478 +-277 -830 +-397 -942 +271 -375 +-899 570 +-483 -922 +931 750 +-609 428 +913 163 +-424 941 +-210 -284 +193 -563 +-899 -11 +-701 -391 +-681 888 +847 -571 +-78 76 +-105 14 +875 -177 +-236 -725 +386 788 +-657 806 +-488 -410 +603 -379 +-511 -824 +773 82 +-795 21 +671 -857 +-614 -766 +504 371 +-77 791 +192 -958 +720 204 +-139 39 +592 948 +798 -598 +-407 338 +210 428 +-275 698 +-538 227 +74 285 +-318 722 +863 450 +632 424 +-862 508 +711 -339 +-898 811 +651 -525 +494 -154 +378 -441 +-508 -410 +909 -128 +151 -525 +-852 -589 +-519 -467 +344 958 +881 431 +681 102 +171 352 +-380 -826 +477 246 +-521 -15 +528 125 +-644 -418 +-135 -55 +-60 283 +69 3 +658 13 +-461 -251 +-456 -719 +933 247 +368 373 +454 280 +83 41 +736 -243 +-145 -445 +-419 -765 +479 17 +671 345 +-820 100 +810 -307 +-458 -958 +545 658 +887 764 +-254 -417 +788 -431 +-590 -379 +-159 238 +560 881 +-716 -463 +-505 -349 +-29 -322 +-874 159 +-134 629 +978 77 +86 -95 +-926 -637 +637 458 +-358 -889 +208 344 +-851 -418 +253 -25 +144 -573 +33 -720 +971 903 +-95 -865 +10 -607 +932 -367 +105 713 +37 -180 +269 525 +-724 -891 +-127 667 +490 -924 +588 -881 +975 -108 +128 -46 +-235 77 +889 684 +-461 727 +67 -797 +-406 346 +-540 -954 +-790 -133 +708 198 +-568 -489 +-330 -826 +-728 685 +-332 481 +-374 57 +413 -138 +-823 -377 +723 426 +-727 662 +-15 617 +619 417 +221 -755 +336 945 +-505 226 +9 -559 +-166 943 +613 -711 +715 428 +-784 557 +82 -780 +-289 -350 +512 -227 +-89 -967 +920 -5 +-959 -114 +-677 -832 +999 -730 +-321 -39 +686 876 +-642 951 +-376 176 +-242 -955 +126 302 +-97 -101 +-359 286 +288 -814 +-748 826 +-40 -671 +-559 -915 +614 135 +323 583 +-833 -35 +-304 139 +-849 -656 +-517 350 +149 325 +-861 -627 +150 676 +-781 -269 +34 382 +-705 822 +-761 232 +-952 959 +-651 570 +-431 -830 +983 828 +-733 -478 +492 -546 +-8 993 +-63 964 +682 -988 +-196 -230 +-853 -779 +-366 -996 +-296 237 +736 -334 +-815 294 +857 -721 +858 -910 +-597 259 +171 401 +395 47 +41 -569 +993 -971 +784 380 +784 828 +-573 317 +-64 -818 +-14 862 +26 -492 +-598 742 +226 518 +671 436 +608 -583 +942 100 +-393 -541 +9 800 +-750 -422 +227 876 +-40 670 +-726 793 +-95 349 +840 -229 +25 886 +925 369 +-746 -177 +909 -916 +-976 -733 +-182 872 +-966 -628 +-479 -837 +-290 378 +176 499 +809 -631 +-966 383 +974 941 +-508 87 +-882 356 +359 -611 +521 -236 +-897 -889 +-218 934 +432 559 +737 845 +906 -190 +-289 994 +994 -200 +275 -806 +891 72 +-202 561 +397 894 +395 -871 +909 -762 +-552 922 +443 -875 +-587 -286 +440 -497 +477 542 +569 595 +-150 -161 +955 110 +756 -50 +477 -65 +-389 -376 +-104 169 +40 342 +-909 -293 +925 756 +845 365 +13 233 +961 -941 +500 -484 +192 272 +-13 637 +441 -801 +601 -168 +317 -926 +832 734 +-675 -657 +204 -711 +286 604 +648 -260 +-631 -393 +-939 699 +-399 184 +753 893 +32 -493 +105 -8 +263 491 +546 -689 +546 255 +516 182 +-421 893 +-122 893 +-500 48 +698 803 +368 -279 +514 -167 +246 859 +-801 627 +-400 -859 +-735 434 +-949 705 +-965 803 +-461 426 +849 -45 +303 -249 +937 816 +-780 387 +126 -356 +-367 -237 +-417 179 +179 613 +759 165 +-238 955 +-196 -816 +-491 360 +977 -36 +-702 995 +356 -298 +-247 895 +-947 559 +281 105 +89 742 +-921 -616 +-887 -832 +188 15 +-522 404 +976 -481 +770 269 +-344 -417 +-830 -474 +429 929 +180 835 +109 -738 +-892 814 +-478 383 +-635 -536 +674 764 +-831 724 +543 -963 +41 223 +-416 304 +814 -748 +660 433 +51 -259 +781 152 +-773 71 +223 -426 +-123 209 +-653 -4 +-161 -699 +344 161 +-131 -623 +459 294 +-841 -126 +-289 607 +-826 -881 +-917 387 +781 -365 +808 73 +-759 652 +-99 744 +-780 358 +458 -719 +-719 648 +-910 762 +-500 817 +-793 -378 +435 -257 +-479 403 +-622 -914 +-19 -74 +-610 413 +-52 517 +-677 -71 +486 -460 +108 -200 +-304 -671 +917 -530 +526 -560 +-305 -760 +-726 573 +-836 397 +-522 265 +159 444 +442 -819 +863 -136 +-735 -644 +-919 -963 +575 -315 +-938 -752 +-834 -369 +-995 -849 +375 519 +839 284 +803 238 +-862 -516 +103 803 +-915 472 +677 147 +-770 -20 +-20 -628 +234 650 +832 -530 +271 286 +-810 -547 +-797 -248 +-533 -472 +-712 -909 +701 241 +-892 -657 +-489 949 +-622 -916 +-586 -930 +252 -440 +-553 189 +-502 -132 +-772 -513 +-635 -703 +709 701 +657 552 +24 -405 +605 1000 +177 76 +-659 422 +362 -545 +-895 641 +-797 -811 +654 -983 +801 -654 +-575 -711 +-162 373 +-228 -540 +632 -361 +-525 -44 +-579 287 +-962 996 +972 780 +-32 952 +-92 788 +214 -184 +324 -43 +-154 -54 +148 -557 +288 689 +898 -15 +866 -391 +-107 453 +517 419 +-490 -313 +625 -89 +463 1 +448 107 +-287 523 +875 -755 +753 463 +-840 -8 +808 61 +990 447 +14 -277 +-540 85 +942 637 +-649 -189 +634 75 +866 857 +-983 -363 +86 788 +-703 816 +-113 547 +293 -618 +-1000 -920 +417 260 +316 -552 +19 -765 +849 -966 +-33 218 +9 -865 +321 -519 +-734 933 +579 -35 +-132 -881 +-475 314 +651 54 +-352 -182 +687 -566 +39 685 +-797 -917 +-167 994 +341 -72 +364 -238 +659 -11 +-367 837 +-18 842 +-710 327 +-845 -509 +-24 -348 +-619 984 +-27 18 +-736 -702 +-586 104 +122 -63 +217 60 +152 -451 +336 210 +-639 885 +432 -599 +473 -4 +-54 35 +606 962 +-382 387 +416 119 +743 -285 +331 -540 +704 -956 +560 -730 +605 -574 +-438 -231 +627 -870 +-439 380 +409 304 +-879 593 +841 -62 +161 143 +-512 870 +743 -300 +41 888 +806 -931 +-547 936 +101 -161 +-143 182 +-678 -504 +710 591 +382 59 +56 974 +849 373 +702 -490 +-327 447 +967 -73 +-884 774 +-74 -244 +315 -791 +-951 -758 +-241 -888 +112 190 +697 -102 +712 631 +832 -70 +-344 -588 +-207 -85 +714 -807 +-500 -783 +-291 -302 +-598 554 +236 974 +445 -883 +-856 292 +-845 -562 +-251 378 +-153 -395 +-544 -150 +-441 -148 +-95 -592 +293 -393 +218 -55 +332 332 +-325 638 +122 553 +-904 -833 +116 336 +-4 360 +605 -295 +716 -452 +601 -283 +-484 235 +-901 236 +344 436 +498 -960 +-756 145 +-904 133 +-450 -656 +-756 261 +-854 603 +-492 148 +-349 608 +398 851 +158 -419 +-529 -581 +788 -923 +476 -312 +577 -966 +-719 116 +-14 -946 +496 -979 +-884 -883 +-484 -802 +-185 798 +455 -149 +868 513 +392 880 +-754 674 +-30 277 +-685 762 +835 -369 +-589 374 +-884 981 +-966 -868 +-560 -623 +-565 -599 +-80 241 +-689 -816 +-9 587 +-316 -138 +361 -524 +681 -21 +-310 332 +-307 -850 +-164 -712 +162 -685 +-462 -350 +368 -297 +-677 -720 +846 790 +-126 -708 +791 -886 +132 -966 +881 -829 +-452 -949 +748 -466 +-767 -244 +-972 -30 +779 -162 +-908 -424 +808 -567 +66 -7 +-605 -718 +-6 413 +778 -222 +716 -428 +-353 373 +-301 923 +-13 -400 +656 98 +334 -639 +196 87 +741 982 +494 918 +-487 -205 +-273 -694 +103 -309 +-730 -725 +840 -528 +984 510 +-272 750 +-871 144 +-957 -146 +-152 778 +-915 -6 +-620 -796 +-232 -67 +14 33 +-424 -711 +946 669 +69 395 +900 20 +-347 22 +514 -773 +786 -154 +18 324 +-861 -787 +249 623 +-668 96 +340 912 +989 287 +56 -240 +-392 231 +-477 926 +-415 581 +142 124 +-322 -999 +0 -527 +-674 590 +66 -946 +-799 389 +-888 -690 +-688 -886 +-738 -474 +378 -297 +263 372 +934 720 +-592 -914 +718 381 +449 -568 +972 611 +236 758 +-629 920 +377 123 +-56 189 +-941 854 +-881 -350 +832 172 +354 611 +968 847 +831 -65 +859 50 +785 -874 +95 -633 +-97 532 +-700 304 +673 423 +-274 586 +-938 -970 +-186 726 +-485 -328 +-845 -963 +-137 -548 +-299 922 +172 -676 +-476 185 +472 71 +-127 921 +-957 -405 +596 -572 +-81 742 +311 -388 +-224 -163 +-81 -295 +912 576 +-317 -959 +-423 -228 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-010.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-010.ans new file mode 100644 index 0000000000000000000000000000000000000000..b6098ff2f80aa91ebe959a684fba57ba1415203f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-010.ans @@ -0,0 +1,501 @@ +78.29431652425353149738 +1 +2 +4 +5 +6 +7 +9 +12 +13 +14 +15 +17 +19 +20 +21 +23 +25 +26 +29 +33 +34 +35 +38 +41 +42 +44 +45 +48 +51 +54 +57 +59 +62 +67 +69 +70 +71 +72 +74 +75 +76 +78 +83 +84 +85 +86 +88 +89 +92 +94 +95 +96 +97 +98 +99 +100 +102 +105 +106 +108 +111 +112 +113 +114 +115 +116 +117 +118 +119 +121 +122 +128 +130 +132 +136 +140 +141 +145 +146 +147 +148 +152 +153 +156 +157 +158 +159 +161 +163 +164 +165 +166 +168 +170 +172 +173 +175 +176 +181 +184 +189 +190 +193 +196 +199 +200 +201 +204 +209 +213 +217 +218 +220 +221 +222 +224 +227 +228 +230 +231 +232 +234 +235 +239 +240 +242 +244 +245 +249 +252 +253 +254 +258 +261 +262 +264 +268 +270 +271 +273 +283 +284 +285 +286 +287 +288 +289 +290 +296 +302 +304 +307 +309 +310 +314 +316 +317 +319 +320 +321 +322 +323 +324 +325 +326 +328 +330 +333 +334 +335 +336 +337 +338 +343 +344 +345 +346 +347 +348 +358 +359 +360 +361 +363 +365 +366 +368 +369 +372 +374 +375 +377 +379 +380 +382 +384 +385 +386 +388 +390 +395 +396 +397 +402 +407 +411 +412 +413 +418 +419 +422 +423 +424 +431 +432 +435 +437 +438 +440 +442 +444 +447 +448 +454 +455 +457 +461 +464 +468 +471 +472 +473 +475 +476 +479 +481 +484 +485 +486 +491 +493 +494 +495 +496 +497 +499 +500 +501 +502 +503 +508 +511 +515 +521 +522 +525 +528 +529 +531 +533 +534 +536 +537 +538 +541 +543 +545 +548 +550 +551 +554 +556 +558 +559 +560 +561 +563 +566 +567 +568 +575 +576 +577 +582 +586 +588 +589 +590 +591 +592 +593 +595 +597 +598 +602 +603 +604 +606 +607 +611 +613 +615 +616 +624 +626 +630 +635 +636 +639 +643 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +660 +661 +665 +667 +670 +674 +677 +678 +679 +682 +685 +688 +690 +691 +693 +694 +695 +698 +699 +704 +707 +709 +710 +711 +714 +715 +716 +718 +719 +721 +722 +726 +727 +729 +730 +732 +733 +734 +736 +737 +742 +744 +745 +746 +748 +749 +753 +755 +757 +758 +760 +762 +766 +768 +769 +774 +775 +776 +783 +784 +787 +788 +789 +791 +792 +797 +799 +800 +802 +804 +805 +808 +810 +811 +812 +813 +816 +818 +819 +821 +822 +826 +827 +830 +831 +832 +834 +835 +841 +842 +843 +845 +846 +847 +851 +853 +854 +856 +857 +859 +860 +861 +862 +863 +864 +865 +867 +872 +873 +874 +875 +877 +881 +882 +883 +886 +887 +888 +889 +890 +892 +895 +896 +898 +899 +902 +903 +905 +906 +909 +910 +911 +912 +913 +915 +917 +918 +919 +923 +925 +928 +930 +933 +939 +940 +942 +944 +945 +946 +947 +950 +951 +952 +953 +954 +955 +957 +960 +962 +963 +964 +966 +967 +968 +969 +971 +974 +982 +983 +984 +986 +988 +991 +993 +996 +1000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-010.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-010.in new file mode 100644 index 0000000000000000000000000000000000000000..88af89858883ca7cc1d130b751c399ae5f869124 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-010.in @@ -0,0 +1,1001 @@ +500 +134 966 +-551 677 +123 433 +434 -833 +-905 810 +314 -801 +762 507 +-748 -912 +809 -761 +998 -826 +-349 111 +30 911 +-977 149 +-354 689 +952 -25 +316 -94 +837 24 +-28 471 +959 810 +995 -238 +156 871 +-111 610 +-197 898 +-103 -593 +871 -560 +489 -590 +-1 -169 +-635 -259 +894 736 +616 -73 +-199 -94 +-437 -464 +902 -178 +-746 858 +-728 211 +339 144 +-160 -97 +722 -388 +90 204 +438 -151 +-367 607 +585 594 +344 994 +651 320 +647 231 +-44 -651 +-706 -956 +-654 932 +188 100 +510 -194 +-686 346 +-658 -481 +-951 -624 +586 -408 +-762 -127 +345 961 +402 -410 +-138 -366 +847 -29 +-695 -270 +-849 -585 +-747 413 +-161 -872 +-254 1 +46 -112 +232 120 +-667 474 +-207 -791 +333 276 +-634 492 +-637 663 +212 -813 +628 -164 +-427 477 +-285 412 +856 784 +-232 -776 +312 320 +529 -154 +-743 -3 +22 -388 +-10 225 +829 -520 +-435 650 +292 800 +-801 161 +365 -26 +737 293 +872 -23 +-386 -482 +-585 -255 +891 174 +-161 -480 +270 -874 +965 -49 +663 991 +939 -129 +-576 420 +498 -729 +526 803 +-946 -725 +-449 892 +-87 -621 +38 638 +-985 902 +361 -415 +-886 1 +213 -902 +-294 -323 +-829 -474 +-828 812 +-479 951 +-921 358 +-993 65 +979 196 +854 982 +-467 765 +-294 930 +-299 846 +97 -211 +754 -593 +-377 547 +-501 -52 +-463 -492 +-549 -862 +54 -681 +-624 -823 +-515 211 +-963 -75 +-933 590 +-975 -510 +939 -384 +-135 461 +-487 -595 +248 22 +-572 364 +-632 -861 +-818 -56 +-783 -366 +516 696 +454 -719 +-803 -150 +18 -20 +266 80 +-744 617 +482 -437 +-740 761 +708 555 +255 154 +-650 -447 +-144 350 +622 545 +668 310 +-486 -203 +142 -376 +-874 525 +104 952 +-612 402 +-891 135 +-273 -988 +309 -567 +-276 16 +514 557 +763 721 +759 -428 +388 -951 +-228 -944 +-854 224 +-80 595 +769 -529 +93 580 +778 346 +-333 973 +-203 -505 +733 271 +654 -345 +-103 516 +-730 -921 +-367 133 +-323 -839 +-725 353 +72 -317 +-718 -774 +911 -426 +63 -62 +55 761 +-280 -784 +-154 409 +925 436 +279 774 +-3 592 +-918 -547 +-754 217 +987 363 +-810 -109 +124 -890 +126 -325 +943 -903 +361 -587 +-886 601 +-552 304 +-292 -1 +512 996 +-639 887 +-261 -229 +-221 -915 +-902 -298 +987 382 +-385 913 +-245 2 +-564 -64 +582 -658 +234 871 +-750 -369 +-125 751 +-297 -961 +748 613 +112 984 +-571 -578 +479 -801 +511 -886 +714 -291 +-264 -145 +792 -736 +95 -714 +-825 -732 +320 -636 +-609 541 +-36 -620 +748 -966 +-403 657 +876 469 +-252 -400 +660 141 +-781 720 +-770 -104 +-60 -682 +112 -97 +455 -911 +354 -888 +-329 -109 +-681 636 +-932 -912 +366 486 +-498 599 +-357 37 +795 -262 +-68 129 +766 -853 +869 -906 +-108 30 +275 -648 +-196 894 +553 579 +86 59 +-597 -580 +160 163 +998 -428 +-237 -615 +-116 -250 +953 472 +399 803 +567 -88 +184 577 +-179 31 +-349 -501 +-941 -850 +591 -428 +223 10 +985 569 +-823 782 +354 117 +337 871 +-688 -349 +-403 -51 +185 -479 +79 136 +-491 96 +480 -208 +695 -13 +-959 -499 +510 50 +-269 714 +-342 812 +-568 503 +-328 952 +-678 334 +663 -349 +526 484 +356 -701 +-580 -314 +-535 -275 +76 187 +-600 -457 +-191 -297 +363 -772 +-601 -624 +-587 113 +249 -453 +-80 -245 +-452 -614 +484 -806 +145 -26 +-774 419 +-876 -187 +-152 -206 +-215 691 +-528 21 +982 -715 +785 -180 +-972 -550 +-192 -872 +-644 211 +363 -586 +-402 -845 +957 -110 +910 812 +-885 -325 +768 239 +-588 386 +419 183 +465 769 +983 791 +-720 377 +322 391 +429 706 +-220 -715 +-495 734 +144 116 +925 -353 +-618 38 +100 -510 +421 -339 +893 280 +784 -824 +-448 643 +584 773 +994 -280 +-194 317 +-95 773 +-154 -588 +-171 -453 +-542 645 +-943 751 +393 443 +-693 394 +170 -894 +546 534 +-450 -860 +-712 -559 +-656 -982 +690 -58 +-284 143 +176 -348 +-424 -728 +-181 -388 +-644 -677 +404 -941 +270 -763 +724 153 +733 965 +-343 -336 +592 940 +195 419 +424 408 +327 -835 +-172 39 +-473 727 +-273 860 +-56 154 +-985 -180 +-628 644 +-695 -721 +-800 196 +-936 495 +-899 50 +980 843 +-855 -170 +-16 -905 +840 -464 +-940 -379 +163 955 +17 -693 +654 504 +12 964 +177 760 +-735 -812 +443 -572 +-596 59 +377 315 +173 19 +328 78 +-896 -859 +45 792 +573 -847 +-33 983 +-358 513 +-252 23 +-889 998 +-301 6 +-274 -464 +295 259 +190 80 +-473 -131 +-853 -105 +-665 -737 +181 689 +-341 123 +436 -24 +-905 -81 +929 -366 +440 860 +95 997 +-469 -448 +-525 -54 +-17 -503 +-565 -645 +-347 398 +-184 662 +80 785 +-643 -420 +81 900 +686 150 +662 -344 +240 481 +-230 -603 +249 -54 +-727 95 +-784 -165 +189 145 +501 -577 +805 -44 +-830 -495 +-58 -262 +-932 743 +-163 -689 +-878 425 +399 -808 +-132 -610 +143 -948 +247 -111 +393 204 +-543 -847 +-754 523 +966 -853 +-746 -532 +-39 -904 +562 523 +-319 248 +-639 -937 +-873 -67 +-444 -363 +880 -850 +950 -56 +904 -490 +-552 -468 +-390 819 +-66 231 +399 67 +-887 -57 +-739 933 +-381 -721 +-100 220 +-916 357 +568 -173 +-238 -927 +965 976 +34 960 +-93 -132 +-812 999 +203 660 +270 -603 +-630 515 +-794 -919 +571 -369 +924 -701 +-19 -620 +-122 449 +-800 145 +-825 -474 +934 -312 +-116 -599 +88 -198 +-538 255 +301 284 +854 -70 +2 -17 +12 -299 +25 -544 +-752 -58 +-662 520 +351 -184 +361 -934 +-373 844 +236 -964 +-871 743 +-315 767 +-239 -64 +885 148 +723 141 +-394 583 +491 -287 +-122 911 +196 379 +-65 -11 +-434 -131 +-109 188 +819 328 +-124 -974 +-681 -973 +-284 440 +-869 -23 +321 -95 +-677 -176 +446 698 +-667 -405 +-952 -993 +-493 -178 +-625 -891 +-83 -553 +39 -949 +602 241 +-352 195 +-138 400 +98 985 +-91 424 +317 -13 +986 604 +952 883 +233 -229 +248 290 +-315 -292 +527 355 +660 370 +-118 -961 +-567 368 +385 -615 +596 -916 +-169 543 +-80 -394 +370 -523 +-318 101 +-753 189 +87 437 +275 740 +-898 23 +-618 -62 +838 -467 +167 185 +-30 981 +-414 889 +-670 -26 +-554 -23 +818 635 +-487 -729 +952 80 +-542 -883 +530 -458 +14 878 +-150 891 +285 886 +-236 -218 +952 257 +-705 -817 +-368 -782 +747 -338 +310 -351 +579 -486 +-276 -871 +-245 -789 +-241 -726 +-115 -701 +-119 -465 +-178 267 +856 871 +-674 596 +787 -359 +959 -941 +-273 -507 +234 165 +-196 -734 +-940 630 +-819 -558 +589 -259 +-14 756 +362 817 +-106 408 +-454 839 +135 722 +286 -667 +820 264 +440 -904 +844 -513 +-911 -851 +-973 199 +242 84 +459 539 +720 -657 +-206 252 +-88 -802 +-800 -611 +672 244 +742 486 +-607 967 +-501 -887 +151 883 +440 873 +-198 -41 +42 763 +654 -972 +-687 409 +43 -243 +-829 300 +-606 -276 +773 -940 +-110 957 +-729 -932 +-590 -348 +-849 -685 +34 458 +-418 -523 +80 -418 +-172 -553 +998 190 +218 -420 +639 -518 +220 -508 +-52 17 +-648 -378 +-859 531 +-78 228 +-415 -630 +234 191 +46 795 +99 -970 +-990 110 +-765 -10 +-753 -541 +52 878 +-353 -647 +-124 299 +41 392 +-834 813 +-620 -454 +-822 725 +241 -882 +748 794 +885 -122 +898 -279 +230 -852 +-241 626 +-425 857 +706 -632 +868 -696 +-640 907 +474 665 +215 938 +391 -913 +-604 -270 +680 166 +404 512 +21 335 +328 86 +581 -630 +338 299 +70 -386 +-576 491 +-782 36 +-963 -365 +465 386 +-14 -32 +30 691 +-577 14 +966 -656 +258 155 +635 -69 +454 -494 +776 118 +-895 185 +31 150 +-198 514 +394 -970 +-881 -74 +326 -199 +632 902 +-60 55 +-204 -350 +671 -526 +-11 -792 +569 -784 +-303 660 +-494 -522 +288 -791 +655 677 +828 -382 +-284 -540 +-86 272 +-141 908 +796 678 +-697 -846 +167 -502 +-393 -740 +487 -201 +-737 800 +-816 -195 +-917 -845 +555 -523 +-485 -531 +523 635 +-408 697 +748 -909 +-372 294 +31 419 +901 928 +597 3 +-715 926 +-738 -161 +-421 991 +334 637 +-164 3 +451 440 +188 -843 +-556 -659 +-836 -785 +116 -183 +455 -690 +-806 258 +94 554 +-836 433 +966 -370 +-113 726 +917 131 +-348 541 +587 360 +-9 605 +-685 746 +-525 904 +-443 253 +-964 -30 +-908 -526 +964 -969 +-464 583 +-592 -554 +-699 467 +-515 664 +572 785 +675 834 +-341 965 +663 739 +-156 -460 +-966 -346 +-8 -481 +-16 -873 +162 -182 +-550 993 +-326 -54 +-959 871 +400 -873 +58 266 +858 -113 +-822 -720 +491 857 +183 -368 +221 164 +191 158 +-334 688 +-456 -97 +735 249 +427 439 +-149 -678 +-473 -133 +-801 -567 +552 -195 +953 535 +897 -706 +511 -841 +-998 -537 +635 -89 +-959 -726 +-743 -555 +-355 -99 +239 -450 +237 -944 +-950 855 +-128 -626 +-114 714 +-686 483 +537 260 +768 975 +-120 792 +829 -41 +649 -368 +-39 -460 +975 958 +-858 -596 +41 -463 +515 -824 +102 -350 +737 479 +-873 410 +125 -73 +-381 414 +74 241 +480 -327 +341 256 +-535 -18 +119 -185 +604 486 +-310 -932 +403 265 +255 996 +-888 270 +69 924 +372 -130 +98 426 +964 34 +-932 -796 +-294 883 +-330 744 +-854 -799 +839 -452 +-324 744 +-435 -63 +-447 -450 +38 -196 +131 -855 +-484 564 +-77 -65 +72 -752 +530 -389 +-325 594 +803 24 +83 374 +477 776 +232 876 +-707 -31 +-321 -904 +451 -51 +-695 -429 +-437 -781 +723 -857 +576 874 +496 -439 +-124 -567 +732 524 +-859 546 +433 646 +137 -402 +-624 -741 +-895 -479 +434 799 +-3 -325 +903 -513 +643 528 +32 175 +987 -82 +665 125 +151 101 +-737 867 +733 898 +873 30 +596 -452 +756 -642 +176 596 +-815 309 +-823 913 +-526 457 +-877 993 +-887 -596 +-714 -523 +-484 -442 +-936 773 +770 184 +556 846 +939 837 +366 12 +-108 951 +234 55 +71 461 +292 141 +-696 357 +-737 391 +354 -304 +-391 -703 +86 -18 +515 811 +812 491 +30 -911 +442 -385 +-424 434 +289 462 +365 647 +-761 -158 +-247 218 +-761 201 +799 868 +-889 -597 +508 878 +880 189 +213 -164 +-188 189 +616 78 +615 887 +-967 -338 +-738 640 +837 553 +-567 -867 +-389 -331 +822 -119 +480 331 +922 115 +614 -790 +489 176 +-823 -776 +-505 385 +-820 -275 +949 -173 +837 -688 +-939 371 +-624 -798 +363 127 +-165 -223 +722 -622 +-21 -182 +547 618 +140 -307 +-331 -782 +-108 926 +58 50 +607 -840 +-650 -276 +-900 -431 +-803 170 +-37 -784 +16 -590 +-20 526 +-679 -389 +427 -143 +-657 821 +641 113 +136 377 +227 -870 +-19 733 +259 277 +648 -864 +724 -320 +-764 497 +187 -186 +-746 -97 +-255 788 +-737 547 +-323 505 +323 846 +699 -215 +816 770 +83 469 +340 -504 +-34 323 +-619 -383 +277 595 +-360 304 +-309 942 +-304 622 +788 -928 +-790 67 +8 -945 +552 255 +952 165 +-915 249 +-733 -334 +239 597 +-906 -857 +-434 -328 +840 656 +-264 6 +-782 -698 +65 661 +-86 -127 +-249 167 +105 -590 +-25 -651 +739 461 +-840 581 +607 712 +-342 -98 +-86 869 +-996 -653 +-759 370 +207 30 +115 438 +293 -824 +-135 215 +-308 651 +-789 -504 +95 88 +478 -944 +130 67 +-510 -324 +-255 -463 +496 213 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-011.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-011.ans new file mode 100644 index 0000000000000000000000000000000000000000..e1be9a45eb58391fb356d0a4959c6bdc36f86be3 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-011.ans @@ -0,0 +1,501 @@ +77.16216689544170037607 +1 +2 +3 +6 +8 +9 +10 +13 +15 +16 +17 +20 +21 +22 +24 +25 +26 +27 +29 +30 +32 +33 +35 +36 +37 +38 +40 +43 +45 +46 +47 +48 +56 +57 +62 +63 +64 +65 +66 +67 +69 +70 +71 +76 +79 +81 +82 +85 +89 +90 +92 +93 +97 +98 +100 +101 +102 +103 +104 +106 +107 +108 +109 +110 +113 +114 +116 +117 +119 +120 +121 +125 +128 +129 +133 +134 +138 +139 +140 +142 +146 +147 +148 +149 +151 +152 +153 +154 +155 +156 +158 +165 +167 +168 +171 +173 +174 +175 +180 +183 +185 +190 +191 +192 +193 +194 +197 +199 +200 +201 +202 +203 +204 +205 +206 +207 +209 +212 +213 +214 +216 +218 +219 +223 +226 +228 +229 +231 +232 +234 +236 +237 +238 +242 +245 +246 +249 +256 +257 +260 +261 +263 +265 +269 +273 +275 +276 +280 +284 +286 +288 +289 +291 +292 +298 +299 +300 +301 +302 +304 +305 +308 +309 +314 +316 +317 +318 +322 +323 +327 +330 +331 +332 +333 +334 +335 +337 +338 +340 +342 +346 +348 +350 +351 +357 +360 +363 +366 +367 +368 +370 +372 +373 +377 +380 +383 +384 +387 +389 +390 +397 +398 +401 +403 +408 +409 +411 +413 +414 +415 +420 +425 +426 +428 +429 +430 +436 +437 +439 +440 +443 +446 +449 +453 +454 +455 +457 +460 +462 +463 +465 +466 +467 +471 +474 +477 +478 +482 +485 +486 +487 +491 +492 +494 +495 +497 +498 +499 +500 +501 +502 +503 +509 +513 +514 +515 +516 +517 +518 +520 +523 +524 +525 +527 +528 +531 +532 +533 +536 +537 +540 +541 +544 +546 +550 +555 +559 +560 +563 +564 +566 +567 +568 +571 +572 +578 +579 +580 +581 +585 +587 +588 +592 +593 +594 +597 +598 +602 +603 +610 +611 +612 +613 +614 +615 +616 +620 +623 +624 +626 +627 +631 +632 +633 +634 +637 +638 +639 +641 +642 +643 +644 +645 +650 +655 +656 +657 +662 +664 +665 +671 +673 +675 +676 +680 +682 +689 +691 +692 +693 +694 +698 +700 +701 +703 +704 +705 +706 +707 +708 +709 +712 +714 +716 +717 +718 +719 +721 +722 +723 +727 +729 +730 +732 +736 +738 +739 +740 +743 +745 +748 +749 +750 +752 +756 +757 +758 +759 +760 +764 +766 +768 +769 +771 +773 +776 +777 +779 +780 +783 +785 +788 +790 +791 +794 +796 +798 +802 +803 +804 +806 +808 +809 +811 +815 +816 +817 +821 +822 +823 +824 +827 +831 +832 +833 +836 +838 +839 +841 +842 +845 +847 +848 +849 +852 +853 +854 +856 +858 +859 +860 +863 +864 +865 +868 +869 +871 +874 +875 +879 +883 +886 +888 +889 +892 +895 +897 +900 +901 +905 +906 +908 +910 +913 +917 +918 +920 +921 +924 +925 +926 +927 +928 +931 +933 +939 +941 +943 +945 +947 +948 +951 +952 +953 +956 +957 +959 +960 +961 +962 +963 +965 +972 +974 +976 +978 +979 +980 +981 +983 +984 +986 +987 +988 +990 +993 +994 +995 +997 +1000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-011.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-011.in new file mode 100644 index 0000000000000000000000000000000000000000..fc2bc8782fb4c69ffad7b4b0152d75e589c04d2d --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-011.in @@ -0,0 +1,1001 @@ +500 +-274 237 +704 -44 +-762 259 +92 -668 +-364 -725 +771 332 +999 -161 +-763 758 +-268 67 +424 -564 +-611 -341 +-736 -204 +90 -222 +-144 858 +-966 97 +-309 244 +806 280 +-147 -496 +-566 -471 +-260 265 +493 -472 +256 -297 +812 789 +-628 207 +-294 165 +-367 312 +777 -358 +-581 -499 +-948 239 +711 453 +-435 986 +308 -161 +-181 -7 +-297 -794 +282 -199 +95 317 +244 -25 +-233 401 +-146 932 +-596 510 +-473 908 +236 737 +133 -452 +104 995 +-229 509 +-697 137 +140 187 +-239 535 +-337 -949 +-395 921 +983 -739 +356 802 +983 476 +378 299 +985 819 +-115 227 +-620 42 +-437 -171 +-228 -908 +-40 -486 +466 903 +-948 71 +-446 48 +783 -110 +-205 539 +729 77 +399 96 +-943 -864 +-556 268 +63 193 +132 318 +30 671 +243 599 +262 513 +933 105 +-930 680 +433 732 +-827 -66 +716 -293 +-598 -85 +-156 -153 +-193 170 +109 641 +-499 -395 +961 -242 +-26 -497 +-73 984 +-757 -610 +233 173 +-763 620 +962 963 +721 229 +-172 389 +524 -945 +659 792 +155 480 +143 -733 +-162 -292 +-10 988 +-113 531 +687 147 +44 250 +-935 615 +-532 540 +-194 -821 +-267 343 +-141 -106 +803 -640 +-636 478 +609 268 +-10 -663 +-645 -423 +558 -431 +-287 102 +-937 -584 +805 -313 +179 -190 +-968 -69 +574 118 +281 -38 +315 -698 +426 564 +-878 -314 +775 851 +855 134 +-261 -551 +42 936 +-891 325 +757 -338 +332 511 +471 365 +-710 -862 +64 108 +342 -633 +-964 -91 +376 575 +282 -966 +-870 183 +629 124 +-653 817 +-379 -861 +53 201 +-558 -278 +-86 -674 +121 952 +-832 463 +-566 457 +809 238 +286 -691 +-819 62 +969 -242 +798 -34 +978 -474 +499 10 +-895 120 +-702 793 +423 407 +-151 245 +-42 665 +-744 -932 +950 -838 +-805 -754 +-898 -579 +428 303 +-688 26 +923 632 +280 101 +615 -427 +563 978 +-908 -299 +827 137 +395 655 +966 -391 +-229 606 +199 60 +64 806 +67 -905 +-343 -655 +314 773 +743 177 +465 949 +441 451 +-315 121 +-221 -960 +164 -616 +624 -587 +453 654 +-16 -823 +-332 994 +-87 371 +-504 112 +783 -305 +143 -370 +-912 833 +806 993 +-586 -674 +-285 616 +318 343 +-69 26 +677 -58 +701 -558 +735 435 +107 -209 +766 -445 +-978 613 +-226 339 +-855 607 +-899 -136 +-621 201 +391 899 +255 -991 +-874 788 +-187 -57 +-474 567 +-541 -704 +-887 124 +591 559 +53 128 +-14 422 +931 744 +-211 -520 +90 -824 +202 -305 +-796 8 +900 919 +858 -172 +340 903 +-484 796 +-36 -298 +851 356 +-538 54 +-996 131 +246 852 +-743 611 +-854 -512 +-356 642 +2 -187 +-99 478 +-458 -989 +624 -875 +-736 -227 +-601 611 +-16 609 +730 975 +995 12 +-595 256 +-389 -771 +-825 -161 +-125 -60 +-606 -805 +-346 922 +-23 653 +-281 -810 +-411 839 +-880 24 +237 -718 +-922 338 +588 -821 +551 971 +-236 -35 +757 -12 +688 -662 +-35 274 +-3 792 +-34 168 +83 579 +-352 -108 +288 -991 +32 -322 +-459 -403 +216 576 +-338 -684 +-336 130 +-964 -702 +-776 408 +-368 268 +-807 -277 +563 493 +564 -585 +-890 886 +862 575 +-957 -201 +-149 795 +364 60 +-995 461 +617 -355 +-219 -850 +-55 348 +-548 121 +426 -826 +-522 487 +886 457 +-925 -303 +-572 -968 +-64 -924 +-149 -689 +776 -819 +-229 -253 +969 -386 +615 -151 +-822 731 +-938 358 +76 874 +779 303 +-164 248 +595 -881 +157 667 +-672 749 +847 -270 +535 -831 +-538 -898 +303 346 +481 -757 +762 -581 +404 -839 +483 -192 +23 108 +-902 994 +-847 -488 +605 -976 +969 607 +-239 146 +588 36 +719 -898 +985 523 +-584 -125 +823 -622 +-678 -914 +477 959 +-341 742 +-192 -150 +-472 543 +-47 317 +599 -36 +551 -346 +-700 -865 +418 -415 +-70 -70 +100 870 +-953 361 +420 -768 +427 -641 +840 -871 +695 766 +629 819 +-576 69 +465 392 +322 -188 +486 892 +-89 286 +-610 473 +-140 -952 +-153 775 +-481 960 +-708 -532 +871 704 +-802 880 +-394 -196 +-689 -382 +230 -228 +-918 -608 +530 195 +-965 136 +-561 -972 +969 560 +-153 -27 +828 -383 +-995 85 +126 644 +890 -617 +3 -661 +-198 498 +-413 109 +-480 -968 +-559 -478 +-813 -557 +101 -133 +864 -949 +733 702 +287 132 +-73 696 +-247 915 +-877 962 +188 -49 +-417 -638 +436 782 +-983 218 +-172 939 +-524 295 +-181 46 +779 -859 +-429 -271 +-829 -862 +455 238 +472 237 +352 695 +-375 747 +-162 241 +-653 -966 +-839 52 +-138 7 +5 -574 +-694 81 +-488 -947 +682 972 +574 -968 +-518 -468 +-32 328 +-757 696 +422 -780 +-609 971 +495 -793 +72 -253 +-791 511 +777 422 +665 -640 +963 112 +-977 -829 +-500 -76 +-242 -7 +-579 -347 +-984 -973 +597 787 +-338 -745 +752 -517 +-783 604 +-913 -477 +171 -587 +-777 599 +50 44 +-163 789 +613 -507 +620 -555 +874 -913 +-746 -864 +-313 -383 +961 4 +-807 -957 +753 -593 +-311 645 +999 -718 +-153 -625 +498 -128 +610 813 +-446 -213 +766 442 +-524 -711 +469 -862 +-611 68 +-262 -859 +626 -833 +-153 -779 +-537 483 +-203 463 +424 94 +526 224 +884 -531 +-620 -670 +496 412 +-112 582 +-584 -624 +816 -265 +-395 312 +-383 -804 +-341 388 +172 16 +630 -174 +-793 -806 +-308 859 +-720 -221 +661 16 +-13 -493 +141 615 +929 -267 +-429 -569 +-359 -955 +-82 315 +20 -24 +-205 -554 +524 471 +-14 846 +460 -525 +-25 609 +-138 916 +673 405 +745 157 +-168 175 +-147 667 +512 883 +2 -911 +768 -380 +951 -312 +-191 -617 +589 -278 +-840 509 +245 396 +249 -342 +-323 321 +-173 100 +688 239 +-764 574 +355 -186 +-395 219 +570 549 +617 -677 +-369 -612 +493 -801 +-117 659 +843 147 +40 -487 +-190 982 +837 860 +-194 -275 +426 -344 +-542 322 +855 -594 +37 -355 +-547 234 +210 914 +268 -683 +68 -806 +279 -906 +-64 -142 +10 -124 +250 180 +236 313 +-483 714 +641 -132 +493 994 +562 496 +736 491 +-481 217 +-802 276 +871 566 +-586 -240 +-319 374 +-860 278 +-285 -544 +-768 -890 +642 278 +-99 248 +22 -453 +-903 -910 +641 31 +-767 -843 +977 -441 +-40 -917 +-872 -994 +-612 -436 +163 -486 +-277 -969 +-946 -698 +439 -726 +855 41 +-883 728 +-995 -581 +-663 -305 +-955 -884 +310 -394 +61 476 +169 867 +714 719 +-355 12 +700 -139 +269 -873 +-660 124 +877 -540 +-682 367 +120 -999 +907 -767 +284 27 +-553 210 +273 311 +-101 970 +-735 -676 +672 820 +-439 -845 +-664 303 +101 -63 +-141 201 +495 1 +-547 -120 +984 98 +3 -562 +-219 198 +262 808 +-227 -174 +35 -62 +20 911 +-909 -14 +-816 -153 +326 -259 +-456 69 +179 142 +392 337 +18 -829 +-466 745 +184 -480 +-149 720 +-842 -809 +154 577 +58 25 +-499 645 +-6 -795 +704 -915 +194 469 +179 543 +-968 -654 +-930 -591 +-420 116 +399 -285 +-359 489 +-425 730 +619 65 +473 109 +508 -427 +-874 -743 +939 -821 +752 782 +287 -612 +-836 -987 +-581 -452 +-820 616 +-806 243 +130 756 +-651 432 +-534 55 +-363 998 +553 -606 +614 -632 +-812 363 +-495 62 +1 154 +-3 497 +565 -720 +982 683 +799 245 +284 -544 +358 -435 +737 845 +668 -233 +820 461 +654 68 +165 -121 +762 504 +413 611 +785 915 +-520 901 +-535 -195 +-493 670 +319 907 +-1 848 +-936 -71 +633 644 +-4 361 +-718 429 +-218 -178 +966 -160 +224 864 +965 356 +-246 766 +110 13 +944 -965 +-548 628 +-786 316 +80 -825 +-601 -207 +-46 -827 +-196 -523 +747 998 +-800 756 +955 -139 +477 -61 +-195 780 +-831 936 +240 -462 +-665 -268 +525 500 +378 714 +-735 108 +769 -973 +-923 333 +689 669 +-172 -840 +637 -509 +-49 -637 +-165 944 +-475 -286 +-318 130 +702 663 +110 -527 +-171 451 +410 -58 +733 448 +-609 -738 +-650 -798 +237 381 +-751 861 +-639 -280 +-375 -411 +-125 -83 +-602 -983 +963 -512 +857 -116 +395 -585 +-157 409 +849 -331 +737 481 +-321 342 +33 -597 +-462 -537 +761 -414 +361 311 +37 -219 +562 619 +350 -107 +-465 255 +647 253 +332 -160 +-738 -986 +-453 699 +592 -418 +17 -280 +-652 -278 +-512 -148 +-21 -707 +-535 112 +70 581 +-767 151 +343 -314 +7 -991 +472 -4 +73 630 +-456 -178 +522 385 +956 -60 +427 -842 +861 -321 +672 -151 +-300 631 +-442 -262 +-119 699 +-669 659 +-516 -352 +-680 174 +328 965 +697 571 +-666 946 +-164 -315 +211 -346 +-155 848 +-68 409 +209 751 +-772 -241 +-351 -863 +-780 713 +1 137 +-534 545 +-220 -158 +-83 278 +-677 -227 +-580 -53 +636 955 +-569 80 +-644 -289 +-38 180 +367 945 +267 -313 +-469 370 +-750 -513 +782 519 +-738 -764 +525 -78 +-655 -820 +4 -599 +-281 -276 +-688 483 +422 578 +-633 624 +431 -389 +232 961 +756 -750 +242 -119 +891 -859 +12 199 +705 -919 +502 938 +858 220 +562 900 +187 -208 +-399 133 +-643 -385 +569 -996 +27 283 +-227 -512 +856 225 +-221 -421 +421 47 +282 -797 +293 344 +731 -797 +-921 744 +-881 488 +-587 266 +-662 -137 +-270 487 +719 -931 +-245 41 +166 -694 +829 825 +755 209 +-886 -954 +-97 885 +973 -609 +-717 547 +-687 381 +689 453 +197 247 +-856 -556 +-506 -33 +-219 632 +-213 -249 +-436 596 +-238 549 +434 288 +-276 -636 +-500 319 +432 620 +880 691 +552 -759 +-878 802 +-709 926 +246 -600 +146 982 +-901 -557 +316 -427 +-87 -507 +793 -477 +-173 172 +566 655 +930 -277 +-503 364 +-865 -644 +-633 -567 +-98 -154 +942 110 +-784 341 +890 -68 +749 100 +285 444 +-124 758 +779 -308 +555 11 +614 203 +-98 909 +-161 -34 +895 -753 +66 475 +865 -497 +-668 512 +-652 -449 +-925 -879 +873 245 +-162 -235 +-971 39 +354 234 +-611 -383 +619 64 +-360 605 +418 598 +767 -162 +-642 -479 +-121 903 +-715 570 +-739 502 +621 -612 +921 672 +-427 -719 +138 -112 +-180 752 +680 -947 +77 990 +611 280 +910 934 +-567 -140 +-334 500 +-472 -908 +-510 706 +-925 617 +175 905 +436 821 +-760 430 +-561 -654 +-590 -915 +184 -34 +-51 -518 +226 -501 +-521 -485 +-880 -232 +-399 374 +111 -328 +-37 -869 +-67 -468 +231 775 +-169 -233 +398 -324 +-904 -906 +-20 -349 +318 651 +53 350 +718 941 +136 -834 +-431 36 +-547 -764 +529 883 +-503 -557 +-526 213 +552 -39 +-760 -211 +-895 896 +-437 41 +311 873 +601 849 +-405 251 +-268 -328 +-194 574 +94 295 +237 38 +176 757 +-82 -550 +953 -417 +-581 -430 +-433 26 +-873 -446 +71 613 +791 -753 +-683 -725 +979 -702 +305 128 +-370 -501 +945 -504 +633 -974 +846 -656 +440 804 +489 -483 +-626 -200 +-372 622 +-696 660 +853 -747 +659 576 +-700 696 +163 356 +-198 -11 +-507 -856 +-441 -956 +-854 232 +-735 992 +-869 -797 +-897 487 +651 393 +-426 224 +115 -309 +-804 976 +370 440 +-247 -265 +-455 874 +546 568 +-79 -687 +951 150 +998 -795 +-577 -421 +-928 385 +-581 -224 +-570 719 +-232 966 +701 -266 +445 -881 +41 -348 +-808 810 +527 -243 +100 -111 +874 624 +699 234 +259 150 +285 -931 +236 -536 +-267 -22 +-343 -9 +-522 -491 +-243 341 +684 959 +58 -638 +-776 621 +-620 863 +559 -172 +-819 -9 +430 -441 +523 -644 +941 -768 +5 -117 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-012.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-012.ans new file mode 100644 index 0000000000000000000000000000000000000000..83c7f8de8b81bbbf02e94185fd7ec09280b100f4 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-012.ans @@ -0,0 +1,501 @@ +74.27651041883967764079 +1 +2 +3 +4 +7 +11 +14 +16 +17 +18 +19 +20 +21 +22 +24 +26 +27 +30 +32 +33 +37 +44 +47 +49 +50 +53 +56 +57 +61 +62 +63 +68 +69 +74 +75 +78 +81 +82 +84 +86 +92 +93 +94 +96 +97 +99 +100 +111 +117 +118 +120 +124 +125 +134 +135 +140 +141 +143 +145 +146 +147 +149 +150 +151 +152 +153 +155 +156 +157 +159 +163 +164 +165 +168 +169 +172 +173 +174 +181 +184 +185 +186 +188 +189 +190 +193 +194 +195 +197 +201 +203 +204 +209 +210 +212 +214 +215 +218 +221 +226 +228 +230 +232 +233 +235 +236 +238 +242 +243 +245 +246 +247 +248 +251 +252 +253 +254 +256 +260 +263 +264 +266 +268 +269 +270 +271 +272 +274 +275 +279 +282 +283 +285 +286 +290 +292 +293 +294 +295 +304 +307 +308 +309 +310 +314 +315 +317 +320 +322 +323 +324 +325 +328 +329 +331 +334 +335 +336 +338 +340 +341 +342 +343 +344 +348 +350 +351 +353 +354 +355 +356 +357 +358 +359 +368 +369 +370 +372 +373 +374 +379 +380 +383 +389 +391 +394 +396 +400 +403 +404 +406 +409 +411 +413 +414 +417 +418 +420 +422 +423 +424 +425 +427 +428 +432 +433 +435 +442 +443 +444 +445 +446 +447 +448 +452 +455 +457 +463 +465 +466 +469 +471 +472 +475 +476 +478 +479 +480 +481 +484 +486 +489 +491 +492 +495 +498 +499 +500 +502 +504 +506 +507 +510 +514 +516 +517 +518 +521 +523 +526 +529 +532 +533 +535 +537 +540 +542 +543 +546 +547 +548 +550 +551 +553 +554 +555 +556 +557 +558 +559 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +583 +584 +589 +590 +592 +595 +596 +597 +599 +604 +606 +607 +608 +609 +611 +614 +617 +618 +619 +621 +622 +626 +629 +634 +635 +636 +637 +638 +640 +642 +648 +650 +654 +657 +658 +661 +662 +665 +666 +668 +669 +670 +673 +676 +677 +683 +684 +686 +687 +689 +691 +695 +697 +700 +703 +704 +706 +707 +711 +713 +714 +716 +717 +721 +722 +723 +724 +726 +727 +728 +729 +730 +731 +732 +734 +735 +737 +738 +739 +743 +744 +745 +746 +747 +748 +749 +753 +754 +755 +758 +760 +762 +764 +766 +768 +771 +774 +776 +777 +778 +779 +782 +783 +784 +786 +787 +788 +789 +792 +794 +795 +798 +800 +801 +805 +806 +807 +809 +810 +811 +813 +815 +816 +819 +820 +822 +823 +824 +825 +828 +830 +831 +833 +835 +838 +840 +844 +845 +849 +850 +851 +852 +855 +858 +860 +862 +865 +866 +867 +868 +869 +872 +874 +877 +879 +880 +882 +885 +886 +888 +890 +892 +893 +897 +899 +900 +901 +904 +909 +912 +913 +914 +915 +918 +921 +922 +923 +924 +925 +927 +928 +932 +936 +938 +941 +942 +943 +944 +946 +949 +953 +955 +957 +960 +961 +965 +966 +967 +968 +971 +975 +976 +977 +979 +980 +985 +986 +990 +991 +992 +993 +995 +997 +998 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-012.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-012.in new file mode 100644 index 0000000000000000000000000000000000000000..31c8022a96e073e3dd23a0b6e0a3a9cb080c7f41 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-012.in @@ -0,0 +1,1001 @@ +500 +-533 109 +355 227 +828 133 +-918 302 +621 -194 +63 792 +-852 859 +811 -961 +422 -622 +546 -918 +-405 345 +314 -993 +-557 -448 +901 259 +807 -68 +43 391 +-327 626 +607 516 +541 145 +-897 643 +-161 197 +942 183 +-74 -980 +-495 18 +250 824 +-710 118 +517 273 +28 -754 +577 -49 +14 351 +818 -838 +940 967 +320 449 +523 -216 +353 -174 +-936 -725 +297 685 +-958 -780 +-74 -780 +339 -646 +422 -191 +-165 915 +-417 -182 +-189 759 +-976 -939 +-178 -488 +-478 67 +917 -377 +307 143 +-389 233 +530 -59 +-735 -647 +575 973 +826 -551 +347 -810 +-191 26 +-578 762 +-829 -718 +498 -217 +51 -118 +256 454 +773 218 +-666 525 +-402 -566 +-284 -720 +491 713 +394 -561 +-589 467 +-588 -31 +167 -832 +106 875 +544 -842 +36 -746 +98 15 +805 727 +380 -711 +494 -309 +244 262 +-120 809 +-891 -304 +-743 769 +290 316 +-53 769 +-916 -42 +485 -625 +-98 581 +959 -635 +693 -642 +-921 -759 +268 -687 +-557 -974 +-270 280 +334 779 +-985 -85 +861 -767 +535 51 +-855 706 +143 511 +-725 932 +505 246 +-319 -654 +102 -525 +-394 -338 +718 -195 +557 -333 +128 -900 +415 -714 +98 -69 +-377 -210 +707 -142 +-692 -86 +964 -793 +-768 -698 +462 -986 +971 -256 +990 249 +-570 -230 +-762 -221 +596 -474 +389 922 +-11 -58 +-195 -723 +-93 -524 +730 953 +-616 441 +764 -846 +-83 -337 +-787 -681 +954 -874 +-599 -336 +645 -128 +255 -734 +-17 679 +856 671 +222 214 +799 -710 +-636 -316 +-698 -392 +-723 -787 +-566 -35 +-694 918 +-955 -994 +-671 531 +-138 -129 +630 151 +622 806 +-26 529 +245 872 +-670 834 +-382 201 +-507 703 +572 382 +-416 391 +956 493 +302 175 +770 44 +-690 129 +-488 -841 +774 715 +457 -403 +-548 -825 +-33 -293 +-330 751 +981 888 +-955 993 +-94 -229 +-76 -730 +-307 -37 +611 455 +92 -171 +502 -768 +-856 162 +303 682 +780 549 +-982 -895 +-570 -584 +941 -831 +424 -135 +79 -418 +417 -550 +422 829 +642 -889 +-996 -692 +-718 394 +884 182 +-930 108 +308 -977 +-773 245 +350 339 +-348 98 +968 -487 +-403 -223 +-540 152 +889 589 +693 519 +-720 -555 +-172 26 +359 -497 +-119 -577 +58 -408 +-264 253 +-402 -644 +-610 804 +-37 523 +811 433 +130 970 +-359 -534 +906 -930 +-363 109 +-146 375 +825 -612 +-588 191 +-927 -809 +-726 -183 +504 949 +-959 -583 +112 -803 +-779 786 +-30 -855 +545 -722 +298 124 +124 -949 +256 -215 +-993 -391 +79 -237 +579 141 +-792 -823 +447 235 +955 60 +-570 293 +549 -733 +841 292 +-627 250 +-453 -540 +-704 83 +362 371 +818 420 +-259 198 +-942 793 +334 -399 +206 -903 +-669 26 +-677 404 +-158 -815 +-254 605 +696 107 +-923 -29 +-608 535 +-886 517 +192 774 +-453 907 +-359 653 +-340 199 +-837 754 +901 -942 +-521 -94 +293 -531 +-513 -982 +-310 -505 +-460 789 +909 -399 +-616 -654 +-461 -90 +-684 303 +110 -69 +-119 532 +676 -868 +876 179 +667 508 +188 172 +-641 526 +691 820 +460 -617 +438 208 +621 898 +97 -301 +187 -603 +-235 -672 +-159 733 +-910 -535 +-146 834 +902 721 +465 199 +850 -931 +49 71 +-503 75 +-695 -380 +729 -703 +822 -314 +-871 -70 +-417 -384 +356 27 +-566 687 +291 495 +-661 -136 +36 -218 +-453 -823 +53 -688 +-811 -567 +9 -738 +-714 -503 +22 -843 +-524 -556 +-326 500 +344 -394 +508 -167 +-577 703 +-132 593 +-819 698 +-305 910 +602 663 +-524 -963 +344 -891 +-941 121 +-257 475 +25 877 +-828 314 +-580 -873 +-618 -302 +-608 333 +-5 -297 +-641 384 +-731 791 +-546 169 +768 605 +605 -782 +-121 -561 +-320 332 +-671 -106 +-607 -683 +-266 -50 +255 874 +138 -66 +-381 515 +366 874 +397 688 +943 475 +-379 857 +219 -109 +-251 420 +-271 425 +980 830 +-824 -170 +657 794 +-159 -718 +61 -275 +414 -691 +-913 374 +-896 -722 +574 491 +-880 868 +281 -240 +760 306 +551 159 +795 554 +-638 -143 +-585 669 +-706 70 +356 671 +585 -865 +-592 -663 +492 -151 +243 -400 +666 -363 +235 -324 +274 -905 +-802 -822 +152 110 +178 169 +11 514 +-286 -167 +-95 347 +-911 342 +-906 166 +264 -195 +927 -657 +-355 -748 +125 -68 +-214 378 +-92 340 +-155 -231 +-288 -164 +-409 236 +73 -987 +620 -993 +-939 -697 +729 -102 +-172 -470 +-429 454 +-995 819 +422 747 +-483 -732 +-284 -758 +819 953 +-614 -721 +731 39 +-921 -606 +-926 -246 +-808 -304 +-631 -140 +295 -340 +126 661 +-765 453 +-540 2 +18 -123 +477 837 +-313 -186 +-296 -583 +-54 85 +794 390 +673 188 +536 -652 +882 660 +-453 577 +119 -679 +248 -95 +861 564 +-232 133 +-244 -756 +-399 416 +-289 -610 +-352 583 +-865 914 +527 157 +921 693 +-307 -362 +776 925 +-702 78 +-895 -285 +944 -289 +411 -38 +-960 221 +-836 -229 +639 -190 +696 155 +501 -902 +479 -769 +-852 -591 +-497 -591 +-158 -955 +-118 -669 +-418 378 +990 950 +697 254 +-663 882 +834 264 +-519 220 +357 565 +-785 -402 +528 -995 +-43 726 +-850 185 +847 -666 +-246 -912 +-638 926 +-929 -562 +-647 675 +-154 -658 +79 186 +979 294 +26 -141 +-97 826 +853 270 +498 671 +-771 778 +394 220 +249 -320 +-164 -388 +944 595 +-408 -230 +-500 673 +-471 923 +-3 -579 +-173 -753 +84 10 +-774 211 +146 -843 +-565 -177 +989 164 +441 810 +-985 244 +967 -4 +-15 -890 +-804 247 +216 689 +-506 48 +272 -931 +350 -212 +-967 41 +694 -740 +-613 946 +288 757 +208 -856 +-18 -90 +-328 -53 +507 753 +150 -373 +-640 398 +-661 557 +-279 131 +-90 951 +-45 438 +620 -717 +-694 593 +-249 -766 +-683 342 +-948 636 +92 -503 +710 -305 +289 364 +450 481 +989 491 +-280 -650 +-591 -205 +-799 -897 +-447 708 +-720 520 +414 920 +-925 -865 +527 -875 +-794 456 +-923 -502 +-332 552 +656 -488 +-178 -926 +-471 313 +-260 -653 +933 -488 +-202 -79 +-625 -334 +408 -63 +752 774 +-287 468 +-945 -947 +-680 909 +545 658 +121 290 +453 -674 +801 -468 +-564 -183 +109 -317 +-253 51 +-640 589 +294 -720 +-19 -450 +707 789 +326 555 +-913 657 +-661 -383 +-283 -10 +-878 325 +-314 -905 +714 777 +275 754 +-514 75 +-835 -32 +438 369 +726 89 +550 446 +-934 -984 +-890 -850 +813 -705 +-52 -678 +887 -200 +-769 426 +-336 915 +-673 194 +-534 -139 +586 535 +-693 690 +723 883 +448 309 +634 393 +-675 520 +39 266 +-295 669 +-615 384 +-853 768 +-296 -52 +-736 -230 +12 982 +53 166 +629 512 +-402 392 +770 -702 +-51 -717 +722 371 +161 631 +659 561 +689 132 +931 -432 +-731 98 +292 -766 +989 488 +-826 -161 +802 849 +729 852 +508 -88 +668 877 +732 432 +622 -318 +-396 -146 +996 -748 +-713 831 +219 -224 +-774 964 +492 52 +465 966 +222 152 +-474 -320 +-543 -43 +877 -194 +539 -432 +376 414 +891 -588 +-578 -800 +817 232 +-946 24 +-460 394 +566 664 +-263 371 +-318 -35 +387 -64 +236 -698 +-890 -390 +343 419 +239 24 +-355 -947 +477 897 +348 -393 +-614 -888 +476 -331 +-10 871 +-230 802 +410 930 +-308 349 +172 83 +555 905 +168 -590 +179 104 +-941 -945 +-409 810 +-533 -641 +879 454 +189 487 +-940 -332 +965 82 +-597 -212 +826 -235 +-27 40 +903 -161 +817 455 +467 506 +-998 -23 +-825 77 +595 -360 +-978 918 +574 50 +-877 499 +286 -299 +577 459 +-426 479 +321 -121 +-384 -658 +-653 328 +744 100 +669 691 +468 347 +-649 831 +399 241 +578 -410 +431 -976 +-267 520 +-583 -345 +29 -199 +-561 137 +-871 -117 +-941 -713 +316 -473 +459 -166 +-304 -842 +882 -596 +505 231 +-189 264 +-164 -591 +-432 589 +-513 589 +659 -580 +-991 -43 +439 -726 +888 107 +33 866 +115 -81 +362 -580 +356 802 +294 -822 +-200 194 +951 -732 +433 -350 +-304 144 +-307 -536 +-94 -98 +-530 -174 +-417 642 +-844 -977 +-273 812 +-709 228 +265 -626 +-456 171 +942 -682 +-327 988 +781 -120 +-816 789 +-506 65 +449 -908 +688 66 +848 603 +199 -41 +-320 -932 +49 867 +-371 291 +-103 533 +-84 -8 +-748 131 +747 -101 +-649 385 +-775 -34 +419 306 +-700 307 +-584 989 +-578 433 +-215 363 +996 -608 +871 232 +598 471 +-667 -929 +-453 533 +739 570 +-492 805 +624 -524 +39 935 +-153 -752 +-694 -60 +-599 -159 +-169 573 +-191 680 +-426 294 +-205 387 +-771 507 +505 722 +-233 -290 +691 -587 +-193 710 +380 88 +-839 850 +-302 -539 +-669 -597 +-563 955 +-243 -729 +579 438 +-939 -184 +-249 857 +966 -968 +-747 835 +763 -179 +589 306 +546 651 +-921 949 +-892 540 +419 -834 +109 110 +979 462 +-491 -685 +-701 820 +120 802 +-572 609 +315 114 +746 261 +402 729 +464 650 +-130 -449 +-3 453 +407 817 +143 124 +234 14 +-772 -100 +347 305 +804 83 +879 648 +-16 675 +819 -146 +-538 -29 +-317 -419 +-377 96 +267 140 +414 -932 +801 -567 +551 229 +-885 -368 +304 122 +882 950 +144 -702 +118 -438 +-267 -797 +-292 211 +-120 -25 +-462 911 +-663 -386 +-497 280 +-25 371 +-666 27 +123 880 +-940 155 +17 -645 +-742 494 +-591 605 +639 -770 +619 -721 +-616 502 +622 485 +-328 -590 +-507 863 +-572 161 +784 30 +271 236 +482 -869 +584 -462 +-121 24 +285 -796 +391 222 +320 718 +764 -110 +-992 309 +-592 -478 +-774 375 +264 -546 +558 692 +98 297 +750 -255 +982 827 +200 542 +137 -856 +967 -465 +621 99 +483 160 +520 -694 +577 -713 +-408 -757 +-734 293 +167 265 +-131 228 +-994 295 +148 556 +-165 -450 +-823 -214 +-77 -556 +-80 939 +-377 405 +-520 -810 +-833 894 +474 -166 +-447 731 +992 -203 +293 -467 +-4 489 +-903 209 +-775 0 +-190 497 +275 173 +548 -642 +391 -235 +584 170 +518 -774 +-634 -92 +-867 -508 +626 -743 +834 886 +-935 -679 +706 106 +-354 423 +-522 -673 +-258 116 +-161 -166 +976 -998 +-573 787 +-439 895 +735 -886 +-568 699 +331 -342 +-450 53 +691 -827 +-177 94 +-819 388 +-275 -418 +-393 -860 +-934 817 +-738 -112 +922 -693 +-755 -208 +822 660 +905 963 +-555 -989 +-529 -672 +-527 952 +-260 -745 +-989 -186 +556 633 +-64 -490 +-987 287 +650 -990 +-48 -109 +641 398 +159 250 +-637 -67 +-388 -21 +957 -929 +401 -77 +-666 -104 +-994 -293 +961 -462 +-264 674 +-538 191 +569 477 +-454 776 +-630 856 +-255 -286 +-100 175 +-212 708 +-900 -454 +-46 -853 +-11 172 +-525 -53 +-720 -999 +-620 -477 +-878 -552 +-284 986 +532 -110 +-246 683 +208 -1000 +660 -574 +-153 654 +-401 -54 +-926 686 +-586 -18 +591 -126 +-130 287 +86 944 +477 -389 +-797 562 +-155 -701 +-767 -880 +312 -672 +-735 381 +192 337 +-836 597 +-267 -832 +564 329 +109 -340 +634 -980 +-261 610 +-914 261 +0 -851 +319 -171 +681 -44 +-606 314 +714 563 +910 325 +857 679 +-83 -354 +-854 50 +688 895 +25 -329 +807 -494 +132 -641 +744 171 +721 939 +-313 172 +-720 -553 +79 358 +556 406 +-557 -884 +-467 -651 +-230 -924 +433 510 +-24 63 +159 61 +861 3 +217 -182 +-105 -415 +366 271 +-354 819 +-889 278 +731 38 +930 -670 +-680 863 +399 -781 +-862 722 +-913 -98 +462 -382 +507 -931 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-013.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-013.ans new file mode 100644 index 0000000000000000000000000000000000000000..1dfc0c4fb42e16b153d57edf8724dae40b8e9e60 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-013.ans @@ -0,0 +1,501 @@ +70491256.48715631663799285889 +1 +2 +3 +5 +6 +13 +16 +18 +19 +23 +26 +27 +28 +29 +30 +31 +34 +35 +36 +37 +38 +40 +44 +53 +54 +56 +57 +61 +65 +66 +67 +68 +69 +70 +71 +73 +74 +75 +80 +82 +83 +86 +87 +89 +90 +91 +93 +95 +99 +103 +104 +106 +107 +108 +109 +111 +112 +118 +120 +124 +126 +129 +130 +132 +133 +135 +137 +143 +144 +146 +147 +149 +150 +159 +160 +162 +163 +165 +169 +172 +177 +178 +180 +181 +182 +183 +184 +187 +190 +192 +196 +197 +199 +201 +203 +204 +206 +207 +210 +214 +220 +222 +223 +234 +235 +238 +240 +242 +243 +244 +247 +248 +250 +251 +253 +255 +257 +259 +260 +261 +262 +263 +265 +266 +267 +268 +269 +271 +273 +274 +275 +282 +283 +286 +287 +288 +290 +296 +297 +298 +299 +300 +301 +302 +305 +306 +307 +308 +313 +314 +316 +317 +319 +320 +322 +324 +325 +326 +327 +328 +329 +330 +332 +335 +336 +337 +338 +340 +342 +343 +345 +351 +353 +354 +355 +356 +357 +361 +362 +363 +367 +370 +371 +372 +373 +376 +378 +380 +381 +385 +386 +387 +390 +391 +392 +394 +396 +397 +399 +401 +402 +403 +405 +406 +412 +414 +415 +416 +417 +418 +423 +424 +426 +427 +428 +429 +431 +434 +435 +436 +438 +441 +442 +443 +446 +451 +452 +453 +456 +459 +461 +463 +464 +465 +469 +475 +478 +480 +482 +484 +486 +487 +490 +492 +493 +495 +497 +499 +501 +502 +504 +505 +506 +507 +510 +512 +513 +518 +520 +523 +526 +527 +532 +533 +535 +536 +541 +543 +544 +546 +549 +551 +553 +555 +557 +560 +562 +563 +564 +567 +568 +569 +570 +573 +575 +578 +579 +580 +585 +587 +589 +590 +591 +594 +595 +596 +598 +599 +601 +602 +605 +606 +608 +613 +618 +619 +622 +623 +625 +626 +630 +631 +632 +633 +634 +636 +638 +642 +646 +647 +649 +652 +655 +657 +664 +665 +668 +669 +670 +672 +673 +677 +678 +680 +682 +683 +684 +685 +686 +688 +689 +692 +693 +694 +696 +697 +699 +702 +703 +704 +705 +706 +707 +708 +711 +713 +717 +719 +720 +721 +722 +724 +725 +726 +729 +731 +732 +733 +734 +735 +736 +741 +742 +743 +744 +745 +747 +750 +751 +758 +760 +761 +762 +763 +765 +767 +769 +775 +782 +787 +788 +792 +794 +796 +797 +798 +801 +804 +805 +806 +808 +809 +811 +812 +815 +818 +823 +824 +825 +827 +828 +829 +830 +831 +833 +835 +836 +837 +838 +839 +844 +850 +853 +854 +858 +859 +860 +861 +862 +865 +868 +869 +872 +874 +875 +876 +882 +884 +885 +890 +891 +894 +895 +896 +898 +899 +902 +903 +905 +906 +909 +910 +911 +912 +917 +919 +920 +921 +922 +924 +925 +926 +928 +929 +932 +933 +934 +937 +941 +943 +944 +945 +946 +947 +948 +950 +953 +954 +958 +960 +961 +962 +963 +966 +967 +968 +970 +974 +975 +976 +977 +982 +985 +988 +989 +990 +994 +996 +997 +1000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-013.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-013.in new file mode 100644 index 0000000000000000000000000000000000000000..890bf9e222bbd0f2f6967c5cbbfed0efed2756a6 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-013.in @@ -0,0 +1,1001 @@ +500 +-78296867 138613230 +318487882 94144687 +-596571903 313507184 +-927120389 963871120 +-241114779 17515640 +314686342 -73961262 +838780299 620223717 +-325020762 702520307 +452425683 -178303876 +856072202 -736056848 +-994441800 900672199 +980117680 -315395139 +-712576526 408605930 +575918486 -477295619 +-243165457 -401525616 +-147923371 460271989 +831813663 -919048858 +625810616 195644686 +-925349124 302716807 +400594027 -613875261 +-723899594 996744575 +727042572 -227034425 +510145620 101534546 +347470547 940423683 +173114994 -781311860 +-140324788 658560971 +-555367628 -691845682 +727944451 90210228 +-744914774 477155101 +-203753875 402335128 +-558850064 -110020149 +294447208 420947986 +294586353 865963648 +707470610 415488167 +-426209476 -309666481 +587730235 209245420 +-702132925 587699049 +-981097418 180454513 +324976801 -491989372 +-320542780 428160555 +313363475 -550757438 +-906835936 -685733511 +-760403181 57090177 +879892092 468559425 +202642668 -614562605 +-705861815 850283035 +-881607860 -236407740 +923441646 913855117 +922857021 -352901781 +484306024 -609198710 +-963671457 -936821021 +65368763 -16613186 +-966449118 108344757 +-714954927 711279855 +544326772 -184665377 +-546896474 -824026509 +915902258 44880865 +200865136 955706451 +518874596 -560312990 +264265985 411754510 +-268243219 22518411 +-810932221 -683904118 +238113172 -742388967 +840953879 -899439903 +-585325126 -717307812 +154245310 -33893130 +804691831 424183663 +-494652907 -82279089 +-881307458 430412468 +-911169981 258204322 +-153383714 268769534 +186017391 -503644361 +-286060848 315158688 +527358692 757579692 +-961366399 347202274 +-195427866 -544712165 +-813614388 -492948286 +256375519 950419918 +-922475185 -523690414 +-700487388 -416158087 +268915043 -950368784 +471432780 198960295 +-415332728 -302730954 +884234391 -769929358 +-559640962 749421648 +722899477 646875748 +-810545943 495202115 +885537231 -986165663 +-492708216 73247287 +-505224695 -245743574 +522449186 429199611 +912368994 -163483882 +-422192018 -69040936 +-438335818 884843165 +-388265866 430670044 +-165500088 -758736233 +849728059 -142683183 +-968483795 673124437 +442715767 20720214 +240841710 -419046044 +202362861 576870857 +647512684 -230951359 +951994546 441909040 +213187236 -82300606 +275638002 367237538 +-44986992 95504041 +-889086778 583595451 +150932851 187205348 +-563181206 394121710 +199438621 344990903 +-730731147 -395331606 +-922121791 228803719 +73302249 799526700 +190697055 389772542 +777860792 -373268266 +-175856942 -144689119 +755459183 -815034586 +-106523855 29466671 +436874421 983669516 +-212448759 800010767 +604840362 -838954300 +-840859815 950112102 +848816633 -968375582 +-555248330 -996401793 +148769478 846084439 +-842287196 730368828 +676070813 -388892955 +583847234 -873861363 +-58386147 542305484 +940275187 222736590 +-138998212 -854907289 +-107345618 -8035222 +-636357344 -755786030 +713130165 -671825930 +561357745 43798750 +988535612 979159554 +-113602417 -64531866 +-721690496 171711683 +888269111 -524318301 +615469024 -398319521 +-940682717 -481832825 +985233578 -901019160 +322727318 -221280434 +-631249592 29080923 +-916699613 -846487050 +52724695 -219323695 +881442778 180470510 +324670712 -591444571 +-758523185 -862374989 +-153716959 609479212 +118067702 -983859226 +-867422558 -253430667 +-785404738 -163766029 +670955657 -624223356 +738464639 -955401076 +899702559 -85879329 +362621940 824292195 +193164314 -673553933 +449632900 -66620491 +-201265465 465515554 +-285140353 993912737 +-600450619 -63707119 +-242255338 786488039 +-968599480 -327614715 +873108540 42852059 +920560155 916782023 +493378706 -711588111 +252310762 311024368 +386096211 -140840949 +-436518736 672984431 +-752883791 -610599634 +-849344739 438975070 +984269686 -112345890 +-828343905 834899429 +-104754267 -890014874 +899598449 801715087 +866757681 86217147 +515053585 396101820 +858047842 -136337990 +-331376462 -784977228 +-584261420 286700832 +-466421537 89128677 +-693430567 -85774432 +-724753042 491616631 +648918848 -599436640 +-194781962 926572828 +-710118523 -535393041 +93119271 958260425 +-998229611 754467127 +503603925 305467536 +979823676 824854011 +-15335233 452572860 +-369202891 -973655765 +825862009 -202705387 +115863720 -353777032 +-47043075 506577829 +-370043365 -333537724 +-411224568 639209232 +385048201 -122948909 +-473842970 659910288 +-657085938 -999944251 +488406211 -298277918 +-434802478 -740735110 +-717223763 465379952 +270245156 331482284 +-447463426 457002908 +442605065 94256979 +815247087 963094298 +-621891950 -296026521 +266412074 -68878427 +-272071780 -939204708 +230983192 -874176649 +968256423 -773534515 +737392215 172853815 +-982151794 686568836 +949701992 528314447 +362294116 -959555172 +77428271 529842612 +949510406 984104906 +-165164439 480287987 +526007021 -730307669 +506723257 519739955 +-753252299 681830868 +726155795 -445872271 +955779017 -56872615 +846184257 -546784011 +-204875393 -861068509 +-918437297 -551213690 +15319379 -142140825 +202548492 -610902863 +-476607582 732997312 +366911913 970395875 +785827310 906574309 +-240807036 537560579 +-472954873 -54302679 +-757573569 -592951637 +387082533 903715953 +429626186 -6960197 +14664222 -882983511 +276808671 -293976353 +582767784 -161884773 +879255377 309542855 +-589844019 -878052670 +-728421737 725940306 +390259798 -927827574 +379620580 -936182991 +-487500731 -889061998 +-317676985 429703388 +5218675 -853011405 +634014842 377129817 +-599471188 488886699 +-854015214 857856271 +-479145108 -952560445 +513172461 -684229496 +-914063530 331108207 +161362117 -535547476 +-697027239 719524765 +-210940205 -573369959 +186475011 146786670 +-741529650 -696245122 +-601143074 -89047967 +-583012163 -576989685 +799123304 494588844 +-308310190 -949923257 +-917598815 391256744 +-173608087 526809889 +-118334294 158532672 +518307465 558620052 +275846824 187415706 +-55997562 -424095391 +-569680739 -765574110 +-7389736 -768145809 +800572596 393189606 +353535121 283255403 +-559904240 334248561 +183659580 -369179276 +-275207125 922386591 +218138581 495334782 +-933094900 -55429487 +604580980 -431382885 +374502353 500366756 +-300395530 52724250 +-368425860 -849128510 +-456022601 -501253229 +-10192577 -705509799 +-707873 430334749 +-136758910 -277025429 +-344896520 -817204812 +-84195384 -990461133 +-604868366 135015713 +-322985655 799081159 +479129941 -749897361 +-924996626 -51722717 +987634954 913536829 +703032632 -543130757 +-567045115 -957805894 +219206651 152486678 +-565341284 -593950510 +-256781416 28073669 +516992233 738948853 +-892742606 201526335 +1283584 134230398 +-718973098 204673036 +180711610 -403398720 +-532864486 -767556804 +-867768744 430132345 +800467150 272274818 +796407401 142488609 +770190687 908381767 +993548065 93219641 +795594560 676167283 +-534539993 771301243 +-417391142 -912224197 +-434226865 363708638 +429114292 -976439530 +655930155 15136038 +103829321 228319094 +839590095 -111291026 +-879875166 676874757 +-500170106 -629826913 +599177692 -949372440 +-341300739 388306679 +430496199 -467893182 +-10951442 721743401 +-664787057 700131111 +-642504224 -623390627 +-594181351 319983180 +-554103522 -119203177 +-817582817 -873038793 +-243612532 363101940 +961095380 -144535623 +-58768243 451958090 +179557477 687998859 +605672874 -252555073 +-341157594 117591473 +347722928 212827902 +77451639 263776154 +489799732 292947654 +426077595 902798991 +-971935506 410486990 +304310713 -466335652 +-172609998 373214555 +-550788692 -869697114 +177086173 -721598022 +-756765012 712926722 +-784451308 905209773 +199652603 374124055 +-70168461 848620357 +299014386 -565770978 +308050389 -643903485 +-223104060 -56701003 +667669528 -850675074 +898709686 419163178 +476543924 454595324 +-548860207 668158890 +868118587 242587726 +154492442 -162174740 +323566479 714152388 +650459876 -110800885 +843221131 779161366 +-280373853 -737907039 +-939194228 567061848 +-577981169 -1669531 +873887092 -147835212 +-190837374 -453091147 +989098132 -876853287 +-672111242 -116937527 +207015827 -699036767 +-202206470 -463919969 +-205171189 620979073 +-574851762 -480138913 +-174259459 -2612997 +-860009597 688309580 +164856233 -567320756 +-846655984 -364772172 +-708902388 618219451 +-16645873 -937188607 +-878632324 594743668 +791573206 -41984381 +423426620 64984591 +303652463 186481889 +859633687 -830057704 +-818127821 221855602 +125368742 -941025456 +207125520 137390598 +-548364658 506887976 +-381400610 102169169 +79508725 533546028 +143074585 391198673 +851611519 252318811 +-638571409 702814838 +-761975805 520483338 +-79069836 -991399969 +439618059 293701203 +978508409 763256271 +-289728087 -72890098 +-654164622 614219643 +-331365237 -951092446 +692855160 147042028 +-264837335 -875093450 +-384835059 12514226 +569543562 506279838 +596023886 460762539 +-483214452 943264960 +294194778 -74073434 +-98823161 180988723 +928702421 764830468 +-807359867 -92595175 +-154536771 -640437863 +-924479754 -155131864 +480817237 867042429 +-404605962 -898668954 +966492100 -14512819 +-689768903 484856505 +-392243966 258380925 +-223716992 296175933 +136802708 -210710126 +-589014674 -741513051 +511958211 -468885779 +736512998 -160703175 +859119308 -694835693 +-272557436 700323899 +-587080301 323161063 +-851851353 465425124 +-920849808 -128706302 +531384531 122955711 +-372002686 -856334340 +-465109324 326916801 +-613257054 567191847 +-973304112 -939334404 +-518628312 -157184251 +-247059401 -535522797 +84022996 -963917699 +-90819145 -253500858 +-322518145 -724417 +-615775183 665638237 +-93753545 -694618725 +7136660 203025054 +194403867 541627785 +-762989184 983733532 +193354931 48351098 +20357552 -257943535 +-155451329 710669977 +685876058 -778828717 +947774110 -416742080 +-197497653 -224424030 +-395996125 943956532 +-928886202 -724571745 +475382146 -738487200 +-156727251 -379725307 +-499969668 -33218148 +-560706513 -132777870 +-197178050 455233818 +595041469 -891070371 +-30284589 863008575 +-533978423 -620518233 +181764666 -831753810 +405838392 953806930 +-620132174 588139656 +59895168 -983865977 +566438219 222956297 +-217332486 -672263765 +-390741978 87303504 +-15203624 661513838 +-299279106 -785481582 +280782596 260265720 +89533602 446055251 +-247057007 -506281343 +403159960 361538904 +-309327431 -944388444 +-188040506 -869389732 +243710272 255359176 +718617952 254631628 +-356880747 749810469 +918412109 199019506 +347498609 452896661 +-59634793 -609566841 +-40557360 385369767 +-159210035 -430166686 +-169886994 -266179300 +171116423 359775556 +-147481766 674229840 +553456358 943047499 +884509427 272252810 +779099628 871547154 +-499773329 584070262 +-113658711 8112239 +-206244399 -635990259 +-991164365 -503626051 +-411010427 -166554847 +215245804 237734994 +-292496166 -171321227 +47585659 389096233 +-246281304 -430534924 +-733131941 357005078 +356587025 619221479 +-249547328 454492585 +710299038 -343570146 +-236721184 -207178206 +978757272 -316744068 +-574611656 -615410645 +888017471 235607885 +-882649469 994505243 +165488105 42580717 +538369335 682914518 +611518130 494951037 +-586729138 -397664222 +648406311 -858998023 +806474216 -111378836 +-565619184 28533600 +733874808 -460842773 +-11772444 626244982 +-882762321 455726072 +658126635 984414688 +927301841 -411955294 +446521241 617851833 +141228681 582214594 +-267937537 15697107 +743073275 982411314 +-71380310 372593355 +758482445 -680662367 +-736795048 918949979 +-881807043 597033164 +-988174720 -867097245 +314790606 651099261 +-433753966 241689089 +-621659056 -537388690 +-830923491 804207809 +-62223712 -949010690 +20885128 -818165984 +145983028 414615839 +-447564635 239439990 +495546292 763463271 +775938949 -410702154 +405891750 -262870035 +-106726334 -86009119 +287695241 -957641005 +52187203 -543634220 +219879094 -849013301 +-957784619 -703099479 +847573469 538004449 +863508953 -426362618 +662531782 355446718 +432149760 361271306 +-168687940 -972086828 +308453980 7218564 +-152943887 -841002970 +778270011 -754549464 +196945476 -246484956 +-777355258 252582190 +660688688 150039684 +509013876 -634724120 +-563841365 -866342712 +105322836 619068176 +-869764808 377486237 +-728258378 226569246 +-366759500 -63393930 +993633954 -17102295 +-170394813 -444725229 +-299143031 328795871 +654450310 -577152352 +-279170988 511094342 +89746296 -195407733 +-335759381 -93584048 +161600412 -402985279 +-887308136 -143584937 +-648502093 -501479829 +-462764785 581895868 +202405283 100080813 +-504270015 -821888263 +705785763 -300362319 +346326708 934689766 +432375777 146346302 +984819509 364737965 +-614836472 -948194659 +33785420 -782239119 +-882646169 -914222455 +-213916405 173793379 +-856175675 659268055 +-946734146 45342449 +-103895708 -710478495 +243170801 -930430393 +-684627570 971555641 +604736097 -262079454 +-405678045 298597043 +-788589388 864912158 +-320660136 244781325 +-644864897 972140303 +395816094 -322258553 +-587908260 315755015 +534360965 422850081 +216124579 -889902755 +-82658905 -738427200 +862300308 504865437 +589367483 226398580 +-353851425 -865153176 +-865177742 -13187734 +407420691 129901326 +255814217 -7117779 +220449497 -686805651 +569082600 350820531 +796965602 293796829 +-124333189 -609909533 +-615245465 981519445 +798456328 151020030 +547753154 135654007 +329987962 -602828253 +-347216982 230820407 +-708216410 929911641 +-2802429 967501041 +442820936 -470963388 +-944858268 -506279742 +313319738 97549732 +279279765 -462844731 +812517333 -774805668 +576062233 -812582365 +880669699 -769309920 +930267571 273757680 +713932610 473170636 +494590257 -515987672 +12025666 -660236141 +353898110 -79051913 +421886706 -39677645 +684780130 -868430010 +-175706720 156128581 +372194931 -35145379 +-986483685 -192005302 +-926882370 -650497792 +-952361502 -162948492 +578544741 634740467 +580862001 506607036 +-841118469 721406534 +-651081290 138333106 +-170297177 586424867 +92756087 485347684 +156382902 -99625856 +-54242404 811994858 +716433991 20773359 +846338086 -562909110 +-687629867 244254422 +808554604 838043978 +-760607355 -762991809 +760529436 876401731 +191752483 658313616 +-21655401 -923028630 +-861596245 564989095 +-573110671 -168299678 +-100856771 978582357 +259701529 50720569 +709066609 -383614921 +-512386148 758955432 +-728753210 -949795284 +-865018382 44626248 +152865431 992722005 +806213123 191001396 +320023106 594922733 +-563892257 -141110037 +718351742 -545453955 +964055259 -89681494 +871870945 -477785170 +95837186 -811700043 +599282124 -907249498 +-919071274 -997416194 +-238149355 507633538 +-677616415 76326222 +53952320 -858298416 +881012728 -30592101 +-496137368 -396122143 +-342794098 102132132 +152968677 123506504 +631827285 -223866518 +-421642356 533806175 +-814004164 -942471888 +791352882 -510055941 +-879841275 -58195834 +88363032 479702629 +-474165943 -378739516 +594140248 323651680 +257087290 -966329363 +-595099196 -940557371 +781860206 -95449486 +522637407 12584445 +-102894474 431360471 +-692188961 -757757178 +544124774 382276784 +-623116201 -385944953 +-866739225 -115844101 +882616820 342963873 +-641412628 451741382 +-332044257 -586624079 +362134031 725913428 +-274040505 -175052663 +916098201 253585268 +-681545462 -400508112 +-829921657 -645955934 +-942279453 56877586 +-86108096 664553059 +-213235477 -918993957 +-505621022 487454447 +738742857 -730151147 +209168609 -763291742 +381628819 -188476767 +-742753177 419683591 +-194920135 282084101 +-208907159 516072078 +-501535300 -31117747 +-937625096 147779091 +-102198454 711903703 +-929391168 951454443 +-830163278 -691203458 +-62343192 657496499 +338724516 -437110217 +99187179 -228135767 +805903473 -3844947 +82715822 -741600951 +-234399581 -656108048 +-491863717 -300173976 +140076648 515997064 +-93335178 298617186 +-720143913 -48564184 +388489579 310925487 +219901577 -210333524 +713183256 -503226270 +-635467095 -511380774 +-739631810 631349889 +-339190847 -370777576 +-898540149 -698510723 +-159384786 881761520 +391818663 -28609184 +126057167 -654494919 +-345207969 154756477 +-454547371 -967610713 +-648777034 148410400 +471610481 459494193 +558911013 -24089848 +-624882346 -752997539 +962683653 804540596 +-378225714 -553566805 +109097216 -947310217 +617093525 -103022610 +-95505166 -211147669 +-1453460 249598316 +263449523 184680667 +905531979 93769446 +447325253 161336004 +627609131 916808150 +-761318296 -800040699 +55739142 -396280217 +423327090 -843549263 +-731175884 -470437244 +842170048 517353381 +637513493 -166675684 +984414872 -719206304 +-935889912 -600065123 +-73293379 -719796627 +-902875611 -728368000 +785776750 -53725150 +-353512960 -339600521 +-125143440 -517716497 +-782890848 -982059249 +673893741 80684063 +89382712 -197080335 +698651133 621063746 +376512250 -438086313 +-232204652 551005952 +-68351606 870610431 +-443115151 566672468 +-867447141 907842100 +544932524 411266937 +837568452 -908064952 +-184552539 -546299939 +406141691 -809263029 +-146637545 -598858754 +346517688 -406313909 +-395358044 -267513422 +198985030 260905623 +230626283 -453615648 +250702909 -952804740 +957407718 -399148808 +-178823407 -867844992 +832819255 -645088301 +-24206902 10194236 +432562860 -942258727 +-760548237 824242469 +-325922765 -528947129 +101174309 -339171206 +430974635 366180474 +-499912759 -228180798 +-144183099 887030474 +164251720 664196511 +853208756 -503685704 +-515635184 -406044625 +795060610 925908630 +116061775 -129164721 +-768336207 -117613745 +-123853241 81271742 +-511646823 -159936533 +-999708211 315068558 +10689137 -435245979 +-976419136 -181694657 +-770536128 429771243 +720880076 909075170 +325546000 -714937839 +-491107127 -319817101 +-64717555 113903072 +-686203172 -380271509 +199922734 -824140591 +-302770381 -70682585 +-684574920 247061 +337018728 -724665043 +-454283557 202944706 +-778926680 -881539611 +292256200 -448753524 +104960432 -975300603 +-305440556 50009125 +-736097794 119211529 +-821630 -926009786 +-800253702 688110735 +-336417872 -684473267 +308402916 -733320253 +-792724171 -350638477 +-852895610 805425345 +-510545526 555630873 +882008338 94012921 +375795665 -234376346 +314589260 -786184876 +-442815973 335926632 +-413662179 -263204693 +404235838 -296886969 +-212528719 2428444 +751781537 41415767 +-861038721 -692761588 +-598305916 435025504 +495846420 -615666663 +-145672089 149054299 +-348530502 89966253 +-851824341 412982084 +-547332691 -926990567 +-505286834 114335235 +961408094 794736668 +997172963 151506286 +107626120 873315931 +648976741 -378100731 +-76827722 28291059 +804769084 -735545629 +-42581681 -676519825 +645734596 -557648874 +494176305 -372493472 +632495306 -860058579 +289621864 -252546684 +480131502 -940571230 +281627939 -561686525 +301285873 -134725067 +-349845895 131796886 +-787180699 -634943516 +-39632779 -700945888 +-352831135 -498171593 +-46538278 -20933249 +-572302155 -424245732 +-646462024 -943247086 +178066717 -218830140 +-478840052 -927003859 +481327784 -783297813 +40730291 986648005 +-52759270 581270123 +269006547 773818170 +9796763 940910172 +-445494974 -879934091 +-639631725 -562206671 +292593534 -742795466 +595309950 975961316 +531509950 262456978 +532970901 996559706 +135932701 292541507 +-221580274 111932283 +463621525 92776727 +-379502181 921190026 +-94910964 -705736207 +-883879903 -131781115 +293361769 -543269242 +232818344 399563670 +800943346 209233038 +329121115 566236720 +-195667829 57684635 +-330687684 -131413080 +928543208 802525668 +942999911 591753599 +256439893 -713373182 +880836833 -374565660 +-960713528 462881787 +649607199 465639206 +203316879 703049069 +-879352078 -572135901 +-480073164 -682231214 +125916881 -215844968 +-689337128 678183569 +373774028 -817831125 +243016934 -162965425 +802790537 335594602 +70204496 1374345 +656148597 788780830 +-725987748 -519817623 +460842940 493767376 +-234208563 -639276028 +-406852001 374117050 +379086077 -137443114 +-797080423 908645291 +52461448 -401168389 +-184798075 83766826 +512031304 138360220 +-236543387 421232478 +734127139 575468818 +422639656 725218181 +694295427 -347954440 +221183456 737581231 +836611278 -546685067 +309279362 -212637627 +-133636428 -924425416 +-338877789 366556813 +370569301 347064476 +-444934039 -718208639 +547161204 603278671 +353469046 583716937 +-403070941 -870615405 +621887837 360026221 +372084720 -186508789 +-117422380 -423583682 +-799152515 -832564583 +884926219 304958427 +96083514 754567049 +392286449 706855726 +-534589645 -63707960 +-629467747 -437185846 +-475464437 -187133903 +769275003 -452346000 +616579187 -253503672 +-38366766 -224023584 +-225279464 -990257990 +757970929 -978811346 +-70891123 -802226419 +-480283440 176814986 +-314696509 -512777046 +-803920210 613664276 +964912007 232143894 +-596569281 -663932608 +-659367230 -786533362 +-894746563 124696937 +-195006180 750026359 +146172162 667207482 +837029342 323801500 +946914736 -389048936 +739366069 -864696684 +-956937281 510797033 +688854430 475030962 +-212510980 -543287959 +785926822 -288940741 +814533729 -296953269 +-153710778 209223483 +-672914435 902734276 +-13681392 585459139 +122618057 -179370381 +842754861 462532997 +-219271181 442034763 +-966757369 -268237344 +688547000 -882517565 +-212406923 -252644951 +238518802 -277646237 +481084873 236300358 +85281700 -444263772 +411610362 -65613020 +208303625 -567946145 +-71956559 -351603182 +900019509 743767501 +-502860059 -176457567 +498112004 -10012985 +644836686 480770176 +900988418 133745826 +-856544986 958297402 +636253003 -542895502 +978150903 739887393 +-477197117 927900065 +-795417774 380204285 +217588973 -995228745 +-105694482 -662196571 +685047904 687788606 +250337818 -964816538 +266822102 825461038 +149610038 7390924 +-214589583 38195174 +692966798 536380482 +410014070 -737016962 +-287834726 955852184 +-743807204 955973778 +-714796745 -45724332 +571848423 909458214 +-534914077 -55075903 +531200025 321536204 +478663557 872158606 +691806990 -436208036 +774441410 482614544 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-014.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-014.ans new file mode 100644 index 0000000000000000000000000000000000000000..8d263ea3a64b9ebdf3c585d4dc96d5c57c752e2e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-014.ans @@ -0,0 +1,501 @@ +80116933.16707040369510650635 +2 +10 +12 +15 +16 +17 +18 +19 +20 +22 +23 +25 +26 +27 +28 +29 +31 +36 +38 +40 +42 +43 +45 +46 +50 +54 +55 +56 +57 +58 +59 +60 +61 +63 +66 +68 +71 +72 +73 +74 +75 +79 +80 +81 +82 +85 +90 +91 +92 +94 +97 +98 +99 +100 +104 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +127 +128 +130 +131 +134 +136 +137 +138 +141 +142 +143 +144 +145 +148 +149 +150 +151 +153 +155 +156 +159 +164 +166 +167 +169 +174 +177 +179 +180 +181 +183 +188 +189 +196 +197 +198 +200 +203 +206 +207 +208 +210 +212 +213 +214 +215 +216 +219 +220 +221 +226 +231 +233 +234 +235 +237 +238 +242 +245 +246 +247 +248 +250 +258 +264 +265 +267 +268 +269 +270 +271 +273 +275 +278 +279 +280 +281 +283 +286 +287 +289 +290 +291 +292 +297 +299 +300 +304 +307 +308 +309 +310 +313 +316 +319 +321 +322 +323 +327 +328 +332 +333 +335 +337 +338 +339 +340 +342 +349 +350 +352 +353 +357 +358 +359 +360 +363 +367 +368 +375 +376 +377 +378 +379 +381 +385 +388 +389 +390 +394 +395 +396 +397 +398 +400 +401 +402 +403 +404 +406 +407 +411 +413 +414 +415 +418 +419 +422 +423 +424 +425 +427 +428 +432 +436 +438 +443 +444 +445 +446 +448 +449 +452 +454 +457 +459 +462 +463 +467 +469 +470 +472 +474 +476 +478 +482 +483 +484 +485 +487 +488 +489 +498 +501 +506 +507 +508 +509 +511 +513 +514 +516 +521 +522 +527 +528 +531 +533 +535 +536 +537 +539 +540 +542 +543 +545 +547 +548 +549 +550 +552 +553 +554 +555 +558 +559 +560 +562 +563 +564 +566 +567 +569 +573 +574 +580 +581 +584 +586 +588 +589 +591 +593 +596 +600 +601 +602 +603 +604 +606 +607 +609 +610 +611 +612 +614 +618 +619 +620 +623 +624 +625 +626 +628 +629 +635 +638 +640 +643 +644 +647 +651 +652 +657 +660 +663 +668 +670 +675 +676 +677 +678 +680 +683 +684 +686 +687 +690 +691 +692 +694 +697 +698 +699 +700 +701 +709 +710 +713 +714 +715 +717 +721 +724 +726 +728 +730 +733 +736 +737 +738 +739 +740 +742 +743 +745 +746 +747 +753 +755 +757 +758 +759 +760 +761 +764 +765 +770 +772 +775 +776 +778 +779 +782 +783 +785 +788 +791 +794 +796 +798 +802 +804 +805 +806 +811 +812 +813 +818 +822 +824 +825 +826 +827 +829 +830 +831 +833 +835 +837 +838 +840 +841 +842 +850 +851 +858 +860 +861 +862 +863 +865 +869 +872 +875 +876 +878 +880 +882 +885 +888 +892 +894 +900 +901 +903 +904 +907 +908 +910 +911 +912 +914 +920 +921 +928 +930 +931 +932 +936 +937 +938 +939 +942 +943 +946 +948 +950 +951 +955 +956 +957 +959 +960 +962 +965 +966 +967 +968 +969 +972 +973 +974 +975 +976 +977 +979 +982 +983 +984 +985 +986 +989 +990 +992 +993 +994 +995 +996 +998 +1000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-014.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-014.in new file mode 100644 index 0000000000000000000000000000000000000000..40463ee215db9d2706bdf3d6d2d2720764350627 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-014.in @@ -0,0 +1,1001 @@ +500 +444717836 233633291 +-273262922 -874105249 +270901622 885001485 +402912338 730067084 +-75376663 866789784 +278068411 440121333 +585182615 -957145349 +670236571 495845009 +-210750174 628620715 +962250969 -437874873 +571033706 -952857949 +196617742 -913486750 +791476265 -310262929 +-405533392 994548546 +-392635180 -151126115 +-648889992 -398966737 +-663797258 360879979 +-37906849 -491964901 +10466890 73093077 +364674275 -625579673 +519763268 139296220 +-917541358 244119059 +-562609287 -186562897 +983610534 747189318 +-969196010 595125589 +-79323101 -441493357 +-195315059 -383583480 +-320226272 -769313085 +-12190070 -309784228 +906273532 -157866587 +-740026055 880949629 +363785961 -368643953 +422037816 185375511 +693553923 876685530 +-396896997 873264779 +-709713618 -864106395 +-57799485 251292882 +-907940341 -997827297 +438087756 -718987545 +-653803831 -526077934 +419602053 338398644 +-677788715 956816179 +-570577244 840869627 +606523086 316486270 +-111782383 -163193790 +-460038611 40260487 +-234979150 331252456 +280989249 71363404 +-171413278 245670733 +-790153672 590581601 +203885722 32284335 +826889678 -855153797 +437827521 -739530397 +-347097538 -993623426 +-759077116 -774289434 +-233907099 44398737 +-803802241 -528267514 +-902597892 472866833 +-944941976 243738445 +-147361047 -987189191 +-707571758 877111621 +790272236 -636336046 +-445754992 -264461054 +24725832 403865319 +424572488 12604514 +-169209422 -850032478 +158454994 790135285 +-595482115 -833901382 +-351078827 858421785 +756099098 -344828889 +837535934 -450105838 +884720871 -414606655 +-821168550 -826238860 +-634617757 309179798 +-760269140 711711642 +880510582 -830338487 +497776847 978544169 +-208661946 390331979 +-627071479 -256728177 +-909171381 534796294 +-340088481 151018203 +-919032084 -58342408 +443491758 -773805727 +604810482 133606624 +-21891883 149254332 +594331821 -786176432 +836451338 -292706057 +-987039130 907130901 +862021004 187184999 +12134694 -404493630 +-12030184 -414257743 +-495843868 -391474150 +622377088 805817757 +-365151116 80330783 +-222267808 193552168 +772993039 -860337343 +-429336575 161080309 +-983739399 -898007313 +-308818844 -118627919 +-977231142 -757163809 +45585532 417910329 +209710541 -21944695 +566747450 818655509 +-58936671 -648491333 +-104087129 392294981 +750019888 179705546 +992241430 466481997 +210638488 960356700 +-655660731 -680014420 +-103903418 62696521 +-571882000 -73063460 +-262091230 -85930924 +284193955 -789944498 +-394476375 -740389489 +-301900989 -829102382 +-727400246 397503122 +333039429 -725424375 +-81249920 -152290404 +-481768605 -437731571 +-449310123 -666440015 +-662387186 -616537858 +266284563 -693850094 +588527737 -405774122 +423139150 489376533 +-62655725 433675391 +554609487 902160256 +-814227802 -455744025 +204436456 -747289092 +-297193806 829302605 +-192803558 -972150514 +-878188068 120809865 +622660098 -159067921 +404961143 150781172 +-832003678 656847075 +392032896 21639345 +-562100343 -843470802 +-687409474 855424180 +824587914 -515256694 +575235584 -549336390 +810632035 461385644 +-793802863 -356724541 +-543999549 356061579 +-542385293 197996043 +-395514571 2446463 +19886202 -791033422 +-262896342 748253243 +205233688 564280134 +-875377867 128909807 +-43288175 -833113096 +-294338957 -390448195 +-536290044 244362462 +928805307 32046968 +-951187142 -148811413 +689383828 222962680 +-866139724 -57865134 +-723775743 -828156440 +344925961 530435729 +450154229 76981715 +-623218879 653717352 +875163851 933315126 +245790850 -241993897 +298368802 97931295 +-54806786 562077493 +-404577818 -860529752 +792650877 -896565711 +-656873950 -913357141 +-390473382 -313555025 +764490798 266547303 +-31820847 -303396346 +-204870232 994480052 +-289909640 964786450 +479731534 -668202970 +516255607 -503306977 +433261699 -968503289 +637027789 43837255 +-490408138 995288290 +-168557889 -86803014 +866328523 -190336059 +-436616212 -107142897 +-118623641 -616963304 +-120098265 -541535985 +-133972633 201602156 +-136895641 -870264262 +422317432 895068261 +-109410775 708814861 +972717507 38340127 +-121306101 460953897 +831001674 -429489375 +-963345134 -801836477 +489423030 866695846 +98923576 583574478 +-183739190 693287370 +796119302 959671987 +923720851 883276968 +373091512 -527428208 +-859209953 -124767303 +-182243596 -476290759 +872515089 -603331036 +13660927 441026689 +-460050245 -539864293 +43854170 588633761 +645012150 111433204 +55785001 -531153572 +198437141 -349747351 +-213233209 833284306 +-141815748 -830500908 +-455670324 -451350024 +-186032842 -560146626 +530350125 -202451473 +-8514218 -379296305 +893692542 230416028 +-136251101 -224584632 +-370392243 260216939 +-930042367 750373894 +-4878295 -489863703 +-689309503 998061732 +-258165946 210198552 +706668614 584626278 +-921294208 -181837271 +-398552962 -497642028 +-662893411 332450531 +305254862 -22263485 +112419753 413594366 +309865061 637942103 +431255722 356793457 +-468284356 -313198882 +135765712 939271276 +898903942 691529093 +958082179 -81404640 +965465033 711863729 +-798857131 765404157 +603662452 391343557 +-625673042 -623597334 +-126124879 -460386227 +-339468195 -855947426 +-688302037 -98116290 +-490684309 277873505 +-114015618 -942757271 +687426735 98751498 +-63105339 279292396 +-128626316 423197597 +-761243877 430373646 +80933403 930908472 +705111882 -327525649 +-149115292 -418570492 +-484720729 -49002515 +-609241195 -436404120 +117991874 -471901620 +923734223 771575420 +-83469624 -47189124 +732559343 55226647 +695998972 984557674 +865176087 95740472 +194330267 574375095 +-928851364 -410405339 +6942331 978575860 +551874550 659690330 +-242927247 -266840049 +587854098 -314646718 +-965575138 -398832603 +755888603 -157688091 +995632104 529568763 +878307508 -941831051 +-857212509 669037127 +-872082002 -174313373 +743422808 441291772 +-867928537 85021911 +-423546901 -370062718 +69726108 -685705927 +-525595160 335042179 +275740578 -904132327 +466283800 272476567 +9259636 -385735772 +59614691 307527400 +-512548730 -367259886 +502548779 126186559 +368789932 563371949 +-246185837 -321115939 +-326600770 264890356 +-166015947 -711105454 +-450424523 577695872 +371557072 500018453 +-565806884 66823248 +414703543 751176967 +477390664 397234976 +-148942944 64603123 +-105594090 -968220113 +753802809 909020887 +-544051013 98265569 +-671668158 -952679137 +-341064976 189959801 +-437868643 -22487360 +-533766535 975739546 +-552003719 721817866 +959978197 938336160 +826963073 -281889583 +-455481098 -765179921 +-37582196 331619577 +-915513924 -32493275 +-433436083 603863972 +966108052 553770047 +554424093 -452162494 +-112231217 831984517 +135195663 -598891753 +49084464 626647104 +-277136829 582229868 +35438618 -417575840 +157669421 -715487346 +-82987978 -372524783 +-969663493 14503294 +-205552058 764740013 +750515453 -895011184 +-597223280 -629760276 +-669176077 -123375923 +708258336 -436249086 +-94416367 72820185 +970505220 -995967316 +894734043 -698081867 +-550919083 204272940 +597533087 -595324436 +157155836 -978131607 +-509558873 290561826 +-771078352 668181987 +851036247 604660602 +131093096 -301496082 +310523517 -121149726 +-379876334 -756868523 +-43628069 -139165127 +-513106696 906727277 +530772857 703070083 +-273915710 367435175 +-626471955 -244367145 +-589766560 -346645644 +477443751 597101819 +80345243 -670617650 +696815556 730975065 +-847817745 474722208 +-616524017 -19170789 +-745747807 352717124 +-839397533 -969934120 +669261014 602311801 +-457077263 -418374141 +209718838 540666712 +189790298 -328658064 +465959374 -222968414 +646807746 -945442052 +828467604 -757025376 +579140319 -404109615 +-921363150 -782696140 +-124253245 -813958287 +774915810 589696351 +-145415529 -685642998 +-143276222 89714131 +802978873 308642277 +-696390126 -109976911 +-234580309 350676573 +-590442783 -821380593 +-367958198 -361303804 +-974134293 -65294805 +-70778335 -971201996 +442981781 -525385074 +-542568750 987967664 +-256861687 -906694263 +561485463 885389586 +672396188 148777634 +941614898 936697013 +57699071 -924821494 +-321573411 38377655 +586651652 793994545 +379667343 207352366 +662833426 -804707195 +767796911 385683226 +160651948 402077280 +661550512 -665210459 +-604616894 65813926 +239261131 -761851336 +-583490575 525658087 +207681217 -665671455 +-326670040 -403452079 +950446690 225430885 +-898344332 -221808115 +902570513 -140867482 +-175582533 383338273 +456533593 -725417529 +-358531006 247637663 +477635316 -481822254 +-274956822 591073916 +-437486789 316630943 +-266829953 -760476956 +-681158274 -341221615 +-204931986 309284353 +-322678382 883514403 +590430902 169680148 +-606425015 -883928274 +-855025497 858688004 +-660939608 -920890174 +-9413240 -871162757 +127031000 1225284 +312326455 664154731 +-31470080 -368161034 +-642807695 948923648 +342443839 -695677464 +-636318908 -676292818 +-493271175 383496331 +479326251 -507007682 +-522450953 -586952047 +-237137082 -681467069 +960459389 -614684182 +389448051 324414034 +277021248 115793012 +-821530065 -328663505 +909701395 -924735798 +-307221872 -999756353 +-946535062 -761734686 +-798782346 320408485 +376450195 809676478 +-192070377 450124997 +42422273 -912243955 +6533413 124525727 +650148618 -586226966 +518180124 301092535 +-490015042 552216616 +-414282889 -740853198 +-495534117 -284617850 +-382755045 -677283512 +615003664 597836565 +-639291688 -470729103 +-254935483 -966399898 +459081234 4184487 +905228080 81569601 +540284917 374850219 +-802831946 -963077856 +309088998 909523611 +440728503 9031284 +65637994 894320455 +16304695 137826981 +-152258806 846624096 +-845310069 680387046 +308015433 -301566515 +148587850 124502000 +486827600 1041214 +226626466 -48187092 +-127083443 -928658375 +-769676725 829702605 +9916404 -805328597 +-970387185 385181251 +592997109 96295994 +-108613395 -985398761 +-822518492 700628948 +499192555 -774783594 +420089054 376229254 +-672348716 735877646 +-310585599 585753180 +-422435310 394236484 +558114191 -368362399 +96797769 -248170702 +-153800052 -417993734 +-226966574 864356889 +-147504803 -874044558 +850450563 78357576 +675048106 -532148519 +-482629082 -653139722 +-38620350 -42503803 +721472411 -971509690 +990433311 446528167 +947231004 -894301304 +164185440 -738348549 +-903823954 -497050941 +-805550329 -864063419 +-847241007 440740828 +-221899054 903170346 +-672858041 401774572 +362922502 -422107511 +-49177471 -226100240 +-161463301 659135310 +-467704509 -224396860 +445342282 942016099 +-893103141 215484333 +-475438817 -966124577 +-111382149 492264835 +-413066146 990209818 +-629111766 447364590 +-617035078 -479287564 +-971963862 26246069 +-309768199 -206803051 +-308171216 378739447 +-670553471 -823294710 +-729978811 533681439 +-613822845 862208907 +768721478 430859375 +-127810800 959120333 +426930962 -551290099 +440979371 -718712452 +-350233129 626055808 +-107354770 171869026 +620047735 -889488146 +530544791 -265634681 +-864583171 -800676095 +754339020 -332820381 +302621519 790399217 +-640494580 136026017 +630802844 879289267 +-260305598 487251342 +739675368 138580381 +319734075 290457719 +293961874 -599506378 +-395426569 195519446 +-81806892 -924173771 +-287716482 -331378350 +819568119 228046980 +-344286456 -848937313 +270268907 761977762 +-707758946 704714385 +-714180251 -615652129 +297716267 770104458 +-796474679 -801961697 +194287163 -91391383 +837840097 3328735 +559415563 -629587316 +427226769 -849535379 +-953177602 572001564 +166843124 -673452520 +714674060 -195449892 +678924310 -726980436 +302776232 420289162 +-74514042 437813055 +-665192480 -363124443 +-198941600 -991829524 +653856538 265108670 +223123734 928141541 +-898957797 -748080621 +991658897 -642873338 +-467808372 322562848 +817893622 -692616654 +-911659512 55863307 +-816653459 -496332544 +-443224316 140393563 +645343194 -263473840 +-663591551 -330203153 +-737669726 -845326724 +664625917 -83415820 +847196278 -491269416 +-258378394 -496457030 +8038845 316641898 +-240863243 -703226228 +501334066 -367848740 +-341217869 266410881 +93348700 -821481644 +-417417857 220489829 +-311839363 -430082578 +841467270 739182927 +-284363922 -558123294 +-97325420 -426066663 +-339761882 -133982574 +-941588071 -948072726 +714471273 75743639 +940598918 665659515 +-684855543 493517980 +-363685690 -292396536 +-747798879 -607705686 +559904108 -61937297 +-799942738 426855471 +-337991185 -167876264 +-155387193 -767125936 +-127025551 886775574 +-601680315 453126115 +-573873559 -646275023 +221802881 621895021 +-758768921 391134668 +232896444 41755192 +392803499 -60316105 +197259842 475040890 +31052204 -769645342 +-733630544 315665693 +957920093 996280666 +955917448 148069949 +676255920 581680057 +118298013 170462695 +688704770 561655416 +-600700904 -171017420 +-196078491 -900553353 +602418816 583499489 +290914423 586037411 +-920335292 632554305 +735656132 -310573576 +-514219880 599212479 +639530988 -68163959 +-679992498 454433917 +372618538 -650609899 +362125241 816509931 +106291078 -714925721 +396736668 206269084 +-411102353 -719738875 +771702930 -261619197 +496996260 752478163 +-791455515 221191856 +809241409 382902113 +949787786 -291830474 +734500449 180981354 +-69673231 -536612178 +-520454445 -737066689 +-49547571 -489797430 +396938227 -648596527 +-1624419 -542257791 +661466303 -529728284 +-296444757 -96873339 +-276487391 -219797828 +672530318 220225215 +-803829659 -387337619 +-614280992 -273916729 +-347920993 -529783966 +-690532147 682519435 +737902512 -289990906 +49092629 -46015928 +-66553975 958889587 +803639413 -784193255 +431910612 134692360 +-240993382 -111535717 +-341235779 169070220 +-136526679 -788438478 +211224421 -435335401 +730643572 -213255235 +-868033279 678777149 +-30604723 -414603920 +236562953 -634019877 +-464919724 -643503828 +816331489 -37058987 +-722032879 -707467598 +-177079955 -607675258 +-182892506 242158310 +127690714 896195412 +-230974370 947961401 +658968659 -252345976 +204989668 974443004 +46788009 -449968425 +-205702676 689305801 +-61593230 290571380 +64402482 7872393 +332881264 -401112342 +-90634505 -765290699 +-168483207 321436582 +577995514 -391791741 +-700637236 952453030 +-586006789 856180875 +412518853 747409285 +158676239 135140800 +-162096009 55910459 +817281436 -302328274 +-54846100 930051270 +154150026 860344189 +-314591464 43805448 +-902675570 -199393235 +803382355 14829924 +694330770 -893961752 +578949320 -657202052 +251771245 -236575400 +-328158316 -544195817 +651771837 485567861 +866827093 -200909988 +-29107630 -931792488 +748287511 -902340150 +96999342 883177743 +76622020 -363603936 +127990256 -167222163 +409991447 510976108 +776451699 -608985159 +587167902 -637865408 +-889685235 -969829162 +899105566 -801434298 +-833028913 -755417682 +637982589 623270115 +596611506 -1597649 +-993926884 -502695313 +537629048 747715226 +-304918909 -291061136 +-805801537 722506978 +-889785487 293647049 +-512572823 -576567356 +664875348 802052531 +-244076994 -865002035 +24013800 819982458 +948394874 899025667 +-262447697 -967267701 +-282271574 125934539 +917865601 -193632727 +-815011490 915383487 +-848491037 -783770429 +960342382 -979333148 +87492542 952258365 +-179038864 -63710999 +-925738056 -903212895 +-549161843 -117571072 +823669388 239184652 +-788402592 440222483 +434566694 887271728 +435575732 153207709 +-785459921 -370218486 +160396246 -531117197 +-787519987 319149084 +196475193 -806901623 +178872588 -690510831 +448600509 -321437623 +472788403 956008886 +597858375 642697539 +246411301 439614230 +277041162 865107410 +774787977 -50717115 +404504451 -233039189 +-426206565 -680871178 +-746317643 -528843087 +-982743437 885203111 +925383110 528920185 +-65432678 60552632 +67534186 -25826026 +-444832696 73980453 +253823474 963754044 +291909251 -737980841 +522121324 -571040235 +651741732 47246882 +532935815 687186370 +-466658877 -455045640 +287832969 651703134 +49055903 682181857 +-132787696 -418481910 +958536929 369328493 +-380084055 -239812987 +159355685 418552564 +-914696022 295623636 +568297445 321704813 +869066964 -408163069 +57138710 806173971 +914118483 748459847 +-815913966 898284840 +-231900297 270263438 +370131012 -458600729 +199663160 -576933607 +-986637998 -701828747 +-78287199 5069437 +-425095107 -779138879 +-125889105 40808844 +550387983 574799608 +-598893352 -517901749 +-477177791 165533975 +-466602746 700088696 +-829587869 778710111 +-733146874 422849106 +-355686912 -785630904 +-365142327 674600102 +844761843 -962430817 +-103542096 869778685 +719181433 -487740870 +-207758999 637614562 +-170400624 -347147886 +-992362836 -374140133 +-98339216 -32477278 +178222819 850174546 +-125080368 -681443704 +-958624102 370910559 +-456692942 477117674 +-548861361 -294464679 +-809401195 -124105252 +542228922 -530431871 +418676378 794840944 +-464836538 -362393615 +-421860431 505692590 +175887639 -177087424 +-164286881 346488331 +803730355 -897160027 +939642507 -980336084 +-953236497 -106653941 +-39058605 460838250 +-807284252 -929015844 +431702637 661579425 +694044312 560383062 +-288635163 -950987628 +-840052310 279586596 +168500071 887353342 +853663917 -435640654 +21180582 38492520 +-929675964 -582087051 +735196029 -68265504 +-400272313 -4578049 +-527148854 544252152 +426169261 -494049928 +-60252330 48913354 +843173428 49141109 +546172708 454572362 +267078074 -684457255 +-754220198 130725887 +678106815 -139388962 +-126681055 -960288915 +440968651 -443172048 +439392544 274174953 +-309434185 -374765481 +737403023 -588670750 +-933843657 744106457 +963609542 154349562 +-906196111 -176398222 +330378016 529749473 +-287595942 761078516 +-204602967 954069788 +-217391924 -171805817 +315757981 -271203641 +361140281 -631251416 +-362295504 -342025870 +-717543772 -287186381 +607621464 966397175 +857747232 589534712 +222424853 -142945712 +399225708 50387451 +-417906930 164888517 +-160550567 -734459708 +-171936182 122420969 +228485767 829490929 +977952251 976114438 +353281879 -487653414 +-247051100 756418009 +-573722282 -149927806 +692895560 435482572 +496724943 901324860 +699328019 -850490285 +-520792191 -866648044 +820313402 628037805 +145546401 -684398852 +-472571619 47305033 +-441938846 -622405845 +-663528142 535139708 +539795323 986662097 +-160951245 -651434371 +-566320114 -373043220 +-65574467 -346229245 +470459626 -32702802 +31768665 -19243799 +444393991 888485283 +-982216287 667571420 +856302350 328696147 +-438104110 -305370865 +-628305068 -805204091 +920598039 -300751743 +-784058908 -845335544 +864096551 -584633783 +-706937020 555997526 +100393220 950617485 +-239278063 348309281 +522312821 -889806038 +323278562 653392211 +469007424 -172210279 +615469520 195766159 +774975462 -729052352 +-300489245 -42496579 +20596530 -581073130 +414112446 -119035991 +869574826 933121260 +298618337 956739979 +17786805 610484390 +-155299003 492909093 +415860401 -379842882 +-720120927 842111802 +355899151 715040930 +-376041992 -856538408 +-481400422 620211352 +-593377068 -581673359 +-25901989 -14862874 +836083587 678214661 +-215089821 -568849769 +54621371 -240317137 +641549916 937731246 +967343770 817785844 +-913650943 328444417 +-991634975 -535142356 +390955624 -36678993 +-909881601 -899825185 +609820687 -542386498 +560593362 331265547 +-533402213 -698712774 +-618862223 912039797 +638518066 -672025886 +-943758988 570048754 +170641515 278681484 +-937301304 174175502 +259606098 437002013 +-953801991 -156238364 +561638770 -520309713 +729799834 -388666045 +-688317525 -702357928 +-405730525 968570898 +263747823 797167093 +-626476743 758396466 +481187463 986593733 +278087152 381378006 +366387810 -305709499 +-641242508 -480858376 +773421075 -998444916 +-914841023 144494991 +-23436941 901119845 +64050560 782507529 +495420901 513573589 +869117516 291677628 +366336720 470534563 +-266147473 -559179525 +-835897959 946113117 +914787143 -883821546 +-534077915 -570159921 +-993311586 -704873107 +607805687 883182846 +351556423 -76888420 +-785660294 -331639859 +-830260670 -706019755 +609746134 70092599 +-50718217 -389537422 +-104297845 91534963 +-365737135 -623169638 +614683399 -749475935 +-118444358 -220473800 +650246455 -169443889 +578275455 556397117 +635402692 588385307 +534165074 310033943 +453652383 249794546 +884462494 -426308943 +-707377630 -862111931 +188423247 236926201 +391620908 -518015137 +-15399060 266804389 +772913221 78500060 +695158197 514491645 +-941661257 -488847753 +-200573733 -957776056 +506386300 680666066 +-599733896 70246143 +-439378327 -302857958 +128088866 -505398956 +900424132 501646393 +-440894007 769232422 +473824227 308653439 +-196689881 -862975025 +-575705556 597525656 +-5975842 87703405 +-919248526 69771575 +919806177 -187075312 +313000707 -194612811 +-158757081 -236161342 +-325930818 -476082997 +-54448983 617221022 +499030748 907612011 +-140317871 -434778585 +-226087233 536316968 +-804724309 772199379 +174608694 608497468 +-413224695 343616304 +-199306550 -593587556 +776084932 803496907 +39646212 293427768 +197942101 85968650 +-715435279 -394722604 +-639178278 43852472 +-670213213 103666816 +532999500 751307063 +-866475175 736443104 +346270947 -602922448 +207387907 153106549 +275799701 -831539006 +917635812 385797473 +-989963409 487631295 +-379202609 -749090788 +-548055230 -502552028 +-428322744 -235217312 +-720826531 -494250986 +-963903773 211524095 +-295261508 736024519 +615883023 -156578675 +-271761405 -512944253 +-472771117 500635257 +342328801 -741889688 +153472295 -509295334 +-618235562 -371164079 +-856644954 309234149 +-333703555 958462891 +835291117 -474513557 +134845599 381639711 +484917301 -143865659 +-284067679 -606125835 +118766624 -53645585 +99791629 -894421796 +-349271866 -406308247 +353093184 -611006819 +346468957 873323144 +5070947 338434441 +-360651625 118597649 +-238972699 -769817999 +151506698 438636824 +-937676180 -222223798 +-856332211 -170282195 +-756653307 624522505 +53670500 -896839835 +216025997 -641397955 +81316608 349947450 +-694496406 -321119444 +41151935 699457171 +-523561753 -134088673 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-015.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-015.ans new file mode 100644 index 0000000000000000000000000000000000000000..75c9f421f37c61066469ea7e7d717d9b4d6dc473 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-015.ans @@ -0,0 +1,501 @@ +68770223.59747116267681121826 +1 +2 +3 +4 +5 +6 +8 +10 +11 +12 +14 +15 +16 +17 +18 +19 +22 +23 +24 +26 +27 +28 +29 +30 +31 +32 +33 +34 +36 +37 +39 +40 +47 +48 +51 +54 +55 +58 +59 +60 +62 +64 +66 +67 +69 +70 +71 +72 +74 +76 +78 +80 +81 +83 +84 +88 +94 +95 +96 +103 +104 +107 +108 +111 +112 +114 +117 +127 +130 +132 +133 +134 +135 +136 +142 +144 +145 +146 +148 +151 +152 +153 +156 +157 +158 +159 +160 +165 +166 +171 +173 +174 +177 +178 +179 +182 +187 +189 +190 +191 +193 +194 +196 +198 +199 +203 +205 +206 +208 +210 +212 +215 +216 +218 +219 +220 +222 +223 +224 +227 +228 +229 +231 +232 +233 +238 +239 +240 +241 +245 +246 +247 +249 +251 +253 +254 +256 +257 +259 +260 +261 +262 +263 +265 +266 +267 +268 +269 +272 +274 +277 +278 +279 +280 +282 +283 +284 +285 +286 +287 +289 +292 +294 +295 +297 +298 +301 +302 +303 +304 +305 +307 +308 +310 +313 +315 +316 +317 +318 +319 +320 +322 +323 +325 +326 +328 +329 +330 +331 +333 +334 +335 +336 +337 +338 +339 +341 +342 +344 +346 +349 +351 +352 +356 +357 +358 +359 +361 +362 +363 +364 +365 +366 +367 +370 +375 +376 +380 +381 +383 +385 +386 +392 +394 +397 +402 +403 +406 +407 +410 +413 +414 +421 +425 +428 +434 +435 +442 +444 +447 +448 +451 +456 +457 +459 +461 +462 +467 +469 +471 +472 +474 +477 +479 +481 +483 +484 +485 +487 +491 +492 +494 +495 +496 +500 +502 +503 +504 +507 +509 +511 +513 +515 +517 +519 +524 +528 +531 +533 +534 +535 +538 +540 +542 +543 +545 +546 +547 +549 +550 +552 +553 +554 +555 +558 +559 +560 +562 +563 +565 +567 +569 +570 +571 +574 +576 +579 +582 +589 +595 +601 +607 +609 +611 +615 +616 +619 +622 +623 +624 +625 +627 +631 +633 +637 +638 +639 +641 +643 +650 +651 +652 +654 +658 +659 +660 +661 +662 +663 +664 +665 +666 +669 +670 +671 +673 +674 +677 +682 +683 +685 +689 +691 +692 +693 +700 +701 +708 +711 +713 +718 +721 +722 +725 +728 +729 +736 +737 +739 +740 +742 +744 +746 +749 +753 +755 +758 +759 +761 +767 +769 +770 +771 +772 +777 +779 +780 +781 +784 +785 +787 +788 +789 +791 +792 +793 +795 +796 +798 +799 +800 +802 +803 +810 +811 +812 +814 +816 +821 +823 +824 +825 +828 +829 +830 +831 +833 +836 +837 +840 +842 +843 +844 +845 +849 +850 +852 +853 +854 +856 +858 +860 +862 +863 +865 +870 +872 +878 +879 +880 +881 +882 +883 +884 +885 +887 +888 +892 +893 +894 +897 +899 +904 +905 +906 +911 +914 +915 +916 +917 +924 +925 +926 +927 +928 +931 +933 +934 +938 +939 +940 +942 +943 +944 +948 +949 +950 +952 +953 +955 +958 +960 +963 +964 +970 +973 +975 +977 +978 +980 +981 +982 +989 +990 +991 +993 +994 +997 +998 +999 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-015.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-015.in new file mode 100644 index 0000000000000000000000000000000000000000..d8734a81b512e15ac7e996c50f6aa2a7a83feaab --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-015.in @@ -0,0 +1,1001 @@ +500 +60449362 664675941 +-694704900 -135845603 +989409677 104878519 +713513994 67210563 +78514902 -764174569 +-903765882 699621626 +-294058186 58273163 +463980515 -728923778 +-963162352 568908394 +-458795821 -71470889 +106970403 -797241749 +-778580057 994516548 +-381350018 708693201 +809214137 -513210541 +797445416 -857158320 +-915254754 -541583981 +491410728 -372508388 +271557714 -633459297 +-919854427 127549179 +171494088 -323261888 +79230717 -92547407 +-232657486 -362802850 +984826055 -879776601 +277926949 -859201206 +-931309866 529388192 +-176176297 -831048260 +355840945 555582069 +-442174248 238110589 +843145311 685381429 +-8553127 322535285 +178298727 689148899 +-919659295 -937290898 +-252058503 923655516 +-355441248 -508040013 +-163555358 144594554 +413537806 103247619 +477922118 801051389 +690998241 -519114990 +949267279 -7167994 +-992753007 11214434 +-545998956 -980968862 +655016826 -993428066 +377632259 920898239 +970973239 -762425267 +-476540800 652880971 +133989971 840927130 +-327702101 965462235 +-968713552 107669891 +12315964 -325899272 +651994556 -175590607 +-787413677 -213597624 +-818186578 817481115 +-566007807 740229489 +-622982116 -536114721 +-189968912 -713520291 +899720909 994565975 +-591250923 388376838 +-587999488 -544571839 +942980559 487705578 +-518530162 920282755 +-784285840 848108117 +-849551613 -547406077 +-875299544 234783212 +622808091 167045802 +-672017348 611469590 +347934936 -313362518 +-529343501 -288552724 +196749158 983865602 +-449022721 928280316 +-821271554 -126737817 +745266742 626374786 +524069499 217276068 +-265338534 -214640524 +383817971 -506212897 +964578289 -752358899 +411525348 543374526 +-77714991 -775727600 +949743091 433620232 +-305498038 27682390 +893596583 710647956 +987226898 -225983092 +-185983702 321019436 +955005101 -246492560 +353631236 -210154615 +660936796 -855751435 +-625413170 329188529 +-115175178 170143073 +73665374 -517500271 +-937663983 -754444557 +-473943396 994756796 +-286080930 262769035 +-691300191 214117151 +-345394124 769265394 +804506854 322810858 +-349949458 907654656 +890561416 822408156 +235071979 440584462 +319233826 861484970 +498520884 -938175363 +-769796562 206195067 +-872121749 609447385 +-253343633 498492097 +-129816678 -715195869 +813288986 196350656 +936957487 574604920 +-343624764 -779296265 +495187119 38614574 +978478755 195854973 +-245880634 -72881483 +-1408319 -170995480 +916628239 -829654804 +992841235 650854254 +-148202275 -83216747 +771997542 828842131 +41580114 428415550 +-952108299 -724404290 +649709239 418498782 +150520363 531876516 +332943840 732851338 +-642968808 655941419 +59243431 855792774 +-831584519 129010154 +320300200 849890463 +-243434117 804789652 +209370280 -75802846 +-708197630 943238624 +485804157 295933478 +15453769 -69505570 +-657950976 914173841 +841274597 -935092509 +-107627670 594687047 +-19550791 -476365357 +862996105 -271483265 +709429601 63861058 +-657421717 -468482775 +1443154 -609669276 +-105588199 25095028 +-232682558 414312032 +-216163941 728137646 +130789857 -155529238 +259305027 326279348 +394597994 -468590162 +584029565 -697133432 +960299200 366552914 +905010170 434953174 +899840390 -277577550 +-414068779 -979903533 +29718117 -574273601 +-746911262 724613441 +-696716415 515114800 +-952399978 -25205412 +-614688766 -904026091 +316465202 14722733 +590904094 -639073786 +-857140158 971227375 +125331634 -780094074 +365217989 4851328 +308055171 -739736015 +-899640097 -107273451 +853310506 474882859 +-563071573 -195013561 +-667890599 479831058 +-154938574 276847121 +-248784070 805137172 +704033139 -368564587 +553877259 -26393478 +19187477 853949654 +577717492 -847046464 +-753552703 254080953 +-259919877 570492429 +-635419595 -889749523 +-354483544 -383330263 +-850557927 -678702993 +3766504 -657911831 +-764637776 804575467 +-231952205 238453059 +696016036 -311583801 +423542672 -148276558 +189685622 -954892618 +-838923328 156628265 +-211236547 -544531724 +-816962953 -779087974 +-626192652 124764799 +-250559684 -122856535 +-528341876 647749255 +-389824480 -327890413 +52580112 -598371141 +574009590 -932058547 +390719543 -861908829 +-96468178 -627717047 +-756439350 -898382767 +-344981680 137203121 +961022124 310799002 +-613657025 -862238414 +-353614063 -135965776 +-975654132 -380737732 +-502202766 -929823674 +-889007315 -44346964 +330022261 -680009478 +-978265982 306741761 +-636755839 8790711 +-16815099 22532820 +893049732 224773025 +518811757 -140619290 +-43302474 929943437 +322068318 50782599 +-115953220 65396369 +905993491 -227819385 +-332701342 450718162 +443066058 520482374 +-659377354 489338038 +-315970452 -613468457 +-559261500 687291787 +-703247848 706255422 +27663202 -971588731 +-575759073 -325308713 +-212953772 -103141696 +-72662056 -548660338 +-900536678 -618996952 +26025423 -449247429 +-540827758 132878850 +-220476808 -676288257 +805808689 869923763 +-899920588 -188834715 +226387659 537082782 +954901811 -675462887 +-937391478 -16985157 +-521841318 878214176 +-153852301 873636722 +680229320 -504369431 +450481489 484797998 +-134323910 -707803330 +-714560102 -904691462 +-319568150 679861003 +-113859393 461221151 +64809983 414685815 +-110818431 -160776259 +758324830 -484106442 +-455143198 868215712 +-964475914 -152768603 +73303845 -906777994 +470833543 -582552491 +-248441021 281469469 +-289585866 122184261 +305370213 -673065145 +716372337 860445657 +775028225 306950682 +366735867 317073806 +801131816 645464829 +-111038607 -353335513 +-314742775 -666799913 +-75124138 -813760227 +-476263074 356052453 +720060293 -385723214 +62445743 983467615 +-490781004 246847863 +588633594 190221981 +-109781123 -248390377 +136930546 -782143071 +-927299220 32562423 +-935239282 -867845224 +544552125 258837406 +166911218 -791753314 +182475760 209047738 +-511836555 862048806 +430534886 -750014589 +-285775809 884057357 +321891218 600147567 +546698419 5177869 +-609349988 -785586435 +569121098 656800404 +-741477598 -461155450 +-951261212 -773778575 +729359080 39108015 +-352782365 -282001908 +684988718 -674987454 +126590899 -961716068 +-211455631 -847991956 +228877801 -268530603 +273007984 99316578 +-489365958 745426050 +738771959 828750330 +344261780 -414972799 +-907633263 -328350269 +-236808153 -881113034 +70145319 686846495 +421964727 -235699527 +-325944104 -90317437 +-930891026 -547113123 +361805013 884588436 +568881108 747992496 +-475983520 -559362405 +-736077383 126882014 +-533716557 -596212574 +867742307 -234450483 +528834383 -965110024 +-874407867 -157579593 +-799131664 -796337436 +-366449154 -796985183 +-230831661 722901326 +379933458 -655095450 +820094294 216459121 +691097264 997517992 +-3537672 -587900294 +-152011529 881677951 +822675530 -588539102 +-779515966 -776997074 +-548738455 -576636642 +-857169993 626573828 +441804993 -774354699 +-329072597 -180441753 +-657095653 631100257 +-634363349 -884914256 +529923316 -849314814 +713207031 -367956996 +918364595 164605281 +568461297 466026663 +274697915 -916153577 +354497519 552842040 +804381281 158889670 +-678188144 198109612 +-967744972 -539195420 +716947918 128223795 +43551314 -159569183 +956316736 279099318 +524604446 119025109 +-288870906 496098302 +-535329572 -640424106 +-735782282 -487492033 +-767932402 -325827657 +403277189 -384034171 +-288488497 61763847 +323344179 -794078086 +264955641 60434650 +-907489255 -132767406 +579888839 456370513 +-113945543 924486036 +-746563821 -139368331 +-427546768 888586935 +-305401873 623512057 +-783595030 -791927225 +705300525 -241551169 +-540581437 473062161 +-902350349 -138880528 +-798192314 61094546 +-157925414 -730241152 +-643937169 670257133 +-799600859 661518506 +-338824796 -481604403 +-308282721 810192836 +764519495 276561213 +586504887 435843466 +538685848 -539066121 +-172941621 92166514 +636704384 -185398241 +811594907 517503811 +730886613 5527504 +704656671 333454945 +250511915 -717284760 +682450586 -669226352 +329761632 -248167211 +-916416106 -488487969 +948378438 747889650 +239480667 -435400002 +453630384 505759195 +278526202 -715574438 +512503127 324286258 +153538366 921862102 +115523912 -397548585 +847425222 495178856 +565184869 -822914051 +-479418152 755641466 +-373835398 89475977 +330400553 792537955 +166248780 -452056206 +-535216864 -485468542 +-764010924 233169424 +-95500962 -950945428 +-826116803 106199815 +-295255297 -708763750 +776414160 -480142838 +-360168820 515252906 +212385314 -840160555 +258416899 898040162 +713053309 772764162 +537780808 51025062 +724282626 -725623761 +-408810794 69581800 +-941925092 510815652 +-644503177 -39647110 +-525050961 17939077 +220160710 -616126635 +-717513254 244658544 +219413502 -859312720 +-798217933 320962496 +88127779 870580900 +-591172359 -511793894 +-433940166 -366317416 +-361872447 585234757 +-651789624 555910903 +-34294702 -149247972 +-821886719 -166883359 +894635861 391132236 +825335974 -675055156 +98224864 -255808484 +524609276 100194350 +652846434 -327260498 +-837289117 162749299 +-813772594 878319094 +29996391 -471661439 +556365030 -203995596 +186503369 141444146 +806716334 686012364 +544005933 299288422 +-383015687 -833543081 +-580379951 171163624 +556806714 -262454653 +-638244409 27012101 +101263979 194371986 +-119660026 511778866 +-863879304 -298142212 +360959709 330096341 +867188771 925759125 +-410494895 -447047374 +-434798149 -733248358 +966510322 -740800108 +190473050 -101932502 +-484651634 325954807 +118378440 -392795054 +-368395734 -147846639 +192508514 472763962 +978546169 -550804518 +25319655 -316023063 +192319765 -929837178 +-512647681 256187776 +36336068 -95862198 +615828017 -833906061 +105614786 458164657 +-22713699 -132262930 +-827084946 -976059217 +-535753888 587932555 +812699218 289981085 +304997387 360763337 +442054460 449939135 +-96687762 534369822 +-917081215 222326914 +-697940906 -293741897 +857480815 -15995053 +-602899269 709462592 +96638817 258530874 +746343349 460538332 +-25659493 214478256 +-678043085 -792021118 +-288733202 243650465 +-56210487 -330766763 +868633708 -222809290 +531666297 136361994 +576990869 -983625872 +118097068 -567288420 +-148019468 334993515 +316082593 -222979404 +938002341 495029960 +-641464052 315050379 +783741624 -649166297 +-397104875 -925496488 +186361234 333408079 +972631465 683355028 +170573777 -229159004 +529974546 -355739252 +-555947511 63192004 +-217668904 -734578297 +885396647 -473242494 +97922983 539908562 +-559567302 -413240991 +-96567730 -934407818 +-125726207 -34565186 +374115371 -52786042 +-248814912 593736276 +-411272646 925416932 +-482219217 -798596583 +426707628 177912659 +602529001 -860181901 +259879510 -939809130 +626125819 352348341 +638005984 -28719231 +-162856053 243457085 +380507242 -403512124 +-410329103 -256984565 +-345486118 -813017714 +-259729118 40294953 +7934462 -758147765 +-631880520 -971901114 +-427076260 -354833930 +315634680 -772686089 +851063970 691466456 +579397502 -388628004 +-460729468 28457142 +897990385 984272903 +-294358995 31499851 +383477913 -781300240 +-943647692 317090419 +-364641351 938017063 +588151362 374937442 +834049036 -85481018 +242539186 369235333 +-548342710 -124647343 +427629333 -190113338 +-241926317 375156051 +846396927 -842562149 +-108031849 -898484988 +985814246 -268649880 +47578340 92656096 +128216679 -593710888 +154826491 343192481 +-918981626 -393887436 +917627509 -117592368 +491345911 261835600 +-192976220 15831320 +-911265138 -106905790 +582288684 -801156141 +-352707103 591522821 +-233162910 -87886736 +494600907 641159385 +773552748 374179230 +14988704 -302552261 +-205022787 -60771008 +-308191397 -165287663 +637796582 -49594683 +613256373 -835091010 +979563305 -483284485 +337067115 -822385709 +-716395492 124599485 +-703744799 -348539103 +-340195484 914827732 +374263114 -740558857 +-129703817 157933301 +93779544 -26985309 +-863808857 -901495594 +151426739 866093184 +425400083 535187295 +-263791146 -7451030 +950391277 716380625 +424509265 -749413685 +983944563 -340447233 +809810043 -270002859 +-264689891 -763436320 +26646464 -849112029 +287967989 282212636 +612669196 -96085485 +-467525673 406568511 +-19763627 46128784 +402284997 -535386247 +530550258 323564285 +-560346588 -358781491 +832993880 -455619959 +-460249786 -156947122 +-550650507 596953173 +-247789 -490233514 +-85020406 885271937 +-641978190 -138670809 +-755813990 387347627 +872530522 -853275564 +805843751 -30021460 +-613430414 -659590089 +500376735 -717396304 +-670923907 604537983 +674370774 880223694 +-521031717 623865744 +332387137 -308632962 +-839697691 -831371954 +-956022648 -56144898 +-496141114 -939923490 +-146951675 587665826 +351012872 -913064669 +-305317280 -230482841 +-244782130 -802613698 +-578130107 120051255 +-38544363 165175532 +664283667 967350108 +759102400 -957172917 +892443391 -549525089 +-401900834 -613471375 +286193818 445306065 +159948091 302129357 +45345281 99299820 +949054264 -537426428 +392348304 878011969 +-739803906 -688869604 +-326328993 -546131986 +-173460810 568719230 +534156330 -939865304 +-321176839 674116490 +-482129628 27645702 +-189632318 -83882314 +481102972 523529177 +-381974665 153753598 +-223621292 -442245581 +-356997070 356619985 +69363933 52977157 +-64266976 572271633 +389988964 -254430206 +-707129864 987674194 +144997891 564823123 +-672816874 714336721 +197088267 -64220112 +-807047239 861434183 +-930745612 103258166 +316395306 979186213 +-306988454 -471217595 +-142741186 -62643834 +-273406611 -776716308 +-464130243 -848866230 +-745503941 683354335 +-762885985 870538691 +880720715 149669005 +833847959 297930279 +-398753683 -990528326 +-733231125 70381838 +217141914 -449883704 +277831197 -92881104 +-193749355 -500372506 +371114303 -967723809 +965455000 -59271092 +-756703818 -447664592 +233744640 -511716211 +-670452901 -801001478 +761422756 -427135053 +637546807 -163288285 +-558728620 460663949 +-44112595 8046412 +478271890 99223346 +-697705984 533494816 +-237945960 924331904 +-144183286 218605971 +-816322941 880996113 +-941399430 336164274 +-362054855 -709236229 +381650267 -123744860 +446153716 -97221544 +-300317518 129356587 +381141424 -432577169 +-645446824 916706597 +267423677 -684103935 +633263360 -226952689 +11755337 225288518 +-191123443 298613606 +-729318186 489959812 +-147606445 28722668 +-64548478 -249558083 +-66436654 -575351083 +-975816066 -366676744 +777216545 104873262 +164515401 -23637772 +-118927999 -613075389 +615267040 -771312078 +98327718 249678416 +-883610841 933347590 +-877385349 -360368666 +700519882 677933555 +-815289300 -647445017 +-874291364 -560111311 +257912844 -846796255 +-778211761 -845141780 +967646930 -842604323 +-120403523 -671063280 +-777200889 -873713597 +709364681 -915238541 +230777642 985333891 +867364280 276080371 +838831354 238713447 +21764361 -975909263 +-283868364 63630997 +982069209 76799515 +655509028 857377368 +188630443 24033238 +368077647 407059415 +163171682 -966501048 +91671086 94846937 +454696016 938409826 +-660730122 797109145 +-593617893 748341683 +733275234 755066171 +-221744629 -917230293 +-375033931 -100455672 +659732372 737804210 +-992633477 -798281512 +-390650892 309012361 +-126011771 431111419 +359411148 -725040979 +-282120786 117656156 +759495816 904672914 +-642710741 -975953538 +801794675 488949469 +21082175 -71574642 +-249703815 11306765 +-53948998 -82895864 +-357341614 170435937 +69561652 561063710 +365502243 930397908 +229200801 -193211602 +-91732758 842719704 +-184858522 413648767 +433029962 861995497 +223945282 504485647 +-919578292 583612657 +589362255 -653019221 +-806114077 654008143 +505710148 494934964 +-113550449 156258273 +-789237109 460763208 +55006046 -862225747 +352482238 891252306 +462872210 246970841 +-96518516 -12423139 +138557794 -164793645 +-131878025 197013702 +-130762520 361727785 +454569325 102430992 +-66862571 33356382 +-84029336 246443255 +784376277 148724741 +344670470 599062763 +145436778 461608093 +-7840703 105600407 +-462787086 298295652 +-239141700 -166779909 +-635861072 179346978 +960971529 302391074 +-179113137 958827922 +-220936484 622659457 +132975151 335846562 +-250079399 799696609 +-100862100 349837618 +410147349 660966106 +986508747 -714772852 +65455567 -959383184 +-408249790 -565892768 +-142447324 93638671 +15748717 364138697 +604986749 -8935231 +-274482298 208200123 +553483549 -17896999 +-232239701 292654415 +486597952 -347465019 +188530795 533746801 +-772519058 -227478736 +-445412966 530288301 +335717506 773715911 +831929930 855006463 +-895566307 485145081 +-193569389 -422456277 +60253720 962120462 +996273987 740005052 +726801675 -916071409 +689212949 889656290 +-445107918 -225462851 +78500273 -236531475 +-357630823 986027047 +883191126 21336953 +-244294465 14028750 +970097832 810572620 +234173504 175277504 +-827496052 451203762 +629088216 514866632 +-710499596 644755493 +-839819580 28849376 +-879344357 -598561251 +-324583776 -365135180 +-879842647 -321935141 +733237805 562469063 +-705692471 -324515471 +820812872 673922066 +-820133212 115752714 +-790464832 861577593 +-504542522 -913374307 +-568294919 447057658 +346682662 -794298378 +-915383225 420426538 +290138293 -323675315 +977034919 -846182344 +759189342 -494191935 +137665700 -188198800 +134409692 -270148219 +738883462 144390822 +277099287 -231589664 +-471994727 571551018 +-527283394 -395500427 +706526221 264999987 +421452137 -371981501 +-99150137 -261975987 +537478472 199826569 +-833459546 -878192909 +948789728 464028112 +-84120795 -282250473 +-827412244 -569416737 +-665296088 -965313755 +162743632 901283394 +-981347183 -951022879 +912300297 109492439 +-773930084 -298875831 +-729360489 331415843 +-20453402 941030530 +-968526878 -426903592 +350886931 268113872 +-345038705 -361897013 +-219321194 -997538460 +626398879 -983220440 +-30472994 -18252234 +151363475 526000594 +698758220 376802128 +862593945 388347774 +99977151 682952173 +-751125333 75718981 +858883070 553236773 +776654819 -745763830 +-967968056 -622810299 +502074324 -536467430 +-752201426 416689669 +521607768 -639158491 +584312018 -295697837 +-910827137 -635627680 +227317959 259431503 +-955998623 -475843937 +-972916353 -24924433 +-960508717 -450082429 +72846544 808503321 +-604595642 -42956446 +-843950040 -323399790 +247695496 -484551094 +473644406 52881237 +977666082 -229096001 +-60028955 117483116 +247399611 -745609138 +-556443492 471003660 +-254514419 545919841 +851666427 -481606392 +367726909 -735694586 +-679302870 465885961 +-40491493 -220309971 +744863129 -282528043 +-202363 801186714 +482458694 123803222 +-128953156 961552259 +798599229 -386411476 +627125433 834469467 +-619445091 38570178 +-633144952 -737008039 +-439117144 712575140 +656633412 -343202532 +-902375324 -855340436 +-395891821 -379338797 +857286994 -867317408 +759686713 700757795 +777896996 301900807 +-202233652 647738718 +846293358 -59179690 +93154289 20901256 +490376403 428023533 +635395475 -609333486 +-7077247 -717430212 +-812453897 53909668 +560635236 234266670 +715102417 381077309 +-330427139 -5633115 +380434626 483727491 +-527200829 633077175 +-755000257 370698479 +-755567787 654850374 +-195280296 25739905 +-715763813 -605920050 +-864198392 -990695475 +224514983 -568910771 +319095952 927656208 +-597703714 -64855237 +-61332933 399766116 +-653873801 408902237 +43387789 985335098 +-504974941 298846889 +-216414401 949636028 +870105805 91620520 +888093103 714933304 +-947350086 -282843466 +315003822 -367539087 +-986631060 -98910427 +-418787444 -676628718 +925790551 594420588 +906048895 9874156 +968261363 152677241 +-752035317 259020920 +512661735 -920255286 +697233019 -916245625 +-835358133 -396340284 +925976926 286233302 +259653877 602114964 +257822554 388013811 +-915170858 587419009 +254122120 -553386978 +-559213803 -58360556 +772599946 -476557475 +-96273848 158542929 +-655645484 442126007 +601757418 -521210160 +-156023643 -113462205 +80947158 -718150320 +-775590274 -240303365 +737466786 -195688436 +-419918498 -311313807 +130028522 570034131 +96877994 574169936 +-516257364 -975529655 +703002684 265672724 +262006041 738861689 +-95656296 71038740 +960714530 321067899 +438717955 -60438687 +824589611 -922747023 +880665655 14152498 +-748549046 856842012 +-641687615 305475797 +-930950204 879716569 +-194533403 145431602 +430224375 853702552 +-836880310 716847367 +762201543 -838461440 +377619094 151649928 +-689915308 -478029622 +-103650999 878058597 +870494399 417252668 +-701716725 -763171029 +-128354111 502560412 +691176 -485296354 +-223940098 599912594 +-202609780 -900790855 +197386115 -699978492 +680323663 -962720128 +50937088 118855628 +354539099 406581924 +48048184 642748435 +748055273 963235174 +431817572 198228750 +-398797610 672542647 +-817454717 -452416829 +772481389 516359984 +782958648 488597459 +533555298 -493269020 +-141931577 -305967760 +-139641205 -176341231 +-45943922 -507566484 +706681516 910786096 +272494255 -377976060 +-389749069 517123319 +-699566035 -913384468 +-911867144 -838891001 +81505277 -133119042 +459041118 -179370411 +-37352503 482067947 +-282569263 696016466 +96285224 -919407498 +-318793660 795541374 +-663708141 -579818555 +-108226187 631894188 +-146393401 -302997469 +404861138 -649755769 +-777755127 -904842966 +-980037759 589856269 +192054360 245641026 +739932307 -661105754 +-810672121 56241070 +-169723099 -319016709 +-996555912 -160240605 +142389876 863845635 +-407584612 64289967 +577275655 833402336 +-641458268 586832700 +845228436 180082193 +-555085256 -775065986 +560105580 315753148 +809329565 -309958505 +-638785900 840469089 +-881525088 -643712071 +519079730 224907725 +183466838 -558182581 +163504529 589477808 +-1013578 194329815 +163918296 -166554424 +664967244 -648539699 +675491219 -938544595 +-350013536 511507794 +64284853 692589902 +-368433206 -692693846 +-655472269 -111711418 +-766559804 -979941915 +377892268 86625074 +-339012136 898473633 +-126869791 -483524862 +-642437628 513714251 +428319254 507411468 +-536440159 -448036189 +793303696 718847908 +-77537425 400405425 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-016.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-016.ans new file mode 100644 index 0000000000000000000000000000000000000000..104e6aa412cff8053ea7ba92122b31aa329d0c39 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-016.ans @@ -0,0 +1,501 @@ +72981106.98070552945137023926 +1 +2 +4 +5 +8 +9 +10 +11 +14 +16 +17 +18 +20 +21 +22 +23 +27 +30 +31 +40 +42 +44 +45 +46 +48 +49 +51 +52 +53 +54 +55 +56 +59 +61 +62 +64 +67 +68 +69 +70 +72 +74 +75 +79 +80 +81 +83 +84 +85 +86 +88 +89 +91 +92 +93 +98 +100 +101 +104 +109 +110 +112 +114 +115 +116 +118 +119 +120 +122 +124 +128 +129 +130 +131 +134 +139 +140 +143 +144 +146 +148 +150 +153 +154 +155 +156 +160 +164 +165 +167 +174 +175 +176 +177 +178 +184 +188 +189 +191 +192 +200 +202 +203 +204 +207 +208 +209 +210 +214 +215 +217 +220 +231 +232 +233 +234 +236 +240 +241 +244 +247 +249 +251 +252 +254 +255 +256 +257 +258 +259 +260 +262 +264 +265 +266 +268 +271 +273 +278 +279 +280 +282 +283 +284 +285 +288 +289 +290 +292 +296 +299 +300 +301 +304 +305 +309 +310 +312 +313 +316 +320 +321 +323 +324 +326 +327 +330 +331 +332 +337 +339 +341 +342 +349 +352 +353 +354 +356 +357 +359 +360 +361 +363 +364 +365 +369 +371 +373 +374 +375 +378 +379 +383 +385 +389 +396 +398 +399 +400 +404 +405 +406 +407 +412 +413 +414 +415 +417 +418 +422 +424 +426 +428 +430 +431 +433 +434 +435 +436 +438 +439 +440 +441 +442 +444 +446 +447 +448 +450 +451 +452 +457 +458 +460 +461 +463 +466 +467 +469 +470 +471 +472 +474 +476 +478 +482 +484 +486 +488 +489 +492 +494 +495 +501 +502 +504 +505 +506 +510 +511 +512 +515 +516 +519 +520 +521 +522 +523 +525 +529 +531 +532 +536 +538 +540 +543 +544 +551 +553 +554 +556 +557 +558 +560 +562 +565 +566 +569 +571 +573 +575 +577 +578 +580 +582 +586 +588 +589 +592 +593 +594 +595 +596 +597 +598 +599 +601 +602 +605 +608 +609 +610 +611 +613 +614 +617 +618 +619 +620 +622 +623 +625 +627 +629 +630 +632 +635 +636 +637 +638 +640 +645 +647 +651 +652 +654 +655 +657 +659 +661 +664 +665 +669 +670 +673 +678 +679 +681 +683 +684 +685 +688 +690 +691 +692 +696 +698 +700 +702 +708 +709 +710 +711 +712 +713 +714 +718 +721 +723 +727 +735 +738 +740 +743 +745 +748 +751 +752 +754 +757 +759 +761 +762 +766 +767 +770 +771 +772 +774 +777 +778 +779 +781 +782 +785 +786 +788 +791 +794 +796 +797 +799 +806 +808 +811 +814 +815 +816 +817 +818 +820 +821 +826 +828 +832 +833 +834 +838 +839 +841 +842 +844 +847 +850 +854 +858 +860 +867 +868 +870 +872 +873 +875 +876 +878 +879 +881 +882 +883 +884 +887 +890 +891 +892 +893 +897 +898 +900 +903 +905 +907 +910 +911 +913 +915 +917 +919 +920 +922 +926 +927 +929 +930 +932 +933 +935 +936 +938 +939 +941 +945 +948 +950 +951 +953 +954 +955 +956 +957 +962 +963 +965 +966 +969 +973 +974 +975 +978 +979 +983 +985 +987 +988 +992 +993 +995 +996 +997 +998 +999 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-016.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-016.in new file mode 100644 index 0000000000000000000000000000000000000000..66b6d9daf856100d2a898a3aaa086ce4936237aa --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-016.in @@ -0,0 +1,1001 @@ +500 +522198183 360346965 +-272815827 593242401 +834027577 664905231 +631540953 -719976130 +-317470086 816030917 +-324359614 -840600571 +828818843 254208739 +630790702 -900667982 +21512823 688179874 +414404796 358814054 +468541045 -535678570 +-569992260 -260021776 +-958044167 -53015341 +-381806572 462071290 +-513041774 -767906575 +628773727 -488116696 +950208738 -653199486 +-270781543 782901409 +101499069 -809662219 +-660979452 231547170 +-656921163 856807026 +722678850 -185842446 +-815349755 580150538 +-54258733 146250028 +-251382603 -589049488 +854226736 449040549 +565655554 -703678346 +-848000567 -414815808 +153960096 -376873861 +595401803 -50935274 +180416788 309066471 +49925921 169659502 +291233813 -608498779 +-547123009 -159031680 +-28712902 -930374929 +-916201666 -474019039 +-688991537 -612479805 +37298462 -442936925 +-434940070 -954776944 +947753071 -625574272 +-539149624 -146412104 +873929442 17258719 +249690000 -439391730 +-100596261 546378942 +-771469432 539739366 +712274487 -850644157 +-992851241 -890711549 +451417343 -506378056 +564444299 -624297522 +-740527259 -893529527 +752248314 53519741 +994007191 95645961 +844083870 79216250 +646559987 -460190540 +465103196 -577875128 +656086661 663575469 +-494468306 -381696434 +922892378 922292510 +-618958855 301600338 +234189583 144455724 +-300739931 378212059 +-4470406 496819213 +-249014324 -487685072 +45101826 690513227 +44717706 -785747901 +663814117 877207580 +402515526 924418922 +576744197 170060349 +-899027721 745083474 +521962393 314550384 +-548170054 -183073106 +767735348 -118367566 +-896075647 -521089374 +829016545 -401025665 +185433157 511538005 +268791496 -922048180 +807403407 222196460 +197333674 -113595068 +471362552 -29161194 +-461933182 299861750 +-783449891 799264968 +-42018626 -581857736 +787819243 -546284803 +665688602 -677174633 +-578610705 610204362 +-682992198 345968744 +-688192834 -684251049 +833403972 -693687014 +905529805 61267238 +-580818450 -684093807 +-252094219 614238186 +-185203072 442622148 +-78167537 262276760 +-348482888 -973461811 +-783667222 26103179 +170473448 -345632471 +152382435 -289824692 +799675490 97215709 +-556188462 -423555020 +-204952219 251768556 +-302829878 927505193 +-212005824 -969461542 +56102444 -600739015 +-386474046 782402219 +-52638254 -924991541 +-609445873 -188155425 +-662430119 -945346280 +44769069 -633227564 +-337655925 972435046 +-818526064 274666119 +-340633695 -860204125 +447067652 -880292543 +181452488 -415395291 +911222724 -58071849 +-522998188 385406472 +600016461 679761159 +-292918160 -357041910 +-654664709 896495563 +-461819168 967771977 +-154105952 673889127 +-180216330 14983091 +918047194 48536747 +49060747 -524051259 +-801919492 872828054 +-448409636 -418728883 +-978444428 -836421678 +-92915748 125693813 +218266124 498398733 +986416477 -161279202 +-384709213 977335550 +545924492 -865409634 +755838325 863240826 +-823912276 -495795663 +-840539657 479587912 +819282057 767440995 +-987052469 652850783 +968885070 534060620 +-318790518 -130682058 +786615723 -481738961 +285146823 378484926 +24113303 -789070526 +-127454181 53296212 +2800398 633387752 +-564222476 290134972 +-741339023 -762268018 +410968186 975204078 +-544406150 -93248733 +423129475 606004895 +-38574093 -76997504 +554879011 -125206435 +-223828031 -66872700 +-557312654 -546484200 +805196436 -162449025 +-616298749 12429102 +837658728 -438108179 +-820877021 787447825 +229870027 -85323904 +22613854 -469407791 +-737610891 -420726106 +-118851650 674838252 +-180877680 -789250724 +-534859046 -804350769 +-362258900 -921562788 +554399993 -452341422 +698051439 -402520446 +-696277580 -734043490 +-760017448 635324670 +92144140 -779651025 +155128106 94834208 +-64630947 -882293681 +-611603375 -271276442 +-19633811 155805484 +831202845 675495213 +938365798 -334469280 +531027399 -47886742 +-452643355 168612321 +-191279584 449742664 +396159214 651483545 +-631206667 -770298281 +163282676 894432900 +-567826680 -592799182 +-678461209 -197296026 +345042412 -163311008 +493069104 -679953947 +-412846968 3958731 +-298055979 -410788453 +-176643112 -983890377 +303807789 420967209 +762921974 -60882337 +326564097 -228599352 +453058405 142870344 +436924540 -480034994 +-794628977 -470726670 +745503767 479526675 +-858971050 -984012539 +-343664144 -72893520 +752473186 511005416 +735609908 445250038 +-363117508 -415372390 +156862401 288997769 +-961022035 434990597 +-671247940 806021592 +-235195066 839154685 +-121253134 453897778 +-603798660 -252384703 +358644027 -373770032 +576954435 183929009 +-218648490 437922610 +-120775041 451258215 +255027216 277033263 +-157303122 -546145541 +36650115 -84557519 +178850176 -453504252 +591679248 -272197134 +-723539296 626886854 +220650274 -467141812 +-425802070 583773082 +-340481311 -854356145 +193028607 -710550715 +-688697555 513492565 +372747360 -331082758 +-944152032 412775779 +966182438 204157750 +-524183025 -195101799 +-231937014 73141458 +-420298012 -329272337 +409733850 -258909147 +895983429 638592607 +6106594 -290236255 +3027682 -687098933 +-754290537 859257649 +363771393 -657504024 +752839374 -181937881 +734970478 -712906322 +997751570 -878502290 +543163781 449251409 +813657431 495236240 +-682223441 -344679191 +243775544 -813677585 +950974556 -550504970 +-115000996 658856675 +209789639 -730693487 +-703070637 -486054480 +279058135 421713978 +300315212 -997795569 +819698042 936313637 +547030235 499596282 +208813668 -835198298 +401977122 -712565643 +-466196700 -349063611 +569778201 -883010701 +-523354225 309276711 +-491775901 -636881725 +537222631 -967689493 +-734794042 567120648 +543011673 222563229 +723360503 73601150 +715250232 -576460299 +-831080595 767987492 +866170087 -153291745 +903483399 408354136 +587981894 525400830 +-84646629 -101303336 +-481987249 546500910 +-592831241 698514197 +-417080180 246036712 +-117392976 -917967888 +857196016 -744828427 +-518909322 48705095 +-446405384 -181558874 +138531778 590090117 +-35441127 -580560822 +969181980 -370355647 +-929318198 -908276379 +86219650 45942326 +309850082 506814584 +-659842398 -886395058 +-597832717 374722744 +-774461636 880675588 +652488147 -399749219 +-969865020 612796236 +-18169181 759201643 +530536291 332267465 +165367494 385804837 +-98305928 343127289 +26608551 -831960500 +85744398 -454599496 +-223598073 553421985 +-620305035 110304660 +681894999 -975361353 +108384939 8704962 +665407904 -65381693 +-557671945 -981209438 +-818169202 -849898207 +785731205 314461162 +774543972 -236583601 +-972190672 -543351499 +-314526490 -855299068 +354282189 830240884 +-669611058 529058144 +-315025502 880923147 +-109862208 -549158552 +-686653941 -488130704 +74489245 439182260 +-582240614 883447564 +-280793421 -213071216 +-854189844 -267589497 +969238628 705205488 +557630706 625721653 +42394290 640475796 +-616932175 -533610972 +-216415545 414590499 +929563777 -659927956 +-891914860 -765828668 +-946807124 -76743145 +431367348 -774307397 +-553451323 -894935599 +-413472690 -6226946 +286290278 -100316202 +-203070463 694077989 +560663586 164049151 +295916570 179846213 +447804832 -975742619 +-387427102 988258085 +659451580 822843472 +-81584114 277366298 +-360640038 800235203 +-722061080 -974224832 +-837890848 132320814 +-757577278 414771654 +-689560024 753336823 +360028313 -740312317 +854659865 869985065 +-746532916 -467129482 +-408186625 -187153308 +-812973963 -292158714 +68258551 678205074 +-892590484 -445256133 +-422064810 108324151 +-184125840 -41938944 +-6790258 436328168 +577101469 -202121318 +-867281234 -878164786 +-474482298 -272851982 +-738999687 -774328924 +58677605 -25622512 +890387247 -921914109 +146179573 -571454786 +-881621169 703952594 +-832879501 -152524895 +-245581092 -98413511 +787084395 -194781274 +-835230077 860381208 +-346130868 761812579 +-292926056 -93955261 +-279816905 317305902 +-784040762 841506397 +-760240243 -666763120 +-542524668 891131900 +793610857 -518956258 +776961763 -247288519 +-417243594 -563835002 +974839792 -556395556 +667265357 163320426 +822402559 -679301426 +-800562220 19281300 +-966432491 -680739050 +-758424183 -289857907 +-729701810 647194586 +281763732 -532920526 +-296153353 895887058 +956262138 -977341572 +936076489 -300521870 +36020122 521903573 +-784352559 535885787 +75511113 843728334 +961398036 451844466 +-134159551 322114623 +-727615288 255875380 +-978165178 -102922125 +896468799 341873063 +999616691 -973364209 +-230280766 280555243 +-954492319 51576788 +424396388 772147761 +215157366 984961117 +-354728852 -355136518 +-862657209 980490040 +216551024 654475489 +859870439 -909424439 +-931506992 -312752319 +-674882678 -699035275 +-812754063 -751755575 +736804228 516771747 +744280118 278124885 +-477284337 332886358 +-511111348 -661607242 +455411933 -42125888 +-836108451 452762959 +223241739 250102388 +515811651 989934377 +-587950023 -729917043 +-858448034 -252348593 +618773015 -872070600 +657195141 -139308498 +-363177215 786750487 +-701411199 665116571 +-906475615 -571034414 +119279673 215449812 +813087634 -895234960 +918997066 742598090 +349338009 847632801 +-766746402 520939747 +-355399107 988635185 +-338468342 426340198 +-975391870 -645562161 +547435579 -98292299 +-713125521 929303428 +144101721 797194812 +-143021642 872901550 +-208759648 -341627052 +-160677494 260662788 +828380188 445208987 +-149522454 280393560 +-576195016 -516410885 +669222101 132311222 +-689417497 -196610880 +912855984 -30547511 +338890357 -80321528 +-37764611 300827333 +505444893 -178917835 +269736446 -992060158 +490156387 583950472 +696243613 726703541 +-612098996 89416422 +-290875142 886523375 +144723246 -980158537 +594650799 733797145 +705601536 -78456458 +-384396082 944715037 +272421361 431468766 +498883159 532322673 +258396841 -852353208 +928594888 -407188869 +-621336109 -582478275 +-403164719 811145952 +672871505 609254693 +308767758 868815399 +-459142525 -447023848 +-319201541 235939603 +210596467 587507916 +496921378 537008740 +880265117 797978264 +-441416832 -99325677 +40067136 161169134 +62752658 -803165023 +-473314490 273564073 +411504500 224799782 +128910077 74663210 +-331678297 314822724 +172816706 418565912 +-403513198 -879980122 +350923842 797184520 +260983228 -251546798 +-866303184 -129232594 +-549609965 582545572 +73230439 511245306 +-178462784 21342560 +704384723 -256924070 +846020442 85456276 +-169567910 509417241 +652130298 -244717027 +-804590092 -532147958 +-31131210 699151349 +-719125772 -987726061 +-745212964 460026799 +-608192881 -315583909 +-276462451 562673534 +-642410360 -946397501 +-876477663 -684283625 +191400734 28185177 +514901265 -682097670 +860555971 994578873 +-636456763 484293236 +891524845 584521338 +-723656363 694981124 +-970194536 238348933 +726466950 -567330757 +533380602 -474688981 +327391401 -7671699 +278971526 -524903245 +-288385237 411612822 +73451245 -397502505 +457110304 -141486033 +689857388 -635591729 +-508302212 -866718504 +-480333443 19895851 +-226607373 -96018514 +-552920555 -234177264 +-724883932 -800398846 +-442804769 330791781 +-315118622 767131896 +-450659201 -167218239 +-498043876 397249475 +-524759136 267053079 +607186541 752621505 +-105638222 884961198 +-124783711 781709816 +830677374 194661007 +502594357 -996648598 +816488132 -459698612 +-514930071 200285831 +-534791460 -115850301 +-722666725 32417720 +925411859 -189867494 +-874513667 769665543 +66588113 -525429787 +660484031 846433607 +152168158 444937549 +160447901 361343695 +-822929011 523992501 +-796971855 587980656 +526333710 -718184535 +-135686056 -845947868 +561763306 -863082102 +-883234102 -794068733 +433876467 -404272146 +72536058 -44554771 +931304894 -275186395 +49169796 134646615 +418102505 882792586 +-629652350 571449941 +-452175172 -259282370 +3719621 -891169912 +-166253739 -31715619 +209969014 467065811 +911333832 760030017 +-829366703 565936542 +19438323 -410097047 +619623517 215595444 +-940287273 838493343 +-921414665 473162630 +143379484 460425692 +468924188 824635442 +-865271957 -760537901 +108493816 906968219 +-460621798 -918435789 +-217508768 -918291485 +-61553584 -130833226 +-531159025 9097528 +413934527 -990035017 +-904382940 -707164740 +-344861634 204807750 +-751519586 730420980 +-545064802 -384392964 +388114768 -965169563 +381519106 -960682306 +889387252 -198506497 +-561191867 -874538032 +-84805858 216730141 +-258631619 -99978638 +436823747 4389135 +-838430736 -285390305 +-146026433 -396112477 +63736437 695385295 +-264220955 607748758 +-837818863 -763082080 +181322551 860169463 +-342375376 294829450 +86763107 -330819947 +-605091467 8034953 +562010017 48805248 +-606837026 734204504 +-955458479 108867911 +-441966986 866257205 +-670509 -89714922 +-773910380 417525706 +-47074137 595470534 +977545692 -937611568 +186362692 385732253 +737698499 392375818 +-686225433 839354737 +-132261698 156529999 +-93689251 -77186906 +839910630 843958244 +427915396 119259458 +263041337 -117249252 +-821201206 876052782 +858697122 -477991132 +899501811 264677108 +-960298082 844873845 +521819002 -688549462 +-483125661 568934226 +432285316 -882359213 +-890459435 314376236 +522080663 -946757514 +706456993 -637279604 +-852443163 708793036 +333645331 -684799467 +-584880603 -781664394 +569518716 392730840 +-397375427 626524661 +-289269066 -218746145 +-257888128 -334740661 +630794437 85043806 +127158996 -873840197 +-393110840 -588900071 +-703156849 901450542 +246237277 341606108 +935664777 -707304358 +-18204481 551818106 +-865271307 -517672151 +677837100 -692662500 +522649828 -935846640 +-800069813 -840862326 +237677956 -285974819 +-828561794 499835571 +629841410 -929995887 +485027015 914598899 +501285831 750776112 +-896588600 -231646393 +-577407718 674625329 +-864508871 550695165 +-414123425 -715616025 +651353159 690527068 +-369087166 -726644376 +-94616035 344628688 +-729845955 114508015 +503463650 -452127527 +347482590 679397258 +992495312 648905706 +159820301 357481628 +316854817 -114776936 +-271458932 -145265300 +531639112 -39913273 +-132830598 358696011 +710535203 -658722410 +-246052282 233245045 +-803950456 -834443554 +618765284 104931357 +129906101 -965691226 +-551907468 -730850027 +198831711 -858414571 +797612343 624003456 +462576543 54299693 +-829784638 96044981 +494392162 -473320938 +210006375 43864670 +296079488 -515150628 +-640946069 -751017496 +673065177 -494316508 +-286452376 553054740 +-977315006 -617931900 +459889463 211656242 +521755571 814726004 +-883818145 -498522869 +-198894821 579561910 +-159757352 -882513937 +626817638 -581490331 +735823127 260255361 +-884287924 686734332 +-638495536 -602487694 +-799355944 -333876456 +836716999 94292856 +-641642812 392657159 +-479276047 -273295526 +-376853480 -362462407 +-548497403 -121005896 +609257650 682316683 +470800099 379279905 +197030148 -35889982 +-19218662 -574095018 +394669474 -578989683 +-629234104 -405330857 +832504216 947452429 +-7942299 -530964700 +81753311 -58958631 +-501281373 808746703 +859533436 -493341529 +-144669838 -633708489 +751977392 54250691 +-853462517 -457631741 +408324692 386008935 +-411443682 672040728 +-20802649 782937855 +-676849934 -659349784 +-128709803 -414111465 +402328970 -684591213 +952496853 514655982 +912374255 -697523174 +491611080 -223614029 +512011512 -176148020 +821965870 407101541 +21698858 892994740 +-101122191 -68503278 +-477396740 812544135 +230420285 993880478 +394408198 673926247 +-339514596 -736423049 +138600893 663147749 +-74495395 987879413 +175409369 357538689 +911225116 500458380 +426154984 -318678877 +160021253 -257645700 +-62299829 -53566088 +-202528356 -449279307 +539778298 481185656 +413155531 907918392 +-773305200 570644458 +338703786 -875342145 +-650543400 244558855 +15816402 463211182 +544018363 -397030984 +-705334836 -293600436 +-861728751 -862908057 +-637474218 -403911246 +-841989025 311264278 +957679832 685417916 +-535647422 -971218818 +-304842329 463765734 +417166450 -242299670 +962150223 -533546677 +-135220801 -138876446 +-587546070 -470594285 +-2746159 885987040 +-481986029 822097865 +-345565513 -609793273 +123022166 -264152512 +-255177174 -841764473 +139294133 790115850 +-731192993 -264342343 +220083916 -182340953 +246600223 -555263790 +415869565 689222163 +-501084805 -509048335 +-419054189 -730720174 +-340911684 464115551 +949039898 605895737 +781857459 -790630643 +-532000708 -574395758 +71874896 -176703974 +-432187927 81424872 +263552346 -453333000 +861081053 -275567037 +4752396 -94540832 +818432458 360189835 +-208684065 649994369 +372531308 -56979492 +50041970 -550293662 +-445328644 882998470 +38353956 480636892 +789437494 720190185 +500111711 128385808 +266488727 -760453345 +255136065 975348129 +341286571 732875342 +151139360 -657574572 +86111402 689804158 +130899104 901803181 +411894562 406072268 +-391513212 381424486 +-109348544 85756086 +-995517623 723522526 +228079251 -35853623 +-287438476 427668925 +-869961576 317153964 +-93332338 40198649 +-31014028 -151435890 +134012527 642652585 +535317176 727306790 +710847470 -922057074 +83639166 -192060026 +-592906081 235987233 +211324883 -961484798 +-89568982 140851218 +97610950 555422823 +448310688 -629760099 +448351559 140426968 +-368480820 -68093321 +280242488 611516824 +-544137311 766974942 +-345344880 -800238871 +-295291463 -578229980 +779868896 24902562 +-649505301 121341547 +90694918 133996806 +-262541055 663030480 +-277375824 6729442 +796282069 -950910009 +332803638 332333450 +-759431945 63403265 +864767253 336412318 +-499241647 425405763 +-875146422 90096886 +350304365 568878509 +436836561 -581773996 +911741155 547074379 +483271441 -752917261 +-310453969 -276960927 +-508094554 11574410 +865410020 689885405 +-946469548 -942304952 +-596747486 -887922856 +863078260 987539127 +-804691989 217598400 +-293081390 -699807826 +647371419 160633119 +-353355142 -294382148 +223990195 99309848 +885296139 -732228461 +-127212421 -920780926 +-203369666 -597864418 +-777244446 836693796 +-52430734 758239005 +-135618805 660878322 +-618448692 19216220 +-551210726 386443418 +-974536108 797430760 +732277396 -839831812 +-547461402 921061043 +990510910 904186745 +-814850416 96814122 +-662777266 -665531905 +-7745237 -721785551 +480421857 218371167 +-49051970 -768162479 +-249774100 840564214 +-310750481 -206951772 +-928033014 494040002 +-983458211 -950442078 +100580019 612240140 +640407272 -325716549 +518870894 691831756 +675089094 368690581 +990153984 -890474130 +-345591901 -456900890 +120940910 448095345 +927553331 -365406906 +820470318 536841766 +-389396116 647560508 +772831720 -154437661 +-833136806 -534900125 +-829162339 760180344 +-968650113 809232843 +-969235105 -557223088 +-275096539 565437886 +120076445 -693638723 +-302280238 52044647 +-410181096 805927369 +170052091 -19458964 +-972845310 -459989919 +2569347 956622439 +-616106472 373711710 +-170364900 98726068 +996898998 727763447 +132484214 -295483354 +-34942020 613844236 +-338520749 -125002952 +929988521 117262719 +-811052171 -9340327 +320744361 -75636542 +795175333 210252953 +-37341577 -681143849 +-560489472 -480303699 +-430123232 -102739377 +-419728696 389094068 +-177072073 555279088 +957859292 582749416 +-598635084 167899018 +-55179106 -815126386 +-315045671 934673741 +985501171 -295727277 +-162384101 -910872745 +-765698048 373145793 +-243151504 870513015 +418067272 -250153963 +348891103 235698412 +-367924288 284960632 +-955187516 -801755678 +413063205 -727233685 +-434919596 682980876 +-573863773 869017518 +-385201895 331292597 +-63242373 49320355 +-649018060 -268199557 +370998026 136432727 +268431480 -631973463 +-606192733 -418333358 +610709519 -163818067 +339182049 627212404 +384516580 183691828 +-483127922 926722470 +-933105096 -763766639 +-770835053 -271255549 +-957903527 -262256743 +-568423304 155946928 +891924948 -745819548 +-202785738 -931473966 +-415818180 671789921 +-975543147 264330371 +926761636 676222617 +-504301652 912543788 +98209400 -795564334 +-190762686 363508405 +56555298 -820993684 +-688595432 410323207 +427280888 488629063 +-745135236 142319366 +926514836 -508405094 +-190027255 702412914 +215990530 -567244509 +-798162185 430040216 +640926830 876277584 +-409496274 727332696 +877193427 -987155818 +609260666 -187331270 +-92758106 -572237216 +-543749982 531387521 +930480924 36115193 +-492204506 -191224717 +380538807 -880999584 +-483957990 -585825725 +-84054469 -5591079 +-921638220 614506507 +-732075229 912141998 +-169279517 668720339 +904009900 291900515 +680199273 -771405396 +-717775749 440325233 +-272946175 -607218101 +338529427 118779536 +-373971857 158289743 +212542671 -295820160 +187849173 449048744 +-532420634 761365941 +581532742 960487249 +960966575 -461052721 +517989816 886355028 +-312191832 -784797224 +-501710495 833305043 +-499275829 -542447365 +-876398797 -969898948 +-24756711 -741349346 +-789015853 321958572 +322882332 -97219059 +19641568 -387997015 +801831731 -774772530 +781214966 367525891 +-694598998 370731197 +462872046 705965137 +-619527844 -197565964 +570762321 -621337542 +-616252198 367624685 +506099858 -869894104 +654460143 -587564577 +-659647800 430977201 +479351247 -319834133 +-719670589 -98491718 +-234538708 -675123549 +88257657 -914627866 +183731547 651210458 +-30670295 546053222 +-348749444 -235098554 +683496433 155522410 +-558462981 602059751 +944628264 768541913 +-866521080 -473740061 +-816247550 736345299 +33279675 151895794 +-642093956 -333610977 +-997459735 -608623701 +-791183632 880909512 +-794118188 653838308 +-76890119 508510579 +-463702845 -619652720 +352702719 -273209697 +289703381 361262053 +484425797 74794217 +-168118471 188062004 +862156985 514032867 +91266638 -766871567 +563225679 853433578 +82115677 -197554786 +-879562699 756201935 +-6550120 -680936279 +973570926 -734816386 +863510863 -774860466 +117118942 -705274555 +-948053795 73488137 +561654470 -546282374 +653828025 -557941727 +114198953 300144549 +-746514082 -146823879 +-374963600 335381675 +448068355 66866059 +876823526 -247431194 +598136874 332388637 +703583706 -520321934 +-217569101 -660979662 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-017.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-017.ans new file mode 100644 index 0000000000000000000000000000000000000000..a252dbdeb9bae27f943c32c8cf6fb3708799808f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-017.ans @@ -0,0 +1,6 @@ +12.36931687685298086876 +1 +3 +6 +7 +9 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-017.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-017.in new file mode 100644 index 0000000000000000000000000000000000000000..05cac80daf8c02196893f4e253ab14aff4b52b81 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-017.in @@ -0,0 +1,11 @@ +5 +-9 14 +-18 4 +3 -2 +-6 -12 +7 11 +-2 1 +0 -1 +-9 -11 +-6 1 +-15 -9 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-018.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-018.ans new file mode 100644 index 0000000000000000000000000000000000000000..23f16ce4f853c42e0aa9ac78d4a7a2f6e7fc8245 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-018.ans @@ -0,0 +1,6 @@ +5.83095189484530074253 +1 +3 +4 +7 +10 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-018.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-018.in new file mode 100644 index 0000000000000000000000000000000000000000..b51f9ac2ce729e2f7177c751fbb38e3958e3ec15 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-018.in @@ -0,0 +1,11 @@ +5 +2 6 +16 -3 +1 -10 +-3 10 +11 1 +-4 -6 +-1 11 +13 2 +-2 -5 +-1 -11 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-019.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-019.ans new file mode 100644 index 0000000000000000000000000000000000000000..f4e8a1ec415264691aa3f1bea149778a73c4f90b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-019.ans @@ -0,0 +1,6 @@ +3.16227766016837952279 +1 +2 +3 +8 +10 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-019.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-019.in new file mode 100644 index 0000000000000000000000000000000000000000..939bcdd2dfe479cb7324169a211b6b74649cd68c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-019.in @@ -0,0 +1,11 @@ +5 +10 -10 +9 0 +7 -4 +-5 -8 +9 -7 +11 -5 +10 5 +8 1 +-4 -3 +10 -2 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-020.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-020.ans new file mode 100644 index 0000000000000000000000000000000000000000..51ed5a0951f09a457a2d61907da4905dd95c10c1 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-020.ans @@ -0,0 +1,501 @@ +39.56008088970496316961 +1 +4 +5 +6 +8 +9 +10 +11 +14 +15 +17 +19 +20 +21 +24 +25 +28 +32 +34 +35 +36 +38 +42 +44 +45 +46 +48 +49 +51 +54 +56 +58 +59 +61 +63 +66 +67 +69 +70 +72 +73 +78 +80 +81 +84 +88 +89 +91 +94 +96 +100 +101 +102 +103 +104 +106 +107 +109 +112 +113 +115 +117 +119 +122 +123 +125 +126 +128 +132 +135 +136 +137 +139 +140 +142 +143 +146 +148 +149 +150 +152 +154 +155 +157 +159 +162 +163 +164 +165 +166 +168 +170 +172 +174 +176 +178 +182 +185 +186 +187 +191 +194 +196 +197 +199 +200 +203 +204 +206 +207 +210 +211 +212 +213 +217 +220 +222 +224 +225 +226 +227 +229 +230 +231 +233 +236 +237 +239 +242 +243 +244 +245 +250 +251 +254 +256 +258 +259 +262 +263 +266 +268 +273 +276 +279 +283 +285 +289 +293 +295 +296 +299 +300 +304 +305 +307 +309 +310 +311 +313 +314 +315 +316 +319 +321 +322 +323 +324 +325 +326 +329 +330 +332 +334 +338 +339 +342 +343 +346 +348 +352 +354 +355 +358 +361 +364 +367 +368 +370 +372 +373 +375 +376 +377 +379 +380 +383 +386 +387 +389 +392 +393 +394 +395 +396 +397 +399 +401 +402 +406 +408 +409 +411 +414 +416 +417 +418 +422 +424 +426 +427 +428 +430 +434 +436 +438 +440 +441 +443 +446 +447 +449 +452 +454 +455 +457 +462 +464 +467 +468 +470 +472 +473 +476 +479 +481 +483 +485 +487 +491 +496 +497 +499 +500 +502 +503 +506 +507 +509 +510 +512 +513 +516 +517 +520 +521 +523 +525 +526 +528 +530 +533 +536 +538 +539 +541 +542 +545 +547 +548 +550 +552 +554 +555 +558 +561 +563 +566 +567 +568 +569 +573 +577 +578 +580 +582 +584 +587 +589 +591 +592 +593 +595 +597 +598 +600 +602 +603 +604 +605 +606 +608 +609 +614 +615 +617 +618 +619 +622 +623 +625 +626 +628 +630 +631 +634 +635 +637 +642 +645 +649 +650 +654 +656 +658 +659 +660 +661 +664 +665 +667 +669 +670 +673 +675 +678 +679 +680 +682 +683 +684 +686 +688 +691 +692 +694 +698 +700 +701 +704 +706 +707 +710 +713 +716 +718 +723 +724 +726 +728 +730 +732 +736 +738 +739 +742 +744 +746 +747 +749 +751 +754 +755 +758 +759 +760 +761 +763 +766 +767 +769 +771 +774 +776 +777 +779 +780 +781 +782 +784 +785 +788 +789 +792 +793 +794 +795 +798 +800 +803 +807 +812 +813 +816 +817 +820 +822 +823 +826 +829 +832 +834 +836 +837 +838 +840 +842 +843 +844 +848 +849 +851 +852 +853 +856 +857 +861 +864 +867 +868 +869 +871 +873 +876 +878 +879 +883 +887 +888 +890 +892 +896 +897 +898 +899 +902 +903 +906 +908 +910 +911 +914 +917 +920 +921 +922 +923 +925 +928 +930 +932 +934 +935 +937 +940 +942 +943 +946 +947 +948 +952 +953 +956 +957 +958 +960 +964 +966 +970 +971 +974 +979 +981 +986 +988 +991 +992 +993 +996 +998 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-020.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-020.in new file mode 100644 index 0000000000000000000000000000000000000000..e25dba753672222e1a862cee50ff209efb25477e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-020.in @@ -0,0 +1,1001 @@ +500 +44 -186 +-85 -570 +305 586 +176 202 +134 118 +5 -266 +216 535 +87 151 +244 10 +115 -374 +122 -39 +-7 -423 +179 597 +50 213 +443 -61 +314 -445 +341 -5 +212 -389 +491 213 +362 -171 +-72 -183 +-201 -567 +495 598 +366 214 +110 85 +-19 -299 +703 317 +574 -67 +-235 704 +-364 320 +327 376 +198 -8 +-110 625 +-239 241 +273 195 +144 -189 +613 149 +484 -235 +-174 455 +-303 71 +614 497 +485 113 +644 247 +515 -137 +535 183 +406 -201 +171 269 +42 -115 +-120 5 +-249 -379 +-37 -72 +-166 -456 +90 528 +-39 144 +124 511 +-5 127 +-109 589 +-238 205 +353 -57 +224 -441 +98 -170 +-31 -554 +555 -232 +426 -616 +57 576 +-72 192 +-87 323 +-216 -61 +252 133 +123 -251 +629 140 +500 -244 +-4 46 +-133 -338 +-189 422 +-318 38 +660 703 +531 319 +99 483 +-30 99 +-226 38 +-355 -346 +302 338 +173 -46 +231 581 +102 197 +124 210 +-5 -174 +-61 43 +-190 -341 +396 -70 +267 -454 +0 515 +-129 131 +24 722 +-105 338 +-272 535 +-401 151 +600 563 +471 179 +43 300 +-86 -84 +-48 398 +-177 14 +26 522 +-103 138 +-26 44 +-155 -340 +333 -5 +204 -389 +645 200 +516 -184 +-248 382 +-377 -2 +-28 56 +-157 -328 +501 -73 +372 -457 +536 -83 +407 -467 +447 570 +318 186 +524 -153 +395 -537 +460 394 +331 10 +131 661 +2 277 +264 600 +135 216 +46 658 +-83 274 +287 -204 +158 -588 +297 81 +168 -303 +638 -183 +509 -567 +203 140 +74 -244 +565 473 +436 89 +619 43 +490 -341 +539 595 +410 211 +431 559 +302 175 +228 156 +99 -228 +639 652 +510 268 +-92 559 +-221 175 +593 -123 +464 -507 +395 -197 +266 -581 +350 -107 +221 -491 +149 561 +20 177 +172 395 +43 11 +189 435 +60 51 +633 137 +504 -247 +234 522 +105 138 +259 251 +130 -133 +610 268 +481 -116 +524 666 +395 282 +669 380 +540 -4 +268 -211 +139 -595 +563 451 +434 67 +443 756 +314 372 +569 344 +440 -40 +-1 90 +-130 -294 +-226 503 +-355 119 +15 -99 +-114 -483 +678 535 +549 151 +-85 578 +-214 194 +-29 -113 +-158 -497 +452 370 +323 -14 +267 -170 +138 -554 +-58 363 +-187 -21 +59 688 +-70 304 +-94 -79 +-223 -463 +-20 478 +-149 94 +163 169 +34 -215 +-251 404 +-380 20 +-278 -78 +-407 -462 +143 74 +14 -310 +30 686 +-99 302 +107 408 +-22 24 +163 254 +34 -130 +-56 376 +-185 -8 +-205 361 +-334 -23 +25 281 +-104 -103 +47 -162 +-82 -546 +366 -44 +237 -428 +574 437 +445 53 +431 -182 +302 -566 +-73 -231 +-202 -615 +671 538 +542 154 +15 319 +-114 -65 +556 -140 +427 -524 +631 95 +502 -289 +565 762 +436 378 +-87 -183 +-216 -567 +670 435 +541 51 +429 430 +300 46 +553 464 +424 80 +181 -58 +52 -442 +691 728 +562 344 +116 12 +-13 -372 +367 435 +238 51 +630 735 +501 351 +340 660 +211 276 +319 650 +190 266 +-13 -218 +-142 -602 +87 760 +-42 376 +350 738 +221 354 +604 -180 +475 -564 +-267 758 +-396 374 +-60 67 +-189 -317 +-35 45 +-164 -339 +322 712 +193 328 +-247 -29 +-376 -413 +-191 519 +-320 135 +-225 366 +-354 -18 +140 374 +11 -10 +281 679 +152 295 +379 330 +250 -54 +-291 425 +-420 41 +568 757 +439 373 +68 101 +-61 -283 +-50 -232 +-179 -616 +50 277 +-79 -107 +47 78 +-82 -306 +225 183 +96 -201 +183 461 +54 77 +252 -224 +123 -608 +354 -15 +225 -399 +324 165 +195 -219 +226 119 +97 -265 +252 145 +123 -239 +690 -83 +561 -467 +43 277 +-86 -107 +631 533 +502 149 +50 648 +-79 264 +708 -146 +579 -530 +-73 762 +-202 378 +446 -155 +317 -539 +-91 716 +-220 332 +-219 57 +-348 -327 +343 583 +214 199 +-187 752 +-316 368 +699 7 +570 -377 +558 526 +429 142 +239 245 +110 -139 +-269 330 +-398 -54 +583 733 +454 349 +291 415 +162 31 +-24 81 +-153 -303 +634 516 +505 132 +702 -145 +573 -529 +251 155 +122 -229 +674 220 +545 -164 +359 554 +230 170 +-64 -85 +-193 -469 +-77 405 +-206 21 +-214 317 +-343 -67 +500 247 +371 -137 +-190 -87 +-319 -471 +202 -46 +73 -430 +636 651 +507 267 +522 -120 +393 -504 +463 -9 +334 -393 +455 446 +326 62 +-137 376 +-266 -8 +493 297 +364 -87 +-235 -22 +-364 -406 +366 -57 +237 -441 +-11 255 +-140 -129 +-153 446 +-282 62 +28 552 +-101 168 +615 178 +486 -206 +578 -205 +449 -589 +102 -98 +-27 -482 +415 450 +286 66 +-64 449 +-193 65 +275 143 +146 -241 +288 683 +159 299 +493 692 +364 308 +470 465 +341 81 +-181 708 +-310 324 +582 240 +453 -144 +-103 474 +-232 90 +371 724 +242 340 +645 293 +516 -91 +86 709 +-43 325 +139 548 +10 164 +345 391 +216 7 +-145 104 +-274 -280 +6 -144 +-123 -528 +705 215 +576 -169 +-88 -15 +-217 -399 +596 -37 +467 -421 +661 330 +532 -54 +33 443 +-96 59 +-48 164 +-177 -220 +-202 135 +-331 -249 +310 -198 +181 -582 +521 450 +392 66 +498 656 +369 272 +343 624 +214 240 +95 361 +-34 -23 +8 740 +-121 356 +419 535 +290 151 +424 -14 +295 -398 +520 615 +391 231 +-194 -146 +-323 -530 +563 143 +434 -241 +118 11 +-11 -373 +405 -118 +276 -502 +-38 107 +-167 -277 +-125 -24 +-254 -408 +-282 -71 +-411 -455 +201 -188 +72 -572 +-267 -99 +-396 -483 +630 226 +501 -158 +-256 219 +-385 -165 +-30 376 +-159 -8 +-119 621 +-248 237 +308 5 +179 -379 +145 570 +16 186 +-280 2 +-409 -382 +-58 402 +-187 18 +663 708 +534 324 +-16 -97 +-145 -481 +-113 484 +-242 100 +597 4 +468 -380 +-93 664 +-222 280 +567 -150 +438 -534 +487 -59 +358 -443 +10 334 +-119 -50 +345 355 +216 -29 +93 641 +-36 257 +-261 756 +-390 372 +354 39 +225 -345 +622 660 +493 276 +-22 554 +-151 170 +-135 -16 +-264 -400 +-65 376 +-194 -8 +404 660 +275 276 +-103 124 +-232 -260 +505 332 +376 -52 +601 741 +472 357 +162 500 +33 116 +648 311 +519 -73 +45 38 +-84 -346 +693 609 +564 225 +256 -100 +127 -484 +-179 141 +-308 -243 +604 -218 +475 -602 +289 460 +160 76 +414 337 +285 -47 +-199 5 +-328 -379 +-267 497 +-396 113 +135 -189 +6 -573 +-283 747 +-412 363 +278 99 +149 -285 +390 573 +261 189 +153 744 +24 360 +655 591 +526 207 +629 -96 +500 -480 +-209 113 +-338 -271 +74 -156 +-55 -540 +548 282 +419 -102 +175 -24 +46 -408 +-240 5 +-369 -379 +59 358 +-70 -26 +84 484 +-45 100 +-10 535 +-139 151 +279 117 +150 -267 +518 268 +389 -116 +253 296 +124 -88 +64 -5 +-65 -389 +-181 505 +-310 121 +246 536 +117 152 +-292 353 +-421 -31 +484 197 +355 -187 +-139 236 +-268 -148 +329 393 +200 9 +222 -44 +93 -428 +272 48 +143 -336 +381 458 +252 74 +-27 438 +-156 54 +-130 -129 +-259 -513 +707 723 +578 339 +371 21 +242 -363 +117 -79 +-12 -463 +-223 -161 +-352 -545 +-69 703 +-198 319 +282 637 +153 253 +123 -27 +-6 -411 +255 666 +126 282 +490 290 +361 -94 +-259 544 +-388 160 +136 463 +7 79 +178 680 +49 296 +-7 419 +-136 35 +277 185 +148 -199 +-177 224 +-306 -160 +236 743 +107 359 +-47 325 +-176 -59 +128 -236 +-1 -620 +27 358 +-102 -26 +-133 -187 +-262 -571 +77 36 +-52 -348 +372 -138 +243 -522 +-48 736 +-177 352 +501 134 +372 -250 +511 705 +382 321 +268 80 +139 -304 +707 191 +578 -193 +9 625 +-120 241 +655 -40 +526 -424 +60 163 +-69 -221 +-79 714 +-208 330 +-252 -111 +-381 -495 +-115 575 +-244 191 +29 473 +-100 89 +228 -155 +99 -539 +71 638 +-58 254 +-136 660 +-265 276 +-30 39 +-159 -345 +684 605 +555 221 +287 715 +158 331 +320 -86 +191 -470 +6 572 +-123 188 +-129 639 +-258 255 +666 91 +537 -293 +288 655 +159 271 +183 411 +54 27 +663 352 +534 -32 +-79 616 +-208 232 +398 442 +269 58 +-121 578 +-250 194 +-174 -183 +-303 -567 +638 404 +509 20 +159 504 +30 120 +627 -220 +498 -604 +266 311 +137 -73 +223 710 +94 326 +1 548 +-128 164 +-89 252 +-218 -132 +-24 293 +-153 -91 +-183 -10 +-312 -394 +96 573 +-33 189 +-220 54 +-349 -330 +263 522 +134 138 +-143 404 +-272 20 +457 -95 +328 -479 +14 62 +-115 -322 +344 503 +215 119 +192 -70 +63 -454 +165 -165 +36 -549 +621 16 +492 -368 +249 402 +120 18 +604 741 +475 357 +576 15 +447 -369 +12 249 +-117 -135 +113 134 +-16 -250 +631 395 +502 11 +181 -98 +52 -482 +403 467 +274 83 +506 -67 +377 -451 +108 455 +-21 71 +290 149 +161 -235 +-282 -31 +-411 -415 +73 487 +-56 103 +-71 531 +-200 147 +443 624 +314 240 +-44 80 +-173 -304 +-269 661 +-398 277 +305 -106 +176 -490 +-227 -163 +-356 -547 +512 626 +383 242 +-57 114 +-186 -270 +170 270 +41 -114 +376 -147 +247 -531 +689 762 +560 378 +61 443 +-68 59 +129 -55 +0 -439 +349 408 +220 24 +245 623 +116 239 +466 -158 +337 -542 +655 437 +526 53 +682 133 +553 -251 +99 722 +-30 338 +299 83 +170 -301 +611 645 +482 261 +451 519 +322 135 +346 203 +217 -181 +-173 -76 +-302 -460 +383 425 +254 41 +-192 104 +-321 -280 +399 379 +270 -5 +-56 225 +-185 -159 +574 736 +445 352 +577 39 +448 -345 +-178 664 +-307 280 +5 -138 +-124 -522 +522 697 +393 313 +668 -112 +539 -496 +261 132 +132 -252 +642 -213 +513 -597 +131 74 +2 -310 +526 -204 +397 -588 +546 677 +417 293 +668 662 +539 278 +334 -29 +205 -413 +423 759 +294 375 +84 -184 +-45 -568 +-273 -132 +-402 -516 +492 317 +363 -67 +507 439 +378 55 +126 706 +-3 322 +-290 -75 +-419 -459 +295 479 +166 95 +212 427 +83 43 +-37 -103 +-166 -487 +84 580 +-45 196 +484 69 +355 -315 +648 254 +519 -130 +622 223 +493 -161 +353 507 +224 123 +379 -58 +250 -442 +-131 588 +-260 204 +-250 752 +-379 368 +165 -139 +36 -523 +66 438 +-63 54 +485 151 +356 -233 +-24 -199 +-153 -583 +496 16 +367 -368 +116 256 +-13 -128 +642 368 +513 -16 +571 554 +442 170 +635 653 +506 269 +564 -16 +435 -400 +564 -72 +435 -456 +653 556 +524 172 +313 264 +184 -120 +358 90 +229 -294 +247 405 +118 21 +506 175 +377 -209 +311 -149 +182 -533 +560 762 +431 378 +399 -64 +270 -448 +19 676 +-110 292 +-111 368 +-240 -16 +-53 755 +-182 371 +275 -232 +146 -616 +218 324 +89 -60 +690 269 +561 -115 +-268 719 +-397 335 +289 343 +160 -41 +-75 92 +-204 -292 +-39 577 +-168 193 +-195 421 +-324 37 +-158 -68 +-287 -452 +396 200 +267 -184 +34 81 +-95 -303 +698 -153 +569 -537 +-126 684 +-255 300 +172 560 +43 176 +-179 277 +-308 -107 +242 73 +113 -311 +-260 222 +-389 -162 +124 598 +-5 214 +595 423 +466 39 +-252 518 +-381 134 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-021.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-021.ans new file mode 100644 index 0000000000000000000000000000000000000000..2d0f673647993a3774efa13dd7ffb784fbfa192e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-021.ans @@ -0,0 +1,501 @@ +39.05124837953326988327 +2 +4 +5 +7 +8 +10 +11 +17 +19 +20 +21 +23 +24 +25 +26 +28 +29 +31 +34 +35 +38 +40 +41 +46 +47 +53 +54 +55 +56 +58 +59 +61 +62 +64 +65 +67 +68 +71 +74 +76 +77 +80 +82 +83 +85 +86 +88 +91 +92 +94 +97 +98 +100 +101 +103 +106 +107 +109 +110 +112 +113 +115 +116 +118 +121 +122 +124 +127 +128 +130 +131 +133 +134 +136 +139 +140 +142 +143 +146 +148 +149 +152 +157 +158 +160 +163 +164 +167 +169 +170 +172 +173 +176 +179 +181 +182 +184 +185 +188 +190 +191 +193 +196 +197 +200 +202 +203 +205 +206 +211 +214 +215 +217 +218 +220 +221 +223 +224 +226 +227 +229 +230 +235 +236 +238 +242 +245 +248 +250 +251 +253 +256 +259 +260 +262 +263 +265 +266 +269 +272 +274 +275 +277 +278 +280 +281 +283 +284 +290 +293 +295 +298 +299 +301 +302 +304 +305 +307 +308 +310 +311 +313 +314 +316 +317 +319 +323 +325 +326 +328 +329 +331 +332 +334 +335 +338 +340 +341 +343 +350 +352 +353 +355 +356 +359 +361 +362 +364 +365 +367 +368 +373 +374 +379 +380 +382 +383 +386 +389 +391 +394 +395 +398 +401 +404 +406 +410 +412 +413 +415 +418 +419 +422 +424 +425 +427 +431 +434 +435 +437 +439 +440 +442 +443 +445 +446 +448 +449 +452 +454 +455 +457 +460 +461 +466 +467 +470 +472 +473 +475 +476 +477 +479 +482 +484 +487 +488 +490 +491 +493 +497 +499 +500 +505 +506 +511 +512 +514 +515 +518 +520 +521 +523 +524 +527 +529 +530 +533 +538 +539 +541 +542 +545 +548 +550 +551 +553 +556 +557 +559 +560 +563 +566 +568 +569 +574 +575 +577 +578 +581 +583 +584 +586 +587 +590 +592 +593 +595 +596 +598 +599 +601 +605 +606 +607 +608 +610 +611 +613 +614 +617 +622 +623 +626 +631 +632 +634 +635 +638 +640 +641 +646 +647 +649 +650 +653 +656 +658 +659 +661 +662 +664 +665 +668 +670 +673 +674 +677 +679 +680 +682 +685 +686 +688 +691 +692 +694 +695 +700 +701 +703 +704 +706 +707 +710 +712 +716 +718 +719 +721 +724 +725 +727 +728 +730 +731 +733 +734 +739 +740 +742 +743 +745 +746 +748 +749 +751 +752 +754 +755 +757 +758 +761 +764 +766 +767 +770 +772 +773 +775 +779 +781 +785 +787 +788 +790 +794 +796 +797 +799 +800 +803 +806 +811 +812 +815 +818 +821 +823 +824 +827 +832 +833 +835 +836 +838 +839 +841 +842 +844 +845 +848 +851 +854 +857 +859 +860 +862 +865 +866 +869 +871 +872 +874 +875 +877 +878 +881 +883 +884 +887 +889 +890 +892 +893 +895 +896 +899 +904 +905 +907 +908 +910 +911 +913 +914 +916 +917 +919 +920 +926 +928 +929 +931 +932 +934 +935 +937 +940 +944 +946 +947 +949 +950 +952 +953 +955 +959 +961 +962 +964 +965 +967 +968 +971 +973 +974 +976 +977 +979 +983 +985 +986 +988 +991 +992 +995 +997 +998 +1000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-021.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-021.in new file mode 100644 index 0000000000000000000000000000000000000000..651b00e8738f6de38c915f9df619db8e46778259 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-021.in @@ -0,0 +1,1001 @@ +500 +-619 -826 +-423 -818 +-566 327 +-361 -480 +-165 -472 +-308 673 +-167 -684 +29 -676 +-114 469 +-161 -701 +35 -693 +-108 452 +-699 -572 +-503 -564 +-646 581 +-659 -784 +-463 -776 +-606 369 +-178 -894 +18 -886 +-125 259 +-438 -541 +-242 -533 +-385 612 +-446 -820 +-250 -812 +-393 333 +-274 -774 +-78 -766 +-221 379 +-86 -919 +110 -911 +-33 234 +-384 -750 +-188 -742 +-331 403 +-491 -518 +-295 -510 +-438 635 +-106 -326 +90 -318 +-53 827 +-719 -629 +-523 -621 +-666 524 +-254 -537 +-58 -529 +-201 616 +-633 -587 +-437 -579 +-580 566 +-433 -535 +-237 -527 +-380 618 +-360 -637 +-164 -629 +-307 516 +-254 -728 +-58 -720 +-201 425 +-322 -897 +-126 -889 +-269 256 +-496 -389 +-300 -381 +-443 764 +-526 -488 +-330 -480 +-473 665 +-568 -436 +-372 -428 +-515 717 +-700 -481 +-504 -473 +-647 672 +-512 -810 +-316 -802 +-459 343 +-486 -703 +-290 -695 +-433 450 +-275 -742 +-79 -734 +-222 411 +-204 -451 +-8 -443 +-151 702 +-126 -830 +70 -822 +-73 323 +-216 -478 +-20 -470 +-163 675 +-558 -298 +-362 -290 +-505 855 +-207 -494 +-11 -486 +-154 659 +-374 -837 +-178 -829 +-321 316 +-535 -273 +-339 -265 +-482 880 +-608 -918 +-412 -910 +-555 235 +-394 -651 +-198 -643 +-341 502 +-250 -683 +-54 -675 +-197 470 +-306 -835 +-110 -827 +-253 318 +-121 -843 +75 -835 +-68 310 +-141 -607 +55 -599 +-88 546 +-121 -511 +75 -503 +-68 642 +-264 -626 +-68 -618 +-211 527 +-344 -543 +-148 -535 +-291 610 +-81 -786 +115 -778 +-28 367 +-453 -280 +-257 -272 +-400 873 +-382 -698 +-186 -690 +-329 455 +-535 -895 +-339 -887 +-482 258 +-622 -316 +-426 -308 +-569 837 +-155 -452 +41 -444 +-102 701 +-450 -628 +-254 -620 +-397 525 +-709 -597 +-513 -589 +-656 556 +-384 -828 +-188 -820 +-331 325 +-462 -316 +-266 -308 +-409 837 +-429 -856 +-233 -848 +-376 297 +-552 -649 +-356 -641 +-499 504 +-456 -405 +-260 -397 +-403 748 +-288 -461 +-92 -453 +-235 692 +-719 -843 +-523 -835 +-666 310 +-611 -365 +-415 -357 +-558 788 +-398 -797 +-202 -789 +-345 356 +-567 -888 +-371 -880 +-514 265 +-250 -344 +-54 -336 +-197 809 +-300 -602 +-104 -594 +-247 551 +-464 -303 +-268 -295 +-411 850 +-371 -552 +-175 -544 +-318 601 +-579 -751 +-383 -743 +-526 402 +-489 -404 +-293 -396 +-436 749 +-432 -776 +-236 -768 +-379 377 +-585 -261 +-389 -253 +-532 892 +-467 -260 +-271 -252 +-414 893 +-378 -431 +-182 -423 +-325 722 +-518 -465 +-322 -457 +-465 688 +-412 -789 +-216 -781 +-359 364 +-297 -610 +-101 -602 +-244 543 +-164 -755 +32 -747 +-111 398 +-198 -800 +-2 -792 +-145 353 +-663 -535 +-467 -527 +-610 618 +-501 -442 +-305 -434 +-448 711 +-82 -461 +114 -453 +-29 692 +-537 -741 +-341 -733 +-484 412 +-510 -551 +-314 -543 +-457 602 +-244 -299 +-48 -291 +-191 854 +-187 -533 +9 -525 +-134 620 +-235 -411 +-39 -403 +-182 742 +-176 -269 +20 -261 +-123 884 +-340 -411 +-144 -403 +-287 742 +-179 -621 +17 -613 +-126 532 +-272 -866 +-76 -858 +-219 287 +-508 -622 +-312 -614 +-455 531 +-669 -798 +-473 -790 +-616 355 +-199 -589 +-3 -581 +-146 564 +-85 -756 +111 -748 +-32 397 +-443 -455 +-247 -447 +-390 698 +-479 -769 +-283 -761 +-426 384 +-692 -565 +-496 -557 +-639 588 +-639 -448 +-443 -440 +-586 705 +-672 -432 +-476 -424 +-619 721 +-167 -299 +29 -291 +-114 854 +-483 -773 +-287 -765 +-430 380 +-414 -908 +-218 -900 +-361 245 +-346 -592 +-150 -584 +-293 561 +-179 -805 +17 -797 +-126 348 +-325 -918 +-129 -910 +-272 235 +-311 -478 +-115 -470 +-258 675 +-333 -585 +-137 -577 +-280 568 +-121 -828 +75 -820 +-68 325 +-330 -281 +-134 -273 +-277 872 +-228 -797 +-32 -789 +-175 356 +-299 -541 +-103 -533 +-246 612 +-636 -906 +-440 -898 +-583 247 +-105 -369 +91 -361 +-52 784 +-679 -479 +-483 -471 +-626 674 +-476 -421 +-280 -413 +-423 732 +-240 -415 +-44 -407 +-187 738 +-637 -699 +-441 -691 +-584 454 +-680 -370 +-484 -362 +-627 783 +-438 -841 +-242 -833 +-385 312 +-83 -539 +113 -531 +-30 614 +-573 -633 +-377 -625 +-520 520 +-91 -307 +105 -299 +-38 846 +-217 -674 +-21 -666 +-164 479 +-235 -888 +-39 -880 +-182 265 +-677 -561 +-481 -553 +-624 592 +-347 -531 +-151 -523 +-294 622 +-708 -583 +-512 -575 +-655 570 +-140 -695 +56 -687 +-87 458 +-282 -587 +-86 -579 +-229 566 +-569 -747 +-373 -739 +-516 406 +-604 -671 +-408 -663 +-551 482 +-232 -404 +-36 -396 +-179 749 +-291 -712 +-95 -704 +-238 441 +-562 -816 +-366 -808 +-509 337 +-529 -549 +-333 -541 +-476 604 +-543 -732 +-347 -724 +-490 421 +-442 -301 +-246 -293 +-389 852 +-505 -686 +-309 -678 +-452 467 +-352 -431 +-156 -423 +-299 722 +-133 -826 +63 -818 +-80 327 +-246 -546 +-50 -538 +-193 607 +-492 -559 +-296 -551 +-439 594 +-172 -455 +24 -447 +-119 698 +-515 -313 +-319 -305 +-462 840 +-438 -629 +-242 -621 +-385 524 +-444 -537 +-248 -529 +-391 616 +-670 -263 +-474 -255 +-617 890 +-242 -707 +-46 -699 +-189 446 +-272 -664 +-76 -656 +-219 489 +-264 -674 +-68 -666 +-211 479 +-90 -320 +106 -312 +-37 833 +-571 -578 +-375 -570 +-518 575 +-223 -555 +-27 -547 +-170 598 +-143 -822 +53 -814 +-90 331 +-440 -883 +-244 -875 +-387 270 +-659 -538 +-463 -530 +-606 615 +-212 -611 +-16 -603 +-159 542 +-719 -434 +-523 -426 +-666 719 +-122 -783 +74 -775 +-69 370 +-192 -909 +4 -901 +-139 244 +-570 -748 +-374 -740 +-517 405 +-656 -394 +-460 -386 +-603 759 +-485 -310 +-289 -302 +-432 843 +-95 -607 +101 -599 +-42 546 +-506 -380 +-310 -372 +-453 773 +-142 -291 +54 -283 +-89 862 +-572 -350 +-376 -342 +-519 803 +-118 -617 +78 -609 +-65 536 +-688 -690 +-492 -682 +-635 463 +-168 -576 +28 -568 +-115 577 +-664 -663 +-468 -655 +-611 490 +-533 -393 +-337 -385 +-480 760 +-145 -575 +51 -567 +-92 578 +-717 -256 +-521 -248 +-664 897 +-519 -479 +-323 -471 +-466 674 +-134 -594 +62 -586 +-81 559 +-575 -751 +-379 -743 +-522 402 +-362 -640 +-166 -632 +-309 513 +-573 -756 +-377 -748 +-520 397 +-703 -588 +-507 -580 +-650 565 +-474 -471 +-278 -463 +-421 682 +-353 -414 +-157 -406 +-300 739 +-542 -644 +-346 -636 +-489 509 +-655 -343 +-459 -335 +-602 810 +-423 -827 +-227 -819 +-370 326 +-139 -516 +57 -508 +-86 637 +-373 -846 +-177 -838 +-320 307 +-160 -433 +36 -425 +-107 720 +-557 -765 +-361 -757 +-504 388 +-592 -650 +-396 -642 +-539 503 +-135 -410 +61 -402 +-82 743 +-724 -553 +-528 -545 +-671 600 +-143 -764 +53 -756 +-90 389 +-215 -803 +-19 -795 +-162 350 +-271 -324 +-75 -316 +-218 829 +-500 -846 +-304 -838 +-447 307 +-323 -862 +-127 -854 +-270 291 +-302 -291 +-106 -283 +-249 862 +-612 -886 +-416 -878 +-559 267 +-270 -583 +-74 -575 +-217 570 +-89 -769 +107 -761 +-36 384 +-435 -314 +-239 -306 +-382 839 +-421 -531 +-225 -523 +-368 622 +-408 -854 +-212 -846 +-355 299 +-321 -587 +-125 -579 +-268 566 +-543 -896 +-347 -888 +-490 257 +-568 -810 +-372 -802 +-515 343 +-701 -663 +-505 -655 +-648 490 +-397 -830 +-201 -822 +-344 323 +-484 -602 +-288 -594 +-431 551 +-641 -550 +-445 -542 +-588 603 +-322 -484 +-126 -476 +-269 669 +-172 -424 +24 -416 +-119 729 +-684 -772 +-488 -764 +-631 381 +-178 -577 +18 -569 +-125 576 +-701 -720 +-505 -712 +-648 433 +-514 -915 +-318 -907 +-461 238 +-69 -581 +127 -573 +-16 572 +-589 -649 +-393 -641 +-536 504 +-660 -802 +-464 -794 +-607 351 +-374 -459 +-178 -451 +-321 694 +-237 -766 +-41 -758 +-184 387 +-355 -559 +-159 -551 +-302 594 +-366 -263 +-170 -255 +-313 890 +-90 -833 +106 -825 +-37 320 +-151 -622 +45 -614 +-98 531 +-236 -326 +-40 -318 +-183 827 +-342 -458 +-146 -450 +-289 695 +-113 -821 +83 -813 +-60 332 +-295 -595 +-99 -587 +-242 558 +-218 -405 +-22 -397 +-165 748 +-232 -865 +-36 -857 +-179 288 +-391 -425 +-195 -417 +-338 728 +-641 -642 +-445 -634 +-588 511 +-118 -385 +78 -377 +-65 768 +-324 -891 +-128 -883 +-271 262 +-154 -578 +42 -570 +-101 575 +-492 -709 +-296 -701 +-439 444 +-76 -496 +120 -488 +-23 657 +-437 -695 +-241 -687 +-384 458 +-358 -392 +-162 -384 +-305 761 +-103 -882 +93 -874 +-50 271 +-68 -330 +128 -322 +-15 823 +-253 -727 +-57 -719 +-200 426 +-303 -482 +-107 -474 +-250 671 +-371 -674 +-175 -666 +-318 479 +-619 -522 +-423 -514 +-566 631 +-392 -858 +-196 -850 +-339 295 +-527 -364 +-331 -356 +-474 789 +-369 -881 +-173 -873 +-316 272 +-190 -696 +6 -688 +-137 457 +-455 -897 +-259 -889 +-402 256 +-261 -755 +-65 -747 +-208 398 +-298 -425 +-102 -417 +-245 728 +-388 -265 +-192 -257 +-335 888 +-458 -679 +-262 -671 +-405 474 +-435 -800 +-239 -792 +-382 353 +-528 -728 +-332 -720 +-475 425 +-444 -864 +-248 -856 +-391 289 +-74 -843 +122 -835 +-21 310 +-704 -874 +-508 -866 +-651 279 +-461 -257 +-265 -249 +-408 896 +-661 -398 +-465 -390 +-608 755 +-192 -524 +4 -516 +-139 629 +-407 -332 +-211 -324 +-354 821 +-247 -276 +-51 -268 +-194 877 +-231 -492 +-35 -484 +-178 661 +-247 -857 +-51 -849 +-194 296 +-546 -679 +-350 -671 +-493 474 +-581 -832 +-385 -824 +-528 321 +-677 -723 +-481 -715 +-624 430 +-502 -879 +-306 -871 +-449 274 +-717 -306 +-521 -298 +-664 847 +-577 -838 +-381 -830 +-524 315 +-582 -674 +-386 -666 +-529 479 +-597 -899 +-401 -891 +-544 254 +-580 -666 +-384 -658 +-527 487 +-708 -632 +-512 -624 +-655 521 +-523 -420 +-327 -412 +-470 733 +-83 -725 +113 -717 +-30 428 +-223 -641 +-27 -633 +-170 512 +-99 -351 +97 -343 +-46 802 +-115 -720 +81 -712 +-62 433 +-655 -414 +-459 -406 +-602 739 +-510 -689 +-314 -681 +-457 464 +-681 -448 +-485 -440 +-628 705 +-445 -734 +-249 -726 +-392 419 +-440 -846 +-244 -838 +-387 307 +-194 -381 +2 -373 +-141 772 +-375 -624 +-179 -616 +-322 529 +-681 -801 +-485 -793 +-628 352 +-114 -620 +82 -612 +-61 533 +-257 -476 +-61 -468 +-204 677 +-340 -343 +-144 -335 +-287 810 +-557 -734 +-361 -726 +-504 419 +-119 -704 +77 -696 +-66 449 +-575 -786 +-379 -778 +-522 367 +-244 -576 +-48 -568 +-191 577 +-94 -540 +102 -532 +-41 613 +-298 -519 +-102 -511 +-245 634 +-438 -624 +-242 -616 +-385 529 +-721 -693 +-525 -685 +-668 460 +-395 -766 +-199 -758 +-342 387 +-407 -387 +-211 -379 +-354 766 +-60 -771 +136 -763 +-7 382 +-130 -630 +66 -622 +-77 523 +-310 -889 +-114 -881 +-257 264 +-434 -392 +-238 -384 +-381 761 +-636 -622 +-440 -614 +-583 531 +-661 -275 +-465 -267 +-608 878 +-179 -610 +17 -602 +-126 543 +-404 -793 +-208 -785 +-351 360 +-352 -374 +-156 -366 +-299 779 +-120 -881 +76 -873 +-67 272 +-91 -824 +105 -816 +-38 329 +-640 -310 +-444 -302 +-587 843 +-313 -688 +-117 -680 +-260 465 +-341 -529 +-145 -521 +-288 624 +-509 -821 +-313 -813 +-456 332 +-173 -271 +23 -263 +-120 882 +-574 -457 +-378 -449 +-521 696 +-292 -906 +-96 -898 +-239 247 +-371 -406 +-175 -398 +-318 747 +-314 -762 +-118 -754 +-261 391 +-347 -279 +-151 -271 +-294 874 +-425 -895 +-229 -887 +-372 258 +-90 -565 +106 -557 +-37 588 +-460 -342 +-264 -334 +-407 811 +-697 -280 +-501 -272 +-644 873 +-369 -480 +-173 -472 +-316 673 +-432 -256 +-236 -248 +-379 897 +-144 -333 +52 -325 +-91 820 +-483 -519 +-287 -511 +-430 634 +-88 -768 +108 -760 +-35 385 +-486 -391 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-022.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-022.ans new file mode 100644 index 0000000000000000000000000000000000000000..50b5dcb8d977a016b0041cff1d607eeaffbcc90b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-022.ans @@ -0,0 +1,501 @@ +137.41178988718544928815 +4 +5 +6 +7 +10 +14 +15 +16 +17 +20 +24 +25 +26 +27 +30 +34 +35 +36 +37 +40 +44 +45 +46 +47 +50 +54 +55 +56 +57 +60 +64 +65 +66 +67 +70 +74 +75 +76 +77 +80 +84 +85 +86 +87 +90 +94 +95 +96 +97 +100 +104 +105 +106 +107 +110 +114 +115 +116 +117 +120 +124 +125 +126 +127 +130 +134 +135 +136 +137 +140 +144 +145 +146 +147 +150 +154 +155 +156 +157 +160 +164 +165 +166 +167 +170 +174 +175 +176 +177 +180 +184 +185 +186 +187 +190 +194 +195 +196 +197 +200 +204 +205 +206 +207 +210 +214 +215 +216 +217 +220 +224 +225 +226 +227 +230 +234 +235 +236 +237 +240 +244 +245 +246 +247 +250 +254 +255 +256 +257 +260 +264 +265 +266 +267 +270 +274 +275 +276 +277 +280 +284 +285 +286 +287 +290 +294 +295 +296 +297 +300 +304 +305 +306 +307 +310 +314 +315 +316 +317 +320 +324 +325 +326 +327 +330 +334 +335 +336 +337 +340 +344 +345 +346 +347 +350 +354 +355 +356 +357 +360 +364 +365 +366 +367 +370 +374 +375 +376 +377 +380 +384 +385 +386 +387 +390 +394 +395 +396 +397 +400 +404 +405 +406 +407 +410 +414 +415 +416 +417 +420 +424 +425 +426 +427 +430 +434 +435 +436 +437 +440 +444 +445 +446 +447 +450 +454 +455 +456 +457 +460 +464 +465 +466 +467 +470 +474 +475 +476 +477 +480 +484 +485 +486 +487 +490 +494 +495 +496 +497 +500 +504 +505 +506 +507 +510 +514 +515 +516 +517 +520 +524 +525 +526 +527 +530 +534 +535 +536 +537 +540 +544 +545 +546 +547 +550 +554 +555 +556 +557 +560 +564 +565 +566 +567 +570 +574 +575 +576 +577 +580 +584 +585 +586 +587 +590 +594 +595 +596 +597 +600 +604 +605 +606 +607 +610 +614 +615 +616 +617 +620 +624 +625 +626 +627 +630 +634 +635 +636 +637 +640 +644 +645 +646 +647 +650 +654 +655 +656 +657 +660 +664 +665 +666 +667 +670 +674 +675 +676 +677 +680 +684 +685 +686 +687 +690 +694 +695 +696 +697 +700 +704 +705 +706 +707 +710 +714 +715 +716 +717 +720 +724 +725 +726 +727 +730 +734 +735 +736 +737 +740 +744 +745 +746 +747 +750 +754 +755 +756 +757 +760 +764 +765 +766 +767 +770 +774 +775 +776 +777 +780 +784 +785 +786 +787 +790 +794 +795 +796 +797 +800 +804 +805 +806 +807 +810 +814 +815 +816 +817 +820 +824 +825 +826 +827 +830 +834 +835 +836 +837 +840 +844 +845 +846 +847 +850 +854 +855 +856 +857 +860 +864 +865 +866 +867 +870 +874 +875 +876 +877 +880 +884 +885 +886 +887 +890 +894 +895 +896 +897 +900 +904 +905 +906 +907 +910 +914 +915 +916 +917 +920 +924 +925 +926 +927 +930 +934 +935 +936 +937 +940 +944 +945 +946 +947 +950 +954 +955 +956 +957 +960 +964 +965 +966 +967 +970 +974 +975 +976 +977 +980 +984 +985 +986 +987 +990 +994 +995 +996 +997 +1000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-022.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-022.in new file mode 100644 index 0000000000000000000000000000000000000000..fab18f470c0bce2308763a8dbeb5b658edb52b17 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-022.in @@ -0,0 +1,1001 @@ +500 +-906 626 +-710 -721 +-104 -409 +424 87 +240 -141 +224 -790 +328 -465 +-137 277 +597 709 +114 -27 +-864 672 +-668 -675 +-62 -363 +466 133 +282 -95 +266 -744 +370 -419 +-95 323 +639 755 +156 19 +-965 622 +-769 -725 +-163 -413 +365 83 +181 -145 +165 -794 +269 -469 +-196 273 +538 705 +55 -31 +-896 631 +-700 -716 +-94 -404 +434 92 +250 -136 +234 -785 +338 -460 +-127 282 +607 714 +124 -22 +-813 706 +-617 -641 +-11 -329 +517 167 +333 -61 +317 -710 +421 -385 +-44 357 +690 789 +207 53 +-819 595 +-623 -752 +-17 -440 +511 56 +327 -172 +311 -821 +415 -496 +-50 246 +684 678 +201 -58 +-847 681 +-651 -666 +-45 -354 +483 142 +299 -86 +283 -735 +387 -410 +-78 332 +656 764 +173 28 +-981 641 +-785 -706 +-179 -394 +349 102 +165 -126 +149 -775 +253 -450 +-212 292 +522 724 +39 -12 +-820 669 +-624 -678 +-18 -366 +510 130 +326 -98 +310 -747 +414 -422 +-51 320 +683 752 +200 16 +-839 775 +-643 -572 +-37 -260 +491 236 +307 8 +291 -641 +395 -316 +-70 426 +664 858 +181 122 +-906 773 +-710 -574 +-104 -262 +424 234 +240 6 +224 -643 +328 -318 +-137 424 +597 856 +114 120 +-934 623 +-738 -724 +-132 -412 +396 84 +212 -144 +196 -793 +300 -468 +-165 274 +569 706 +86 -30 +-969 701 +-773 -646 +-167 -334 +361 162 +177 -66 +161 -715 +265 -390 +-200 352 +534 784 +51 48 +-926 634 +-730 -713 +-124 -401 +404 95 +220 -133 +204 -782 +308 -457 +-157 285 +577 717 +94 -19 +-884 604 +-688 -743 +-82 -431 +446 65 +262 -163 +246 -812 +350 -487 +-115 255 +619 687 +136 -49 +-983 732 +-787 -615 +-181 -303 +347 193 +163 -35 +147 -684 +251 -359 +-214 383 +520 815 +37 79 +-878 704 +-682 -643 +-76 -331 +452 165 +268 -63 +252 -712 +356 -387 +-109 355 +625 787 +142 51 +-915 742 +-719 -605 +-113 -293 +415 203 +231 -25 +215 -674 +319 -349 +-146 393 +588 825 +105 89 +-866 794 +-670 -553 +-64 -241 +464 255 +280 27 +264 -622 +368 -297 +-97 445 +637 877 +154 141 +-900 608 +-704 -739 +-98 -427 +430 69 +246 -159 +230 -808 +334 -483 +-131 259 +603 691 +120 -45 +-886 627 +-690 -720 +-84 -408 +444 88 +260 -140 +244 -789 +348 -464 +-117 278 +617 710 +134 -26 +-881 741 +-685 -606 +-79 -294 +449 202 +265 -26 +249 -675 +353 -350 +-112 392 +622 824 +139 88 +-810 672 +-614 -675 +-8 -363 +520 133 +336 -95 +320 -744 +424 -419 +-41 323 +693 755 +210 19 +-964 763 +-768 -584 +-162 -272 +366 224 +182 -4 +166 -653 +270 -328 +-195 414 +539 846 +56 110 +-904 602 +-708 -745 +-102 -433 +426 63 +242 -165 +226 -814 +330 -489 +-135 253 +599 685 +116 -51 +-989 788 +-793 -559 +-187 -247 +341 249 +157 21 +141 -628 +245 -303 +-220 439 +514 871 +31 135 +-922 634 +-726 -713 +-120 -401 +408 95 +224 -133 +208 -782 +312 -457 +-153 285 +581 717 +98 -19 +-900 729 +-704 -618 +-98 -306 +430 190 +246 -38 +230 -687 +334 -362 +-131 380 +603 812 +120 76 +-835 631 +-639 -716 +-33 -404 +495 92 +311 -136 +295 -785 +399 -460 +-66 282 +668 714 +185 -22 +-878 669 +-682 -678 +-76 -366 +452 130 +268 -98 +252 -747 +356 -422 +-109 320 +625 752 +142 16 +-874 697 +-678 -650 +-72 -338 +456 158 +272 -70 +256 -719 +360 -394 +-105 348 +629 780 +146 44 +-950 748 +-754 -599 +-148 -287 +380 209 +196 -19 +180 -668 +284 -343 +-181 399 +553 831 +70 95 +-989 784 +-793 -563 +-187 -251 +341 245 +157 17 +141 -632 +245 -307 +-220 435 +514 867 +31 131 +-895 710 +-699 -637 +-93 -325 +435 171 +251 -57 +235 -706 +339 -381 +-126 361 +608 793 +125 57 +-864 621 +-668 -726 +-62 -414 +466 82 +282 -146 +266 -795 +370 -470 +-95 272 +639 704 +156 -32 +-879 700 +-683 -647 +-77 -335 +451 161 +267 -67 +251 -716 +355 -391 +-110 351 +624 783 +141 47 +-925 790 +-729 -557 +-123 -245 +405 251 +221 23 +205 -626 +309 -301 +-156 441 +578 873 +95 137 +-860 742 +-664 -605 +-58 -293 +470 203 +286 -25 +270 -674 +374 -349 +-91 393 +643 825 +160 89 +-896 666 +-700 -681 +-94 -369 +434 127 +250 -101 +234 -750 +338 -425 +-127 317 +607 749 +124 13 +-795 631 +-599 -716 +7 -404 +535 92 +351 -136 +335 -785 +439 -460 +-26 282 +708 714 +225 -22 +-835 614 +-639 -733 +-33 -421 +495 75 +311 -153 +295 -802 +399 -477 +-66 265 +668 697 +185 -39 +-834 657 +-638 -690 +-32 -378 +496 118 +312 -110 +296 -759 +400 -434 +-65 308 +669 740 +186 4 +-854 655 +-658 -692 +-52 -380 +476 116 +292 -112 +276 -761 +380 -436 +-85 306 +649 738 +166 2 +-990 759 +-794 -588 +-188 -276 +340 220 +156 -8 +140 -657 +244 -332 +-221 410 +513 842 +30 106 +-826 676 +-630 -671 +-24 -359 +504 137 +320 -91 +304 -740 +408 -415 +-57 327 +677 759 +194 23 +-824 608 +-628 -739 +-22 -427 +506 69 +322 -159 +306 -808 +410 -483 +-55 259 +679 691 +196 -45 +-808 771 +-612 -576 +-6 -264 +522 232 +338 4 +322 -645 +426 -320 +-39 422 +695 854 +212 118 +-883 605 +-687 -742 +-81 -430 +447 66 +263 -162 +247 -811 +351 -486 +-114 256 +620 688 +137 -48 +-944 648 +-748 -699 +-142 -387 +386 109 +202 -119 +186 -768 +290 -443 +-175 299 +559 731 +76 -5 +-853 746 +-657 -601 +-51 -289 +477 207 +293 -21 +277 -670 +381 -345 +-84 397 +650 829 +167 93 +-888 691 +-692 -656 +-86 -344 +442 152 +258 -76 +242 -725 +346 -400 +-119 342 +615 774 +132 38 +-950 600 +-754 -747 +-148 -435 +380 61 +196 -167 +180 -816 +284 -491 +-181 251 +553 683 +70 -53 +-981 678 +-785 -669 +-179 -357 +349 139 +165 -89 +149 -738 +253 -413 +-212 329 +522 761 +39 25 +-903 741 +-707 -606 +-101 -294 +427 202 +243 -26 +227 -675 +331 -350 +-134 392 +600 824 +117 88 +-989 641 +-793 -706 +-187 -394 +341 102 +157 -126 +141 -775 +245 -450 +-220 292 +514 724 +31 -12 +-841 677 +-645 -670 +-39 -358 +489 138 +305 -90 +289 -739 +393 -414 +-72 328 +662 760 +179 24 +-887 636 +-691 -711 +-85 -399 +443 97 +259 -131 +243 -780 +347 -455 +-118 287 +616 719 +133 -17 +-963 614 +-767 -733 +-161 -421 +367 75 +183 -153 +167 -802 +271 -477 +-194 265 +540 697 +57 -39 +-978 602 +-782 -745 +-176 -433 +352 63 +168 -165 +152 -814 +256 -489 +-209 253 +525 685 +42 -51 +-870 666 +-674 -681 +-68 -369 +460 127 +276 -101 +260 -750 +364 -425 +-101 317 +633 749 +150 13 +-980 640 +-784 -707 +-178 -395 +350 101 +166 -127 +150 -776 +254 -451 +-211 291 +523 723 +40 -13 +-851 638 +-655 -709 +-49 -397 +479 99 +295 -129 +279 -778 +383 -453 +-82 289 +652 721 +169 -15 +-797 776 +-601 -571 +5 -259 +533 237 +349 9 +333 -640 +437 -315 +-28 427 +706 859 +223 123 +-929 759 +-733 -588 +-127 -276 +401 220 +217 -8 +201 -657 +305 -332 +-160 410 +574 842 +91 106 +-801 644 +-605 -703 +1 -391 +529 105 +345 -123 +329 -772 +433 -447 +-32 295 +702 727 +219 -9 +-868 713 +-672 -634 +-66 -322 +462 174 +278 -54 +262 -703 +366 -378 +-99 364 +635 796 +152 60 +-801 741 +-605 -606 +1 -294 +529 202 +345 -26 +329 -675 +433 -350 +-32 392 +702 824 +219 88 +-848 776 +-652 -571 +-46 -259 +482 237 +298 9 +282 -640 +386 -315 +-79 427 +655 859 +172 123 +-976 694 +-780 -653 +-174 -341 +354 155 +170 -73 +154 -722 +258 -397 +-207 345 +527 777 +44 41 +-954 782 +-758 -565 +-152 -253 +376 243 +192 15 +176 -634 +280 -309 +-185 433 +549 865 +66 129 +-887 784 +-691 -563 +-85 -251 +443 245 +259 17 +243 -632 +347 -307 +-118 435 +616 867 +133 131 +-965 729 +-769 -618 +-163 -306 +365 190 +181 -38 +165 -687 +269 -362 +-196 380 +538 812 +55 76 +-823 775 +-627 -572 +-21 -260 +507 236 +323 8 +307 -641 +411 -316 +-54 426 +680 858 +197 122 +-845 634 +-649 -713 +-43 -401 +485 95 +301 -133 +285 -782 +389 -457 +-76 285 +658 717 +175 -19 +-987 667 +-791 -680 +-185 -368 +343 128 +159 -100 +143 -749 +247 -424 +-218 318 +516 750 +33 14 +-883 597 +-687 -750 +-81 -438 +447 58 +263 -170 +247 -819 +351 -494 +-114 248 +620 680 +137 -56 +-879 596 +-683 -751 +-77 -439 +451 57 +267 -171 +251 -820 +355 -495 +-110 247 +624 679 +141 -57 +-902 636 +-706 -711 +-100 -399 +428 97 +244 -131 +228 -780 +332 -455 +-133 287 +601 719 +118 -17 +-968 748 +-772 -599 +-166 -287 +362 209 +178 -19 +162 -668 +266 -343 +-199 399 +535 831 +52 95 +-968 700 +-772 -647 +-166 -335 +362 161 +178 -67 +162 -716 +266 -391 +-199 351 +535 783 +52 47 +-796 778 +-600 -569 +6 -257 +534 239 +350 11 +334 -638 +438 -313 +-27 429 +707 861 +224 125 +-861 601 +-665 -746 +-59 -434 +469 62 +285 -166 +269 -815 +373 -490 +-92 252 +642 684 +159 -52 +-843 638 +-647 -709 +-41 -397 +487 99 +303 -129 +287 -778 +391 -453 +-74 289 +660 721 +177 -15 +-936 625 +-740 -722 +-134 -410 +394 86 +210 -142 +194 -791 +298 -466 +-167 276 +567 708 +84 -28 +-860 788 +-664 -559 +-58 -247 +470 249 +286 21 +270 -628 +374 -303 +-91 439 +643 871 +160 135 +-890 791 +-694 -556 +-88 -244 +440 252 +256 24 +240 -625 +344 -300 +-121 442 +613 874 +130 138 +-833 787 +-637 -560 +-31 -248 +497 248 +313 20 +297 -629 +401 -304 +-64 438 +670 870 +187 134 +-902 742 +-706 -605 +-100 -293 +428 203 +244 -25 +228 -674 +332 -349 +-133 393 +601 825 +118 89 +-866 616 +-670 -731 +-64 -419 +464 77 +280 -151 +264 -800 +368 -475 +-97 267 +637 699 +154 -37 +-801 786 +-605 -561 +1 -249 +529 247 +345 19 +329 -630 +433 -305 +-32 437 +702 869 +219 133 +-848 692 +-652 -655 +-46 -343 +482 153 +298 -75 +282 -724 +386 -399 +-79 343 +655 775 +172 39 +-974 648 +-778 -699 +-172 -387 +356 109 +172 -119 +156 -768 +260 -443 +-205 299 +529 731 +46 -5 +-804 775 +-608 -572 +-2 -260 +526 236 +342 8 +326 -641 +430 -316 +-35 426 +699 858 +216 122 +-977 674 +-781 -673 +-175 -361 +353 135 +169 -93 +153 -742 +257 -417 +-208 325 +526 757 +43 21 +-795 708 +-599 -639 +7 -327 +535 169 +351 -59 +335 -708 +439 -383 +-26 359 +708 791 +225 55 +-902 684 +-706 -663 +-100 -351 +428 145 +244 -83 +228 -732 +332 -407 +-133 335 +601 767 +118 31 +-967 614 +-771 -733 +-165 -421 +363 75 +179 -153 +163 -802 +267 -477 +-198 265 +536 697 +53 -39 +-811 688 +-615 -659 +-9 -347 +519 149 +335 -79 +319 -728 +423 -403 +-42 339 +692 771 +209 35 +-971 705 +-775 -642 +-169 -330 +359 166 +175 -62 +159 -711 +263 -386 +-202 356 +532 788 +49 52 +-980 684 +-784 -663 +-178 -351 +350 145 +166 -83 +150 -732 +254 -407 +-211 335 +523 767 +40 31 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-023.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-023.ans new file mode 100644 index 0000000000000000000000000000000000000000..e4090fb747e033096148a70e9abf70bc5f878432 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-023.ans @@ -0,0 +1,501 @@ +206.04125800431330617357 +1 +7 +8 +9 +11 +12 +13 +14 +16 +17 +19 +22 +24 +25 +27 +28 +32 +33 +34 +35 +39 +41 +42 +48 +51 +54 +57 +60 +61 +62 +63 +67 +68 +70 +71 +72 +73 +75 +79 +80 +82 +83 +87 +88 +90 +92 +96 +98 +99 +100 +101 +107 +108 +109 +111 +112 +113 +114 +116 +117 +119 +122 +124 +125 +127 +128 +132 +133 +134 +135 +139 +141 +142 +148 +151 +154 +157 +160 +161 +162 +163 +167 +168 +170 +171 +172 +173 +175 +179 +180 +182 +183 +187 +188 +190 +192 +196 +198 +199 +200 +201 +207 +208 +209 +211 +212 +213 +214 +216 +217 +219 +222 +224 +225 +227 +228 +232 +233 +234 +235 +239 +241 +242 +248 +251 +254 +257 +260 +261 +262 +263 +267 +268 +270 +271 +272 +273 +275 +279 +280 +282 +283 +287 +288 +290 +292 +296 +298 +299 +300 +301 +307 +308 +309 +311 +312 +313 +314 +316 +317 +319 +322 +324 +325 +327 +328 +332 +333 +334 +335 +339 +341 +342 +348 +351 +354 +357 +360 +361 +362 +363 +367 +368 +370 +371 +372 +373 +375 +379 +380 +382 +383 +387 +388 +390 +392 +396 +398 +399 +400 +401 +407 +408 +409 +411 +412 +413 +414 +416 +417 +419 +422 +424 +425 +427 +428 +432 +433 +434 +435 +439 +441 +442 +448 +451 +454 +457 +460 +461 +462 +463 +467 +468 +470 +471 +472 +473 +475 +479 +480 +482 +483 +487 +488 +490 +492 +496 +498 +499 +500 +501 +507 +508 +509 +511 +512 +513 +514 +516 +517 +519 +522 +524 +525 +527 +528 +532 +533 +534 +535 +539 +541 +542 +548 +551 +554 +557 +560 +561 +562 +563 +567 +568 +570 +571 +572 +573 +575 +579 +580 +582 +583 +587 +588 +590 +592 +596 +598 +599 +600 +601 +607 +608 +609 +611 +612 +613 +614 +616 +617 +619 +622 +624 +625 +627 +628 +632 +633 +634 +635 +639 +641 +642 +648 +651 +654 +657 +660 +661 +662 +663 +667 +668 +670 +671 +672 +673 +675 +679 +680 +682 +683 +687 +688 +690 +692 +696 +698 +699 +700 +701 +707 +708 +709 +711 +712 +713 +714 +716 +717 +719 +722 +724 +725 +727 +728 +732 +733 +734 +735 +739 +741 +742 +748 +751 +754 +757 +760 +761 +762 +763 +767 +768 +770 +771 +772 +773 +775 +779 +780 +782 +783 +787 +788 +790 +792 +796 +798 +799 +800 +801 +807 +808 +809 +811 +812 +813 +814 +816 +817 +819 +822 +824 +825 +827 +828 +832 +833 +834 +835 +839 +841 +842 +848 +851 +854 +857 +860 +861 +862 +863 +867 +868 +870 +871 +872 +873 +875 +879 +880 +882 +883 +887 +888 +890 +892 +896 +898 +899 +900 +901 +907 +908 +909 +911 +912 +913 +914 +916 +917 +919 +922 +924 +925 +927 +928 +932 +933 +934 +935 +939 +941 +942 +948 +951 +954 +957 +960 +961 +962 +963 +967 +968 +970 +971 +972 +973 +975 +979 +980 +982 +983 +987 +988 +990 +992 +996 +998 +999 +1000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-023.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-023.in new file mode 100644 index 0000000000000000000000000000000000000000..9c25dbd97c62e90e3a91e2bcde506ac17afa995a --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-023.in @@ -0,0 +1,1001 @@ +500 +-683 -209 +-753 272 +-497 251 +-876 856 +-741 459 +22 933 +-764 -80 +-45 -684 +-471 -97 +806 362 +-336 605 +102 184 +-193 -632 +713 -305 +-909 832 +978 -362 +227 118 +495 89 +-129 501 +248 551 +-730 494 +-513 -234 +707 935 +116 234 +456 -372 +-971 -412 +-17 387 +-232 123 +621 37 +-564 520 +-536 293 +-238 293 +-616 -117 +214 141 +-616 -334 +599 273 +-744 624 +292 938 +-220 -691 +-700 987 +690 -400 +-253 785 +561 350 +423 401 +-545 -988 +934 446 +15 960 +14 10 +-502 -923 +-928 -517 +47 -390 +225 915 +-614 -904 +30 -219 +752 787 +-562 433 +-503 -217 +-712 -804 +500 286 +-523 -309 +-350 -483 +82 395 +98 -662 +872 -572 +-407 962 +380 677 +188 37 +-364 43 +-936 179 +252 -551 +-199 393 +-74 -99 +470 -665 +484 -53 +-439 -47 +431 872 +651 586 +-888 204 +125 -551 +202 -260 +713 -716 +-209 290 +302 -655 +-897 861 +931 -827 +342 524 +-703 -221 +160 118 +-651 -899 +607 -382 +-775 665 +233 -430 +-846 924 +-869 -456 +-528 979 +-278 -462 +-508 -694 +-34 -820 +-260 -172 +-211 -922 +-683 -200 +-753 281 +-497 260 +-876 865 +-741 468 +22 942 +-764 -71 +-45 -675 +-471 -88 +806 371 +-336 614 +102 193 +-193 -623 +713 -296 +-909 841 +978 -353 +227 127 +495 98 +-129 510 +248 560 +-730 503 +-513 -225 +707 944 +116 243 +456 -363 +-971 -403 +-17 396 +-232 132 +621 46 +-564 529 +-536 302 +-238 302 +-616 -108 +214 150 +-616 -325 +599 282 +-744 633 +292 947 +-220 -682 +-700 996 +690 -391 +-253 794 +561 359 +423 410 +-545 -979 +934 455 +15 969 +14 19 +-502 -914 +-928 -508 +47 -381 +225 924 +-614 -895 +30 -210 +752 796 +-562 442 +-503 -208 +-712 -795 +500 295 +-523 -300 +-350 -474 +82 404 +98 -653 +872 -563 +-407 971 +380 686 +188 46 +-364 52 +-936 188 +252 -542 +-199 402 +-74 -90 +470 -656 +484 -44 +-439 -38 +431 881 +651 595 +-888 213 +125 -542 +202 -251 +713 -707 +-209 299 +302 -646 +-897 870 +931 -818 +342 533 +-703 -212 +160 127 +-651 -890 +607 -373 +-775 674 +233 -421 +-846 933 +-869 -447 +-528 988 +-278 -453 +-508 -685 +-34 -811 +-260 -163 +-211 -913 +-670 -210 +-740 271 +-484 250 +-863 855 +-728 458 +35 932 +-751 -81 +-32 -685 +-458 -98 +819 361 +-323 604 +115 183 +-180 -633 +726 -306 +-896 831 +991 -363 +240 117 +508 88 +-116 500 +261 550 +-717 493 +-500 -235 +720 934 +129 233 +469 -373 +-958 -413 +-4 386 +-219 122 +634 36 +-551 519 +-523 292 +-225 292 +-603 -118 +227 140 +-603 -335 +612 272 +-731 623 +305 937 +-207 -692 +-687 986 +703 -401 +-240 784 +574 349 +436 400 +-532 -989 +947 445 +28 959 +27 9 +-489 -924 +-915 -518 +60 -391 +238 914 +-601 -905 +43 -220 +765 786 +-549 432 +-490 -218 +-699 -805 +513 285 +-510 -310 +-337 -484 +95 394 +111 -663 +885 -573 +-394 961 +393 676 +201 36 +-351 42 +-923 178 +265 -552 +-186 392 +-61 -100 +483 -666 +497 -54 +-426 -48 +444 871 +664 585 +-875 203 +138 -552 +215 -261 +726 -717 +-196 289 +315 -656 +-884 860 +944 -828 +355 523 +-690 -222 +173 117 +-638 -900 +620 -383 +-762 664 +246 -431 +-833 923 +-856 -457 +-515 978 +-265 -463 +-495 -695 +-21 -821 +-247 -173 +-198 -923 +-664 -202 +-734 279 +-478 258 +-857 863 +-722 466 +41 940 +-745 -73 +-26 -677 +-452 -90 +825 369 +-317 612 +121 191 +-174 -625 +732 -298 +-890 839 +997 -355 +246 125 +514 96 +-110 508 +267 558 +-711 501 +-494 -227 +726 942 +135 241 +475 -365 +-952 -405 +2 394 +-213 130 +640 44 +-545 527 +-517 300 +-219 300 +-597 -110 +233 148 +-597 -327 +618 280 +-725 631 +311 945 +-201 -684 +-681 994 +709 -393 +-234 792 +580 357 +442 408 +-526 -981 +953 453 +34 967 +33 17 +-483 -916 +-909 -510 +66 -383 +244 922 +-595 -897 +49 -212 +771 794 +-543 440 +-484 -210 +-693 -797 +519 293 +-504 -302 +-331 -476 +101 402 +117 -655 +891 -565 +-388 969 +399 684 +207 44 +-345 50 +-917 186 +271 -544 +-180 400 +-55 -92 +489 -658 +503 -46 +-420 -40 +450 879 +670 593 +-869 211 +144 -544 +221 -253 +732 -709 +-190 297 +321 -648 +-878 868 +950 -820 +361 531 +-684 -214 +179 125 +-632 -892 +626 -375 +-756 672 +252 -423 +-827 931 +-850 -449 +-509 986 +-259 -455 +-489 -687 +-15 -813 +-241 -165 +-192 -915 +-680 -196 +-750 285 +-494 264 +-873 869 +-738 472 +25 946 +-761 -67 +-42 -671 +-468 -84 +809 375 +-333 618 +105 197 +-190 -619 +716 -292 +-906 845 +981 -349 +230 131 +498 102 +-126 514 +251 564 +-727 507 +-510 -221 +710 948 +119 247 +459 -359 +-968 -399 +-14 400 +-229 136 +624 50 +-561 533 +-533 306 +-235 306 +-613 -104 +217 154 +-613 -321 +602 286 +-741 637 +295 951 +-217 -678 +-697 1000 +693 -387 +-250 798 +564 363 +426 414 +-542 -975 +937 459 +18 973 +17 23 +-499 -910 +-925 -504 +50 -377 +228 928 +-611 -891 +33 -206 +755 800 +-559 446 +-500 -204 +-709 -791 +503 299 +-520 -296 +-347 -470 +85 408 +101 -649 +875 -559 +-404 975 +383 690 +191 50 +-361 56 +-933 192 +255 -538 +-196 406 +-71 -86 +473 -652 +487 -40 +-436 -34 +434 885 +654 599 +-885 217 +128 -538 +205 -247 +716 -703 +-206 303 +305 -642 +-894 874 +934 -814 +345 537 +-700 -208 +163 131 +-648 -886 +610 -369 +-772 678 +236 -417 +-843 937 +-866 -443 +-525 992 +-275 -449 +-505 -681 +-31 -807 +-257 -159 +-208 -909 +-667 -198 +-737 283 +-481 262 +-860 867 +-725 470 +38 944 +-748 -69 +-29 -673 +-455 -86 +822 373 +-320 616 +118 195 +-177 -621 +729 -294 +-893 843 +994 -351 +243 129 +511 100 +-113 512 +264 562 +-714 505 +-497 -223 +723 946 +132 245 +472 -361 +-955 -401 +-1 398 +-216 134 +637 48 +-548 531 +-520 304 +-222 304 +-600 -106 +230 152 +-600 -323 +615 284 +-728 635 +308 949 +-204 -680 +-684 998 +706 -389 +-237 796 +577 361 +439 412 +-529 -977 +950 457 +31 971 +30 21 +-486 -912 +-912 -506 +63 -379 +241 926 +-598 -893 +46 -208 +768 798 +-546 444 +-487 -206 +-696 -793 +516 297 +-507 -298 +-334 -472 +98 406 +114 -651 +888 -561 +-391 973 +396 688 +204 48 +-348 54 +-920 190 +268 -540 +-183 404 +-58 -88 +486 -654 +500 -42 +-423 -36 +447 883 +667 597 +-872 215 +141 -540 +218 -249 +729 -705 +-193 301 +318 -644 +-881 872 +947 -816 +358 535 +-687 -210 +176 129 +-635 -888 +623 -371 +-759 676 +249 -419 +-830 935 +-853 -445 +-512 990 +-262 -451 +-492 -683 +-18 -809 +-244 -161 +-195 -911 +-680 -216 +-750 265 +-494 244 +-873 849 +-738 452 +25 926 +-761 -87 +-42 -691 +-468 -104 +809 355 +-333 598 +105 177 +-190 -639 +716 -312 +-906 825 +981 -369 +230 111 +498 82 +-126 494 +251 544 +-727 487 +-510 -241 +710 928 +119 227 +459 -379 +-968 -419 +-14 380 +-229 116 +624 30 +-561 513 +-533 286 +-235 286 +-613 -124 +217 134 +-613 -341 +602 266 +-741 617 +295 931 +-217 -698 +-697 980 +693 -407 +-250 778 +564 343 +426 394 +-542 -995 +937 439 +18 953 +17 3 +-499 -930 +-925 -524 +50 -397 +228 908 +-611 -911 +33 -226 +755 780 +-559 426 +-500 -224 +-709 -811 +503 279 +-520 -316 +-347 -490 +85 388 +101 -669 +875 -579 +-404 955 +383 670 +191 30 +-361 36 +-933 172 +255 -558 +-196 386 +-71 -106 +473 -672 +487 -60 +-436 -54 +434 865 +654 579 +-885 197 +128 -558 +205 -267 +716 -723 +-206 283 +305 -662 +-894 854 +934 -834 +345 517 +-700 -228 +163 111 +-648 -906 +610 -389 +-772 658 +236 -437 +-843 917 +-866 -463 +-525 972 +-275 -469 +-505 -701 +-31 -827 +-257 -179 +-208 -929 +-678 -200 +-748 281 +-492 260 +-871 865 +-736 468 +27 942 +-759 -71 +-40 -675 +-466 -88 +811 371 +-331 614 +107 193 +-188 -623 +718 -296 +-904 841 +983 -353 +232 127 +500 98 +-124 510 +253 560 +-725 503 +-508 -225 +712 944 +121 243 +461 -363 +-966 -403 +-12 396 +-227 132 +626 46 +-559 529 +-531 302 +-233 302 +-611 -108 +219 150 +-611 -325 +604 282 +-739 633 +297 947 +-215 -682 +-695 996 +695 -391 +-248 794 +566 359 +428 410 +-540 -979 +939 455 +20 969 +19 19 +-497 -914 +-923 -508 +52 -381 +230 924 +-609 -895 +35 -210 +757 796 +-557 442 +-498 -208 +-707 -795 +505 295 +-518 -300 +-345 -474 +87 404 +103 -653 +877 -563 +-402 971 +385 686 +193 46 +-359 52 +-931 188 +257 -542 +-194 402 +-69 -90 +475 -656 +489 -44 +-434 -38 +436 881 +656 595 +-883 213 +130 -542 +207 -251 +718 -707 +-204 299 +307 -646 +-892 870 +936 -818 +347 533 +-698 -212 +165 127 +-646 -890 +612 -373 +-770 674 +238 -421 +-841 933 +-864 -447 +-523 988 +-273 -453 +-503 -685 +-29 -811 +-255 -163 +-206 -913 +-681 -210 +-751 271 +-495 250 +-874 855 +-739 458 +24 932 +-762 -81 +-43 -685 +-469 -98 +808 361 +-334 604 +104 183 +-191 -633 +715 -306 +-907 831 +980 -363 +229 117 +497 88 +-127 500 +250 550 +-728 493 +-511 -235 +709 934 +118 233 +458 -373 +-969 -413 +-15 386 +-230 122 +623 36 +-562 519 +-534 292 +-236 292 +-614 -118 +216 140 +-614 -335 +601 272 +-742 623 +294 937 +-218 -692 +-698 986 +692 -401 +-251 784 +563 349 +425 400 +-543 -989 +936 445 +17 959 +16 9 +-500 -924 +-926 -518 +49 -391 +227 914 +-612 -905 +32 -220 +754 786 +-560 432 +-501 -218 +-710 -805 +502 285 +-521 -310 +-348 -484 +84 394 +100 -663 +874 -573 +-405 961 +382 676 +190 36 +-362 42 +-934 178 +254 -552 +-197 392 +-72 -100 +472 -666 +486 -54 +-437 -48 +433 871 +653 585 +-886 203 +127 -552 +204 -261 +715 -717 +-207 289 +304 -656 +-895 860 +933 -828 +344 523 +-701 -222 +162 117 +-649 -900 +609 -383 +-773 664 +235 -431 +-844 923 +-867 -457 +-526 978 +-276 -463 +-506 -695 +-32 -821 +-258 -173 +-209 -923 +-665 -205 +-735 276 +-479 255 +-858 860 +-723 463 +40 937 +-746 -76 +-27 -680 +-453 -93 +824 366 +-318 609 +120 188 +-175 -628 +731 -301 +-891 836 +996 -358 +245 122 +513 93 +-111 505 +266 555 +-712 498 +-495 -230 +725 939 +134 238 +474 -368 +-953 -408 +1 391 +-214 127 +639 41 +-546 524 +-518 297 +-220 297 +-598 -113 +232 145 +-598 -330 +617 277 +-726 628 +310 942 +-202 -687 +-682 991 +708 -396 +-235 789 +579 354 +441 405 +-527 -984 +952 450 +33 964 +32 14 +-484 -919 +-910 -513 +65 -386 +243 919 +-596 -900 +48 -215 +770 791 +-544 437 +-485 -213 +-694 -800 +518 290 +-505 -305 +-332 -479 +100 399 +116 -658 +890 -568 +-389 966 +398 681 +206 41 +-346 47 +-918 183 +270 -547 +-181 397 +-56 -95 +488 -661 +502 -49 +-421 -43 +449 876 +669 590 +-870 208 +143 -547 +220 -256 +731 -712 +-191 294 +320 -651 +-879 865 +949 -823 +360 528 +-685 -217 +178 122 +-633 -895 +625 -378 +-757 669 +251 -426 +-828 928 +-851 -452 +-510 983 +-260 -458 +-490 -690 +-16 -816 +-242 -168 +-193 -918 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-024.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-024.ans new file mode 100644 index 0000000000000000000000000000000000000000..5ab9e07f40ceb17cf5927bc4f01dbda095c85e1b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-024.ans @@ -0,0 +1,501 @@ +43437374.10107513517141342163 +1 +2 +5 +6 +17 +18 +21 +22 +25 +26 +29 +30 +31 +32 +33 +34 +37 +38 +41 +42 +43 +44 +45 +46 +49 +50 +61 +62 +63 +64 +73 +74 +79 +80 +81 +82 +99 +100 +105 +106 +107 +108 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +127 +128 +129 +130 +135 +136 +137 +138 +141 +142 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +161 +162 +163 +164 +167 +168 +169 +170 +171 +172 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +195 +196 +197 +198 +199 +200 +203 +204 +213 +214 +221 +222 +227 +228 +229 +230 +237 +238 +239 +240 +249 +250 +253 +254 +255 +256 +259 +260 +263 +264 +265 +266 +267 +268 +271 +272 +275 +276 +279 +280 +285 +286 +291 +292 +297 +298 +301 +302 +303 +304 +313 +314 +317 +318 +319 +320 +321 +322 +325 +326 +329 +330 +331 +332 +339 +340 +345 +346 +351 +352 +361 +362 +367 +368 +371 +372 +377 +378 +379 +380 +383 +384 +389 +390 +391 +392 +393 +394 +397 +398 +399 +400 +401 +402 +409 +410 +413 +414 +417 +418 +419 +420 +421 +422 +425 +426 +435 +436 +439 +440 +443 +444 +453 +454 +455 +456 +459 +460 +461 +462 +471 +472 +473 +474 +475 +476 +483 +484 +485 +486 +489 +490 +493 +494 +501 +502 +505 +506 +509 +510 +513 +514 +517 +518 +523 +524 +527 +528 +529 +530 +531 +532 +541 +542 +543 +544 +547 +548 +551 +552 +557 +558 +559 +560 +561 +562 +565 +566 +571 +572 +579 +580 +587 +588 +593 +594 +597 +598 +601 +602 +609 +610 +613 +614 +615 +616 +619 +620 +621 +622 +623 +624 +633 +634 +635 +636 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +659 +660 +663 +664 +667 +668 +669 +670 +673 +674 +675 +676 +677 +678 +685 +686 +693 +694 +695 +696 +709 +710 +711 +712 +715 +716 +717 +718 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +751 +752 +753 +754 +755 +756 +757 +758 +765 +766 +767 +768 +771 +772 +773 +774 +783 +784 +785 +786 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +803 +804 +807 +808 +809 +810 +813 +814 +817 +818 +819 +820 +829 +830 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +857 +858 +859 +860 +863 +864 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +879 +880 +883 +884 +887 +888 +891 +892 +893 +894 +895 +896 +899 +900 +901 +902 +903 +904 +911 +912 +921 +922 +925 +926 +927 +928 +931 +932 +935 +936 +937 +938 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +961 +962 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +989 +990 +991 +992 +993 +994 +995 +996 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-024.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-024.in new file mode 100644 index 0000000000000000000000000000000000000000..195d6cbe0dc85bf4c01fbafef2414211aad06f16 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-024.in @@ -0,0 +1,1001 @@ +500 +5222360 106788666 +14406528 118219009 +503654520 158285010 +512838688 169715353 +-71066093 -336789539 +-61881925 -325359196 +481710312 -19053514 +490894480 -7623171 +312124638 -97119954 +321308806 -85689611 +327176441 -166329343 +336360609 -154899000 +493306583 361942018 +502490751 373372361 +176871805 470598219 +186055973 482028562 +226457216 196839862 +235641384 208270205 +384336848 3022630 +393521016 14452973 +212189677 -358588962 +221373845 -347158619 +507877137 220631709 +517061305 232062052 +112827576 -321611306 +122011744 -310180963 +538984732 -106854442 +548168900 -95424099 +-173877335 -242490556 +-164693167 -231060213 +-284321172 10821085 +-275137004 22251428 +-230784441 50073623 +-221600273 61503966 +84321012 505654980 +93505180 517085323 +96637698 155317242 +105821866 166747585 +388806588 254854953 +397990756 266285296 +-289950685 -385771863 +-280766517 -374341520 +-291133921 -293181887 +-281949753 -281751544 +152102789 -214178285 +161286957 -202747942 +-273748773 449593648 +-264564605 461023991 +-169465569 -357657408 +-160281401 -346227065 +202417641 -450101090 +211601809 -438670747 +557960568 356376084 +567144736 367806427 +333976548 375216338 +343160716 386646681 +422543829 -182913347 +431727997 -171483004 +524193041 213531649 +533377209 224961992 +25657055 61203319 +34841223 72633662 +59220094 -196109870 +68404262 -184679527 +183060288 490187223 +192244456 501617566 +-119625320 508744669 +-110441152 520175012 +-202431411 226280007 +-193247243 237710350 +-5421895 312466150 +3762273 323896493 +238324363 9165606 +247508531 20595949 +487179373 185648678 +496363541 197079021 +251036966 443574430 +260221134 455004773 +164865509 -421713423 +174049677 -410283080 +-188977721 -434294502 +-179793553 -422864159 +430031280 117769232 +439215448 129199575 +301760670 -146526800 +310944838 -135096457 +522567951 272754845 +531752119 284185188 +-286478206 295838350 +-277294038 307268693 +493197665 -386386082 +502381833 -374955739 +353671630 -74240033 +362855798 -62809690 +-408011741 141105509 +-398827573 152535852 +-157514434 362515360 +-148330266 373945703 +-132995407 146624275 +-123811239 158054618 +-141953367 215191754 +-132769199 226622097 +484660737 -293839749 +493844905 -282409406 +210215326 87599184 +219399494 99029527 +326600310 5429633 +335784478 16859976 +396057870 28670470 +405242038 40100813 +-409646631 -69939198 +-400462463 -58508855 +-192262581 -433333733 +-183078413 -421903390 +256865651 254912294 +266049819 266342637 +194281077 -171955838 +203465245 -160525495 +-286886011 -396222176 +-277701843 -384791833 +3088701 98668210 +12272869 110098553 +-188901225 531987517 +-179717057 543417860 +359599174 -197272859 +368783342 -185842516 +-35684403 -412431542 +-26500235 -401001199 +-40333470 -448418300 +-31149302 -436987957 +399487716 -399662716 +408671884 -388232373 +132237015 464004041 +141421183 475434384 +-197913351 -161247096 +-188729183 -149816753 +-198999310 -214465491 +-189815142 -203035148 +-422242340 233065973 +-413058172 244496316 +-415533005 -244565758 +-406348837 -233135415 +429999139 308065967 +439183307 319496310 +-200151429 434524342 +-190967261 445954685 +-325679248 -456390129 +-316495080 -444959786 +300048427 141015645 +309232595 152445988 +-73801415 -299085866 +-64617247 -287655523 +100821107 190522454 +110005275 201952797 +-83326800 108794063 +-74142632 120224406 +-368412808 -313807759 +-359228640 -302377416 +-420541850 466500845 +-411357682 477931188 +202284917 -164346442 +211469085 -152916099 +32097629 203948024 +41281797 215378367 +-119564866 -6592423 +-110380698 4837920 +-50573381 164302620 +-41389213 175732963 +84047189 208597360 +93231357 220027703 +-331392778 -218478820 +-322208610 -207048477 +356728150 241035060 +365912318 252465403 +209018364 -102987095 +218202532 -91556752 +166503735 392348042 +175687903 403778385 +111501423 -14550073 +120685591 -3119730 +-386361563 -133687873 +-377177395 -122257530 +147495464 8430501 +156679632 19860844 +11238350 -18028574 +20422518 -6598231 +-350096255 -311555547 +-340912087 -300125204 +146448178 -435813059 +155632346 -424382716 +179167313 225619323 +188351481 237049666 +536761186 -194520966 +545945354 -183090623 +253886399 -183216602 +263070567 -171786259 +43545654 -204916576 +52729822 -193486233 +221258891 -385714194 +230443059 -374283851 +51591608 533356864 +60775776 544787207 +313433584 183910340 +322617752 195340683 +-62078512 486895865 +-52894344 498326208 +507875054 -202716684 +517059222 -191286341 +492512429 -421606923 +501696597 -410176580 +545749181 -234226036 +554933349 -222795693 +144728925 172100880 +153913093 183531223 +379671376 -442538513 +388855544 -431108170 +-68109648 -200867739 +-58925480 -189437396 +417445679 168853003 +426629847 180283346 +25023872 -10079675 +34208040 1350668 +-71562581 533213955 +-62378413 544644298 +-161013464 487302322 +-151829296 498732665 +109312920 -308908022 +118497088 -297477679 +-274020869 -256574220 +-264836701 -245143877 +356505875 -31129795 +365690043 -19699452 +432808131 180943353 +441992299 192373696 +-179460870 317688359 +-170276702 329118702 +-416200740 -166648698 +-407016572 -155218355 +322846323 134729654 +332030491 146159997 +516109337 520350032 +525293505 531780375 +-42330817 453897171 +-33146649 465327514 +552083742 69555151 +561267910 80985494 +528101127 1935110 +537285295 13365453 +-360808608 -287847869 +-351624440 -276417526 +453640558 26478505 +462824726 37908848 +-394960685 -246919443 +-385776517 -235489100 +336558646 46908465 +345742814 58338808 +69565282 429187052 +78749450 440617395 +173902936 141854369 +183087104 153284712 +422119279 406903927 +431303447 418334270 +27084142 -209235849 +36268310 -197805506 +-210288147 -271796201 +-201103979 -260365858 +56517306 -257109093 +65701474 -245678750 +-260073169 178941361 +-250889001 190371704 +78190812 94403632 +87374980 105833975 +-314917751 235984688 +-305733583 247415031 +200212506 182523880 +209396674 193954223 +482409953 428646189 +491594121 440076532 +-119038236 -423640387 +-109854068 -412210044 +405660293 -296753223 +414844461 -285322880 +558628690 -295554665 +567812858 -284124322 +-122912550 47106745 +-113728382 58537088 +149614622 452669841 +158798790 464100184 +539889461 -152438482 +549073629 -141008139 +-169594766 -361751325 +-160410598 -350320982 +556291624 268649801 +565475792 280080144 +350765763 -210910957 +359949931 -199480614 +295359379 94494185 +304543547 105924528 +-74260415 327889920 +-65076247 339320263 +-80418581 -367089472 +-71234413 -355659129 +155928736 -312733514 +165112904 -301303171 +395000869 501425246 +404185037 512855589 +-243906044 516123466 +-234721876 527553809 +41474419 -448720465 +50658587 -437290122 +-362427869 421065197 +-353243701 432495540 +-205566745 -118008378 +-196382577 -106578035 +-116386402 -153410156 +-107202234 -141979813 +105858376 -409590495 +115042544 -398160152 +-308355777 -222838760 +-299171609 -211408417 +123217886 -439743261 +132402054 -428312918 +-134708012 -55482065 +-125523844 -44051722 +-63234586 -448966260 +-54050418 -437535917 +487131601 -280694467 +496315769 -269264124 +-195598165 51962047 +-186413997 63392390 +170126231 290984486 +179310399 302414829 +483468585 -94158492 +492652753 -82728149 +335794563 -85828515 +344978731 -74398172 +-306292161 426111164 +-297107993 437541507 +263674780 101565964 +272858948 112996307 +96032903 520186388 +105217071 531616731 +399592803 166335496 +408776971 177765839 +-313244664 -261658746 +-304060496 -250228403 +-58321149 -17533032 +-49136981 -6102689 +466114297 125054362 +475298465 136484705 +38657831 -96015533 +47841999 -84585190 +475426435 345982718 +484610603 357413061 +516711044 172658882 +525895212 184089225 +-416003380 265693147 +-406819212 277123490 +272973953 -295908417 +282158121 -284478074 +-15772933 -80210881 +-6588765 -68780538 +496095976 -57314236 +505280144 -45883893 +451030488 -309043215 +460214656 -297612872 +-10274661 -292422905 +-1090493 -280992562 +-244967943 246219083 +-235783775 257649426 +168970853 385069485 +178155021 396499828 +-91285053 356032337 +-82100885 367462680 +407146638 311254875 +416330806 322685218 +-260353692 35300435 +-251169524 46730778 +70796691 -235772160 +79980859 -224341817 +509093817 -219630402 +518277985 -208200059 +-358001610 -165439142 +-348817442 -154008799 +518006901 -139674456 +527191069 -128244113 +555637954 451095321 +564822122 462525664 +-220683203 137963401 +-211499035 149393744 +-210794096 -254927827 +-201609928 -243497484 +109768747 -19052402 +118952915 -7622059 +-153929825 411514707 +-144745657 422945050 +59571113 -168191661 +68755281 -156761318 +317692268 274768750 +326876436 286199093 +-211939795 -129706594 +-202755627 -118276251 +313497995 -257694608 +322682163 -246264265 +-371767138 20500237 +-362582970 31930580 +-48152198 317766533 +-38968030 329196876 +76422417 -4853147 +85606585 6577196 +482412589 387807041 +491596757 399237384 +215225454 -305091477 +224409622 -293661134 +424782071 -219812467 +433966239 -208382124 +-68256000 67283954 +-59071832 78714297 +58783677 200839365 +67967845 212269708 +225348748 -8863069 +234532916 2567274 +493093697 -435345694 +502277865 -423915351 +-217353011 -129894108 +-208168843 -118463765 +438514707 -456261532 +447698875 -444831189 +-114206731 351429827 +-105022563 362860170 +556229239 410518674 +565413407 421949017 +301551374 416212674 +310735542 427643017 +107371561 146510514 +116555729 157940857 +497530211 148706738 +506714379 160137081 +-276277626 -369505076 +-267093458 -358074733 +361102861 430929260 +370287029 442359603 +-102595358 -303424737 +-93411190 -291994394 +-330091507 451548734 +-320907339 462979077 +-370437428 398481043 +-361253260 409911386 +-366636169 351918033 +-357452001 363348376 +-86005722 8317135 +-76821554 19747478 +-87972637 -431047202 +-78788469 -419616859 +-184878167 -103523462 +-175693999 -92093119 +397857641 -455243168 +407041809 -443812825 +-154911216 35652674 +-145727048 47083017 +-382347016 -197008683 +-373162848 -185578340 +427551240 -353022109 +436735408 -341591766 +569188168 -217607221 +578372336 -206176878 +-160530035 401809069 +-151345867 413239412 +335871556 -327812072 +345055724 -316381729 +-93213577 -285997068 +-84029409 -274566725 +213088641 116273427 +222272809 127703770 +126552222 247072984 +135736390 258503327 +510381593 200497070 +519565761 211927413 +-13920790 500652899 +-4736622 512083242 +323877108 382536312 +333061276 393966655 +-3817936 181565092 +5366232 192995435 +-154919089 -210768355 +-145734921 -199338012 +-301201824 238110398 +-292017656 249540741 +-184564185 74794258 +-175380017 86224601 +-300225135 191735198 +-291040967 203165541 +-380344654 -230970446 +-371160486 -219540103 +354762339 480086493 +363946507 491516836 +171628652 493486311 +180812820 504916654 +444059361 -379362223 +453243529 -367931880 +-342342891 -254976061 +-333158723 -243545718 +555399896 -238013871 +564584064 -226583528 +217501649 30076808 +226685817 41507151 +547792720 299872968 +556976888 311303311 +180923295 386391526 +190107463 397821869 +-45044311 370960813 +-35860143 382391156 +216520266 205734540 +225704434 217164883 +316768207 -242722567 +325952375 -231292224 +286728231 4368168 +295912399 15798511 +-127932835 487725040 +-118748667 499155383 +-303105889 280041193 +-293921721 291471536 +-182722629 -276229863 +-173538461 -264799520 +74140921 401944117 +83325089 413374460 +224356052 279060076 +233540220 290490419 +-246589344 37280288 +-237405176 48710631 +183003828 -397944690 +192187996 -386514347 +-151252131 235852194 +-142067963 247282537 +-292765354 343569532 +-283581186 354999875 +-17354097 337797545 +-8169929 349227888 +-147310763 346615839 +-138126595 358046182 +-288138413 -102811514 +-278954245 -91381171 +217663537 -47600759 +226847705 -36170416 +429931015 521338973 +439115183 532769316 +104008561 64503305 +113192729 75933648 +-279942246 220312354 +-270758078 231742697 +105432125 -191296893 +114616293 -179866550 +-149926482 -34720558 +-140742314 -23290215 +-160326854 435755105 +-151142686 447185448 +-141527892 -429824615 +-132343724 -418394272 +23519633 -285466291 +32703801 -274035948 +-54802526 218836724 +-45618358 230267067 +466850327 -150418308 +476034495 -138987965 +-177225726 -433516236 +-168041558 -422085893 +318513601 413116721 +327697769 424547064 +-69837921 502860073 +-60653753 514290416 +-206577102 -84181833 +-197392934 -72751490 +80530601 527646648 +89714769 539076991 +398506388 -18104098 +407690556 -6673755 +104431800 432729652 +113615968 444159995 +-426377005 -267536432 +-417192837 -256106089 +74204906 527413219 +83389074 538843562 +-326302657 188113339 +-317118489 199543682 +392395982 294275357 +401580150 305705700 +47678486 246226721 +56862654 257657064 +-195294801 223842995 +-186110633 235273338 +509704095 222335805 +518888263 233766148 +-11431436 150130750 +-2247268 161561093 +363175929 -271176173 +372360097 -259745830 +-137527709 -309099760 +-128343541 -297669417 +444004780 -40545923 +453188948 -29115580 +-166485932 89223145 +-157301764 100653488 +340054447 502486400 +349238615 513916743 +409267576 504183316 +418451744 515613659 +-363746702 -408229020 +-354562534 -396798677 +243222515 -132060920 +252406683 -120630577 +513407248 -361247356 +522591416 -349817013 +-309459356 -114231859 +-300275188 -102801516 +-6491708 118357977 +2692460 129788320 +-72581529 334566467 +-63397361 345996810 +-290488924 -38932472 +-281304756 -27502129 +-274658812 -334936519 +-265474644 -323506176 +252297061 -379893686 +261481229 -368463343 +454090209 317886361 +463274377 329316704 +-9936839 350026238 +-752671 361456581 +550533486 146273837 +559717654 157704180 +318961792 495775301 +328145960 507205644 +88803923 289386133 +97988091 300816476 +151493696 333572316 +160677864 345002659 +-6186546 277949167 +2997622 289379510 +420942980 484456549 +430127148 495886892 +-82654908 255235165 +-73470740 266665508 +-372291142 352724336 +-363106974 364154679 +209917621 110104075 +219101789 121534418 +182041269 -94470794 +191225437 -83040451 +-50526393 206883749 +-41342225 218314092 +188814154 276446357 +197998322 287876700 +182383994 -70833397 +191568162 -59403054 +338021837 -273338658 +347206005 -261908315 +269745796 407835008 +278929964 419265351 +90133074 -257011663 +99317242 -245581320 +-323104074 513656806 +-313919906 525087149 +-278080086 -242482851 +-268895918 -231052508 +-41992903 456504943 +-32808735 467935286 +150364062 -387478504 +159548230 -376048161 +227737189 -129780199 +236921357 -118349856 +342549557 415430392 +351733725 426860735 +190081817 -174315938 +199265985 -162885595 +124523068 -339487970 +133707236 -328057627 +150574535 310917197 +159758703 322347540 +-389464940 88912402 +-380280772 100342745 +313751388 -192644083 +322935556 -181213740 +-363857152 344696705 +-354672984 356127048 +-310206901 -290111774 +-301022733 -278681431 +89137443 440472540 +98321611 451902883 +514634445 31892456 +523818613 43322799 +265535009 -248303154 +274719177 -236872811 +-240001495 -220148921 +-230817327 -208718578 +101742704 324092112 +110926872 335522455 +-59668814 494516680 +-50484646 505947023 +-376532581 377395468 +-367348413 388825811 +441036464 268260470 +450220632 279690813 +290105476 418954263 +299289644 430384606 +-28264094 472166540 +-19079926 483596883 +471491128 199986494 +480675296 211416837 +63141106 -190242343 +72325274 -178812000 +-267293051 -266117345 +-258108883 -254687002 +415196524 297481677 +424380692 308912020 +19500214 173232820 +28684382 184663163 +-377440466 -118456083 +-368256298 -107025740 +-230909680 508559146 +-221725512 519989489 +-274701215 -292920689 +-265517047 -281490346 +171086507 -21144024 +180270675 -9713681 +65725786 112898111 +74909954 124328454 +2883286 -336155368 +12067454 -324725025 +-138887368 -350044906 +-129703200 -338614563 +-248814593 -17140866 +-239630425 -5710523 +-383284989 -156386774 +-374100821 -144956431 +-255474218 -100395184 +-246290050 -88964841 +141667010 -109553662 +150851178 -98123319 +-35043755 -342104605 +-25859587 -330674262 +-220995588 -268733495 +-211811420 -257303152 +131294836 -196799441 +140479004 -185369098 +196470667 230429226 +205654835 241859569 +-186079520 -202225955 +-176895352 -190795612 +243173107 448115195 +252357275 459545538 +-252064958 -266849285 +-242880790 -255418942 +-234994810 -228287649 +-225810642 -216857306 +-300133786 -191030494 +-290949618 -179600151 +-385671269 -85863205 +-376487101 -74432862 +-376460485 306909032 +-367276317 318339375 +-427773183 239167255 +-418589015 250597598 +-17828384 324080684 +-8644216 335511027 +-212008852 94536101 +-202824684 105966444 +-99605216 193504984 +-90421048 204935327 +146158889 484581770 +155343057 496012113 +-77257235 -363497704 +-68073067 -352067361 +94393245 33898778 +103577413 45329121 +439597212 -251773886 +448781380 -240343543 +-117107858 -134653795 +-107923690 -123223452 +443987544 263761539 +453171712 275191882 +413013610 329702030 +422197778 341132373 +-177658022 -314599824 +-168473854 -303169481 +-171492961 155655037 +-162308793 167085380 +362038103 -229599515 +371222271 -218169172 +-96879906 -270094879 +-87695738 -258664536 +-365939157 -226348364 +-356754989 -214918021 +154544485 165019032 +163728653 176449375 +176804699 72952121 +185988867 84382464 +-279472167 -348280230 +-270287999 -336849887 +204403988 33104639 +213588156 44534982 +-292630072 113738893 +-283445904 125169236 +28034359 -62363225 +37218527 -50932882 +-54763037 -11455382 +-45578869 -25039 +309703977 39228724 +318888145 50659067 +-240306891 -433472589 +-231122723 -422042246 +548311631 -405543965 +557495799 -394113622 +-392509836 -42464831 +-383325668 -31034488 +383656717 330241 +392840885 11760584 +-188574906 -104675665 +-179390738 -93245322 +-66260046 137230304 +-57075878 148660647 +464536209 57150265 +473720377 68580608 +532700030 462260696 +541884198 473691039 +433151765 77257391 +442335933 88687734 +-60187930 333675779 +-51003762 345106122 +143224598 318678552 +152408766 330108895 +379836647 -8613122 +389020815 2817221 +-397971021 390471254 +-388786853 401901597 +483716183 -389512499 +492900351 -378082156 +540835886 244194907 +550020054 255625250 +151186155 -235450028 +160370323 -224019685 +93746764 258902288 +102930932 270332631 +342997942 126384418 +352182110 137814761 +-322844123 -55406373 +-313659955 -43976030 +88334805 87078343 +97518973 98508686 +-287539774 452680580 +-278355606 464110923 +269434507 364853577 +278618675 376283920 +284585329 464029124 +293769497 475459467 +426363571 -412643118 +435547739 -401212775 +108160275 -41476203 +117344443 -30045860 +-190196382 -326483055 +-181012214 -315052712 +-327812464 179327840 +-318628296 190758183 +-296675388 -359483673 +-287491220 -348053330 +381561205 513387492 +390745373 524817835 +169896575 324371181 +179080743 335801524 +-393045777 -37064482 +-383861609 -25634139 +-198486692 71887487 +-189302524 83317830 +-409186193 -250220476 +-400002025 -238790133 +18931466 203198268 +28115634 214628611 +258096949 327584660 +267281117 339015003 +-95924438 -276893885 +-86740270 -265463542 +-48915505 314117248 +-39731337 325547591 +279659006 275283591 +288843174 286713934 +520314368 -306737541 +529498536 -295307198 +-150497895 135391094 +-141313727 146821437 +-312401234 416793224 +-303217066 428223567 +230399917 -222762387 +239584085 -211332044 +-243362801 -352830318 +-234178633 -341399975 +-329414418 -174989548 +-320230250 -163559205 +-35315971 499129816 +-26131803 510560159 +263075659 124212994 +272259827 135643337 +807436 -131347122 +9991604 -119916779 +5715730 -288966959 +14899898 -277536616 +491582047 -450814361 +500766215 -439384018 +433249252 -27410574 +442433420 -15980231 +-115815900 444486162 +-106631732 455916505 +-314066201 -217225603 +-304882033 -205795260 +348398566 401497232 +357582734 412927575 +564714525 -210302977 +573898693 -198872634 +-380988837 421425979 +-371804669 432856322 +320630761 -215504121 +329814929 -204073778 +-277771113 -60608843 +-268586945 -49178500 +-163291729 395168796 +-154107561 406599139 +-427365632 -262689356 +-418181464 -251259013 +210238030 -369265221 +219422198 -357834878 +268605549 -449759286 +277789717 -438328943 +84136300 -378377255 +93320468 -366946912 +-176694270 277811625 +-167510102 289241968 +107620615 -141270999 +116804783 -129840656 +-252186143 -416080875 +-243001975 -404650532 +-254885114 399448227 +-245700946 410878570 +2850022 -202951975 +12034190 -191521632 +21724837 243619025 +30909005 255049368 +258177151 -383073252 +267361319 -371642909 +207035543 254681099 +216219711 266111442 +-234062597 84273807 +-224878429 95704150 +427789878 -407075810 +436974046 -395645467 +411966748 -415791446 +421150916 -404361103 +-356539210 235872019 +-347355042 247302362 +-257800668 520441108 +-248616500 531871451 +449688022 -5148733 +458872190 6281610 +81994087 -313072761 +91178255 -301642418 +545609735 -32941679 +554793903 -21511336 +518956873 -84502873 +528141041 -73072530 +397452990 410811360 +406637158 422241703 +-256264078 21455066 +-247079910 32885409 +-200487815 -254777541 +-191303647 -243347198 +219117551 -168265861 +228301719 -156835518 +92538361 -189495334 +101722529 -178064991 +-97035396 -260444510 +-87851228 -249014167 +-47846109 -351156517 +-38661941 -339726174 +-101928472 529370640 +-92744304 540800983 +152373345 497716282 +161557513 509146625 +474083649 92315697 +483267817 103746040 +396834260 -67786313 +406018428 -56355970 +-345495424 -204934787 +-336311256 -193504444 +105045949 -221245970 +114230117 -209815627 +-71690285 -416139291 +-62506117 -404708948 +-226094902 -7585840 +-216910734 3844503 +-53160762 16809517 +-43976594 28239860 +286415750 -277286073 +295599918 -265855730 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-025.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-025.ans new file mode 100644 index 0000000000000000000000000000000000000000..8d46da82b8dace6b4fa38290668a9fda09a87483 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-025.ans @@ -0,0 +1,501 @@ +35041043.41244564205408096313 +1 +2 +3 +4 +6 +7 +8 +9 +10 +11 +13 +14 +17 +18 +21 +23 +25 +27 +30 +32 +33 +35 +38 +42 +43 +45 +47 +48 +50 +51 +54 +56 +57 +59 +60 +65 +66 +69 +71 +72 +73 +74 +76 +77 +78 +80 +81 +83 +84 +87 +89 +91 +92 +95 +96 +99 +101 +102 +103 +104 +108 +111 +113 +114 +117 +118 +119 +122 +124 +125 +131 +135 +137 +141 +143 +144 +146 +147 +148 +149 +150 +152 +153 +155 +157 +158 +161 +165 +167 +168 +170 +171 +173 +174 +176 +177 +179 +181 +183 +185 +186 +188 +189 +192 +194 +197 +201 +203 +209 +213 +216 +218 +219 +221 +224 +228 +230 +231 +234 +236 +243 +246 +248 +249 +252 +254 +255 +257 +261 +264 +265 +266 +269 +270 +271 +272 +276 +278 +279 +281 +282 +288 +290 +291 +293 +296 +302 +306 +307 +308 +311 +312 +314 +317 +319 +320 +322 +323 +327 +330 +332 +333 +336 +338 +339 +343 +344 +345 +346 +347 +348 +350 +351 +352 +353 +355 +356 +360 +363 +365 +366 +368 +374 +376 +377 +378 +380 +381 +383 +384 +386 +387 +389 +391 +392 +394 +395 +398 +401 +402 +404 +406 +407 +409 +411 +413 +414 +416 +419 +420 +422 +425 +428 +430 +431 +432 +435 +436 +437 +441 +443 +444 +446 +447 +448 +450 +451 +452 +455 +456 +459 +461 +462 +468 +470 +471 +473 +474 +476 +480 +482 +483 +485 +486 +488 +491 +492 +493 +494 +497 +498 +500 +501 +502 +503 +505 +506 +507 +509 +510 +513 +516 +519 +521 +525 +528 +529 +530 +533 +536 +537 +540 +541 +543 +545 +547 +548 +552 +554 +555 +557 +558 +563 +564 +565 +566 +570 +573 +576 +579 +581 +584 +585 +588 +590 +594 +596 +597 +600 +605 +606 +608 +612 +614 +615 +618 +621 +624 +625 +626 +629 +630 +632 +633 +635 +636 +638 +639 +641 +642 +645 +647 +648 +649 +650 +655 +656 +660 +662 +663 +665 +668 +669 +675 +677 +678 +680 +682 +683 +684 +687 +689 +690 +692 +695 +698 +701 +702 +704 +707 +708 +710 +713 +715 +717 +719 +722 +726 +728 +730 +732 +735 +737 +738 +740 +743 +744 +746 +747 +749 +750 +752 +753 +755 +756 +757 +758 +759 +761 +762 +764 +767 +768 +770 +771 +772 +773 +775 +776 +779 +785 +786 +789 +790 +791 +795 +796 +797 +801 +803 +804 +806 +807 +808 +809 +811 +812 +815 +819 +823 +824 +827 +830 +831 +834 +836 +837 +839 +842 +843 +845 +846 +848 +852 +855 +857 +858 +860 +861 +864 +865 +866 +867 +870 +873 +876 +877 +878 +881 +882 +884 +887 +888 +890 +894 +897 +899 +900 +901 +902 +903 +905 +908 +909 +911 +912 +914 +915 +917 +918 +921 +923 +924 +927 +929 +932 +933 +936 +938 +939 +941 +942 +945 +947 +948 +951 +956 +959 +960 +962 +963 +965 +966 +968 +969 +972 +974 +975 +978 +981 +983 +986 +987 +989 +990 +991 +992 +996 +997 +998 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-025.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-025.in new file mode 100644 index 0000000000000000000000000000000000000000..b9a7a60f1904067de224bfa634daabbb67fde1f5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-025.in @@ -0,0 +1,1001 @@ +500 +-587718180 -257109316 +190747072 -148603165 +-64946939 -223375322 +-388172610 -195328407 +390292642 -86822256 +134598631 -161594413 +-428356387 398622433 +350108865 507128584 +94414854 432356427 +-810996183 140826234 +-32530931 249332385 +-288224942 174560228 +-734949331 375666123 +43515921 484172274 +-212178090 409400117 +-437941967 30600284 +340523285 139106435 +84829274 64334278 +-364281581 -125040201 +414183671 -16534050 +158489660 -91306207 +-862906585 265724644 +-84441333 374230795 +-340135344 299458638 +-345629603 -251579981 +432835649 -143073830 +177141638 -217845987 +-289598341 273145957 +488866911 381652108 +233172900 306879951 +-466826929 -34848475 +311638323 73657676 +55944312 -1114481 +-635954766 305784430 +142510486 414290581 +-113183525 339518424 +-727626341 -47707423 +50838911 60798728 +-204855100 -13973429 +-307214932 340682419 +471250320 449188570 +215556309 374416413 +-379084074 -229278101 +399381178 -120771950 +143687167 -195544107 +-616137364 350839228 +162327888 459345379 +-93366123 384573222 +-400856100 -21005075 +377609152 87501076 +121915141 12728919 +-394019026 154655724 +384446226 263161875 +128752215 188389718 +-648670785 138048714 +129794467 246554865 +-125899544 171782708 +-406145123 -14784393 +372320129 93721758 +116626118 18949601 +-868569165 390242977 +-90103913 498749128 +-345797924 423976971 +-692606866 271519469 +85858386 380025620 +-169835625 305253463 +-434104991 153896628 +344360261 262402779 +88666250 187630622 +-532689694 144355604 +245775558 252861755 +-9918453 178089598 +-685677776 385833115 +92787476 494339266 +-162906535 419567109 +-650247743 -186955219 +128217509 -78449068 +-127476502 -153221225 +-540460720 -163914925 +238004532 -55408774 +-17689479 -130180931 +-545114579 -97223208 +233350673 11282943 +-22343338 -63489214 +-256310146 219884920 +522155106 328391071 +266461095 253618914 +-812926686 -205147744 +-34461434 -96641593 +-290155445 -171413750 +-748367787 257835116 +30097465 366341267 +-225596546 291569110 +-510031555 -197993466 +268433697 -89487315 +12739686 -164259472 +-253240652 154126299 +525224600 262632450 +269530589 187860293 +-514461950 326472544 +264003302 434978695 +8309291 360206538 +-678272523 338784131 +100192729 447290282 +-155501282 372518125 +-302888089 -139009978 +475577163 -30503827 +219883152 -105275984 +-359532585 383612798 +418932667 492118949 +163238656 417346792 +-528860050 340399638 +249605202 448905789 +-6088809 374133632 +-309989681 342143297 +468475571 450649448 +212781560 375877291 +-797486518 247599839 +-19021266 356105990 +-274715277 281333833 +-841569306 -1923392 +-63104054 106582759 +-318798065 31810602 +-822140590 296263034 +-43675338 404769185 +-299369349 329997028 +-270647273 -201097990 +507817979 -92591839 +252123968 -167363996 +-777380653 -82924440 +1084599 25581711 +-254609412 -49190446 +-313233538 102881042 +465231714 211387193 +209537703 136615036 +-739272069 7944062 +39193183 116450213 +-216500828 41678056 +-343185971 230548593 +435279281 339054744 +179585270 264282587 +-636455113 114781202 +142010139 223287353 +-113683872 148515196 +-497063731 354013843 +281401521 462519994 +25707510 387747837 +-640218624 -235775435 +138246628 -127269284 +-117447383 -202041441 +-459840021 -70553642 +318625231 37952509 +62931220 -36819648 +-864163167 111495041 +-85697915 220001192 +-341391926 145229035 +-759035789 253767684 +19429463 362273835 +-236264548 287501678 +-744754236 136513417 +33711016 245019568 +-221982995 170247411 +-283898398 -142395669 +494566854 -33889518 +238872843 -108661675 +-549146245 354066317 +229319007 462572468 +-26375004 387800311 +-435537873 -22915602 +342927379 85590549 +87233368 10818392 +-660809132 238360899 +117656120 346867050 +-138037891 272094893 +-453567450 203442058 +324897802 311948209 +69203791 237176052 +-878310215 285590718 +-99844963 394096869 +-355538974 319324712 +-384312407 -208403335 +394152845 -99897184 +138458834 -174669341 +-722198178 225964073 +56267074 334470224 +-199426937 259698067 +-603250555 -45327346 +175214697 63178805 +-80479314 -11593352 +-362092782 -117415949 +416372470 -8909798 +160678459 -83681955 +-692902609 -38423634 +85562643 70082517 +-170131368 -4689640 +-779397224 65785870 +-931972 174292021 +-256625983 99519864 +-343621983 364305223 +434843269 472811374 +179149258 398039217 +-693451354 -121771381 +85013898 -13265230 +-170680113 -88037387 +-772299238 -12487160 +6166014 96018991 +-249527997 21246834 +-711585812 79463874 +66879440 187970025 +-188814571 113197868 +-303198765 -35725095 +475266487 72781056 +219572476 -1991101 +-430826183 -152951207 +347639069 -44445056 +91945058 -119217213 +-448193521 349662334 +330271731 458168485 +74577720 383396328 +-765330407 71019556 +13134845 179525707 +-242559166 104753550 +-799547585 -114279225 +-21082333 -5773074 +-276776344 -80545231 +-317574695 359320796 +460890557 467826947 +205196546 393054790 +-561018899 -34030314 +217446353 74475837 +-38247658 -296320 +-248238485 315149693 +530226767 423655844 +274532756 348883687 +-544605592 45988820 +233859660 154494971 +-21834351 79722814 +-487371865 -265498709 +291093387 -156992558 +35399376 -231764715 +-351496478 127596155 +426968774 236102306 +171274763 161330149 +-324521839 341728029 +453943413 450234180 +198249402 375462023 +-670252174 75405789 +108213078 183911940 +-147480933 109139783 +-234275005 4062123 +544190247 112568274 +288496236 37796117 +-562689753 391197558 +215775499 499703709 +-39918512 424931552 +-825160804 52192319 +-46695552 160698470 +-302389563 85926313 +-370603673 132509832 +407861579 241015983 +152167568 166243826 +-303730320 -84165557 +474734932 24340594 +219040921 -50431563 +-808115621 309931874 +-29650369 418438025 +-285344380 343665868 +-683119738 253409582 +95345514 361915733 +-160348497 287143576 +-695824047 396600836 +82641205 505106987 +-173052806 430334830 +-293854819 -135326436 +484610433 -26820285 +228916422 -101592442 +-543150345 -108177927 +235314907 328224 +-20379104 -74443933 +-713738689 201504667 +64726563 310010818 +-190967448 235238661 +-786488319 -14836711 +-8023067 93669440 +-263717078 18897283 +-260468349 302904351 +517996903 411410502 +262302892 336638345 +-375824477 299284780 +402640775 407790931 +146946764 333018774 +-820149865 -102964079 +-41684613 5542072 +-297378624 -69230085 +-749995704 -66575076 +28469548 41931075 +-227224463 -32841082 +-797755549 -30063765 +-19290297 78442386 +-274984308 3670229 +-752520342 127790196 +25944910 236296347 +-229749101 161524190 +-387078113 221332143 +391387139 329838294 +135693128 255066137 +-767057340 245547485 +11407912 354053636 +-244286099 279281479 +-546190927 -53587336 +232274325 54918815 +-23419686 -19853342 +-756866141 -117407618 +21599111 -8901467 +-234094900 -83673624 +-786700320 -87871519 +-8235068 20634632 +-263929079 -54137525 +-847420621 315605577 +-68955369 424111728 +-324649380 349339571 +-794754236 211624175 +-16288984 320130326 +-271982995 245358169 +-261515135 316646966 +516950117 425153117 +261256106 350380960 +-277788075 365666906 +500677177 474173057 +244983166 399400900 +-392261903 308716453 +386203349 417222604 +130509338 342450447 +-282072214 66665670 +496393038 175171821 +240699027 100399664 +-433112993 27223134 +345352259 135729285 +89658248 60957128 +-828710934 382240459 +-50245682 490746610 +-305939693 415974453 +-630670537 -235096411 +147794715 -126590260 +-107899296 -201362417 +-430123383 396462152 +348341869 504968303 +92647858 430196146 +-452369059 299942511 +326096193 408448662 +70402182 333676505 +-827372932 264245019 +-48907680 372751170 +-304601691 297979013 +-731870373 312040936 +46594879 420547087 +-209099132 345774930 +-354719583 150830131 +423745669 259336282 +168051658 184564125 +-300857090 41967116 +477608162 150473267 +221914151 75701110 +-688728385 285499434 +89736867 394005585 +-165957144 319233428 +-698467843 -197091868 +79997409 -88585717 +-175696602 -163357874 +-828727182 399562396 +-50261930 508068547 +-305955941 433296390 +-715953276 36440940 +62511976 144947091 +-193182035 70174934 +-624908607 -238355969 +153556645 -129849818 +-102137366 -204621975 +-549029978 392801018 +229435274 501307169 +-26258737 426535012 +-603758789 -19950061 +174706463 88556090 +-80987548 13783933 +-510941012 247883437 +267524240 356389588 +11830229 281617431 +-822204181 -82945162 +-43738929 25560989 +-299432940 -49211168 +-803001654 120050583 +-24536402 228556734 +-280230413 153784577 +-746779698 331280550 +31685554 439786701 +-224008457 365014544 +-883209826 71064903 +-104744574 179571054 +-360438585 104798897 +-540386105 -140947535 +238079147 -32441384 +-17614864 -107213541 +-691970210 37400813 +86495042 145906964 +-169198969 71134807 +-771146397 396020669 +7318855 504526820 +-248375156 429754663 +-328815100 -200603131 +449650152 -92096980 +193956141 -166869137 +-583988296 -14573997 +194476956 93932154 +-61217055 19159997 +-731276170 101179323 +47189082 209685474 +-208504929 134913317 +-565020066 204490094 +213445186 312996245 +-42248825 238224088 +-812324355 -183290426 +-33859103 -74784275 +-289553114 -149556432 +-846666144 -107003593 +-68200892 1502558 +-323894903 -73269599 +-679444142 33714628 +99021110 142220779 +-156672901 67448622 +-562087546 -236349874 +216377706 -127843723 +-39316305 -202615880 +-365151724 188480457 +413313528 296986608 +157619517 222214451 +-695820122 359214531 +82645130 467720682 +-173048881 392948525 +-306107885 287692500 +472357367 396198651 +216663356 321426494 +-423509369 32164784 +354955883 140670935 +99261872 65898778 +-551289594 225647614 +227175658 334153765 +-28518353 259381608 +-364911955 -209539948 +413553297 -101033797 +157859286 -175805954 +-767824306 306491201 +10640946 414997352 +-245053065 340225195 +-664307689 67432177 +114157563 175938328 +-141536448 101166171 +-371627857 -164088501 +406837395 -55582350 +151143384 -130354507 +-590769674 -13360123 +187695578 95146028 +-67998433 20373871 +-859940025 222173093 +-81474773 330679244 +-337168784 255907087 +-346139546 353318919 +432325706 461825070 +176631695 387052913 +-627229743 349921945 +151235509 458428096 +-104458502 383655939 +-717781079 173963778 +60684173 282469929 +-195009838 207697772 +-543540565 27350870 +234924687 135857021 +-20769324 61084864 +-447902001 122052504 +330563251 230558655 +74869240 155786498 +-709938740 140482795 +68526512 248988946 +-187167499 174216789 +-489740735 -174868281 +288724517 -66362130 +33030506 -141134287 +-699253413 -178460912 +79211839 -69954761 +-176482172 -144726918 +-482525158 136508073 +295940094 245014224 +40246083 170242067 +-845092391 297264538 +-66627139 405770689 +-322321150 330998532 +-471727430 35502751 +306737822 144008902 +51043811 69236745 +-506949970 157153701 +271515282 265659852 +15821271 190887695 +-721001717 368245193 +57463535 476751344 +-198230476 401979187 +-429389309 390713624 +349075943 499219775 +93381932 424447618 +-616978260 4922577 +161486992 113428728 +-94207019 38656571 +-295974262 -168470919 +482490990 -59964768 +226796979 -134736925 +-327970772 349927872 +450494480 458434023 +194800469 383661866 +-327283834 372049527 +451181418 480555678 +195487407 405783521 +-543861840 60747203 +234603412 169253354 +-21090599 94481197 +-452257980 157200846 +326207272 265706997 +70513261 190934840 +-331515942 46757395 +446949310 155263546 +191255299 80491389 +-762863448 360279112 +15601804 468785263 +-240092207 394013106 +-651426843 204099369 +127038409 312605520 +-128655602 237833363 +-425283181 -104412948 +353182071 4093203 +97488060 -70678954 +-291281434 -1949909 +487183818 106556242 +231489807 31784085 +-344064517 -235445100 +434400735 -126938949 +178706724 -201711106 +-868719480 -24361622 +-90254228 84144529 +-345948239 9372372 +-812522483 146336803 +-34057231 254842954 +-289751242 180070797 +-246633511 38004049 +531831741 146510200 +276137730 71738043 +-600181945 213647742 +178283307 322153893 +-77410704 247381736 +-584207372 96752304 +194257880 205258455 +-61436131 130486298 +-234620726 -157315873 +543844526 -48809722 +288150515 -123581879 +-601125947 -29300675 +177339305 79205476 +-78354706 4433319 +-736724533 393729859 +41740719 502236010 +-213953292 427463853 +-375622557 142691361 +402842695 251197512 +147148684 176425355 +-229454703 365641922 +549010549 474148073 +293316538 399375916 +-237036224 27403314 +541429028 135909465 +285735017 61137308 +-329859106 -107589770 +448606146 916381 +192912135 -73855776 +-798421779 -245633012 +-19956527 -137126861 +-275650538 -211899018 +-523034290 325084546 +255430962 433590697 +-263049 358818540 +-351433808 39366878 +427031444 147873029 +171337433 73100872 +-595363295 -188553041 +183101957 -80046890 +-72592054 -154819047 +-305935879 266514839 +472529373 375020990 +216835362 300248833 +-539217038 -22152324 +239248214 86353827 +-16445797 11581670 +-240365946 -27600061 +538099306 80906090 +282405295 6133933 +-370026349 -82117990 +408438903 26388161 +152744892 -48383996 +-623187376 -33411527 +155277876 75094624 +-100416135 322467 +-821342249 -190809883 +-42876997 -82303732 +-298571008 -157075889 +-363260321 -149945972 +415204931 -41439821 +159510920 -116211978 +-641419836 88727673 +137045416 197233824 +-118648595 122461667 +-355650654 337630668 +422814598 446136819 +167120587 371364662 +-359854780 163581667 +418610472 272087818 +162916461 197315661 +-268438816 2869567 +510026436 111375718 +254332425 36603561 +-697034503 326520935 +81430749 435027086 +-174263262 360254929 +-682501193 268121395 +95964059 376627546 +-159729952 301855389 +-378034771 5289101 +400430481 113795252 +144736470 39023095 +-541288349 177193606 +237176903 285699757 +-18517108 210927600 +-437257621 230697945 +341207631 339204096 +85513620 264431939 +-498985756 148068396 +279479496 256574547 +23785485 181802390 +-379029224 175034237 +399436028 283540388 +143742017 208768231 +-645724051 105972669 +132741201 214478820 +-122952810 139706663 +-860773201 173432349 +-82307949 281938500 +-338001960 207166343 +-223722875 -243157707 +554742377 -134651556 +299048366 -209423713 +-827027712 169712194 +-48562460 278218345 +-304256471 203446188 +-276339148 93100919 +502126104 201607070 +246432093 126834913 +-440476845 252799543 +337988407 361305694 +82294396 286533537 +-528376474 75285743 +250088778 183791894 +-5605233 109019737 +-500366935 -132889352 +278098317 -24383201 +22404306 -99155358 +-258376369 -203785266 +520088883 -95279115 +264394872 -170051272 +-234819458 54496411 +543645794 163002562 +287951783 88230405 +-533271653 -90945985 +245193599 17560166 +-10500412 -57211991 +-678928498 29351012 +99536754 137857163 +-156157257 63085006 +-642424845 -233584353 +136040407 -125078202 +-119653604 -199850359 +-364547992 196305637 +413917260 304811788 +158223249 230039631 +-504809069 205773301 +273656183 314279452 +17962172 239507295 +-728669875 -9377766 +49795377 99128385 +-205898634 24356228 +-694183973 -32234811 +84281279 76271340 +-171412732 1499183 +-732757541 -213936090 +45707711 -105429939 +-209986300 -180202096 +-485225672 -38296112 +293239580 70210039 +37545569 -4562118 +-879385313 97885114 +-100920061 206391265 +-356614072 131619108 +-535967682 -209758707 +242497570 -101252556 +-13196441 -176024713 +-848537811 -166541086 +-70072559 -58034935 +-325766570 -132807092 +-674085690 -256876709 +104379562 -148370558 +-151314449 -223142715 +-383059130 -237536854 +395406122 -129030703 +139712111 -203802860 +-797916203 -141962608 +-19450951 -33456457 +-275144962 -108228614 +-749656484 -107642812 +28808768 863339 +-226885243 -73908818 +-287262602 67175832 +491202650 175681983 +235508639 100909826 +-764477221 133521626 +13988031 242027777 +-241705980 167255620 +-326725537 -256704140 +451739715 -148197989 +196045704 -222970146 +-250251722 -13523576 +528213530 94982575 +272519519 20210418 +-557835158 -45087649 +220630094 63418502 +-35063917 -11353655 +-774815007 -154498862 +3650245 -45992711 +-252043766 -120764868 +-648803601 77429757 +129661651 185935908 +-126032360 111163751 +-477680833 238987517 +300784419 347493668 +45090408 272721511 +-581501338 -123728144 +196963914 -15221993 +-58730097 -89994150 +-565956941 -51891517 +212508311 56614634 +-43185700 -18157523 +-550426814 -29228127 +228038438 79278024 +-27655573 4505867 +-653406032 -209923275 +125059220 -101417124 +-130634791 -176189281 +-882836566 -248142646 +-104371314 -139636495 +-360065325 -214408652 +-547125319 99672945 +231339933 208179096 +-24354078 133406939 +-478951635 -25300751 +299513617 83205400 +43819606 8433243 +-384176600 291341212 +394288652 399847363 +138594641 325075206 +-681472436 340141934 +96992816 448648085 +-158701195 373875928 +-692318003 391682869 +86147249 500189020 +-169546762 425416863 +-857763170 45969337 +-79297918 154475488 +-334991929 79703331 +-857859359 226880464 +-79394107 335386615 +-335088118 260614458 +-453733271 282566591 +324731981 391072742 +69037970 316300585 +-226770042 296701001 +551695210 405207152 +296001199 330434995 +-757546337 315231464 +20918915 423737615 +-234775096 348965458 +-394261584 -158242088 +384203668 -49735937 +128509657 -124508094 +-772084606 289655097 +6380646 398161248 +-249313365 323389091 +-302396810 393053868 +476068442 501560019 +220374431 426787862 +-421162120 260292040 +357303132 368798191 +101609121 294026034 +-651930828 105196475 +126534424 213702626 +-129159587 138930469 +-813217870 138177892 +-34752618 246684043 +-290446629 171911886 +-849024034 340377301 +-70558782 448883452 +-326252793 374111295 +-855851999 -17238260 +-77386747 91267891 +-333080758 16495734 +-640122306 -144332361 +138342946 -35826210 +-117351065 -110598367 +-802057717 363141539 +-23592465 471647690 +-279286476 396875533 +-813311932 227208583 +-34846680 335714734 +-290540691 260942577 +-877436292 -191903783 +-98971040 -83397632 +-354665051 -158169789 +-482436608 91284465 +296028644 199790616 +40334633 125018459 +-229373311 -93051176 +549091941 15454975 +293397930 -59317182 +-709877241 259266321 +68588011 367772472 +-187106000 293000315 +-730121631 -33007050 +48343621 75499101 +-207350390 726944 +-532001774 393015031 +246463478 501521182 +-9230533 426749025 +-701810590 154404386 +76654662 262910537 +-179039349 188138380 +-657282145 -65256361 +121183107 43249790 +-134510904 -31522367 +-281144334 146551868 +497320918 255058019 +241626907 180285862 +-260640496 -57118762 +517824756 51387389 +262130745 -23384768 +-454308445 -90841953 +324156807 17664198 +68462796 -57107959 +-541822098 -109315840 +236643154 -809689 +-19050857 -75581846 +-322200533 -114414751 +456264719 -5908600 +200570708 -80680757 +-628059506 -215772280 +150405746 -107266129 +-105288265 -182038286 +-323771296 200967392 +454693956 309473543 +198999945 234701386 +-287647269 -21239813 +490817983 87266338 +235123972 12494181 +-319193481 373021008 +459271771 481527159 +203577760 406755002 +-751875477 343084912 +26589775 451591063 +-229104236 376818906 +-545839296 269432168 +232625956 377938319 +-23068055 303166162 +-772943623 144237754 +5521629 252743905 +-250172382 177971748 +-499372902 199691909 +279092350 308198060 +23398339 233425903 +-778057287 -205811189 +407965 -97305038 +-255286046 -172077195 +-352125797 111145711 +426339455 219651862 +170645444 144879705 +-352681762 51784285 +425783490 160290436 +170089479 85518279 +-402030228 273692824 +376435024 382198975 +120741013 307426818 +-618223322 -243718649 +160241930 -135212498 +-95452081 -209984655 +-622442941 280863492 +156022311 389369643 +-99671700 314597486 +-549757810 378441170 +228707442 486947321 +-26986569 412175164 +-478209507 -35431231 +300255745 73074920 +44561734 -1697237 +-644596418 136408195 +133868834 244914346 +-121825177 170142189 +-483985425 -164612195 +294479827 -56106044 +38785816 -130878201 +-248071382 -9987762 +530393870 98518389 +274699859 23746232 +-681487782 134296645 +96977470 242802796 +-158716541 168030639 +-237983012 364031716 +540482240 472537867 +284788229 397765710 +-790785125 174797738 +-12319873 283303889 +-268013884 208531732 +-479807622 371802681 +298657630 480308832 +42963619 405536675 +-410839870 90874505 +367625382 199380656 +111931371 124608499 +-502774671 -167542973 +275690581 -59036822 +19996570 -133808979 +-528092158 -71116863 +250373094 37389288 +-5320917 -37382869 +-373339561 393162597 +405125691 501668748 +149431680 426896591 +-474522135 275669890 +303943117 384176041 +48249106 309403884 +-263855328 387661178 +514609924 496167329 +258915913 421395172 +-288737736 -244426708 +489727516 -135920557 +234033505 -210692714 +-669834771 -264182602 +108630481 -155676451 +-147063530 -230448608 +-634010869 241268989 +144454383 349775140 +-111239628 275002983 +-543461060 -202174262 +235004192 -93668111 +-20689819 -168440268 +-406673242 293404370 +371792010 401910521 +116097999 327138364 +-587140396 -151263900 +191324856 -42757749 +-64369155 -117529906 +-257345120 -61935127 +521120132 46571024 +265426121 -28201133 +-540847855 -177701284 +237617397 -69195133 +-18076614 -143967290 +-275070577 196498956 +503394675 305005107 +247700664 230232950 +-335659372 -1371655 +442805880 107134496 +187111869 32362339 +-675958030 14293291 +102507222 122799442 +-153186789 48027285 +-464853916 342011102 +313611336 450517253 +57917325 375745096 +-478757047 61634344 +299708205 170140495 +44014194 95368338 +-828147182 110474696 +-49681930 218980847 +-305375941 144208690 +-340864558 199116803 +437600694 307622954 +181906683 232850797 +-799354453 301001856 +-20889201 409508007 +-276583212 334735850 +-904272871 872618871 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-026.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-026.ans new file mode 100644 index 0000000000000000000000000000000000000000..3a187de08ff7e829035e2dbefc79c16d30570808 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-026.ans @@ -0,0 +1,501 @@ +362818607.37924224138259887695 +2 +3 +4 +8 +9 +12 +13 +14 +18 +19 +22 +23 +24 +28 +29 +32 +33 +34 +38 +39 +42 +43 +44 +48 +49 +52 +53 +54 +58 +59 +62 +63 +64 +68 +69 +72 +73 +74 +78 +79 +82 +83 +84 +88 +89 +92 +93 +94 +98 +99 +102 +103 +104 +108 +109 +112 +113 +114 +118 +119 +122 +123 +124 +128 +129 +132 +133 +134 +138 +139 +142 +143 +144 +148 +149 +152 +153 +154 +158 +159 +162 +163 +164 +168 +169 +172 +173 +174 +178 +179 +182 +183 +184 +188 +189 +192 +193 +194 +198 +199 +202 +203 +204 +208 +209 +212 +213 +214 +218 +219 +222 +223 +224 +228 +229 +232 +233 +234 +238 +239 +242 +243 +244 +248 +249 +252 +253 +254 +258 +259 +262 +263 +264 +268 +269 +272 +273 +274 +278 +279 +282 +283 +284 +288 +289 +292 +293 +294 +298 +299 +302 +303 +304 +308 +309 +312 +313 +314 +318 +319 +322 +323 +324 +328 +329 +332 +333 +334 +338 +339 +342 +343 +344 +348 +349 +352 +353 +354 +358 +359 +362 +363 +364 +368 +369 +372 +373 +374 +378 +379 +382 +383 +384 +388 +389 +392 +393 +394 +398 +399 +402 +403 +404 +408 +409 +412 +413 +414 +418 +419 +422 +423 +424 +428 +429 +432 +433 +434 +438 +439 +442 +443 +444 +448 +449 +452 +453 +454 +458 +459 +462 +463 +464 +468 +469 +472 +473 +474 +478 +479 +482 +483 +484 +488 +489 +492 +493 +494 +498 +499 +502 +503 +504 +508 +509 +512 +513 +514 +518 +519 +522 +523 +524 +528 +529 +532 +533 +534 +538 +539 +542 +543 +544 +548 +549 +552 +553 +554 +558 +559 +562 +563 +564 +568 +569 +572 +573 +574 +578 +579 +582 +583 +584 +588 +589 +592 +593 +594 +598 +599 +602 +603 +604 +608 +609 +612 +613 +614 +618 +619 +622 +623 +624 +628 +629 +632 +633 +634 +638 +639 +642 +643 +644 +648 +649 +652 +653 +654 +658 +659 +662 +663 +664 +668 +669 +672 +673 +674 +678 +679 +682 +683 +684 +688 +689 +692 +693 +694 +698 +699 +702 +703 +704 +708 +709 +712 +713 +714 +718 +719 +722 +723 +724 +728 +729 +732 +733 +734 +738 +739 +742 +743 +744 +748 +749 +752 +753 +754 +758 +759 +762 +763 +764 +768 +769 +772 +773 +774 +778 +779 +782 +783 +784 +788 +789 +792 +793 +794 +798 +799 +802 +803 +804 +808 +809 +812 +813 +814 +818 +819 +822 +823 +824 +828 +829 +832 +833 +834 +838 +839 +842 +843 +844 +848 +849 +852 +853 +854 +858 +859 +862 +863 +864 +868 +869 +872 +873 +874 +878 +879 +882 +883 +884 +888 +889 +892 +893 +894 +898 +899 +902 +903 +904 +908 +909 +912 +913 +914 +918 +919 +922 +923 +924 +928 +929 +932 +933 +934 +938 +939 +942 +943 +944 +948 +949 +952 +953 +954 +958 +959 +962 +963 +964 +968 +969 +972 +973 +974 +978 +979 +982 +983 +984 +988 +989 +992 +993 +994 +998 +999 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-026.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-026.in new file mode 100644 index 0000000000000000000000000000000000000000..43605a0b64c352cebb0aab58d98afe489e794a84 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-026.in @@ -0,0 +1,1001 @@ +500 +-123278750 -776409305 +-861148837 231282853 +-948041115 -205877273 +-684957357 -57816941 +674501583 -571379164 +102508104 786779058 +-454244310 -592143432 +-625024153 821197728 +-757119226 339930652 +736627309 54847994 +-76555758 -700540348 +-814425845 307151810 +-901318123 -130008316 +-638234365 18052016 +721224575 -495510207 +149231096 862648015 +-407521318 -516274475 +-578301161 897066685 +-710396234 415799609 +783350301 130716951 +-88397564 -837540558 +-826267651 170151600 +-913159929 -267008526 +-650076171 -118948194 +709382769 -632510417 +137389290 725647805 +-419363124 -653274685 +-590142967 760066475 +-722238040 278799399 +771508495 -6283259 +-105555704 -794205726 +-843425791 213486432 +-930318069 -223673694 +-667234311 -75613362 +692224629 -589175585 +120231150 768982637 +-436521264 -609939853 +-607301107 803401307 +-739396180 322134231 +754350355 37051573 +-3017189 -701500075 +-740887276 306192083 +-827779554 -130968043 +-564695796 17092289 +794763144 -496469934 +222769665 861688288 +-333982749 -517234202 +-504762592 896106958 +-636857665 414839882 +856888870 129757224 +-137726180 -696335367 +-875596267 311356791 +-962488545 -125803335 +-699404787 22256997 +660054153 -491305226 +88060674 866852996 +-468691740 -512069494 +-639471583 901271666 +-771566656 420004590 +722179879 134921932 +-172681228 -714814771 +-910551315 292877387 +-997443593 -144282739 +-734359835 3777593 +625099105 -509784630 +53105626 848373592 +-503646788 -530548898 +-674426631 882792262 +-806521704 401525186 +687224831 116442528 +6528463 -797362925 +-731341624 210329233 +-818233902 -226830893 +-555150144 -78770561 +804308796 -592332784 +232315317 765825438 +-324437097 -613097052 +-495216940 800244108 +-627312013 318977032 +866434522 33894374 +-61138166 -802110708 +-799008253 205581450 +-885900531 -231578676 +-622816773 -83518344 +736642167 -597080567 +164648688 761077655 +-392103726 -617844835 +-562883569 795496325 +-694978642 314229249 +798767893 29146591 +-170878515 -824129591 +-908748602 183562567 +-995640880 -253597559 +-732557122 -105537227 +626901818 -619099450 +54908339 739058772 +-501844075 -639863718 +-672623918 773477442 +-804718991 292210366 +689027544 7127708 +-172624054 -756869466 +-910494141 250822692 +-997386419 -186337434 +-734302661 -38277102 +625156279 -551839325 +53162800 806318897 +-503589614 -572603593 +-674369457 840737567 +-806464530 359470491 +687282005 74387833 +-120367299 -825644120 +-858237386 182048038 +-945129664 -255112088 +-682045906 -107051756 +677413034 -620613979 +105419555 737544243 +-451332859 -641378247 +-622112702 771962913 +-754207775 290695837 +739538760 5613179 +-126709593 -850800361 +-864579680 156891797 +-951471958 -280268329 +-688388200 -132207997 +671070740 -645770220 +99077261 712388002 +-457675153 -666534488 +-628454996 746806672 +-760550069 265539596 +733196466 -19543062 +-113914081 -819352358 +-851784168 188339800 +-938676446 -248820326 +-675592688 -100759994 +683866252 -614322217 +111872773 743836005 +-444879641 -635086485 +-615659484 778254675 +-747754557 296987599 +745991978 11904941 +-15022049 -688841875 +-752892136 318850283 +-839784414 -118309843 +-576700656 29750489 +782758284 -483811734 +210764805 874346488 +-345987609 -504576002 +-516767452 908765158 +-648862525 427498082 +844884010 142415424 +-103288380 -712114612 +-841158467 295577546 +-928050745 -141582580 +-664966987 6477752 +694491953 -507084471 +122498474 851073751 +-434253940 -527848739 +-605033783 885492421 +-737128856 404225345 +756617679 119142687 +-3838864 -758723561 +-741708951 248968597 +-828601229 -188191529 +-565517471 -40131197 +793941469 -553693420 +221947990 804464802 +-334804424 -574457688 +-505584267 838883472 +-637679340 357616396 +856067195 72533738 +363138 -787531953 +-737506949 220160205 +-824399227 -216999921 +-561315469 -68939589 +798143471 -582501812 +226149992 775656410 +-330602422 -603266080 +-501382265 810075080 +-633477338 328808004 +860269197 43725346 +-81658281 -795857308 +-819528368 211834850 +-906420646 -225325276 +-643336888 -77264944 +716122052 -590827167 +144128573 767331055 +-412623841 -611591435 +-583403684 801749725 +-715498757 320482649 +778247778 35399991 +-48195223 -691541911 +-786065310 316150247 +-872957588 -121009879 +-609873830 27050453 +749585110 -486511770 +177591631 871646452 +-379160783 -507276038 +-549940626 906065122 +-682035699 424798046 +811710836 139715388 +-163004127 -806797087 +-900874214 200895071 +-987766492 -236265055 +-724682734 -88204723 +634776206 -601766946 +62782727 756391276 +-493969687 -622531214 +-664749530 790809946 +-796844603 309542870 +696901932 24460212 +-124757582 -840169739 +-862627669 167522419 +-949519947 -269637707 +-686436189 -121577375 +673022751 -635139598 +101029272 723018624 +-455723142 -655903866 +-626502985 757437294 +-758598058 276170218 +735148477 -8912440 +-165538049 -828432375 +-903408136 179259783 +-990300414 -257900343 +-727216656 -109840011 +632242284 -623402234 +60248805 734755988 +-496503609 -644166502 +-667283452 769174658 +-799378525 287907582 +694368010 2824924 +-69717894 -795015256 +-807587981 212676902 +-894480259 -224483224 +-631396501 -76422892 +728062439 -589985115 +156068960 768173107 +-400683454 -610749383 +-571463297 802591777 +-703558370 321324701 +790188165 36242043 +-53210673 -715744431 +-791080760 291947727 +-877973038 -145212399 +-614889280 2847933 +744569660 -510714290 +172576181 847443932 +-384176233 -531478558 +-554956076 881862602 +-687051149 400595526 +806695386 115512868 +-95915833 -875985806 +-833785920 131706352 +-920678198 -305453774 +-657594440 -157393442 +701864500 -670955665 +129871021 687202557 +-426881393 -691719933 +-597661236 721621227 +-729756309 240354151 +763990226 -44728507 +-160760747 -825155681 +-898630834 182536477 +-985523112 -254623649 +-722439354 -106563317 +637019586 -620125540 +65026107 738032682 +-491726307 -640889808 +-662506150 772451352 +-794601223 291184276 +699145312 6101618 +-6757286 -848862564 +-744627373 158829594 +-831519651 -278330532 +-568435893 -130270200 +791023047 -643832423 +219029568 714325799 +-337722846 -664596691 +-508502689 748744469 +-640597762 267477393 +853148773 -17605265 +-87228513 -723252541 +-825098600 284439617 +-911990878 -152720509 +-648907120 -4660177 +710551820 -518222400 +138558341 839935822 +-418194073 -538986668 +-588973916 874354492 +-721068989 393087416 +772677546 108004758 +-138129114 -751219357 +-875999201 256472801 +-962891479 -180687325 +-699807721 -32626993 +659651219 -546189216 +87657740 811969006 +-469094674 -566953484 +-639874517 846387676 +-771969590 365120600 +721776945 80037942 +-67972736 -688720643 +-805842823 318971515 +-892735101 -118188611 +-629651343 29871721 +729807597 -483690502 +157814118 874467720 +-398938296 -504454770 +-569718139 908886390 +-701813212 427619314 +791933323 142536656 +-2364279 -867157537 +-740234366 140534621 +-827126644 -296625505 +-564042886 -148565173 +795416054 -662127396 +223422575 696030826 +-333329839 -682891664 +-504109682 730449496 +-636204755 249182420 +857541780 -35900238 +-137852021 -795625036 +-875722108 212067122 +-962614386 -225093004 +-699530628 -77032672 +659928312 -590594895 +87934833 767563327 +-468817581 -611359163 +-639597424 801981997 +-771692497 320714921 +722054038 35632263 +-76785268 -736300949 +-814655355 271391209 +-901547633 -165768917 +-638463875 -17708585 +720995065 -531270808 +149001586 826887414 +-407750828 -552035076 +-578530671 861306084 +-710625744 380039008 +783120791 94956350 +-147794316 -783571490 +-885664403 224120668 +-972556681 -213039458 +-709472923 -64979126 +649986017 -578541349 +77992538 779616873 +-478759876 -599305617 +-649539719 814035543 +-781634792 332768467 +712111743 47685809 +9318995 -745718737 +-728551092 261973421 +-815443370 -175186705 +-552359612 -27126373 +807099328 -540688596 +235105849 817469626 +-321646565 -561452864 +-492426408 851888296 +-624521481 370621220 +869225054 85538562 +-132496982 -809709337 +-870367069 197982821 +-957259347 -239177305 +-694175589 -91116973 +665283351 -604679196 +93289872 753479026 +-463462542 -625443464 +-634242385 787897696 +-766337458 306630620 +727409077 21547962 +-111858592 -841568517 +-849728679 166123641 +-936620957 -271036485 +-673537199 -122976153 +685921741 -636538376 +113928262 721619846 +-442824152 -657302644 +-613603995 756038516 +-745699068 274771440 +748047467 -10311218 +-172003400 -710229760 +-909873487 297462398 +-996765765 -139697728 +-733682007 8362604 +625776933 -505199619 +53783454 852958603 +-502968960 -525963887 +-673748803 887377273 +-805843876 406110197 +687902659 121027539 +-84982825 -745066493 +-822852912 262625665 +-909745190 -174534461 +-646661432 -26474129 +712797508 -540036352 +140804029 818121870 +-415948385 -560800620 +-586728228 852540540 +-718823301 371273464 +774923234 86190806 +-124525536 -854127824 +-862395623 153564334 +-949287901 -283595792 +-686204143 -135535460 +673254797 -649097683 +101261318 709060539 +-455491096 -669861951 +-626270939 743479209 +-758366012 262212133 +735380523 -22870525 +-82056189 -859896770 +-819926276 147795388 +-906818554 -289364738 +-643734796 -141304406 +715724144 -654866629 +143730665 703291593 +-413021749 -675630897 +-583801592 737710263 +-715896665 256443187 +777849870 -28639471 +-31031310 -874091991 +-768901397 133600167 +-855793675 -303559959 +-592709917 -155499627 +766749023 -669061850 +194755544 689096372 +-361996870 -689826118 +-532776713 723515042 +-664871786 242247966 +828874749 -42834692 +-67838082 -711006724 +-805708169 296685434 +-892600447 -140474692 +-629516689 7585640 +729942251 -505976583 +157948772 852181639 +-398803642 -526740851 +-569583485 886600309 +-701678558 405333233 +792067977 120250575 +-20837113 -800528184 +-758707200 207163974 +-845599478 -229996152 +-582515720 -81935820 +776943220 -595498043 +204949741 762660179 +-351802673 -616262311 +-522582516 797078849 +-654677589 315811773 +839068946 30729115 +-96756509 -831136344 +-834626596 176555814 +-921518874 -260604312 +-658435116 -112543980 +701023824 -626106203 +129030345 732052019 +-427722069 -646870471 +-598501912 766470689 +-730596985 285203613 +763149550 120955 +-51453909 -707724077 +-789323996 299968081 +-876216274 -137192045 +-613132516 10868287 +746326424 -502693936 +174332945 855464286 +-382419469 -523458204 +-553199312 889882956 +-685294385 408615880 +808452150 123533222 +-14912751 -734061678 +-752782838 273630480 +-839675116 -163529646 +-576591358 -15469314 +782867582 -529031537 +210874103 829126685 +-345878311 -549795805 +-516658154 863545355 +-648753227 382278279 +844993308 97195621 +-155124718 -710481257 +-892994805 297210901 +-979887083 -139949225 +-716803325 8111107 +642655615 -505451116 +70662136 852707106 +-486090278 -526215384 +-656870121 887125776 +-788965194 405858700 +704781341 120776042 +-96888381 -848706662 +-834758468 158985496 +-921650746 -278174630 +-658566988 -130114298 +700891952 -643676521 +128898473 714481701 +-427853941 -664440789 +-598633784 748900371 +-730728857 267633295 +763017678 -17449363 +-172014383 -699078786 +-909884470 308613372 +-996776748 -128546754 +-733692990 19513578 +625765950 -494048645 +53772471 864109577 +-502979943 -514812913 +-673759786 898528247 +-805854859 417261171 +687891676 132178513 +-157462901 -799627984 +-895332988 208064174 +-982225266 -229095952 +-719141508 -81035620 +640317432 -594597843 +68323953 763560379 +-488428461 -615362111 +-659208304 797979049 +-791303377 316711973 +702443158 31629315 +-96008356 -766621033 +-833878443 241071125 +-920770721 -196089001 +-657686963 -48028669 +701771977 -561590892 +129778498 796567330 +-426973916 -582355160 +-597753759 830986000 +-729848832 349718924 +763897703 64636266 +-171457281 -798456289 +-909327368 209235869 +-996219646 -227924257 +-733135888 -79863925 +626323052 -593426148 +54329573 764732074 +-502422841 -614190416 +-673202684 799150744 +-805297757 317883668 +688448778 32801010 +-160505545 -773965230 +-898375632 233726928 +-985267910 -203433198 +-722184152 -55372866 +637274788 -568935089 +65281309 789223133 +-491471105 -589699357 +-662250948 823641803 +-794346021 342374727 +699400514 57292069 +-42056308 -726414216 +-779926395 281277942 +-866818673 -155882184 +-603734915 -7821852 +755724025 -521384075 +183730546 836774147 +-373021868 -542148343 +-543801711 871192817 +-675896784 389925741 +817849751 104843083 +-161280966 -768490654 +-899151053 239201504 +-986043331 -197958622 +-722959573 -49898290 +636499367 -563460513 +64505888 794697709 +-492246526 -584224781 +-663026369 829116379 +-795121442 347849303 +698625093 62766645 +-107088487 -831703393 +-844958574 175988765 +-931850852 -261171361 +-668767094 -113111029 +690691846 -626673252 +118698367 731484970 +-438054047 -647437520 +-608833890 765903640 +-740928963 284636564 +752817572 -446094 +17851769 -685246966 +-720018318 322445192 +-806910596 -114714934 +-543826838 33345398 +815632102 -480216825 +243638623 877941397 +-313113791 -500981093 +-483893634 912360067 +-615988707 431092991 +877757828 146010333 +-164956744 -791382523 +-902826831 216309635 +-989719109 -220850491 +-726635351 -72790159 +632823589 -586352382 +60830110 771805840 +-495922304 -607116650 +-666702147 806224510 +-798797220 324957434 +694949315 39874776 +-98714187 -827150315 +-836584274 180541843 +-923476552 -256618283 +-660392794 -108557951 +699066146 -622120174 +127072667 736038048 +-429679747 -642884442 +-600459590 770456718 +-732554663 289189642 +761191872 4106984 +10270634 -873833215 +-727599453 133858943 +-814491731 -303301183 +-551407973 -155240851 +808050967 -668803074 +236057488 689355148 +-320694926 -689567342 +-491474769 723773818 +-623569842 242506742 +870176693 -42575916 +-126742523 -763230369 +-864612610 244461789 +-951504888 -192698337 +-688421130 -44638005 +671037810 -558200228 +99044331 799957994 +-457708083 -578964496 +-628487926 834376664 +-760582999 353109588 +733163536 68026930 +-52404979 -684789506 +-790275066 322902652 +-877167344 -114257474 +-614083586 33802858 +745375354 -479759365 +173381875 878398857 +-383370539 -500523633 +-554150382 912817527 +-686245455 431550451 +807501080 146467793 +-118814482 -828918165 +-856684569 178773993 +-943576847 -258386133 +-680493089 -110325801 +678965851 -623888024 +106972372 734270198 +-449780042 -644652292 +-620559885 768688868 +-752654958 287421792 +741091577 2339134 +-39243907 -831865016 +-777113994 175827142 +-864006272 -261332984 +-600922514 -113272652 +758536426 -626834875 +186542947 731323347 +-370209467 -647599143 +-540989310 765742017 +-673084383 284474941 +820662152 -607717 +-133492938 -809763457 +-871363025 197928701 +-958255303 -239231425 +-695171545 -91171093 +664287395 -604733316 +92293916 753424906 +-464458498 -625497584 +-635238341 787843576 +-767333414 306576500 +726413121 21493842 +-21369864 -828415771 +-759239951 179276387 +-846132229 -257883739 +-583048471 -109823407 +776410469 -623385630 +204416990 734772592 +-352335424 -644149898 +-523115267 769191262 +-655210340 287924186 +838536195 2841528 +-10894828 -846893093 +-748764915 160799065 +-835657193 -276361061 +-572573435 -128300729 +786885505 -641862952 +214892026 716295270 +-341860388 -662627220 +-512640231 750713940 +-644735304 269446864 +849011231 -15635794 +-103740428 -723695201 +-841610515 283996957 +-928502793 -153163169 +-665419035 -5102837 +694039905 -518665060 +122046426 839493162 +-434705988 -539429328 +-605485831 873911832 +-737580904 392644756 +756165631 107562098 +-46909610 -770422780 +-784779697 237269378 +-871671975 -199890748 +-608588217 -51830416 +750870723 -565392639 +178877244 792765583 +-377875170 -586156907 +-548655013 827184253 +-680750086 345917177 +812996449 60834519 +-101269899 -743104922 +-839139986 264587236 +-926032264 -172572890 +-662948506 -24512558 +696510434 -538074781 +124516955 820083441 +-432235459 -558839049 +-603015302 854502111 +-735110375 373235035 +758636160 88152377 +-78982552 -859114353 +-816852639 148577805 +-903744917 -288582321 +-640661159 -140521989 +718797781 -654084212 +146804302 704074010 +-409948112 -674848480 +-580727955 738492680 +-712823028 257225604 +780923507 -27857054 +-164387207 -742079006 +-902257294 265613152 +-989149572 -171546974 +-726065814 -23486642 +633393126 -537048865 +61399647 821109357 +-495352767 -557813133 +-666132610 855528027 +-798227683 374260951 +695518852 89178293 +-63866624 -747486473 +-801736711 260205685 +-888628989 -176954441 +-625545231 -28894109 +733913709 -542456332 +161920230 815701890 +-394832184 -563220600 +-565612027 850120560 +-697707100 368853484 +796039435 83770826 +-91320980 -680441508 +-829191067 327250650 +-916083345 -109909476 +-652999587 38150856 +706459353 -475411367 +134465874 882746855 +-422286540 -496175635 +-593066383 917165525 +-725161456 435898449 +768585079 150815791 +-107935601 -845333324 +-845805688 162358834 +-932697966 -274801292 +-669614208 -126740960 +689844732 -640303183 +117851253 717855039 +-438901161 -661067451 +-609681004 752273709 +-741776077 271006633 +751970458 -14076025 +-42529421 -699433242 +-780399508 308258916 +-867291786 -128901210 +-604208028 19159122 +755250912 -494403101 +183257433 863755121 +-373494981 -515167369 +-544274824 898173791 +-676369897 416906715 +817376638 131824057 +5995488 -859531718 +-731874599 148160440 +-818766877 -288999686 +-555683119 -140939354 +803775821 -654501577 +231782342 703656645 +-324970072 -675265845 +-495749915 738075315 +-627844988 256808239 +865901547 -28274419 +-10164019 -741062031 +-748034106 266630127 +-834926384 -170529999 +-571842626 -22469667 +787616314 -536031890 +215622835 822126332 +-341129579 -556796158 +-511909422 856545002 +-644004495 375277926 +849742040 90195268 +-14049940 -796375372 +-751920027 211316786 +-838812305 -225843340 +-575728547 -77783008 +783730393 -591345231 +211736914 766812991 +-345015500 -612109499 +-515795343 801231661 +-647890416 319964585 +845856119 34881927 +-137525444 -727360851 +-875395531 280331307 +-962287809 -156828819 +-699204051 -8768487 +660254889 -522330710 +88261410 835827512 +-468491004 -543094978 +-639270847 870246182 +-771365920 388979106 +722380615 103896448 +-41211637 -838944901 +-779081724 168747257 +-865974002 -268412869 +-602890244 -120352537 +756568696 -633914760 +184575217 724243462 +-372177197 -654679028 +-542957040 758662132 +-675052113 277395056 +818694422 -7687602 +-138002567 -730470846 +-875872654 277221312 +-962764932 -159938814 +-699681174 -11878482 +659777766 -525440705 +87784287 832717517 +-468968127 -546204973 +-639747970 867136187 +-771843043 385869111 +721903492 100786453 +-68540254 -768293728 +-806410341 239398430 +-893302619 -197761696 +-630218861 -49701364 +729240079 -563263587 +157246600 794894635 +-399505814 -584027855 +-570285657 829313305 +-702380730 348046229 +791365805 62963571 +-132698915 -744514711 +-870569002 263177447 +-957461280 -173982679 +-694377522 -25922347 +665081418 -539484570 +93087939 818673652 +-463664475 -560248838 +-634444318 853092322 +-766539391 371825246 +727207144 86742588 +-39638263 -753702972 +-777508350 253989186 +-864400628 -183170940 +-601316870 -35110608 +758142070 -548672831 +186148591 809485391 +-370603823 -569437099 +-541383666 843904061 +-673478739 362636985 +820267796 77554327 +-98965023 -716596626 +-836835110 291095532 +-923727388 -146064594 +-660643630 1995738 +698815310 -511566485 +126821831 846591737 +-429930583 -532330753 +-600710426 881010407 +-732805499 399743331 +760941036 114660673 +-137806317 -830511412 +-875676404 177180746 +-962568682 -259979380 +-699484924 -111919048 +659974016 -625481271 +87980537 732676951 +-468771877 -646245539 +-639551720 767095621 +-771646793 285828545 +722099742 745887 +505788 -753725947 +-737364299 253966211 +-824256577 -183193915 +-561172819 -35133583 +798286121 -548695806 +226292642 809462416 +-330459772 -569460074 +-501239615 843881086 +-633334688 362614010 +860411847 77531352 +-167150530 -831939586 +-905020617 175752572 +-991912895 -261407554 +-728829137 -113347222 +630629803 -626909445 +58636324 731248777 +-498116090 -647673713 +-668895933 765667447 +-800991006 284400371 +692755529 -682287 +-134199541 -857798288 +-872069628 149893870 +-958961906 -287266256 +-695878148 -139205924 +663580792 -652768147 +91587313 705390075 +-465165101 -673532415 +-635944944 739808745 +-768040017 258541669 +725706518 -26540989 +11998868 -767404967 +-725871219 240287191 +-812763497 -196872935 +-549679739 -48812603 +809779201 -562374826 +237785722 795783396 +-318966692 -583139094 +-489746535 830202066 +-621841608 348934990 +871904927 63852332 +-129029745 -729661774 +-866899832 278030384 +-953792110 -159129742 +-690708352 -11069410 +668750588 -524631633 +96757109 833526589 +-459995305 -545395901 +-630775148 867945259 +-762870221 386678183 +730876314 101595525 +-61663081 -829227159 +-799533168 178464999 +-886425446 -258695127 +-623341688 -110634795 +736117252 -624197018 +164123773 733961204 +-392628641 -644961286 +-563408484 768379874 +-695503557 287112798 +798242978 2030140 +-130483643 -704398201 +-868353730 303293957 +-955246008 -133866169 +-692162250 14194163 +667296690 -499368060 +95303211 858790162 +-461449203 -520132328 +-632229046 893208832 +-764324119 411941756 +729422416 126859098 +-128387469 -744233500 +-866257556 263458658 +-953149834 -173701468 +-690066076 -25641136 +669392864 -539203359 +97399385 818954863 +-459353029 -559967627 +-630132872 853373533 +-762227945 372106457 +731518590 87023799 +-130774849 -694498975 +-868644936 313193183 +-955537214 -123966943 +-692453456 24093389 +667005484 -489468834 +95012005 868689388 +-461740409 -510233102 +-632520252 903108058 +-764615325 421840982 +729131210 136758324 +-21026063 -817349297 +-758896150 190342861 +-845788428 -246817265 +-582704670 -98756933 +776754270 -612319156 +204760791 745839066 +-351991623 -633083424 +-522771466 780257736 +-654866539 298990660 +838879996 13908002 +-65775856 -843380263 +-803645943 164311895 +-890538221 -272848231 +-627454463 -124787899 +732004477 -638350122 +160010998 719808100 +-396741416 -659114390 +-567521259 754226770 +-699616332 272959694 +794130203 -12122964 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-027.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-027.ans new file mode 100644 index 0000000000000000000000000000000000000000..4a5519ef9f29f341f952d36c3d3296a3a7c620ae --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-027.ans @@ -0,0 +1,501 @@ +198479189.92137670516967773438 +1 +2 +4 +6 +9 +10 +11 +12 +14 +15 +16 +17 +19 +21 +24 +25 +26 +28 +29 +31 +38 +39 +46 +47 +48 +51 +53 +55 +57 +58 +60 +69 +71 +72 +73 +74 +80 +82 +83 +84 +86 +89 +91 +92 +93 +95 +96 +98 +99 +100 +101 +102 +104 +106 +109 +110 +111 +112 +114 +115 +116 +117 +119 +121 +124 +125 +126 +128 +129 +131 +138 +139 +146 +147 +148 +151 +153 +155 +157 +158 +160 +169 +171 +172 +173 +174 +180 +182 +183 +184 +186 +189 +191 +192 +193 +195 +196 +198 +199 +200 +201 +202 +204 +206 +209 +210 +211 +212 +214 +215 +216 +217 +219 +221 +224 +225 +226 +228 +229 +231 +238 +239 +246 +247 +248 +251 +253 +255 +257 +258 +260 +269 +271 +272 +273 +274 +280 +282 +283 +284 +286 +289 +291 +292 +293 +295 +296 +298 +299 +300 +301 +302 +304 +306 +309 +310 +311 +312 +314 +315 +316 +317 +319 +321 +324 +325 +326 +328 +329 +331 +338 +339 +346 +347 +348 +351 +353 +355 +357 +358 +360 +369 +371 +372 +373 +374 +380 +382 +383 +384 +386 +389 +391 +392 +393 +395 +396 +398 +399 +400 +401 +402 +404 +406 +409 +410 +411 +412 +414 +415 +416 +417 +419 +421 +424 +425 +426 +428 +429 +431 +438 +439 +446 +447 +448 +451 +453 +455 +457 +458 +460 +469 +471 +472 +473 +474 +480 +482 +483 +484 +486 +489 +491 +492 +493 +495 +496 +498 +499 +500 +501 +502 +504 +506 +509 +510 +511 +512 +514 +515 +516 +517 +519 +521 +524 +525 +526 +528 +529 +531 +538 +539 +546 +547 +548 +551 +553 +555 +557 +558 +560 +569 +571 +572 +573 +574 +580 +582 +583 +584 +586 +589 +591 +592 +593 +595 +596 +598 +599 +600 +601 +602 +604 +606 +609 +610 +611 +612 +614 +615 +616 +617 +619 +621 +624 +625 +626 +628 +629 +631 +638 +639 +646 +647 +648 +651 +653 +655 +657 +658 +660 +669 +671 +672 +673 +674 +680 +682 +683 +684 +686 +689 +691 +692 +693 +695 +696 +698 +699 +700 +701 +702 +704 +706 +709 +710 +711 +712 +714 +715 +716 +717 +719 +721 +724 +725 +726 +728 +729 +731 +738 +739 +746 +747 +748 +751 +753 +755 +757 +758 +760 +769 +771 +772 +773 +774 +780 +782 +783 +784 +786 +789 +791 +792 +793 +795 +796 +798 +799 +800 +801 +802 +804 +806 +809 +810 +811 +812 +814 +815 +816 +817 +819 +821 +824 +825 +826 +828 +829 +831 +838 +839 +846 +847 +848 +851 +853 +855 +857 +858 +860 +869 +871 +872 +873 +874 +880 +882 +883 +884 +886 +889 +891 +892 +893 +895 +896 +898 +899 +900 +901 +902 +904 +906 +909 +910 +911 +912 +914 +915 +916 +917 +919 +921 +924 +925 +926 +928 +929 +931 +938 +939 +946 +947 +948 +951 +953 +955 +957 +958 +960 +969 +971 +972 +973 +974 +980 +982 +983 +984 +986 +989 +991 +992 +993 +995 +996 +998 +999 +1000 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-027.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-027.in new file mode 100644 index 0000000000000000000000000000000000000000..d56df42fdb7e506c7f13608f109040db77ababd8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-027.in @@ -0,0 +1,1001 @@ +500 +16055588 -607694341 +-512960937 -909877674 +-767805801 558762330 +375411078 -609907085 +490856385 -927348538 +-17518092 805028798 +-420299250 -461262125 +318624587 433108829 +-214288835 799058832 +133411320 -287493425 +-116805323 -204208269 +-23141712 296685044 +-351642899 -673738954 +225501556 -329543875 +600901387 -696665399 +-624707625 -143388556 +225833499 -172547748 +-905898980 -168720656 +-155657585 557834621 +-146222291 -782220367 +40088343 -275436878 +588153751 474165489 +-317970182 -571660279 +813764671 -668815325 +830926305 -577762703 +847640742 -893035780 +395926173 212597898 +59008852 -63753625 +148268648 -146903041 +-982675934 483434120 +-237066719 -119345066 +-526928122 -659198195 +-844248177 -828861775 +690859694 545239238 +726068940 724801936 +-726391583 -850850934 +-343877161 398425860 +137623472 291849622 +-178234943 551676993 +-932827731 17926492 +-771740631 -291315052 +-633589090 100956323 +611239087 795087176 +791781161 -262473147 +277101659 -942767217 +-405648857 791553080 +406332109 -340257961 +438608780 -278364947 +945909630 -139067652 +511299242 -952348562 +-336381895 -117541639 +765200592 414763346 +35923661 463710031 +191483287 895466159 +109878141 674518863 +-807353947 309530191 +470690363 -647440208 +888377010 -916042449 +680667128 -172195499 +859824980 -767014278 +488489123 92473774 +-599456207 285617429 +846310849 348511279 +396774579 174369450 +-839318955 -796208364 +-952726769 205525216 +-454054576 -654622577 +830898374 787197682 +-249146178 627633268 +-757249621 964491123 +319751878 -427843048 +494105766 -316086473 +394292731 -544929684 +-455120315 931735150 +-824013124 730807391 +-942763806 -360750334 +380641832 -885902284 +-449112776 -628360022 +660372467 950036967 +49234376 666999876 +-752263848 920492220 +835010382 -504020890 +873842210 -779409294 +-125909348 194768638 +-310989308 -544643097 +31708602 -246455183 +-736005394 273976693 +-874084247 -900119309 +-168746853 -69601919 +511042221 328975893 +510802441 -311851407 +72306717 122885896 +823013596 -555630877 +-277583983 -385077073 +-83900056 984131349 +-460617708 -42733354 +-710310643 -710871913 +94772016 -38952936 +-270833674 -171014862 +182237536 -707163606 +5118005 -604039475 +-523898520 -906222808 +-778743384 562417196 +364473495 -606252219 +479918802 -923693672 +-28455675 808683664 +-431236833 -457607259 +307687004 436763695 +-225226418 802713698 +122473737 -283838559 +-127742906 -200553403 +-34079295 300339910 +-362580482 -670084088 +214563973 -325889009 +589963804 -693010533 +-635645208 -139733690 +214895916 -168892882 +-916836563 -165065790 +-166595168 561489487 +-157159874 -778565501 +29150760 -271782012 +577216168 477820355 +-328907765 -568005413 +802827088 -665160459 +819988722 -574107837 +836703159 -889380914 +384988590 216252764 +48071269 -60098759 +137331065 -143248175 +-993613517 487088986 +-248004302 -115690200 +-537865705 -655543329 +-855185760 -825206909 +679922111 548894104 +715131357 728456802 +-737329166 -847196068 +-354814744 402080726 +126685889 295504488 +-189172526 555331859 +-943765314 21581358 +-782678214 -287660186 +-644526673 104611189 +600301504 798742042 +780843578 -258818281 +266164076 -939112351 +-416586440 795207946 +395394526 -336603095 +427671197 -274710081 +934972047 -135412786 +500361659 -948693696 +-347319478 -113886773 +754263009 418418212 +24986078 467364897 +180545704 899121025 +98940558 678173729 +-818291530 313185057 +459752780 -643785342 +877439427 -912387583 +669729545 -168540633 +848887397 -763359412 +477551540 96128640 +-610393790 289272295 +835373266 352166145 +385836996 178024316 +-850256538 -792553498 +-963664352 209180082 +-464992159 -650967711 +819960791 790852548 +-260083761 631288134 +-768187204 968145989 +308814295 -424188182 +483168183 -312431607 +383355148 -541274818 +-466057898 935390016 +-834950707 734462257 +-953701389 -357095468 +369704249 -882247418 +-460050359 -624705156 +649434884 953691833 +38296793 670654742 +-763201431 924147086 +824072799 -500366024 +862904627 -775754428 +-136846931 198423504 +-321926891 -540988231 +20771019 -242800317 +-746942977 277631559 +-885021830 -896464443 +-179684436 -65947053 +500104638 332630759 +499864858 -308196541 +61369134 126540762 +812076013 -551976011 +-288521566 -381422207 +-94837639 987786215 +-471555291 -39078488 +-721248226 -707217047 +83834433 -35298070 +-281771257 -167359996 +171299953 -703508740 +10562160 -601740873 +-518454365 -903924206 +-773299229 564715798 +369917650 -603953617 +485362957 -921395070 +-23011520 810982266 +-425792678 -455308657 +313131159 439062297 +-219782263 805012300 +127917892 -281539957 +-122298751 -198254801 +-28635140 302638512 +-357136327 -667785486 +220008128 -323590407 +595407959 -690711931 +-630201053 -137435088 +220340071 -166594280 +-911392408 -162767188 +-161151013 563788089 +-151715719 -776266899 +34594915 -269483410 +582660323 480118957 +-323463610 -565706811 +808271243 -662861857 +825432877 -571809235 +842147314 -887082312 +390432745 218551366 +53515424 -57800157 +142775220 -140949573 +-988169362 489387588 +-242560147 -113391598 +-532421550 -653244727 +-849741605 -822908307 +685366266 551192706 +720575512 730755404 +-731885011 -844897466 +-349370589 404379328 +132130044 297803090 +-183728371 557630461 +-938321159 23879960 +-777234059 -285361584 +-639082518 106909791 +605745659 801040644 +786287733 -256519679 +271608231 -936813749 +-411142285 797506548 +400838681 -334304493 +433115352 -272411479 +940416202 -133114184 +505805814 -946395094 +-341875323 -111588171 +759707164 420716814 +30430233 469663499 +185989859 901419627 +104384713 680472331 +-812847375 315483659 +465196935 -641486740 +882883582 -910088981 +675173700 -166242031 +854331552 -761060810 +482995695 98427242 +-604949635 291570897 +840817421 354464747 +391281151 180322918 +-844812383 -790254896 +-958220197 211478684 +-459548004 -648669109 +825404946 793151150 +-254639606 633586736 +-762743049 970444591 +314258450 -421889580 +488612338 -310133005 +388799303 -538976216 +-460613743 937688618 +-829506552 736760859 +-948257234 -354796866 +375148404 -879948816 +-454606204 -622406554 +654879039 955990435 +43740948 672953344 +-757757276 926445688 +829516954 -498067422 +868348782 -773455826 +-131402776 200722106 +-316482736 -538689629 +26215174 -240501715 +-741498822 279930161 +-879577675 -894165841 +-174240281 -63648451 +505548793 334929361 +505309013 -305897939 +66813289 128839364 +817520168 -549677409 +-283077411 -379123605 +-89393484 990084817 +-466111136 -36779886 +-715804071 -704918445 +89278588 -32999468 +-276327102 -165061394 +176744108 -701210138 +2118696 -604902433 +-526897829 -907085766 +-781742693 561554238 +361474186 -607115177 +476919493 -924556630 +-31454984 807820706 +-434236142 -458470217 +304687695 435900737 +-228225727 801850740 +119474428 -284701517 +-130742215 -201416361 +-37078604 299476952 +-365579791 -670947046 +211564664 -326751967 +586964495 -693873491 +-638644517 -140596648 +211896607 -169755840 +-919835872 -165928748 +-169594477 560626529 +-160159183 -779428459 +26151451 -272644970 +574216859 476957397 +-331907074 -568868371 +799827779 -666023417 +816989413 -574970795 +833703850 -890243872 +381989281 215389806 +45071960 -60961717 +134331756 -144111133 +-996612826 486226028 +-251003611 -116553158 +-540865014 -656406287 +-858185069 -826069867 +676922802 548031146 +712132048 727593844 +-740328475 -848059026 +-357814053 401217768 +123686580 294641530 +-192171835 554468901 +-946764623 20718400 +-785677523 -288523144 +-647525982 103748231 +597302195 797879084 +777844269 -259681239 +263164767 -939975309 +-419585749 794344988 +392395217 -337466053 +424671888 -275573039 +931972738 -136275744 +497362350 -949556654 +-350318787 -114749731 +751263700 417555254 +21986769 466501939 +177546395 898258067 +95941249 677310771 +-821290839 312322099 +456753471 -644648300 +874440118 -913250541 +666730236 -169403591 +845888088 -764222370 +474552231 95265682 +-613393099 288409337 +832373957 351303187 +382837687 177161358 +-853255847 -793416456 +-966663661 208317124 +-467991468 -651830669 +816961482 789989590 +-263083070 630425176 +-771186513 967283031 +305814986 -425051140 +480168874 -313294565 +380355839 -542137776 +-469057207 934527058 +-837950016 733599299 +-956700698 -357958426 +366704940 -883110376 +-463049668 -625568114 +646435575 952828875 +35297484 669791784 +-766200740 923284128 +821073490 -501228982 +859905318 -776617386 +-139846240 197560546 +-324926200 -541851189 +17771710 -243663275 +-749942286 276768601 +-888021139 -897327401 +-182683745 -66810011 +497105329 331767801 +496865549 -309059499 +58369825 125677804 +809076704 -552838969 +-291520875 -382285165 +-97836948 986923257 +-474554600 -39941446 +-724247535 -708080005 +80835124 -36161028 +-284770566 -168222954 +168300644 -704371698 +20282480 -608477058 +-508734045 -910660391 +-763578909 557979613 +379637970 -610689802 +495083277 -928131255 +-13291200 804246081 +-416072358 -462044842 +322851479 432326112 +-210061943 798276115 +137638212 -288276142 +-112578431 -204990986 +-18914820 295902327 +-347416007 -674521671 +229728448 -330326592 +605128279 -697448116 +-620480733 -144171273 +230060391 -173330465 +-901672088 -169503373 +-151430693 557051904 +-141995399 -783003084 +44315235 -276219595 +592380643 473382772 +-313743290 -572442996 +817991563 -669598042 +835153197 -578545420 +851867634 -893818497 +400153065 211815181 +63235744 -64536342 +152495540 -147685758 +-978449042 482651403 +-232839827 -120127783 +-522701230 -659980912 +-840021285 -829644492 +695086586 544456521 +730295832 724019219 +-722164691 -851633651 +-339650269 397643143 +141850364 291066905 +-174008051 550894276 +-928600839 17143775 +-767513739 -292097769 +-629362198 100173606 +615465979 794304459 +796008053 -263255864 +281328551 -943549934 +-401421965 790770363 +410559001 -341040678 +442835672 -279147664 +950136522 -139850369 +515526134 -953131279 +-332155003 -118324356 +769427484 413980629 +40150553 462927314 +195710179 894683442 +114105033 673736146 +-803127055 308747474 +474917255 -648222925 +892603902 -916825166 +684894020 -172978216 +864051872 -767796995 +492716015 91691057 +-595229315 284834712 +850537741 347728562 +401001471 173586733 +-835092063 -796991081 +-948499877 204742499 +-449827684 -655405294 +835125266 786414965 +-244919286 626850551 +-753022729 963708406 +323978770 -428625765 +498332658 -316869190 +398519623 -545712401 +-450893423 930952433 +-819786232 730024674 +-938536914 -361533051 +384868724 -886685001 +-444885884 -629142739 +664599359 949254250 +53461268 666217159 +-748036956 919709503 +839237274 -504803607 +878069102 -780192011 +-121682456 193985921 +-306762416 -545425814 +35935494 -247237900 +-731778502 273193976 +-869857355 -900902026 +-164519961 -70384636 +515269113 328193176 +515029333 -312634124 +76533609 122103179 +827240488 -556413594 +-273357091 -385859790 +-79673164 983348632 +-456390816 -43516071 +-706083751 -711654630 +98998908 -39735653 +-266606782 -171797579 +186464428 -707946323 +16219080 -604362866 +-512797445 -906546199 +-767642309 562093805 +375574570 -606575610 +491019877 -924017063 +-17354600 808360273 +-420135758 -457930650 +318788079 436440304 +-214125343 802390307 +133574812 -284161950 +-116641831 -200876794 +-22978220 300016519 +-351479407 -670407479 +225665048 -326212400 +601064879 -693333924 +-624544133 -140057081 +225996991 -169216273 +-905735488 -165389181 +-155494093 561166096 +-146058799 -778888892 +40251835 -272105403 +588317243 477496964 +-317806690 -568328804 +813928163 -665483850 +831089797 -574431228 +847804234 -889704305 +396089665 215929373 +59172344 -60422150 +148432140 -143571566 +-982512442 486765595 +-236903227 -116013591 +-526764630 -655866720 +-844084685 -825530300 +691023186 548570713 +726232432 728133411 +-726228091 -847519459 +-343713669 401757335 +137786964 295181097 +-178071451 555008468 +-932664239 21257967 +-771577139 -287983577 +-633425598 104287798 +611402579 798418651 +791944653 -259141672 +277265151 -939435742 +-405485365 794884555 +406495601 -336926486 +438772272 -275033472 +946073122 -135736177 +511462734 -949017087 +-336218403 -114210164 +765364084 418094821 +36087153 467041506 +191646779 898797634 +110041633 677850338 +-807190455 312861666 +470853855 -644108733 +888540502 -912710974 +680830620 -168864024 +859988472 -763682803 +488652615 95805249 +-599292715 288948904 +846474341 351842754 +396938071 177700925 +-839155463 -792876889 +-952563277 208856691 +-453891084 -651291102 +831061866 790529157 +-248982686 630964743 +-757086129 967822598 +319915370 -424511573 +494269258 -312754998 +394456223 -541598209 +-454956823 935066625 +-823849632 734138866 +-942600314 -357418859 +380805324 -882570809 +-448949284 -625028547 +660535959 953368442 +49397868 670331351 +-752100356 923823695 +835173874 -500689415 +874005702 -776077819 +-125745856 198100113 +-310825816 -541311622 +31872094 -243123708 +-735841902 277308168 +-873920755 -896787834 +-168583361 -66270444 +511205713 332307368 +510965933 -308519932 +72470209 126217371 +823177088 -552299402 +-277420491 -381745598 +-83736564 987462824 +-460454216 -39401879 +-710147151 -707540438 +94935508 -35621461 +-270670182 -167683387 +182401028 -703832131 +4891119 -599175061 +-524125406 -901358394 +-778970270 567281610 +364246609 -601387805 +479691916 -918829258 +-28682561 813548078 +-431463719 -452742845 +307460118 441628109 +-225453304 807578112 +122246851 -278974145 +-127969792 -195688989 +-34306181 305204324 +-362807368 -665219674 +214337087 -321024595 +589736918 -688146119 +-635872094 -134869276 +214669030 -164028468 +-917063449 -160201376 +-166822054 566353901 +-157386760 -773701087 +28923874 -266917598 +576989282 482684769 +-329134651 -563140999 +802600202 -660296045 +819761836 -569243423 +836476273 -884516500 +384761704 221117178 +47844383 -55234345 +137104179 -138383761 +-993840403 491953400 +-248231188 -110825786 +-538092591 -650678915 +-855412646 -820342495 +679695225 553758518 +714904471 733321216 +-737556052 -842331654 +-355041630 406945140 +126459003 300368902 +-189399412 560196273 +-943992200 26445772 +-782905100 -282795772 +-644753559 109475603 +600074618 803606456 +780616692 -253953867 +265937190 -934247937 +-416813326 800072360 +395167640 -331738681 +427444311 -269845667 +934745161 -130548372 +500134773 -943829282 +-347546364 -109022359 +754036123 423282626 +24759192 472229311 +180318818 903985439 +98713672 683038143 +-818518416 318049471 +459525894 -638920928 +877212541 -907523169 +669502659 -163676219 +848660511 -758494998 +477324654 100993054 +-610620676 294136709 +835146380 357030559 +385610110 182888730 +-850483424 -787689084 +-963891238 214044496 +-465219045 -646103297 +819733905 795716962 +-260310647 636152548 +-768414090 973010403 +308587409 -419323768 +482941297 -307567193 +383128262 -536410404 +-466284784 940254430 +-835177593 739326671 +-953928275 -352231054 +369477363 -877383004 +-460277245 -619840742 +649207998 958556247 +38069907 675519156 +-763428317 929011500 +823845913 -495501610 +862677741 -770890014 +-137073817 203287918 +-322153777 -536123817 +20544133 -237935903 +-747169863 282495973 +-885248716 -891600029 +-179911322 -61082639 +499877752 337495173 +499637972 -303332127 +61142248 131405176 +811849127 -547111597 +-288748452 -376557793 +-95064525 992650629 +-471782177 -34214074 +-721475112 -702352633 +83607547 -30433656 +-281998143 -162495582 +171073067 -698644326 +8186782 -608182724 +-520829743 -910366057 +-775674607 558273947 +367542272 -610395468 +482987579 -927836921 +-25386898 804540415 +-428168056 -461750508 +310755781 432620446 +-222157641 798570449 +125542514 -287981808 +-124674129 -204696652 +-31010518 296196661 +-359511705 -674227337 +217632750 -330032258 +593032581 -697153782 +-632576431 -143876939 +217964693 -173036131 +-913767786 -169209039 +-163526391 557346238 +-154091097 -782708750 +32219537 -275925261 +580284945 473677106 +-325838988 -572148662 +805895865 -669303708 +823057499 -578251086 +839771936 -893524163 +388057367 212109515 +51140046 -64242008 +140399842 -147391424 +-990544740 482945737 +-244935525 -119833449 +-534796928 -659686578 +-852116983 -829350158 +682990888 544750855 +718200134 724313553 +-734260389 -851339317 +-351745967 397937477 +129754666 291361239 +-186103749 551188610 +-940696537 17438109 +-779609437 -291803435 +-641457896 100467940 +603370281 794598793 +783912355 -262961530 +269232853 -943255600 +-413517663 791064697 +398463303 -340746344 +430739974 -278853330 +938040824 -139556035 +503430436 -952836945 +-344250701 -118030022 +757331786 414274963 +28054855 463221648 +183614481 894977776 +102009335 674030480 +-815222753 309041808 +462821557 -647928591 +880508204 -916530832 +672798322 -172683882 +851956174 -767502661 +480620317 91985391 +-607325013 285129046 +838442043 348022896 +388905773 173881067 +-847187761 -796696747 +-960595575 205036833 +-461923382 -655110960 +823029568 786709299 +-257014984 627144885 +-765118427 964002740 +311883072 -428331431 +486236960 -316574856 +386423925 -545418067 +-462989121 931246767 +-831881930 730319008 +-950632612 -361238717 +372773026 -886390667 +-456981582 -628848405 +652503661 949548584 +41365570 666511493 +-760132654 920003837 +827141576 -504509273 +865973404 -779897677 +-133778154 194280255 +-318858114 -545131480 +23839796 -246943566 +-743874200 273488310 +-881953053 -900607692 +-176615659 -70090302 +503173415 328487510 +502933635 -312339790 +64437911 122397513 +815144790 -556119260 +-285452789 -385565456 +-91768862 983642966 +-468486514 -43221737 +-718179449 -711360296 +86903210 -39441319 +-278702480 -171503245 +174368730 -707651989 +3338480 -601973122 +-525678045 -904156455 +-780522909 564483549 +362693970 -604185866 +478139277 -921627319 +-30235200 810750017 +-433016358 -455540906 +305907479 438830048 +-227005943 804780051 +120694212 -281772206 +-129522431 -198487050 +-35858820 302406263 +-364360007 -668017735 +212784448 -323822656 +588184279 -690944180 +-637424733 -137667337 +213116391 -166826529 +-918616088 -162999437 +-168374693 563555840 +-158939399 -776499148 +27371235 -269715659 +575436643 479886708 +-330687290 -565939060 +801047563 -663094106 +818209197 -572041484 +834923634 -887314561 +383209065 218319117 +46291744 -58032406 +135551540 -141181822 +-995393042 489155339 +-249783827 -113623847 +-539645230 -653476976 +-856965285 -823140556 +678142586 550960457 +713351832 730523155 +-739108691 -845129715 +-356594269 404147079 +124906364 297570841 +-190952051 557398212 +-945544839 23647711 +-784457739 -285593833 +-646306198 106677542 +598521979 800808395 +779064053 -256751928 +264384551 -937045998 +-418365965 797274299 +393615001 -334536742 +425891672 -272643728 +933192522 -133346433 +498582134 -946627343 +-349099003 -111820420 +752483484 420484565 +23206553 469431250 +178766179 901187378 +97161033 680240082 +-820071055 315251410 +457973255 -641718989 +875659902 -910321230 +667950020 -166474280 +847107872 -761293059 +475772015 98194993 +-612173315 291338648 +833593741 354232498 +384057471 180090669 +-852036063 -790487145 +-965443877 211246435 +-466771684 -648901358 +818181266 792918901 +-261863286 633354487 +-769966729 970212342 +307034770 -422121829 +481388658 -310365254 +381575623 -539208465 +-467837423 937456369 +-836730232 736528610 +-955480914 -355029115 +367924724 -880181065 +-461829884 -622638803 +647655359 955758186 +36517268 672721095 +-764980956 926213439 +822293274 -498299671 +861125102 -773688075 +-138626456 200489857 +-323706416 -538921878 +18991494 -240733964 +-748722502 279697912 +-886801355 -894398090 +-181463961 -63880700 +498325113 334697112 +498085333 -306130188 +59589609 128607115 +810296488 -549909658 +-290301091 -379355854 +-96617164 989852568 +-473334816 -37012135 +-723027751 -705150694 +82054908 -33231717 +-283550782 -165293643 +169520428 -701442387 +19866612 -608697938 +-509149913 -910881271 +-763994777 557758733 +379222102 -610910682 +494667409 -928352135 +-13707068 804025201 +-416488226 -462265722 +322435611 432105232 +-210477811 798055235 +137222344 -288497022 +-112994299 -205211866 +-19330688 295681447 +-347831875 -674742551 +229312580 -330547472 +604712411 -697668996 +-620896601 -144392153 +229644523 -173551345 +-902087956 -169724253 +-151846561 556831024 +-142411267 -783223964 +43899367 -276440475 +591964775 473161892 +-314159158 -572663876 +817575695 -669818922 +834737329 -578766300 +851451766 -894039377 +399737197 211594301 +62819876 -64757222 +152079672 -147906638 +-978864910 482430523 +-233255695 -120348663 +-523117098 -660201792 +-840437153 -829865372 +694670718 544235641 +729879964 723798339 +-722580559 -851854531 +-340066137 397422263 +141434496 290846025 +-174423919 550673396 +-929016707 16922895 +-767929607 -292318649 +-629778066 99952726 +615050111 794083579 +795592185 -263476744 +280912683 -943770814 +-401837833 790549483 +410143133 -341261558 +442419804 -279368544 +949720654 -140071249 +515110266 -953352159 +-332570871 -118545236 +769011616 413759749 +39734685 462706434 +195294311 894462562 +113689165 673515266 +-803542923 308526594 +474501387 -648443805 +892188034 -917046046 +684478152 -173199096 +863636004 -768017875 +492300147 91470177 +-595645183 284613832 +850121873 347507682 +400585603 173365853 +-835507931 -797211961 +-948915745 204521619 +-450243552 -655626174 +834709398 786194085 +-245335154 626629671 +-753438597 963487526 +323562902 -428846645 +497916790 -317090070 +398103755 -545933281 +-451309291 930731553 +-820202100 729803794 +-938952782 -361753931 +384452856 -886905881 +-445301752 -629363619 +664183491 949033370 +53045400 665996279 +-748452824 919488623 +838821406 -505024487 +877653234 -780412891 +-122098324 193765041 +-307178284 -545646694 +35519626 -247458780 +-732194370 272973096 +-870273223 -901122906 +-164935829 -70605516 +514853245 327972296 +514613465 -312855004 +76117741 121882299 +826824620 -556634474 +-273772959 -386080670 +-80089032 983127752 +-456806684 -43736951 +-706499619 -711875510 +98583040 -39956533 +-267022650 -172018459 +186048560 -708167203 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-028.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-028.ans new file mode 100644 index 0000000000000000000000000000000000000000..bcfacbf93ec2acfc8bd907b535606f79e8cc0df8 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-028.ans @@ -0,0 +1,501 @@ +3454096.00000000000000000000 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-028.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-028.in new file mode 100644 index 0000000000000000000000000000000000000000..92bb9fbf736fadf000ede266ed302a7d547edcfd --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-028.in @@ -0,0 +1,1001 @@ +500 +-1727048 0 +-1727049 863524 +-1727050 1727048 +-1727051 2590572 +-1727052 3454096 +-1727053 4317620 +-1727054 5181144 +-1727055 6044668 +-1727056 6908192 +-1727057 7771716 +-1727058 8635240 +-1727059 9498764 +-1727060 10362288 +-1727061 11225812 +-1727062 12089336 +-1727063 12952860 +-1727064 13816384 +-1727065 14679908 +-1727066 15543432 +-1727067 16406956 +-1727068 17270480 +-1727069 18134004 +-1727070 18997528 +-1727071 19861052 +-1727072 20724576 +-1727073 21588100 +-1727074 22451624 +-1727075 23315148 +-1727076 24178672 +-1727077 25042196 +-1727078 25905720 +-1727079 26769244 +-1727080 27632768 +-1727081 28496292 +-1727082 29359816 +-1727083 30223340 +-1727084 31086864 +-1727085 31950388 +-1727086 32813912 +-1727087 33677436 +-1727088 34540960 +-1727089 35404484 +-1727090 36268008 +-1727091 37131532 +-1727092 37995056 +-1727093 38858580 +-1727094 39722104 +-1727095 40585628 +-1727096 41449152 +-1727097 42312676 +-1727098 43176200 +-1727099 44039724 +-1727100 44903248 +-1727101 45766772 +-1727102 46630296 +-1727103 47493820 +-1727104 48357344 +-1727105 49220868 +-1727106 50084392 +-1727107 50947916 +-1727108 51811440 +-1727109 52674964 +-1727110 53538488 +-1727111 54402012 +-1727112 55265536 +-1727113 56129060 +-1727114 56992584 +-1727115 57856108 +-1727116 58719632 +-1727117 59583156 +-1727118 60446680 +-1727119 61310204 +-1727120 62173728 +-1727121 63037252 +-1727122 63900776 +-1727123 64764300 +-1727124 65627824 +-1727125 66491348 +-1727126 67354872 +-1727127 68218396 +-1727128 69081920 +-1727129 69945444 +-1727130 70808968 +-1727131 71672492 +-1727132 72536016 +-1727133 73399540 +-1727134 74263064 +-1727135 75126588 +-1727136 75990112 +-1727137 76853636 +-1727138 77717160 +-1727139 78580684 +-1727140 79444208 +-1727141 80307732 +-1727142 81171256 +-1727143 82034780 +-1727144 82898304 +-1727145 83761828 +-1727146 84625352 +-1727147 85488876 +-1727148 86352400 +-1727149 87215924 +-1727150 88079448 +-1727151 88942972 +-1727152 89806496 +-1727153 90670020 +-1727154 91533544 +-1727155 92397068 +-1727156 93260592 +-1727157 94124116 +-1727158 94987640 +-1727159 95851164 +-1727160 96714688 +-1727161 97578212 +-1727162 98441736 +-1727163 99305260 +-1727164 100168784 +-1727165 101032308 +-1727166 101895832 +-1727167 102759356 +-1727168 103622880 +-1727169 104486404 +-1727170 105349928 +-1727171 106213452 +-1727172 107076976 +-1727173 107940500 +-1727174 108804024 +-1727175 109667548 +-1727176 110531072 +-1727177 111394596 +-1727178 112258120 +-1727179 113121644 +-1727180 113985168 +-1727181 114848692 +-1727182 115712216 +-1727183 116575740 +-1727184 117439264 +-1727185 118302788 +-1727186 119166312 +-1727187 120029836 +-1727188 120893360 +-1727189 121756884 +-1727190 122620408 +-1727191 123483932 +-1727192 124347456 +-1727193 125210980 +-1727194 126074504 +-1727195 126938028 +-1727196 127801552 +-1727197 128665076 +-1727198 129528600 +-1727199 130392124 +-1727200 131255648 +-1727201 132119172 +-1727202 132982696 +-1727203 133846220 +-1727204 134709744 +-1727205 135573268 +-1727206 136436792 +-1727207 137300316 +-1727208 138163840 +-1727209 139027364 +-1727210 139890888 +-1727211 140754412 +-1727212 141617936 +-1727213 142481460 +-1727214 143344984 +-1727215 144208508 +-1727216 145072032 +-1727217 145935556 +-1727218 146799080 +-1727219 147662604 +-1727220 148526128 +-1727221 149389652 +-1727222 150253176 +-1727223 151116700 +-1727224 151980224 +-1727225 152843748 +-1727226 153707272 +-1727227 154570796 +-1727228 155434320 +-1727229 156297844 +-1727230 157161368 +-1727231 158024892 +-1727232 158888416 +-1727233 159751940 +-1727234 160615464 +-1727235 161478988 +-1727236 162342512 +-1727237 163206036 +-1727238 164069560 +-1727239 164933084 +-1727240 165796608 +-1727241 166660132 +-1727242 167523656 +-1727243 168387180 +-1727244 169250704 +-1727245 170114228 +-1727246 170977752 +-1727247 171841276 +-1727248 172704800 +-1727249 173568324 +-1727250 174431848 +-1727251 175295372 +-1727252 176158896 +-1727253 177022420 +-1727254 177885944 +-1727255 178749468 +-1727256 179612992 +-1727257 180476516 +-1727258 181340040 +-1727259 182203564 +-1727260 183067088 +-1727261 183930612 +-1727262 184794136 +-1727263 185657660 +-1727264 186521184 +-1727265 187384708 +-1727266 188248232 +-1727267 189111756 +-1727268 189975280 +-1727269 190838804 +-1727270 191702328 +-1727271 192565852 +-1727272 193429376 +-1727273 194292900 +-1727274 195156424 +-1727275 196019948 +-1727276 196883472 +-1727277 197746996 +-1727278 198610520 +-1727279 199474044 +-1727280 200337568 +-1727281 201201092 +-1727282 202064616 +-1727283 202928140 +-1727284 203791664 +-1727285 204655188 +-1727286 205518712 +-1727287 206382236 +-1727288 207245760 +-1727289 208109284 +-1727290 208972808 +-1727291 209836332 +-1727292 210699856 +-1727293 211563380 +-1727294 212426904 +-1727295 213290428 +-1727296 214153952 +-1727297 215017476 +-1727298 215881000 +-1727299 216744524 +-1727300 217608048 +-1727301 218471572 +-1727302 219335096 +-1727303 220198620 +-1727304 221062144 +-1727305 221925668 +-1727306 222789192 +-1727307 223652716 +-1727308 224516240 +-1727309 225379764 +-1727310 226243288 +-1727311 227106812 +-1727312 227970336 +-1727313 228833860 +-1727314 229697384 +-1727315 230560908 +-1727316 231424432 +-1727317 232287956 +-1727318 233151480 +-1727319 234015004 +-1727320 234878528 +-1727321 235742052 +-1727322 236605576 +-1727323 237469100 +-1727324 238332624 +-1727325 239196148 +-1727326 240059672 +-1727327 240923196 +-1727328 241786720 +-1727329 242650244 +-1727330 243513768 +-1727331 244377292 +-1727332 245240816 +-1727333 246104340 +-1727334 246967864 +-1727335 247831388 +-1727336 248694912 +-1727337 249558436 +-1727338 250421960 +-1727339 251285484 +-1727340 252149008 +-1727341 253012532 +-1727342 253876056 +-1727343 254739580 +-1727344 255603104 +-1727345 256466628 +-1727346 257330152 +-1727347 258193676 +-1727348 259057200 +-1727349 259920724 +-1727350 260784248 +-1727351 261647772 +-1727352 262511296 +-1727353 263374820 +-1727354 264238344 +-1727355 265101868 +-1727356 265965392 +-1727357 266828916 +-1727358 267692440 +-1727359 268555964 +-1727360 269419488 +-1727361 270283012 +-1727362 271146536 +-1727363 272010060 +-1727364 272873584 +-1727365 273737108 +-1727366 274600632 +-1727367 275464156 +-1727368 276327680 +-1727369 277191204 +-1727370 278054728 +-1727371 278918252 +-1727372 279781776 +-1727373 280645300 +-1727374 281508824 +-1727375 282372348 +-1727376 283235872 +-1727377 284099396 +-1727378 284962920 +-1727379 285826444 +-1727380 286689968 +-1727381 287553492 +-1727382 288417016 +-1727383 289280540 +-1727384 290144064 +-1727385 291007588 +-1727386 291871112 +-1727387 292734636 +-1727388 293598160 +-1727389 294461684 +-1727390 295325208 +-1727391 296188732 +-1727392 297052256 +-1727393 297915780 +-1727394 298779304 +-1727395 299642828 +-1727396 300506352 +-1727397 301369876 +-1727398 302233400 +-1727399 303096924 +-1727400 303960448 +-1727401 304823972 +-1727402 305687496 +-1727403 306551020 +-1727404 307414544 +-1727405 308278068 +-1727406 309141592 +-1727407 310005116 +-1727408 310868640 +-1727409 311732164 +-1727410 312595688 +-1727411 313459212 +-1727412 314322736 +-1727413 315186260 +-1727414 316049784 +-1727415 316913308 +-1727416 317776832 +-1727417 318640356 +-1727418 319503880 +-1727419 320367404 +-1727420 321230928 +-1727421 322094452 +-1727422 322957976 +-1727423 323821500 +-1727424 324685024 +-1727425 325548548 +-1727426 326412072 +-1727427 327275596 +-1727428 328139120 +-1727429 329002644 +-1727430 329866168 +-1727431 330729692 +-1727432 331593216 +-1727433 332456740 +-1727434 333320264 +-1727435 334183788 +-1727436 335047312 +-1727437 335910836 +-1727438 336774360 +-1727439 337637884 +-1727440 338501408 +-1727441 339364932 +-1727442 340228456 +-1727443 341091980 +-1727444 341955504 +-1727445 342819028 +-1727446 343682552 +-1727447 344546076 +-1727448 345409600 +-1727449 346273124 +-1727450 347136648 +-1727451 348000172 +-1727452 348863696 +-1727453 349727220 +-1727454 350590744 +-1727455 351454268 +-1727456 352317792 +-1727457 353181316 +-1727458 354044840 +-1727459 354908364 +-1727460 355771888 +-1727461 356635412 +-1727462 357498936 +-1727463 358362460 +-1727464 359225984 +-1727465 360089508 +-1727466 360953032 +-1727467 361816556 +-1727468 362680080 +-1727469 363543604 +-1727470 364407128 +-1727471 365270652 +-1727472 366134176 +-1727473 366997700 +-1727474 367861224 +-1727475 368724748 +-1727476 369588272 +-1727477 370451796 +-1727478 371315320 +-1727479 372178844 +-1727480 373042368 +-1727481 373905892 +-1727482 374769416 +-1727483 375632940 +-1727484 376496464 +-1727485 377359988 +-1727486 378223512 +-1727487 379087036 +-1727488 379950560 +-1727489 380814084 +-1727490 381677608 +-1727491 382541132 +-1727492 383404656 +-1727493 384268180 +-1727494 385131704 +-1727495 385995228 +-1727496 386858752 +-1727497 387722276 +-1727498 388585800 +-1727499 389449324 +-1727500 390312848 +-1727501 391176372 +-1727502 392039896 +-1727503 392903420 +-1727504 393766944 +-1727505 394630468 +-1727506 395493992 +-1727507 396357516 +-1727508 397221040 +-1727509 398084564 +-1727510 398948088 +-1727511 399811612 +-1727512 400675136 +-1727513 401538660 +-1727514 402402184 +-1727515 403265708 +-1727516 404129232 +-1727517 404992756 +-1727518 405856280 +-1727519 406719804 +-1727520 407583328 +-1727521 408446852 +-1727522 409310376 +-1727523 410173900 +-1727524 411037424 +-1727525 411900948 +-1727526 412764472 +-1727527 413627996 +-1727528 414491520 +-1727529 415355044 +-1727530 416218568 +-1727531 417082092 +-1727532 417945616 +-1727533 418809140 +-1727534 419672664 +-1727535 420536188 +-1727536 421399712 +-1727537 422263236 +-1727538 423126760 +-1727539 423990284 +-1727540 424853808 +-1727541 425717332 +-1727542 426580856 +-1727543 427444380 +-1727544 428307904 +-1727545 429171428 +-1727546 430034952 +-1727547 430898476 +1727048 0 +1727047 863524 +1727046 1727048 +1727045 2590572 +1727044 3454096 +1727043 4317620 +1727042 5181144 +1727041 6044668 +1727040 6908192 +1727039 7771716 +1727038 8635240 +1727037 9498764 +1727036 10362288 +1727035 11225812 +1727034 12089336 +1727033 12952860 +1727032 13816384 +1727031 14679908 +1727030 15543432 +1727029 16406956 +1727028 17270480 +1727027 18134004 +1727026 18997528 +1727025 19861052 +1727024 20724576 +1727023 21588100 +1727022 22451624 +1727021 23315148 +1727020 24178672 +1727019 25042196 +1727018 25905720 +1727017 26769244 +1727016 27632768 +1727015 28496292 +1727014 29359816 +1727013 30223340 +1727012 31086864 +1727011 31950388 +1727010 32813912 +1727009 33677436 +1727008 34540960 +1727007 35404484 +1727006 36268008 +1727005 37131532 +1727004 37995056 +1727003 38858580 +1727002 39722104 +1727001 40585628 +1727000 41449152 +1726999 42312676 +1726998 43176200 +1726997 44039724 +1726996 44903248 +1726995 45766772 +1726994 46630296 +1726993 47493820 +1726992 48357344 +1726991 49220868 +1726990 50084392 +1726989 50947916 +1726988 51811440 +1726987 52674964 +1726986 53538488 +1726985 54402012 +1726984 55265536 +1726983 56129060 +1726982 56992584 +1726981 57856108 +1726980 58719632 +1726979 59583156 +1726978 60446680 +1726977 61310204 +1726976 62173728 +1726975 63037252 +1726974 63900776 +1726973 64764300 +1726972 65627824 +1726971 66491348 +1726970 67354872 +1726969 68218396 +1726968 69081920 +1726967 69945444 +1726966 70808968 +1726965 71672492 +1726964 72536016 +1726963 73399540 +1726962 74263064 +1726961 75126588 +1726960 75990112 +1726959 76853636 +1726958 77717160 +1726957 78580684 +1726956 79444208 +1726955 80307732 +1726954 81171256 +1726953 82034780 +1726952 82898304 +1726951 83761828 +1726950 84625352 +1726949 85488876 +1726948 86352400 +1726947 87215924 +1726946 88079448 +1726945 88942972 +1726944 89806496 +1726943 90670020 +1726942 91533544 +1726941 92397068 +1726940 93260592 +1726939 94124116 +1726938 94987640 +1726937 95851164 +1726936 96714688 +1726935 97578212 +1726934 98441736 +1726933 99305260 +1726932 100168784 +1726931 101032308 +1726930 101895832 +1726929 102759356 +1726928 103622880 +1726927 104486404 +1726926 105349928 +1726925 106213452 +1726924 107076976 +1726923 107940500 +1726922 108804024 +1726921 109667548 +1726920 110531072 +1726919 111394596 +1726918 112258120 +1726917 113121644 +1726916 113985168 +1726915 114848692 +1726914 115712216 +1726913 116575740 +1726912 117439264 +1726911 118302788 +1726910 119166312 +1726909 120029836 +1726908 120893360 +1726907 121756884 +1726906 122620408 +1726905 123483932 +1726904 124347456 +1726903 125210980 +1726902 126074504 +1726901 126938028 +1726900 127801552 +1726899 128665076 +1726898 129528600 +1726897 130392124 +1726896 131255648 +1726895 132119172 +1726894 132982696 +1726893 133846220 +1726892 134709744 +1726891 135573268 +1726890 136436792 +1726889 137300316 +1726888 138163840 +1726887 139027364 +1726886 139890888 +1726885 140754412 +1726884 141617936 +1726883 142481460 +1726882 143344984 +1726881 144208508 +1726880 145072032 +1726879 145935556 +1726878 146799080 +1726877 147662604 +1726876 148526128 +1726875 149389652 +1726874 150253176 +1726873 151116700 +1726872 151980224 +1726871 152843748 +1726870 153707272 +1726869 154570796 +1726868 155434320 +1726867 156297844 +1726866 157161368 +1726865 158024892 +1726864 158888416 +1726863 159751940 +1726862 160615464 +1726861 161478988 +1726860 162342512 +1726859 163206036 +1726858 164069560 +1726857 164933084 +1726856 165796608 +1726855 166660132 +1726854 167523656 +1726853 168387180 +1726852 169250704 +1726851 170114228 +1726850 170977752 +1726849 171841276 +1726848 172704800 +1726847 173568324 +1726846 174431848 +1726845 175295372 +1726844 176158896 +1726843 177022420 +1726842 177885944 +1726841 178749468 +1726840 179612992 +1726839 180476516 +1726838 181340040 +1726837 182203564 +1726836 183067088 +1726835 183930612 +1726834 184794136 +1726833 185657660 +1726832 186521184 +1726831 187384708 +1726830 188248232 +1726829 189111756 +1726828 189975280 +1726827 190838804 +1726826 191702328 +1726825 192565852 +1726824 193429376 +1726823 194292900 +1726822 195156424 +1726821 196019948 +1726820 196883472 +1726819 197746996 +1726818 198610520 +1726817 199474044 +1726816 200337568 +1726815 201201092 +1726814 202064616 +1726813 202928140 +1726812 203791664 +1726811 204655188 +1726810 205518712 +1726809 206382236 +1726808 207245760 +1726807 208109284 +1726806 208972808 +1726805 209836332 +1726804 210699856 +1726803 211563380 +1726802 212426904 +1726801 213290428 +1726800 214153952 +1726799 215017476 +1726798 215881000 +1726797 216744524 +1726796 217608048 +1726795 218471572 +1726794 219335096 +1726793 220198620 +1726792 221062144 +1726791 221925668 +1726790 222789192 +1726789 223652716 +1726788 224516240 +1726787 225379764 +1726786 226243288 +1726785 227106812 +1726784 227970336 +1726783 228833860 +1726782 229697384 +1726781 230560908 +1726780 231424432 +1726779 232287956 +1726778 233151480 +1726777 234015004 +1726776 234878528 +1726775 235742052 +1726774 236605576 +1726773 237469100 +1726772 238332624 +1726771 239196148 +1726770 240059672 +1726769 240923196 +1726768 241786720 +1726767 242650244 +1726766 243513768 +1726765 244377292 +1726764 245240816 +1726763 246104340 +1726762 246967864 +1726761 247831388 +1726760 248694912 +1726759 249558436 +1726758 250421960 +1726757 251285484 +1726756 252149008 +1726755 253012532 +1726754 253876056 +1726753 254739580 +1726752 255603104 +1726751 256466628 +1726750 257330152 +1726749 258193676 +1726748 259057200 +1726747 259920724 +1726746 260784248 +1726745 261647772 +1726744 262511296 +1726743 263374820 +1726742 264238344 +1726741 265101868 +1726740 265965392 +1726739 266828916 +1726738 267692440 +1726737 268555964 +1726736 269419488 +1726735 270283012 +1726734 271146536 +1726733 272010060 +1726732 272873584 +1726731 273737108 +1726730 274600632 +1726729 275464156 +1726728 276327680 +1726727 277191204 +1726726 278054728 +1726725 278918252 +1726724 279781776 +1726723 280645300 +1726722 281508824 +1726721 282372348 +1726720 283235872 +1726719 284099396 +1726718 284962920 +1726717 285826444 +1726716 286689968 +1726715 287553492 +1726714 288417016 +1726713 289280540 +1726712 290144064 +1726711 291007588 +1726710 291871112 +1726709 292734636 +1726708 293598160 +1726707 294461684 +1726706 295325208 +1726705 296188732 +1726704 297052256 +1726703 297915780 +1726702 298779304 +1726701 299642828 +1726700 300506352 +1726699 301369876 +1726698 302233400 +1726697 303096924 +1726696 303960448 +1726695 304823972 +1726694 305687496 +1726693 306551020 +1726692 307414544 +1726691 308278068 +1726690 309141592 +1726689 310005116 +1726688 310868640 +1726687 311732164 +1726686 312595688 +1726685 313459212 +1726684 314322736 +1726683 315186260 +1726682 316049784 +1726681 316913308 +1726680 317776832 +1726679 318640356 +1726678 319503880 +1726677 320367404 +1726676 321230928 +1726675 322094452 +1726674 322957976 +1726673 323821500 +1726672 324685024 +1726671 325548548 +1726670 326412072 +1726669 327275596 +1726668 328139120 +1726667 329002644 +1726666 329866168 +1726665 330729692 +1726664 331593216 +1726663 332456740 +1726662 333320264 +1726661 334183788 +1726660 335047312 +1726659 335910836 +1726658 336774360 +1726657 337637884 +1726656 338501408 +1726655 339364932 +1726654 340228456 +1726653 341091980 +1726652 341955504 +1726651 342819028 +1726650 343682552 +1726649 344546076 +1726648 345409600 +1726647 346273124 +1726646 347136648 +1726645 348000172 +1726644 348863696 +1726643 349727220 +1726642 350590744 +1726641 351454268 +1726640 352317792 +1726639 353181316 +1726638 354044840 +1726637 354908364 +1726636 355771888 +1726635 356635412 +1726634 357498936 +1726633 358362460 +1726632 359225984 +1726631 360089508 +1726630 360953032 +1726629 361816556 +1726628 362680080 +1726627 363543604 +1726626 364407128 +1726625 365270652 +1726624 366134176 +1726623 366997700 +1726622 367861224 +1726621 368724748 +1726620 369588272 +1726619 370451796 +1726618 371315320 +1726617 372178844 +1726616 373042368 +1726615 373905892 +1726614 374769416 +1726613 375632940 +1726612 376496464 +1726611 377359988 +1726610 378223512 +1726609 379087036 +1726608 379950560 +1726607 380814084 +1726606 381677608 +1726605 382541132 +1726604 383404656 +1726603 384268180 +1726602 385131704 +1726601 385995228 +1726600 386858752 +1726599 387722276 +1726598 388585800 +1726597 389449324 +1726596 390312848 +1726595 391176372 +1726594 392039896 +1726593 392903420 +1726592 393766944 +1726591 394630468 +1726590 395493992 +1726589 396357516 +1726588 397221040 +1726587 398084564 +1726586 398948088 +1726585 399811612 +1726584 400675136 +1726583 401538660 +1726582 402402184 +1726581 403265708 +1726580 404129232 +1726579 404992756 +1726578 405856280 +1726577 406719804 +1726576 407583328 +1726575 408446852 +1726574 409310376 +1726573 410173900 +1726572 411037424 +1726571 411900948 +1726570 412764472 +1726569 413627996 +1726568 414491520 +1726567 415355044 +1726566 416218568 +1726565 417082092 +1726564 417945616 +1726563 418809140 +1726562 419672664 +1726561 420536188 +1726560 421399712 +1726559 422263236 +1726558 423126760 +1726557 423990284 +1726556 424853808 +1726555 425717332 +1726554 426580856 +1726553 427444380 +1726552 428307904 +1726551 429171428 +1726550 430034952 +1726549 430898476 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-029.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-029.ans new file mode 100644 index 0000000000000000000000000000000000000000..2c93fd8a214c561d2b8510499d9ba0eaabe853ef --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-029.ans @@ -0,0 +1,501 @@ +2860024.00000000000000000000 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-029.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-029.in new file mode 100644 index 0000000000000000000000000000000000000000..e9c2c4999851cc035edf94248f31b762e7d4198f --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-029.in @@ -0,0 +1,1001 @@ +500 +-1430012 0 +-1430013 715006 +-1430014 1430012 +-1430015 2145018 +-1430016 2860024 +-1430017 3575030 +-1430018 4290036 +-1430019 5005042 +-1430020 5720048 +-1430021 6435054 +-1430022 7150060 +-1430023 7865066 +-1430024 8580072 +-1430025 9295078 +-1430026 10010084 +-1430027 10725090 +-1430028 11440096 +-1430029 12155102 +-1430030 12870108 +-1430031 13585114 +-1430032 14300120 +-1430033 15015126 +-1430034 15730132 +-1430035 16445138 +-1430036 17160144 +-1430037 17875150 +-1430038 18590156 +-1430039 19305162 +-1430040 20020168 +-1430041 20735174 +-1430042 21450180 +-1430043 22165186 +-1430044 22880192 +-1430045 23595198 +-1430046 24310204 +-1430047 25025210 +-1430048 25740216 +-1430049 26455222 +-1430050 27170228 +-1430051 27885234 +-1430052 28600240 +-1430053 29315246 +-1430054 30030252 +-1430055 30745258 +-1430056 31460264 +-1430057 32175270 +-1430058 32890276 +-1430059 33605282 +-1430060 34320288 +-1430061 35035294 +-1430062 35750300 +-1430063 36465306 +-1430064 37180312 +-1430065 37895318 +-1430066 38610324 +-1430067 39325330 +-1430068 40040336 +-1430069 40755342 +-1430070 41470348 +-1430071 42185354 +-1430072 42900360 +-1430073 43615366 +-1430074 44330372 +-1430075 45045378 +-1430076 45760384 +-1430077 46475390 +-1430078 47190396 +-1430079 47905402 +-1430080 48620408 +-1430081 49335414 +-1430082 50050420 +-1430083 50765426 +-1430084 51480432 +-1430085 52195438 +-1430086 52910444 +-1430087 53625450 +-1430088 54340456 +-1430089 55055462 +-1430090 55770468 +-1430091 56485474 +-1430092 57200480 +-1430093 57915486 +-1430094 58630492 +-1430095 59345498 +-1430096 60060504 +-1430097 60775510 +-1430098 61490516 +-1430099 62205522 +-1430100 62920528 +-1430101 63635534 +-1430102 64350540 +-1430103 65065546 +-1430104 65780552 +-1430105 66495558 +-1430106 67210564 +-1430107 67925570 +-1430108 68640576 +-1430109 69355582 +-1430110 70070588 +-1430111 70785594 +-1430112 71500600 +-1430113 72215606 +-1430114 72930612 +-1430115 73645618 +-1430116 74360624 +-1430117 75075630 +-1430118 75790636 +-1430119 76505642 +-1430120 77220648 +-1430121 77935654 +-1430122 78650660 +-1430123 79365666 +-1430124 80080672 +-1430125 80795678 +-1430126 81510684 +-1430127 82225690 +-1430128 82940696 +-1430129 83655702 +-1430130 84370708 +-1430131 85085714 +-1430132 85800720 +-1430133 86515726 +-1430134 87230732 +-1430135 87945738 +-1430136 88660744 +-1430137 89375750 +-1430138 90090756 +-1430139 90805762 +-1430140 91520768 +-1430141 92235774 +-1430142 92950780 +-1430143 93665786 +-1430144 94380792 +-1430145 95095798 +-1430146 95810804 +-1430147 96525810 +-1430148 97240816 +-1430149 97955822 +-1430150 98670828 +-1430151 99385834 +-1430152 100100840 +-1430153 100815846 +-1430154 101530852 +-1430155 102245858 +-1430156 102960864 +-1430157 103675870 +-1430158 104390876 +-1430159 105105882 +-1430160 105820888 +-1430161 106535894 +-1430162 107250900 +-1430163 107965906 +-1430164 108680912 +-1430165 109395918 +-1430166 110110924 +-1430167 110825930 +-1430168 111540936 +-1430169 112255942 +-1430170 112970948 +-1430171 113685954 +-1430172 114400960 +-1430173 115115966 +-1430174 115830972 +-1430175 116545978 +-1430176 117260984 +-1430177 117975990 +-1430178 118690996 +-1430179 119406002 +-1430180 120121008 +-1430181 120836014 +-1430182 121551020 +-1430183 122266026 +-1430184 122981032 +-1430185 123696038 +-1430186 124411044 +-1430187 125126050 +-1430188 125841056 +-1430189 126556062 +-1430190 127271068 +-1430191 127986074 +-1430192 128701080 +-1430193 129416086 +-1430194 130131092 +-1430195 130846098 +-1430196 131561104 +-1430197 132276110 +-1430198 132991116 +-1430199 133706122 +-1430200 134421128 +-1430201 135136134 +-1430202 135851140 +-1430203 136566146 +-1430204 137281152 +-1430205 137996158 +-1430206 138711164 +-1430207 139426170 +-1430208 140141176 +-1430209 140856182 +-1430210 141571188 +-1430211 142286194 +-1430212 143001200 +-1430213 143716206 +-1430214 144431212 +-1430215 145146218 +-1430216 145861224 +-1430217 146576230 +-1430218 147291236 +-1430219 148006242 +-1430220 148721248 +-1430221 149436254 +-1430222 150151260 +-1430223 150866266 +-1430224 151581272 +-1430225 152296278 +-1430226 153011284 +-1430227 153726290 +-1430228 154441296 +-1430229 155156302 +-1430230 155871308 +-1430231 156586314 +-1430232 157301320 +-1430233 158016326 +-1430234 158731332 +-1430235 159446338 +-1430236 160161344 +-1430237 160876350 +-1430238 161591356 +-1430239 162306362 +-1430240 163021368 +-1430241 163736374 +-1430242 164451380 +-1430243 165166386 +-1430244 165881392 +-1430245 166596398 +-1430246 167311404 +-1430247 168026410 +-1430248 168741416 +-1430249 169456422 +-1430250 170171428 +-1430251 170886434 +-1430252 171601440 +-1430253 172316446 +-1430254 173031452 +-1430255 173746458 +-1430256 174461464 +-1430257 175176470 +-1430258 175891476 +-1430259 176606482 +-1430260 177321488 +-1430261 178036494 +-1430262 178751500 +-1430263 179466506 +-1430264 180181512 +-1430265 180896518 +-1430266 181611524 +-1430267 182326530 +-1430268 183041536 +-1430269 183756542 +-1430270 184471548 +-1430271 185186554 +-1430272 185901560 +-1430273 186616566 +-1430274 187331572 +-1430275 188046578 +-1430276 188761584 +-1430277 189476590 +-1430278 190191596 +-1430279 190906602 +-1430280 191621608 +-1430281 192336614 +-1430282 193051620 +-1430283 193766626 +-1430284 194481632 +-1430285 195196638 +-1430286 195911644 +-1430287 196626650 +-1430288 197341656 +-1430289 198056662 +-1430290 198771668 +-1430291 199486674 +-1430292 200201680 +-1430293 200916686 +-1430294 201631692 +-1430295 202346698 +-1430296 203061704 +-1430297 203776710 +-1430298 204491716 +-1430299 205206722 +-1430300 205921728 +-1430301 206636734 +-1430302 207351740 +-1430303 208066746 +-1430304 208781752 +-1430305 209496758 +-1430306 210211764 +-1430307 210926770 +-1430308 211641776 +-1430309 212356782 +-1430310 213071788 +-1430311 213786794 +-1430312 214501800 +-1430313 215216806 +-1430314 215931812 +-1430315 216646818 +-1430316 217361824 +-1430317 218076830 +-1430318 218791836 +-1430319 219506842 +-1430320 220221848 +-1430321 220936854 +-1430322 221651860 +-1430323 222366866 +-1430324 223081872 +-1430325 223796878 +-1430326 224511884 +-1430327 225226890 +-1430328 225941896 +-1430329 226656902 +-1430330 227371908 +-1430331 228086914 +-1430332 228801920 +-1430333 229516926 +-1430334 230231932 +-1430335 230946938 +-1430336 231661944 +-1430337 232376950 +-1430338 233091956 +-1430339 233806962 +-1430340 234521968 +-1430341 235236974 +-1430342 235951980 +-1430343 236666986 +-1430344 237381992 +-1430345 238096998 +-1430346 238812004 +-1430347 239527010 +-1430348 240242016 +-1430349 240957022 +-1430350 241672028 +-1430351 242387034 +-1430352 243102040 +-1430353 243817046 +-1430354 244532052 +-1430355 245247058 +-1430356 245962064 +-1430357 246677070 +-1430358 247392076 +-1430359 248107082 +-1430360 248822088 +-1430361 249537094 +-1430362 250252100 +-1430363 250967106 +-1430364 251682112 +-1430365 252397118 +-1430366 253112124 +-1430367 253827130 +-1430368 254542136 +-1430369 255257142 +-1430370 255972148 +-1430371 256687154 +-1430372 257402160 +-1430373 258117166 +-1430374 258832172 +-1430375 259547178 +-1430376 260262184 +-1430377 260977190 +-1430378 261692196 +-1430379 262407202 +-1430380 263122208 +-1430381 263837214 +-1430382 264552220 +-1430383 265267226 +-1430384 265982232 +-1430385 266697238 +-1430386 267412244 +-1430387 268127250 +-1430388 268842256 +-1430389 269557262 +-1430390 270272268 +-1430391 270987274 +-1430392 271702280 +-1430393 272417286 +-1430394 273132292 +-1430395 273847298 +-1430396 274562304 +-1430397 275277310 +-1430398 275992316 +-1430399 276707322 +-1430400 277422328 +-1430401 278137334 +-1430402 278852340 +-1430403 279567346 +-1430404 280282352 +-1430405 280997358 +-1430406 281712364 +-1430407 282427370 +-1430408 283142376 +-1430409 283857382 +-1430410 284572388 +-1430411 285287394 +-1430412 286002400 +-1430413 286717406 +-1430414 287432412 +-1430415 288147418 +-1430416 288862424 +-1430417 289577430 +-1430418 290292436 +-1430419 291007442 +-1430420 291722448 +-1430421 292437454 +-1430422 293152460 +-1430423 293867466 +-1430424 294582472 +-1430425 295297478 +-1430426 296012484 +-1430427 296727490 +-1430428 297442496 +-1430429 298157502 +-1430430 298872508 +-1430431 299587514 +-1430432 300302520 +-1430433 301017526 +-1430434 301732532 +-1430435 302447538 +-1430436 303162544 +-1430437 303877550 +-1430438 304592556 +-1430439 305307562 +-1430440 306022568 +-1430441 306737574 +-1430442 307452580 +-1430443 308167586 +-1430444 308882592 +-1430445 309597598 +-1430446 310312604 +-1430447 311027610 +-1430448 311742616 +-1430449 312457622 +-1430450 313172628 +-1430451 313887634 +-1430452 314602640 +-1430453 315317646 +-1430454 316032652 +-1430455 316747658 +-1430456 317462664 +-1430457 318177670 +-1430458 318892676 +-1430459 319607682 +-1430460 320322688 +-1430461 321037694 +-1430462 321752700 +-1430463 322467706 +-1430464 323182712 +-1430465 323897718 +-1430466 324612724 +-1430467 325327730 +-1430468 326042736 +-1430469 326757742 +-1430470 327472748 +-1430471 328187754 +-1430472 328902760 +-1430473 329617766 +-1430474 330332772 +-1430475 331047778 +-1430476 331762784 +-1430477 332477790 +-1430478 333192796 +-1430479 333907802 +-1430480 334622808 +-1430481 335337814 +-1430482 336052820 +-1430483 336767826 +-1430484 337482832 +-1430485 338197838 +-1430486 338912844 +-1430487 339627850 +-1430488 340342856 +-1430489 341057862 +-1430490 341772868 +-1430491 342487874 +-1430492 343202880 +-1430493 343917886 +-1430494 344632892 +-1430495 345347898 +-1430496 346062904 +-1430497 346777910 +-1430498 347492916 +-1430499 348207922 +-1430500 348922928 +-1430501 349637934 +-1430502 350352940 +-1430503 351067946 +-1430504 351782952 +-1430505 352497958 +-1430506 353212964 +-1430507 353927970 +-1430508 354642976 +-1430509 355357982 +-1430510 356072988 +-1430511 356787994 +1430012 0 +1430011 715006 +1430010 1430012 +1430009 2145018 +1430008 2860024 +1430007 3575030 +1430006 4290036 +1430005 5005042 +1430004 5720048 +1430003 6435054 +1430002 7150060 +1430001 7865066 +1430000 8580072 +1429999 9295078 +1429998 10010084 +1429997 10725090 +1429996 11440096 +1429995 12155102 +1429994 12870108 +1429993 13585114 +1429992 14300120 +1429991 15015126 +1429990 15730132 +1429989 16445138 +1429988 17160144 +1429987 17875150 +1429986 18590156 +1429985 19305162 +1429984 20020168 +1429983 20735174 +1429982 21450180 +1429981 22165186 +1429980 22880192 +1429979 23595198 +1429978 24310204 +1429977 25025210 +1429976 25740216 +1429975 26455222 +1429974 27170228 +1429973 27885234 +1429972 28600240 +1429971 29315246 +1429970 30030252 +1429969 30745258 +1429968 31460264 +1429967 32175270 +1429966 32890276 +1429965 33605282 +1429964 34320288 +1429963 35035294 +1429962 35750300 +1429961 36465306 +1429960 37180312 +1429959 37895318 +1429958 38610324 +1429957 39325330 +1429956 40040336 +1429955 40755342 +1429954 41470348 +1429953 42185354 +1429952 42900360 +1429951 43615366 +1429950 44330372 +1429949 45045378 +1429948 45760384 +1429947 46475390 +1429946 47190396 +1429945 47905402 +1429944 48620408 +1429943 49335414 +1429942 50050420 +1429941 50765426 +1429940 51480432 +1429939 52195438 +1429938 52910444 +1429937 53625450 +1429936 54340456 +1429935 55055462 +1429934 55770468 +1429933 56485474 +1429932 57200480 +1429931 57915486 +1429930 58630492 +1429929 59345498 +1429928 60060504 +1429927 60775510 +1429926 61490516 +1429925 62205522 +1429924 62920528 +1429923 63635534 +1429922 64350540 +1429921 65065546 +1429920 65780552 +1429919 66495558 +1429918 67210564 +1429917 67925570 +1429916 68640576 +1429915 69355582 +1429914 70070588 +1429913 70785594 +1429912 71500600 +1429911 72215606 +1429910 72930612 +1429909 73645618 +1429908 74360624 +1429907 75075630 +1429906 75790636 +1429905 76505642 +1429904 77220648 +1429903 77935654 +1429902 78650660 +1429901 79365666 +1429900 80080672 +1429899 80795678 +1429898 81510684 +1429897 82225690 +1429896 82940696 +1429895 83655702 +1429894 84370708 +1429893 85085714 +1429892 85800720 +1429891 86515726 +1429890 87230732 +1429889 87945738 +1429888 88660744 +1429887 89375750 +1429886 90090756 +1429885 90805762 +1429884 91520768 +1429883 92235774 +1429882 92950780 +1429881 93665786 +1429880 94380792 +1429879 95095798 +1429878 95810804 +1429877 96525810 +1429876 97240816 +1429875 97955822 +1429874 98670828 +1429873 99385834 +1429872 100100840 +1429871 100815846 +1429870 101530852 +1429869 102245858 +1429868 102960864 +1429867 103675870 +1429866 104390876 +1429865 105105882 +1429864 105820888 +1429863 106535894 +1429862 107250900 +1429861 107965906 +1429860 108680912 +1429859 109395918 +1429858 110110924 +1429857 110825930 +1429856 111540936 +1429855 112255942 +1429854 112970948 +1429853 113685954 +1429852 114400960 +1429851 115115966 +1429850 115830972 +1429849 116545978 +1429848 117260984 +1429847 117975990 +1429846 118690996 +1429845 119406002 +1429844 120121008 +1429843 120836014 +1429842 121551020 +1429841 122266026 +1429840 122981032 +1429839 123696038 +1429838 124411044 +1429837 125126050 +1429836 125841056 +1429835 126556062 +1429834 127271068 +1429833 127986074 +1429832 128701080 +1429831 129416086 +1429830 130131092 +1429829 130846098 +1429828 131561104 +1429827 132276110 +1429826 132991116 +1429825 133706122 +1429824 134421128 +1429823 135136134 +1429822 135851140 +1429821 136566146 +1429820 137281152 +1429819 137996158 +1429818 138711164 +1429817 139426170 +1429816 140141176 +1429815 140856182 +1429814 141571188 +1429813 142286194 +1429812 143001200 +1429811 143716206 +1429810 144431212 +1429809 145146218 +1429808 145861224 +1429807 146576230 +1429806 147291236 +1429805 148006242 +1429804 148721248 +1429803 149436254 +1429802 150151260 +1429801 150866266 +1429800 151581272 +1429799 152296278 +1429798 153011284 +1429797 153726290 +1429796 154441296 +1429795 155156302 +1429794 155871308 +1429793 156586314 +1429792 157301320 +1429791 158016326 +1429790 158731332 +1429789 159446338 +1429788 160161344 +1429787 160876350 +1429786 161591356 +1429785 162306362 +1429784 163021368 +1429783 163736374 +1429782 164451380 +1429781 165166386 +1429780 165881392 +1429779 166596398 +1429778 167311404 +1429777 168026410 +1429776 168741416 +1429775 169456422 +1429774 170171428 +1429773 170886434 +1429772 171601440 +1429771 172316446 +1429770 173031452 +1429769 173746458 +1429768 174461464 +1429767 175176470 +1429766 175891476 +1429765 176606482 +1429764 177321488 +1429763 178036494 +1429762 178751500 +1429761 179466506 +1429760 180181512 +1429759 180896518 +1429758 181611524 +1429757 182326530 +1429756 183041536 +1429755 183756542 +1429754 184471548 +1429753 185186554 +1429752 185901560 +1429751 186616566 +1429750 187331572 +1429749 188046578 +1429748 188761584 +1429747 189476590 +1429746 190191596 +1429745 190906602 +1429744 191621608 +1429743 192336614 +1429742 193051620 +1429741 193766626 +1429740 194481632 +1429739 195196638 +1429738 195911644 +1429737 196626650 +1429736 197341656 +1429735 198056662 +1429734 198771668 +1429733 199486674 +1429732 200201680 +1429731 200916686 +1429730 201631692 +1429729 202346698 +1429728 203061704 +1429727 203776710 +1429726 204491716 +1429725 205206722 +1429724 205921728 +1429723 206636734 +1429722 207351740 +1429721 208066746 +1429720 208781752 +1429719 209496758 +1429718 210211764 +1429717 210926770 +1429716 211641776 +1429715 212356782 +1429714 213071788 +1429713 213786794 +1429712 214501800 +1429711 215216806 +1429710 215931812 +1429709 216646818 +1429708 217361824 +1429707 218076830 +1429706 218791836 +1429705 219506842 +1429704 220221848 +1429703 220936854 +1429702 221651860 +1429701 222366866 +1429700 223081872 +1429699 223796878 +1429698 224511884 +1429697 225226890 +1429696 225941896 +1429695 226656902 +1429694 227371908 +1429693 228086914 +1429692 228801920 +1429691 229516926 +1429690 230231932 +1429689 230946938 +1429688 231661944 +1429687 232376950 +1429686 233091956 +1429685 233806962 +1429684 234521968 +1429683 235236974 +1429682 235951980 +1429681 236666986 +1429680 237381992 +1429679 238096998 +1429678 238812004 +1429677 239527010 +1429676 240242016 +1429675 240957022 +1429674 241672028 +1429673 242387034 +1429672 243102040 +1429671 243817046 +1429670 244532052 +1429669 245247058 +1429668 245962064 +1429667 246677070 +1429666 247392076 +1429665 248107082 +1429664 248822088 +1429663 249537094 +1429662 250252100 +1429661 250967106 +1429660 251682112 +1429659 252397118 +1429658 253112124 +1429657 253827130 +1429656 254542136 +1429655 255257142 +1429654 255972148 +1429653 256687154 +1429652 257402160 +1429651 258117166 +1429650 258832172 +1429649 259547178 +1429648 260262184 +1429647 260977190 +1429646 261692196 +1429645 262407202 +1429644 263122208 +1429643 263837214 +1429642 264552220 +1429641 265267226 +1429640 265982232 +1429639 266697238 +1429638 267412244 +1429637 268127250 +1429636 268842256 +1429635 269557262 +1429634 270272268 +1429633 270987274 +1429632 271702280 +1429631 272417286 +1429630 273132292 +1429629 273847298 +1429628 274562304 +1429627 275277310 +1429626 275992316 +1429625 276707322 +1429624 277422328 +1429623 278137334 +1429622 278852340 +1429621 279567346 +1429620 280282352 +1429619 280997358 +1429618 281712364 +1429617 282427370 +1429616 283142376 +1429615 283857382 +1429614 284572388 +1429613 285287394 +1429612 286002400 +1429611 286717406 +1429610 287432412 +1429609 288147418 +1429608 288862424 +1429607 289577430 +1429606 290292436 +1429605 291007442 +1429604 291722448 +1429603 292437454 +1429602 293152460 +1429601 293867466 +1429600 294582472 +1429599 295297478 +1429598 296012484 +1429597 296727490 +1429596 297442496 +1429595 298157502 +1429594 298872508 +1429593 299587514 +1429592 300302520 +1429591 301017526 +1429590 301732532 +1429589 302447538 +1429588 303162544 +1429587 303877550 +1429586 304592556 +1429585 305307562 +1429584 306022568 +1429583 306737574 +1429582 307452580 +1429581 308167586 +1429580 308882592 +1429579 309597598 +1429578 310312604 +1429577 311027610 +1429576 311742616 +1429575 312457622 +1429574 313172628 +1429573 313887634 +1429572 314602640 +1429571 315317646 +1429570 316032652 +1429569 316747658 +1429568 317462664 +1429567 318177670 +1429566 318892676 +1429565 319607682 +1429564 320322688 +1429563 321037694 +1429562 321752700 +1429561 322467706 +1429560 323182712 +1429559 323897718 +1429558 324612724 +1429557 325327730 +1429556 326042736 +1429555 326757742 +1429554 327472748 +1429553 328187754 +1429552 328902760 +1429551 329617766 +1429550 330332772 +1429549 331047778 +1429548 331762784 +1429547 332477790 +1429546 333192796 +1429545 333907802 +1429544 334622808 +1429543 335337814 +1429542 336052820 +1429541 336767826 +1429540 337482832 +1429539 338197838 +1429538 338912844 +1429537 339627850 +1429536 340342856 +1429535 341057862 +1429534 341772868 +1429533 342487874 +1429532 343202880 +1429531 343917886 +1429530 344632892 +1429529 345347898 +1429528 346062904 +1429527 346777910 +1429526 347492916 +1429525 348207922 +1429524 348922928 +1429523 349637934 +1429522 350352940 +1429521 351067946 +1429520 351782952 +1429519 352497958 +1429518 353212964 +1429517 353927970 +1429516 354642976 +1429515 355357982 +1429514 356072988 +1429513 356787994 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-030.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-030.ans new file mode 100644 index 0000000000000000000000000000000000000000..a63f21e8c1a8e9bf3648a37c325ed945ce66c129 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-030.ans @@ -0,0 +1,501 @@ +37500.00001333333057118580 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-030.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-030.in new file mode 100644 index 0000000000000000000000000000000000000000..9476bc943c1677f1edd462f1a2fa7c5a1abe019e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-030.in @@ -0,0 +1,1001 @@ +500 +0 0 +1 75 +2 225 +3 450 +4 750 +5 1125 +6 1575 +7 2100 +8 2700 +9 3375 +10 4125 +11 4950 +12 5850 +13 6825 +14 7875 +15 9000 +16 10200 +17 11475 +18 12825 +19 14250 +20 15750 +21 17325 +22 18975 +23 20700 +24 22500 +25 24375 +26 26325 +27 28350 +28 30450 +29 32625 +30 34875 +31 37200 +32 39600 +33 42075 +34 44625 +35 47250 +36 49950 +37 52725 +38 55575 +39 58500 +40 61500 +41 64575 +42 67725 +43 70950 +44 74250 +45 77625 +46 81075 +47 84600 +48 88200 +49 91875 +50 95625 +51 99450 +52 103350 +53 107325 +54 111375 +55 115500 +56 119700 +57 123975 +58 128325 +59 132750 +60 137250 +61 141825 +62 146475 +63 151200 +64 156000 +65 160875 +66 165825 +67 170850 +68 175950 +69 181125 +70 186375 +71 191700 +72 197100 +73 202575 +74 208125 +75 213750 +76 219450 +77 225225 +78 231075 +79 237000 +80 243000 +81 249075 +82 255225 +83 261450 +84 267750 +85 274125 +86 280575 +87 287100 +88 293700 +89 300375 +90 307125 +91 313950 +92 320850 +93 327825 +94 334875 +95 342000 +96 349200 +97 356475 +98 363825 +99 371250 +100 378750 +101 386325 +102 393975 +103 401700 +104 409500 +105 417375 +106 425325 +107 433350 +108 441450 +109 449625 +110 457875 +111 466200 +112 474600 +113 483075 +114 491625 +115 500250 +116 508950 +117 517725 +118 526575 +119 535500 +120 544500 +121 553575 +122 562725 +123 571950 +124 581250 +125 590625 +126 600075 +127 609600 +128 619200 +129 628875 +130 638625 +131 648450 +132 658350 +133 668325 +134 678375 +135 688500 +136 698700 +137 708975 +138 719325 +139 729750 +140 740250 +141 750825 +142 761475 +143 772200 +144 783000 +145 793875 +146 804825 +147 815850 +148 826950 +149 838125 +150 849375 +151 860700 +152 872100 +153 883575 +154 895125 +155 906750 +156 918450 +157 930225 +158 942075 +159 954000 +160 966000 +161 978075 +162 990225 +163 1002450 +164 1014750 +165 1027125 +166 1039575 +167 1052100 +168 1064700 +169 1077375 +170 1090125 +171 1102950 +172 1115850 +173 1128825 +174 1141875 +175 1155000 +176 1168200 +177 1181475 +178 1194825 +179 1208250 +180 1221750 +181 1235325 +182 1248975 +183 1262700 +184 1276500 +185 1290375 +186 1304325 +187 1318350 +188 1332450 +189 1346625 +190 1360875 +191 1375200 +192 1389600 +193 1404075 +194 1418625 +195 1433250 +196 1447950 +197 1462725 +198 1477575 +199 1492500 +200 1507500 +201 1522575 +202 1537725 +203 1552950 +204 1568250 +205 1583625 +206 1599075 +207 1614600 +208 1630200 +209 1645875 +210 1661625 +211 1677450 +212 1693350 +213 1709325 +214 1725375 +215 1741500 +216 1757700 +217 1773975 +218 1790325 +219 1806750 +220 1823250 +221 1839825 +222 1856475 +223 1873200 +224 1890000 +225 1906875 +226 1923825 +227 1940850 +228 1957950 +229 1975125 +230 1992375 +231 2009700 +232 2027100 +233 2044575 +234 2062125 +235 2079750 +236 2097450 +237 2115225 +238 2133075 +239 2151000 +240 2169000 +241 2187075 +242 2205225 +243 2223450 +244 2241750 +245 2260125 +246 2278575 +247 2297100 +248 2315700 +249 2334375 +250 2353125 +251 2371950 +252 2390850 +253 2409825 +254 2428875 +255 2448000 +256 2467200 +257 2486475 +258 2505825 +259 2525250 +260 2544750 +261 2564325 +262 2583975 +263 2603700 +264 2623500 +265 2643375 +266 2663325 +267 2683350 +268 2703450 +269 2723625 +270 2743875 +271 2764200 +272 2784600 +273 2805075 +274 2825625 +275 2846250 +276 2866950 +277 2887725 +278 2908575 +279 2929500 +280 2950500 +281 2971575 +282 2992725 +283 3013950 +284 3035250 +285 3056625 +286 3078075 +287 3099600 +288 3121200 +289 3142875 +290 3164625 +291 3186450 +292 3208350 +293 3230325 +294 3252375 +295 3274500 +296 3296700 +297 3318975 +298 3341325 +299 3363750 +300 3386250 +301 3408825 +302 3431475 +303 3454200 +304 3477000 +305 3499875 +306 3522825 +307 3545850 +308 3568950 +309 3592125 +310 3615375 +311 3638700 +312 3662100 +313 3685575 +314 3709125 +315 3732750 +316 3756450 +317 3780225 +318 3804075 +319 3828000 +320 3852000 +321 3876075 +322 3900225 +323 3924450 +324 3948750 +325 3973125 +326 3997575 +327 4022100 +328 4046700 +329 4071375 +330 4096125 +331 4120950 +332 4145850 +333 4170825 +334 4195875 +335 4221000 +336 4246200 +337 4271475 +338 4296825 +339 4322250 +340 4347750 +341 4373325 +342 4398975 +343 4424700 +344 4450500 +345 4476375 +346 4502325 +347 4528350 +348 4554450 +349 4580625 +350 4606875 +351 4633200 +352 4659600 +353 4686075 +354 4712625 +355 4739250 +356 4765950 +357 4792725 +358 4819575 +359 4846500 +360 4873500 +361 4900575 +362 4927725 +363 4954950 +364 4982250 +365 5009625 +366 5037075 +367 5064600 +368 5092200 +369 5119875 +370 5147625 +371 5175450 +372 5203350 +373 5231325 +374 5259375 +375 5287500 +376 5315700 +377 5343975 +378 5372325 +379 5400750 +380 5429250 +381 5457825 +382 5486475 +383 5515200 +384 5544000 +385 5572875 +386 5601825 +387 5630850 +388 5659950 +389 5689125 +390 5718375 +391 5747700 +392 5777100 +393 5806575 +394 5836125 +395 5865750 +396 5895450 +397 5925225 +398 5955075 +399 5985000 +400 6015000 +401 6045075 +402 6075225 +403 6105450 +404 6135750 +405 6166125 +406 6196575 +407 6227100 +408 6257700 +409 6288375 +410 6319125 +411 6349950 +412 6380850 +413 6411825 +414 6442875 +415 6474000 +416 6505200 +417 6536475 +418 6567825 +419 6599250 +420 6630750 +421 6662325 +422 6693975 +423 6725700 +424 6757500 +425 6789375 +426 6821325 +427 6853350 +428 6885450 +429 6917625 +430 6949875 +431 6982200 +432 7014600 +433 7047075 +434 7079625 +435 7112250 +436 7144950 +437 7177725 +438 7210575 +439 7243500 +440 7276500 +441 7309575 +442 7342725 +443 7375950 +444 7409250 +445 7442625 +446 7476075 +447 7509600 +448 7543200 +449 7576875 +450 7610625 +451 7644450 +452 7678350 +453 7712325 +454 7746375 +455 7780500 +456 7814700 +457 7848975 +458 7883325 +459 7917750 +460 7952250 +461 7986825 +462 8021475 +463 8056200 +464 8091000 +465 8125875 +466 8160825 +467 8195850 +468 8230950 +469 8266125 +470 8301375 +471 8336700 +472 8372100 +473 8407575 +474 8443125 +475 8478750 +476 8514450 +477 8550225 +478 8586075 +479 8622000 +480 8658000 +481 8694075 +482 8730225 +483 8766450 +484 8802750 +485 8839125 +486 8875575 +487 8912100 +488 8948700 +489 8985375 +490 9022125 +491 9058950 +492 9095850 +493 9132825 +494 9169875 +495 9207000 +496 9244200 +497 9281475 +498 9318825 +499 9356250 +500 9393750 +501 9431325 +502 9468975 +503 9506700 +504 9544500 +505 9582375 +506 9620325 +507 9658350 +508 9696450 +509 9734625 +510 9772875 +511 9811200 +512 9849600 +513 9888075 +514 9926625 +515 9965250 +516 10003950 +517 10042725 +518 10081575 +519 10120500 +520 10159500 +521 10198575 +522 10237725 +523 10276950 +524 10316250 +525 10355625 +526 10395075 +527 10434600 +528 10474200 +529 10513875 +530 10553625 +531 10593450 +532 10633350 +533 10673325 +534 10713375 +535 10753500 +536 10793700 +537 10833975 +538 10874325 +539 10914750 +540 10955250 +541 10995825 +542 11036475 +543 11077200 +544 11118000 +545 11158875 +546 11199825 +547 11240850 +548 11281950 +549 11323125 +550 11364375 +551 11405700 +552 11447100 +553 11488575 +554 11530125 +555 11571750 +556 11613450 +557 11655225 +558 11697075 +559 11739000 +560 11781000 +561 11823075 +562 11865225 +563 11907450 +564 11949750 +565 11992125 +566 12034575 +567 12077100 +568 12119700 +569 12162375 +570 12205125 +571 12247950 +572 12290850 +573 12333825 +574 12376875 +575 12420000 +576 12463200 +577 12506475 +578 12549825 +579 12593250 +580 12636750 +581 12680325 +582 12723975 +583 12767700 +584 12811500 +585 12855375 +586 12899325 +587 12943350 +588 12987450 +589 13031625 +590 13075875 +591 13120200 +592 13164600 +593 13209075 +594 13253625 +595 13298250 +596 13342950 +597 13387725 +598 13432575 +599 13477500 +600 13522500 +601 13567575 +602 13612725 +603 13657950 +604 13703250 +605 13748625 +606 13794075 +607 13839600 +608 13885200 +609 13930875 +610 13976625 +611 14022450 +612 14068350 +613 14114325 +614 14160375 +615 14206500 +616 14252700 +617 14298975 +618 14345325 +619 14391750 +620 14438250 +621 14484825 +622 14531475 +623 14578200 +624 14625000 +625 14671875 +626 14718825 +627 14765850 +628 14812950 +629 14860125 +630 14907375 +631 14954700 +632 15002100 +633 15049575 +634 15097125 +635 15144750 +636 15192450 +637 15240225 +638 15288075 +639 15336000 +640 15384000 +641 15432075 +642 15480225 +643 15528450 +644 15576750 +645 15625125 +646 15673575 +647 15722100 +648 15770700 +649 15819375 +650 15868125 +651 15916950 +652 15965850 +653 16014825 +654 16063875 +655 16113000 +656 16162200 +657 16211475 +658 16260825 +659 16310250 +660 16359750 +661 16409325 +662 16458975 +663 16508700 +664 16558500 +665 16608375 +666 16658325 +667 16708350 +668 16758450 +669 16808625 +670 16858875 +671 16909200 +672 16959600 +673 17010075 +674 17060625 +675 17111250 +676 17161950 +677 17212725 +678 17263575 +679 17314500 +680 17365500 +681 17416575 +682 17467725 +683 17518950 +684 17570250 +685 17621625 +686 17673075 +687 17724600 +688 17776200 +689 17827875 +690 17879625 +691 17931450 +692 17983350 +693 18035325 +694 18087375 +695 18139500 +696 18191700 +697 18243975 +698 18296325 +699 18348750 +700 18401250 +701 18453825 +702 18506475 +703 18559200 +704 18612000 +705 18664875 +706 18717825 +707 18770850 +708 18823950 +709 18877125 +710 18930375 +711 18983700 +712 19037100 +713 19090575 +714 19144125 +715 19197750 +716 19251450 +717 19305225 +718 19359075 +719 19413000 +720 19467000 +721 19521075 +722 19575225 +723 19629450 +724 19683750 +725 19738125 +726 19792575 +727 19847100 +728 19901700 +729 19956375 +730 20011125 +731 20065950 +732 20120850 +733 20175825 +734 20230875 +735 20286000 +736 20341200 +737 20396475 +738 20451825 +739 20507250 +740 20562750 +741 20618325 +742 20673975 +743 20729700 +744 20785500 +745 20841375 +746 20897325 +747 20953350 +748 21009450 +749 21065625 +750 21121875 +751 21178200 +752 21234600 +753 21291075 +754 21347625 +755 21404250 +756 21460950 +757 21517725 +758 21574575 +759 21631500 +760 21688500 +761 21745575 +762 21802725 +763 21859950 +764 21917250 +765 21974625 +766 22032075 +767 22089600 +768 22147200 +769 22204875 +770 22262625 +771 22320450 +772 22378350 +773 22436325 +774 22494375 +775 22552500 +776 22610700 +777 22668975 +778 22727325 +779 22785750 +780 22844250 +781 22902825 +782 22961475 +783 23020200 +784 23079000 +785 23137875 +786 23196825 +787 23255850 +788 23314950 +789 23374125 +790 23433375 +791 23492700 +792 23552100 +793 23611575 +794 23671125 +795 23730750 +796 23790450 +797 23850225 +798 23910075 +799 23970000 +800 24030000 +801 24090075 +802 24150225 +803 24210450 +804 24270750 +805 24331125 +806 24391575 +807 24452100 +808 24512700 +809 24573375 +810 24634125 +811 24694950 +812 24755850 +813 24816825 +814 24877875 +815 24939000 +816 25000200 +817 25061475 +818 25122825 +819 25184250 +820 25245750 +821 25307325 +822 25368975 +823 25430700 +824 25492500 +825 25554375 +826 25616325 +827 25678350 +828 25740450 +829 25802625 +830 25864875 +831 25927200 +832 25989600 +833 26052075 +834 26114625 +835 26177250 +836 26239950 +837 26302725 +838 26365575 +839 26428500 +840 26491500 +841 26554575 +842 26617725 +843 26680950 +844 26744250 +845 26807625 +846 26871075 +847 26934600 +848 26998200 +849 27061875 +850 27125625 +851 27189450 +852 27253350 +853 27317325 +854 27381375 +855 27445500 +856 27509700 +857 27573975 +858 27638325 +859 27702750 +860 27767250 +861 27831825 +862 27896475 +863 27961200 +864 28026000 +865 28090875 +866 28155825 +867 28220850 +868 28285950 +869 28351125 +870 28416375 +871 28481700 +872 28547100 +873 28612575 +874 28678125 +875 28743750 +876 28809450 +877 28875225 +878 28941075 +879 29007000 +880 29073000 +881 29139075 +882 29205225 +883 29271450 +884 29337750 +885 29404125 +886 29470575 +887 29537100 +888 29603700 +889 29670375 +890 29737125 +891 29803950 +892 29870850 +893 29937825 +894 30004875 +895 30072000 +896 30139200 +897 30206475 +898 30273825 +899 30341250 +900 30408750 +901 30476325 +902 30543975 +903 30611700 +904 30679500 +905 30747375 +906 30815325 +907 30883350 +908 30951450 +909 31019625 +910 31087875 +911 31156200 +912 31224600 +913 31293075 +914 31361625 +915 31430250 +916 31498950 +917 31567725 +918 31636575 +919 31705500 +920 31774500 +921 31843575 +922 31912725 +923 31981950 +924 32051250 +925 32120625 +926 32190075 +927 32259600 +928 32329200 +929 32398875 +930 32468625 +931 32538450 +932 32608350 +933 32678325 +934 32748375 +935 32818500 +936 32888700 +937 32958975 +938 33029325 +939 33099750 +940 33170250 +941 33240825 +942 33311475 +943 33382200 +944 33453000 +945 33523875 +946 33594825 +947 33665850 +948 33736950 +949 33808125 +950 33879375 +951 33950700 +952 34022100 +953 34093575 +954 34165125 +955 34236750 +956 34308450 +957 34380225 +958 34452075 +959 34524000 +960 34596000 +961 34668075 +962 34740225 +963 34812450 +964 34884750 +965 34957125 +966 35029575 +967 35102100 +968 35174700 +969 35247375 +970 35320125 +971 35392950 +972 35465850 +973 35538825 +974 35611875 +975 35685000 +976 35758200 +977 35831475 +978 35904825 +979 35978250 +980 36051750 +981 36125325 +982 36198975 +983 36272700 +984 36346500 +985 36420375 +986 36494325 +987 36568350 +988 36642450 +989 36716625 +990 36790875 +991 36865200 +992 36939600 +993 37014075 +994 37088625 +995 37163250 +996 37237950 +997 37312725 +998 37387575 +999 37462500 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-031.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-031.ans new file mode 100644 index 0000000000000000000000000000000000000000..949cfeb0b2f4cd24504d828859f5a1ac7682b950 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-031.ans @@ -0,0 +1,501 @@ +7500.00006666666649834951 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-031.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-031.in new file mode 100644 index 0000000000000000000000000000000000000000..7469cbee12f91aa98b3b13e05fda1b84708fee8b --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-031.in @@ -0,0 +1,1001 @@ +500 +0 0 +1 15 +2 45 +3 90 +4 150 +5 225 +6 315 +7 420 +8 540 +9 675 +10 825 +11 990 +12 1170 +13 1365 +14 1575 +15 1800 +16 2040 +17 2295 +18 2565 +19 2850 +20 3150 +21 3465 +22 3795 +23 4140 +24 4500 +25 4875 +26 5265 +27 5670 +28 6090 +29 6525 +30 6975 +31 7440 +32 7920 +33 8415 +34 8925 +35 9450 +36 9990 +37 10545 +38 11115 +39 11700 +40 12300 +41 12915 +42 13545 +43 14190 +44 14850 +45 15525 +46 16215 +47 16920 +48 17640 +49 18375 +50 19125 +51 19890 +52 20670 +53 21465 +54 22275 +55 23100 +56 23940 +57 24795 +58 25665 +59 26550 +60 27450 +61 28365 +62 29295 +63 30240 +64 31200 +65 32175 +66 33165 +67 34170 +68 35190 +69 36225 +70 37275 +71 38340 +72 39420 +73 40515 +74 41625 +75 42750 +76 43890 +77 45045 +78 46215 +79 47400 +80 48600 +81 49815 +82 51045 +83 52290 +84 53550 +85 54825 +86 56115 +87 57420 +88 58740 +89 60075 +90 61425 +91 62790 +92 64170 +93 65565 +94 66975 +95 68400 +96 69840 +97 71295 +98 72765 +99 74250 +100 75750 +101 77265 +102 78795 +103 80340 +104 81900 +105 83475 +106 85065 +107 86670 +108 88290 +109 89925 +110 91575 +111 93240 +112 94920 +113 96615 +114 98325 +115 100050 +116 101790 +117 103545 +118 105315 +119 107100 +120 108900 +121 110715 +122 112545 +123 114390 +124 116250 +125 118125 +126 120015 +127 121920 +128 123840 +129 125775 +130 127725 +131 129690 +132 131670 +133 133665 +134 135675 +135 137700 +136 139740 +137 141795 +138 143865 +139 145950 +140 148050 +141 150165 +142 152295 +143 154440 +144 156600 +145 158775 +146 160965 +147 163170 +148 165390 +149 167625 +150 169875 +151 172140 +152 174420 +153 176715 +154 179025 +155 181350 +156 183690 +157 186045 +158 188415 +159 190800 +160 193200 +161 195615 +162 198045 +163 200490 +164 202950 +165 205425 +166 207915 +167 210420 +168 212940 +169 215475 +170 218025 +171 220590 +172 223170 +173 225765 +174 228375 +175 231000 +176 233640 +177 236295 +178 238965 +179 241650 +180 244350 +181 247065 +182 249795 +183 252540 +184 255300 +185 258075 +186 260865 +187 263670 +188 266490 +189 269325 +190 272175 +191 275040 +192 277920 +193 280815 +194 283725 +195 286650 +196 289590 +197 292545 +198 295515 +199 298500 +200 301500 +201 304515 +202 307545 +203 310590 +204 313650 +205 316725 +206 319815 +207 322920 +208 326040 +209 329175 +210 332325 +211 335490 +212 338670 +213 341865 +214 345075 +215 348300 +216 351540 +217 354795 +218 358065 +219 361350 +220 364650 +221 367965 +222 371295 +223 374640 +224 378000 +225 381375 +226 384765 +227 388170 +228 391590 +229 395025 +230 398475 +231 401940 +232 405420 +233 408915 +234 412425 +235 415950 +236 419490 +237 423045 +238 426615 +239 430200 +240 433800 +241 437415 +242 441045 +243 444690 +244 448350 +245 452025 +246 455715 +247 459420 +248 463140 +249 466875 +250 470625 +251 474390 +252 478170 +253 481965 +254 485775 +255 489600 +256 493440 +257 497295 +258 501165 +259 505050 +260 508950 +261 512865 +262 516795 +263 520740 +264 524700 +265 528675 +266 532665 +267 536670 +268 540690 +269 544725 +270 548775 +271 552840 +272 556920 +273 561015 +274 565125 +275 569250 +276 573390 +277 577545 +278 581715 +279 585900 +280 590100 +281 594315 +282 598545 +283 602790 +284 607050 +285 611325 +286 615615 +287 619920 +288 624240 +289 628575 +290 632925 +291 637290 +292 641670 +293 646065 +294 650475 +295 654900 +296 659340 +297 663795 +298 668265 +299 672750 +300 677250 +301 681765 +302 686295 +303 690840 +304 695400 +305 699975 +306 704565 +307 709170 +308 713790 +309 718425 +310 723075 +311 727740 +312 732420 +313 737115 +314 741825 +315 746550 +316 751290 +317 756045 +318 760815 +319 765600 +320 770400 +321 775215 +322 780045 +323 784890 +324 789750 +325 794625 +326 799515 +327 804420 +328 809340 +329 814275 +330 819225 +331 824190 +332 829170 +333 834165 +334 839175 +335 844200 +336 849240 +337 854295 +338 859365 +339 864450 +340 869550 +341 874665 +342 879795 +343 884940 +344 890100 +345 895275 +346 900465 +347 905670 +348 910890 +349 916125 +350 921375 +351 926640 +352 931920 +353 937215 +354 942525 +355 947850 +356 953190 +357 958545 +358 963915 +359 969300 +360 974700 +361 980115 +362 985545 +363 990990 +364 996450 +365 1001925 +366 1007415 +367 1012920 +368 1018440 +369 1023975 +370 1029525 +371 1035090 +372 1040670 +373 1046265 +374 1051875 +375 1057500 +376 1063140 +377 1068795 +378 1074465 +379 1080150 +380 1085850 +381 1091565 +382 1097295 +383 1103040 +384 1108800 +385 1114575 +386 1120365 +387 1126170 +388 1131990 +389 1137825 +390 1143675 +391 1149540 +392 1155420 +393 1161315 +394 1167225 +395 1173150 +396 1179090 +397 1185045 +398 1191015 +399 1197000 +400 1203000 +401 1209015 +402 1215045 +403 1221090 +404 1227150 +405 1233225 +406 1239315 +407 1245420 +408 1251540 +409 1257675 +410 1263825 +411 1269990 +412 1276170 +413 1282365 +414 1288575 +415 1294800 +416 1301040 +417 1307295 +418 1313565 +419 1319850 +420 1326150 +421 1332465 +422 1338795 +423 1345140 +424 1351500 +425 1357875 +426 1364265 +427 1370670 +428 1377090 +429 1383525 +430 1389975 +431 1396440 +432 1402920 +433 1409415 +434 1415925 +435 1422450 +436 1428990 +437 1435545 +438 1442115 +439 1448700 +440 1455300 +441 1461915 +442 1468545 +443 1475190 +444 1481850 +445 1488525 +446 1495215 +447 1501920 +448 1508640 +449 1515375 +450 1522125 +451 1528890 +452 1535670 +453 1542465 +454 1549275 +455 1556100 +456 1562940 +457 1569795 +458 1576665 +459 1583550 +460 1590450 +461 1597365 +462 1604295 +463 1611240 +464 1618200 +465 1625175 +466 1632165 +467 1639170 +468 1646190 +469 1653225 +470 1660275 +471 1667340 +472 1674420 +473 1681515 +474 1688625 +475 1695750 +476 1702890 +477 1710045 +478 1717215 +479 1724400 +480 1731600 +481 1738815 +482 1746045 +483 1753290 +484 1760550 +485 1767825 +486 1775115 +487 1782420 +488 1789740 +489 1797075 +490 1804425 +491 1811790 +492 1819170 +493 1826565 +494 1833975 +495 1841400 +496 1848840 +497 1856295 +498 1863765 +499 1871250 +500 1878750 +501 1886265 +502 1893795 +503 1901340 +504 1908900 +505 1916475 +506 1924065 +507 1931670 +508 1939290 +509 1946925 +510 1954575 +511 1962240 +512 1969920 +513 1977615 +514 1985325 +515 1993050 +516 2000790 +517 2008545 +518 2016315 +519 2024100 +520 2031900 +521 2039715 +522 2047545 +523 2055390 +524 2063250 +525 2071125 +526 2079015 +527 2086920 +528 2094840 +529 2102775 +530 2110725 +531 2118690 +532 2126670 +533 2134665 +534 2142675 +535 2150700 +536 2158740 +537 2166795 +538 2174865 +539 2182950 +540 2191050 +541 2199165 +542 2207295 +543 2215440 +544 2223600 +545 2231775 +546 2239965 +547 2248170 +548 2256390 +549 2264625 +550 2272875 +551 2281140 +552 2289420 +553 2297715 +554 2306025 +555 2314350 +556 2322690 +557 2331045 +558 2339415 +559 2347800 +560 2356200 +561 2364615 +562 2373045 +563 2381490 +564 2389950 +565 2398425 +566 2406915 +567 2415420 +568 2423940 +569 2432475 +570 2441025 +571 2449590 +572 2458170 +573 2466765 +574 2475375 +575 2484000 +576 2492640 +577 2501295 +578 2509965 +579 2518650 +580 2527350 +581 2536065 +582 2544795 +583 2553540 +584 2562300 +585 2571075 +586 2579865 +587 2588670 +588 2597490 +589 2606325 +590 2615175 +591 2624040 +592 2632920 +593 2641815 +594 2650725 +595 2659650 +596 2668590 +597 2677545 +598 2686515 +599 2695500 +600 2704500 +601 2713515 +602 2722545 +603 2731590 +604 2740650 +605 2749725 +606 2758815 +607 2767920 +608 2777040 +609 2786175 +610 2795325 +611 2804490 +612 2813670 +613 2822865 +614 2832075 +615 2841300 +616 2850540 +617 2859795 +618 2869065 +619 2878350 +620 2887650 +621 2896965 +622 2906295 +623 2915640 +624 2925000 +625 2934375 +626 2943765 +627 2953170 +628 2962590 +629 2972025 +630 2981475 +631 2990940 +632 3000420 +633 3009915 +634 3019425 +635 3028950 +636 3038490 +637 3048045 +638 3057615 +639 3067200 +640 3076800 +641 3086415 +642 3096045 +643 3105690 +644 3115350 +645 3125025 +646 3134715 +647 3144420 +648 3154140 +649 3163875 +650 3173625 +651 3183390 +652 3193170 +653 3202965 +654 3212775 +655 3222600 +656 3232440 +657 3242295 +658 3252165 +659 3262050 +660 3271950 +661 3281865 +662 3291795 +663 3301740 +664 3311700 +665 3321675 +666 3331665 +667 3341670 +668 3351690 +669 3361725 +670 3371775 +671 3381840 +672 3391920 +673 3402015 +674 3412125 +675 3422250 +676 3432390 +677 3442545 +678 3452715 +679 3462900 +680 3473100 +681 3483315 +682 3493545 +683 3503790 +684 3514050 +685 3524325 +686 3534615 +687 3544920 +688 3555240 +689 3565575 +690 3575925 +691 3586290 +692 3596670 +693 3607065 +694 3617475 +695 3627900 +696 3638340 +697 3648795 +698 3659265 +699 3669750 +700 3680250 +701 3690765 +702 3701295 +703 3711840 +704 3722400 +705 3732975 +706 3743565 +707 3754170 +708 3764790 +709 3775425 +710 3786075 +711 3796740 +712 3807420 +713 3818115 +714 3828825 +715 3839550 +716 3850290 +717 3861045 +718 3871815 +719 3882600 +720 3893400 +721 3904215 +722 3915045 +723 3925890 +724 3936750 +725 3947625 +726 3958515 +727 3969420 +728 3980340 +729 3991275 +730 4002225 +731 4013190 +732 4024170 +733 4035165 +734 4046175 +735 4057200 +736 4068240 +737 4079295 +738 4090365 +739 4101450 +740 4112550 +741 4123665 +742 4134795 +743 4145940 +744 4157100 +745 4168275 +746 4179465 +747 4190670 +748 4201890 +749 4213125 +750 4224375 +751 4235640 +752 4246920 +753 4258215 +754 4269525 +755 4280850 +756 4292190 +757 4303545 +758 4314915 +759 4326300 +760 4337700 +761 4349115 +762 4360545 +763 4371990 +764 4383450 +765 4394925 +766 4406415 +767 4417920 +768 4429440 +769 4440975 +770 4452525 +771 4464090 +772 4475670 +773 4487265 +774 4498875 +775 4510500 +776 4522140 +777 4533795 +778 4545465 +779 4557150 +780 4568850 +781 4580565 +782 4592295 +783 4604040 +784 4615800 +785 4627575 +786 4639365 +787 4651170 +788 4662990 +789 4674825 +790 4686675 +791 4698540 +792 4710420 +793 4722315 +794 4734225 +795 4746150 +796 4758090 +797 4770045 +798 4782015 +799 4794000 +800 4806000 +801 4818015 +802 4830045 +803 4842090 +804 4854150 +805 4866225 +806 4878315 +807 4890420 +808 4902540 +809 4914675 +810 4926825 +811 4938990 +812 4951170 +813 4963365 +814 4975575 +815 4987800 +816 5000040 +817 5012295 +818 5024565 +819 5036850 +820 5049150 +821 5061465 +822 5073795 +823 5086140 +824 5098500 +825 5110875 +826 5123265 +827 5135670 +828 5148090 +829 5160525 +830 5172975 +831 5185440 +832 5197920 +833 5210415 +834 5222925 +835 5235450 +836 5247990 +837 5260545 +838 5273115 +839 5285700 +840 5298300 +841 5310915 +842 5323545 +843 5336190 +844 5348850 +845 5361525 +846 5374215 +847 5386920 +848 5399640 +849 5412375 +850 5425125 +851 5437890 +852 5450670 +853 5463465 +854 5476275 +855 5489100 +856 5501940 +857 5514795 +858 5527665 +859 5540550 +860 5553450 +861 5566365 +862 5579295 +863 5592240 +864 5605200 +865 5618175 +866 5631165 +867 5644170 +868 5657190 +869 5670225 +870 5683275 +871 5696340 +872 5709420 +873 5722515 +874 5735625 +875 5748750 +876 5761890 +877 5775045 +878 5788215 +879 5801400 +880 5814600 +881 5827815 +882 5841045 +883 5854290 +884 5867550 +885 5880825 +886 5894115 +887 5907420 +888 5920740 +889 5934075 +890 5947425 +891 5960790 +892 5974170 +893 5987565 +894 6000975 +895 6014400 +896 6027840 +897 6041295 +898 6054765 +899 6068250 +900 6081750 +901 6095265 +902 6108795 +903 6122340 +904 6135900 +905 6149475 +906 6163065 +907 6176670 +908 6190290 +909 6203925 +910 6217575 +911 6231240 +912 6244920 +913 6258615 +914 6272325 +915 6286050 +916 6299790 +917 6313545 +918 6327315 +919 6341100 +920 6354900 +921 6368715 +922 6382545 +923 6396390 +924 6410250 +925 6424125 +926 6438015 +927 6451920 +928 6465840 +929 6479775 +930 6493725 +931 6507690 +932 6521670 +933 6535665 +934 6549675 +935 6563700 +936 6577740 +937 6591795 +938 6605865 +939 6619950 +940 6634050 +941 6648165 +942 6662295 +943 6676440 +944 6690600 +945 6704775 +946 6718965 +947 6733170 +948 6747390 +949 6761625 +950 6775875 +951 6790140 +952 6804420 +953 6818715 +954 6833025 +955 6847350 +956 6861690 +957 6876045 +958 6890415 +959 6904800 +960 6919200 +961 6933615 +962 6948045 +963 6962490 +964 6976950 +965 6991425 +966 7005915 +967 7020420 +968 7034940 +969 7049475 +970 7064025 +971 7078590 +972 7093170 +973 7107765 +974 7122375 +975 7137000 +976 7151640 +977 7166295 +978 7180965 +979 7195650 +980 7210350 +981 7225065 +982 7239795 +983 7254540 +984 7269300 +985 7284075 +986 7298865 +987 7313670 +988 7328490 +989 7343325 +990 7358175 +991 7373040 +992 7387920 +993 7402815 +994 7417725 +995 7432650 +996 7447590 +997 7462545 +998 7477515 +999 7492500 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-032.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-032.ans new file mode 100644 index 0000000000000000000000000000000000000000..c4b5894f759e006bb3fa5fb2eafe3e63dcc73e55 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-032.ans @@ -0,0 +1,48 @@ +14141.42867605674473452382 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +53 +54 +59 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-032.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-032.in new file mode 100644 index 0000000000000000000000000000000000000000..604601403b4fc010d41283c1dda6f55ee364d1ad --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-032.in @@ -0,0 +1,95 @@ +47 +0 0 +2 1 +4 2 +6 3 +8 4 +10 5 +12 6 +14 7 +16 8 +18 9 +20 10 +22 11 +24 12 +26 13 +28 14 +30 15 +10016 10016 +10018 10017 +10020 10018 +10022 10019 +10024 10020 +10026 10021 +10028 10022 +10030 10023 +20024 20024 +20026 20025 +20028 20026 +20030 20027 +20032 20028 +20034 20029 +20036 20030 +20038 20031 +30032 30032 +30034 30033 +30036 30034 +30038 30035 +30040 30036 +30042 30037 +30044 30038 +30046 30039 +40040 40040 +40042 40041 +40044 40042 +40046 40043 +50044 50044 +50046 50045 +50048 50046 +50050 50047 +60048 60048 +60050 60049 +60052 60050 +60054 60051 +70052 70052 +70054 70053 +80054 80054 +80056 80055 +90056 90056 +90058 90057 +100058 100058 +110059 110059 +120060 120060 +130061 130061 +140062 140062 +150063 150063 +160064 160064 +170065 170065 +180066 180066 +190067 190067 +200068 200068 +210069 210069 +220070 220070 +230071 230071 +240072 240072 +250073 250073 +260074 260074 +270075 270075 +280076 280076 +290077 290077 +300078 300078 +310079 310079 +320080 320080 +330081 330081 +340082 340082 +350083 350083 +360084 360084 +370085 370085 +380086 380086 +390087 390087 +400088 400088 +410089 410089 +420090 420090 +430091 430091 +440092 440092 +450093 450093 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-033.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-033.ans new file mode 100644 index 0000000000000000000000000000000000000000..fc22235d1270e59e6565eb5f134475ea66c57d98 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-033.ans @@ -0,0 +1,161 @@ +14054.03418951298772299197 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-033.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-033.in new file mode 100644 index 0000000000000000000000000000000000000000..f1d2bdddd317186819bb3ff07cca1c7efa2a7330 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-033.in @@ -0,0 +1,321 @@ +160 +0 0 +2 1 +4 2 +6 3 +8 4 +10 5 +12 6 +14 7 +16 8 +18 9 +20 10 +22 11 +24 12 +26 13 +28 14 +30 15 +32 16 +34 17 +36 18 +38 19 +40 20 +42 21 +44 22 +46 23 +48 24 +50 25 +52 26 +54 27 +56 28 +58 29 +60 30 +62 31 +64 32 +66 33 +68 34 +70 35 +72 36 +74 37 +76 38 +78 39 +80 40 +82 41 +84 42 +86 43 +88 44 +90 45 +92 46 +94 47 +96 48 +98 49 +100 50 +102 51 +104 52 +106 53 +108 54 +110 55 +112 56 +114 57 +116 58 +118 59 +120 60 +122 61 +124 62 +126 63 +128 64 +130 65 +132 66 +134 67 +136 68 +138 69 +140 70 +142 71 +144 72 +146 73 +148 74 +150 75 +152 76 +154 77 +156 78 +158 79 +160 80 +162 81 +164 82 +166 83 +168 84 +170 85 +172 86 +174 87 +176 88 +178 89 +180 90 +182 91 +184 92 +186 93 +188 94 +190 95 +192 96 +194 97 +196 98 +198 99 +200 100 +202 101 +204 102 +206 103 +208 104 +210 105 +212 106 +214 107 +216 108 +218 109 +220 110 +222 111 +224 112 +226 113 +228 114 +230 115 +232 116 +234 117 +236 118 +238 119 +240 120 +242 121 +244 122 +246 123 +248 124 +250 125 +252 126 +254 127 +10128 10128 +10130 10129 +10132 10130 +10134 10131 +10136 10132 +10138 10133 +10140 10134 +10142 10135 +10144 10136 +10146 10137 +10148 10138 +10150 10139 +10152 10140 +10154 10141 +10156 10142 +10158 10143 +10160 10144 +10162 10145 +10164 10146 +10166 10147 +10168 10148 +10170 10149 +10172 10150 +10174 10151 +10176 10152 +10178 10153 +10180 10154 +10182 10155 +10184 10156 +10186 10157 +10188 10158 +10190 10159 +10192 10160 +10194 10161 +10196 10162 +10198 10163 +10200 10164 +10202 10165 +10204 10166 +10206 10167 +10208 10168 +10210 10169 +10212 10170 +10214 10171 +10216 10172 +10218 10173 +10220 10174 +10222 10175 +10224 10176 +10226 10177 +10228 10178 +10230 10179 +10232 10180 +10234 10181 +10236 10182 +10238 10183 +10240 10184 +10242 10185 +10244 10186 +10246 10187 +10248 10188 +10250 10189 +10252 10190 +10254 10191 +20192 20192 +20194 20193 +20196 20194 +20198 20195 +20200 20196 +20202 20197 +20204 20198 +20206 20199 +20208 20200 +20210 20201 +20212 20202 +20214 20203 +20216 20204 +20218 20205 +20220 20206 +20222 20207 +20224 20208 +20226 20209 +20228 20210 +20230 20211 +20232 20212 +20234 20213 +20236 20214 +20238 20215 +20240 20216 +20242 20217 +20244 20218 +20246 20219 +20248 20220 +20250 20221 +20252 20222 +20254 20223 +30224 30224 +30226 30225 +30228 30226 +30230 30227 +30232 30228 +30234 30229 +30236 30230 +30238 30231 +30240 30232 +30242 30233 +30244 30234 +30246 30235 +30248 30236 +30250 30237 +30252 30238 +30254 30239 +40240 40240 +40242 40241 +40244 40242 +40246 40243 +40248 40244 +40250 40245 +40252 40246 +40254 40247 +50248 50248 +50250 50249 +50252 50250 +50254 50251 +60252 60252 +60254 60253 +70254 70254 +80255 80255 +90256 90256 +100257 100257 +110258 110258 +120259 120259 +130260 130260 +140261 140261 +150262 150262 +160263 160263 +170264 170264 +180265 180265 +190266 190266 +200267 200267 +210268 210268 +220269 220269 +230270 230270 +240271 240271 +250272 250272 +260273 260273 +270274 270274 +280275 280275 +290276 290276 +300277 300277 +310278 310278 +320279 320279 +330280 330280 +340281 340281 +350282 350282 +360283 360283 +370284 370284 +380285 380285 +390286 390286 +400287 400287 +410288 410288 +420289 420289 +430290 430290 +440291 440291 +450292 450292 +460293 460293 +470294 470294 +480295 480295 +490296 490296 +500297 500297 +510298 510298 +520299 520299 +530300 530300 +540301 540301 +550302 550302 +560303 560303 +570304 570304 +580305 580305 +590306 590306 +600307 600307 +610308 610308 +620309 620309 +630310 630310 +640311 640311 +650312 650312 +660313 660313 +670314 670314 +680315 680315 +690316 690316 +700317 700317 +710318 710318 +720319 720319 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-034.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-034.ans new file mode 100644 index 0000000000000000000000000000000000000000..1b82693b148d1a2fdd31b1f15059dc707f5bc3ed --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-034.ans @@ -0,0 +1,7 @@ +84755989.40308047831058502197 +1 +2 +5 +6 +9 +10 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-034.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-034.in new file mode 100644 index 0000000000000000000000000000000000000000..61f543a53074351423062fe532db20d2659af247 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-034.in @@ -0,0 +1,13 @@ +6 +0 0 +113161679 65956091 +226323358 131912182 +339485037 197868273 +29537874 350259 +142699553 66306350 +255861232 132262441 +369022911 198218532 +59075748 700518 +172237427 66656609 +285399106 132612700 +398560785 198568791 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-035.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-035.ans new file mode 100644 index 0000000000000000000000000000000000000000..809e2c12233d4bff111b802f166765e7b518ef41 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-035.ans @@ -0,0 +1,151 @@ +949076.06808147893752902746 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-035.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-035.in new file mode 100644 index 0000000000000000000000000000000000000000..e705d3cb3d9ded8cba263831d1a86658d9d1c36c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-035.in @@ -0,0 +1,301 @@ +150 +0 0 +924962 212581 +1849924 425162 +2774886 637743 +3699848 850324 +4624810 1062905 +5549772 1275486 +6474734 1488067 +7399696 1700648 +8324658 1913229 +9249620 2125810 +10174582 2338391 +11099544 2550972 +12024506 2763553 +12949468 2976134 +13874430 3188715 +14799392 3401296 +15724354 3613877 +16649316 3826458 +17574278 4039039 +18499240 4251620 +19424202 4464201 +20349164 4676782 +21274126 4889363 +22199088 5101944 +23124050 5314525 +24049012 5527106 +24973974 5739687 +25898936 5952268 +26823898 6164849 +27748860 6377430 +28673822 6590011 +29598784 6802592 +30523746 7015173 +31448708 7227754 +32373670 7440335 +33298632 7652916 +34223594 7865497 +35148556 8078078 +36073518 8290659 +36998480 8503240 +37923442 8715821 +38848404 8928402 +39773366 9140983 +40698328 9353564 +41623290 9566145 +42548252 9778726 +43473214 9991307 +44398176 10203888 +45323138 10416469 +46248100 10629050 +47173062 10841631 +48098024 11054212 +49022986 11266793 +49947948 11479374 +50872910 11691955 +51797872 11904536 +52722834 12117117 +53647796 12329698 +54572758 12542279 +55497720 12754860 +56422682 12967441 +57347644 13180022 +58272606 13392603 +59197568 13605184 +60122530 13817765 +61047492 14030346 +61972454 14242927 +62897416 14455508 +63822378 14668089 +64747340 14880670 +65672302 15093251 +66597264 15305832 +67522226 15518413 +68447188 15730994 +69372150 15943575 +70297112 16156156 +71222074 16368737 +72147036 16581318 +73071998 16793899 +73996960 17006480 +74921922 17219061 +75846884 17431642 +76771846 17644223 +77696808 17856804 +78621770 18069385 +79546732 18281966 +80471694 18494547 +81396656 18707128 +82321618 18919709 +83246580 19132290 +84171542 19344871 +85096504 19557452 +86021466 19770033 +86946428 19982614 +87871390 20195195 +88796352 20407776 +89721314 20620357 +90646276 20832938 +91571238 21045519 +157831484 6850332 +158756446 7062913 +159681408 7275494 +160606370 7488075 +161531332 7700656 +162456294 7913237 +163381256 8125818 +164306218 8338399 +165231180 8550980 +166156142 8763561 +167081104 8976142 +168006066 9188723 +168931028 9401304 +169855990 9613885 +170780952 9826466 +171705914 10039047 +172630876 10251628 +173555838 10464209 +174480800 10676790 +175405762 10889371 +176330724 11101952 +177255686 11314533 +178180648 11527114 +179105610 11739695 +180030572 11952276 +180955534 12164857 +181880496 12377438 +182805458 12590019 +183730420 12802600 +184655382 13015181 +185580344 13227762 +186505306 13440343 +187430268 13652924 +188355230 13865505 +189280192 14078086 +190205154 14290667 +191130116 14503248 +192055078 14715829 +192980040 14928410 +193905002 15140991 +194829964 15353572 +195754926 15566153 +196679888 15778734 +197604850 15991315 +198529812 16203896 +199454774 16416477 +200379736 16629058 +201304698 16841639 +202229660 17054220 +203154622 17266801 +204079584 17479382 +205004546 17691963 +205929508 17904544 +206854470 18117125 +207779432 18329706 +208704394 18542287 +209629356 18754868 +210554318 18967449 +211479280 19180030 +212404242 19392611 +213329204 19605192 +214254166 19817773 +215179128 20030354 +216104090 20242935 +217029052 20455516 +217954014 20668097 +218878976 20880678 +219803938 21093259 +220728900 21305840 +221653862 21518421 +222578824 21731002 +223503786 21943583 +224428748 22156164 +225353710 22368745 +226278672 22581326 +227203634 22793907 +228128596 23006488 +229053558 23219069 +229978520 23431650 +230903482 23644231 +231828444 23856812 +232753406 24069393 +233678368 24281974 +234603330 24494555 +235528292 24707136 +236453254 24919717 +237378216 25132298 +238303178 25344879 +239228140 25557460 +240153102 25770041 +241078064 25982622 +242003026 26195203 +242927988 26407784 +243852950 26620365 +244777912 26832946 +245702874 27045527 +246627836 27258108 +247552798 27470689 +248477760 27683270 +249402722 27895851 +315662968 13700664 +316587930 13913245 +317512892 14125826 +318437854 14338407 +319362816 14550988 +320287778 14763569 +321212740 14976150 +322137702 15188731 +323062664 15401312 +323987626 15613893 +324912588 15826474 +325837550 16039055 +326762512 16251636 +327687474 16464217 +328612436 16676798 +329537398 16889379 +330462360 17101960 +331387322 17314541 +332312284 17527122 +333237246 17739703 +334162208 17952284 +335087170 18164865 +336012132 18377446 +336937094 18590027 +337862056 18802608 +338787018 19015189 +339711980 19227770 +340636942 19440351 +341561904 19652932 +342486866 19865513 +343411828 20078094 +344336790 20290675 +345261752 20503256 +346186714 20715837 +347111676 20928418 +348036638 21140999 +348961600 21353580 +349886562 21566161 +350811524 21778742 +351736486 21991323 +352661448 22203904 +353586410 22416485 +354511372 22629066 +355436334 22841647 +356361296 23054228 +357286258 23266809 +358211220 23479390 +359136182 23691971 +360061144 23904552 +360986106 24117133 +361911068 24329714 +362836030 24542295 +363760992 24754876 +364685954 24967457 +365610916 25180038 +366535878 25392619 +367460840 25605200 +368385802 25817781 +369310764 26030362 +370235726 26242943 +371160688 26455524 +372085650 26668105 +373010612 26880686 +373935574 27093267 +374860536 27305848 +375785498 27518429 +376710460 27731010 +377635422 27943591 +378560384 28156172 +379485346 28368753 +380410308 28581334 +381335270 28793915 +382260232 29006496 +383185194 29219077 +384110156 29431658 +385035118 29644239 +385960080 29856820 +386885042 30069401 +387810004 30281982 +388734966 30494563 +389659928 30707144 +390584890 30919725 +391509852 31132306 +392434814 31344887 +393359776 31557468 +394284738 31770049 +395209700 31982630 +396134662 32195211 +397059624 32407792 +397984586 32620373 +398909548 32832954 +399834510 33045535 +400759472 33258116 +401684434 33470697 +402609396 33683278 +403534358 33895859 +404459320 34108440 +405384282 34321021 +406309244 34533602 +407234206 34746183 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-036.ans b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-036.ans new file mode 100644 index 0000000000000000000000000000000000000000..c2ae9ad8be8b3cf6da0ca4cddcc3366273bc4e37 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-036.ans @@ -0,0 +1,211 @@ +15593134.05313098058104515076 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +221 +222 +223 +224 +225 +226 +227 +228 +229 +241 +242 +243 +244 +245 +246 +247 +248 +261 +262 +263 +264 +265 +266 +267 +281 +282 +283 +284 +285 +286 +301 +302 +303 +304 +305 +321 +322 +323 +324 +341 +342 +343 +361 +362 +381 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-036.in b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-036.in new file mode 100644 index 0000000000000000000000000000000000000000..3aa61fec03745b58589bd30f65b9fb48d9fccbfb --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/data/secret-036.in @@ -0,0 +1,421 @@ +210 +0 0 +16112181 6820259 +32224362 13640518 +48336543 20460777 +64448724 27281036 +80560905 34101295 +96673086 40921554 +112785267 47741813 +128897448 54562072 +145009629 61382331 +161121810 68202590 +177233991 75022849 +193346172 81843108 +209458353 88663367 +225570534 95483626 +241682715 102303885 +257794896 109124144 +273907077 115944403 +290019258 122764662 +306131439 129584921 +16662274 14624005 +32774455 21444264 +48886636 28264523 +64998817 35084782 +81110998 41905041 +97223179 48725300 +113335360 55545559 +129447541 62365818 +145559722 69186077 +161671903 76006336 +177784084 82826595 +193896265 89646854 +210008446 96467113 +226120627 103287372 +242232808 110107631 +258344989 116927890 +274457170 123748149 +290569351 130568408 +306681532 137388667 +322793713 144208926 +33324548 29248010 +49436729 36068269 +65548910 42888528 +81661091 49708787 +97773272 56529046 +113885453 63349305 +129997634 70169564 +146109815 76989823 +162221996 83810082 +178334177 90630341 +194446358 97450600 +210558539 104270859 +226670720 111091118 +242782901 117911377 +258895082 124731636 +275007263 131551895 +291119444 138372154 +307231625 145192413 +323343806 152012672 +339455987 158832931 +49986822 43872015 +66099003 50692274 +82211184 57512533 +98323365 64332792 +114435546 71153051 +130547727 77973310 +146659908 84793569 +162772089 91613828 +178884270 98434087 +194996451 105254346 +211108632 112074605 +227220813 118894864 +243332994 125715123 +259445175 132535382 +275557356 139355641 +291669537 146175900 +307781718 152996159 +323893899 159816418 +340006080 166636677 +356118261 173456936 +66649096 58496020 +82761277 65316279 +98873458 72136538 +114985639 78956797 +131097820 85777056 +147210001 92597315 +163322182 99417574 +179434363 106237833 +195546544 113058092 +211658725 119878351 +227770906 126698610 +243883087 133518869 +259995268 140339128 +276107449 147159387 +292219630 153979646 +308331811 160799905 +324443992 167620164 +340556173 174440423 +356668354 181260682 +372780535 188080941 +83311370 73120025 +99423551 79940284 +115535732 86760543 +131647913 93580802 +147760094 100401061 +163872275 107221320 +179984456 114041579 +196096637 120861838 +212208818 127682097 +228320999 134502356 +244433180 141322615 +260545361 148142874 +276657542 154963133 +292769723 161783392 +308881904 168603651 +324994085 175423910 +341106266 182244169 +357218447 189064428 +373330628 195884687 +389442809 202704946 +99973644 87744030 +116085825 94564289 +132198006 101384548 +148310187 108204807 +164422368 115025066 +180534549 121845325 +196646730 128665584 +212758911 135485843 +228871092 142306102 +244983273 149126361 +261095454 155946620 +277207635 162766879 +293319816 169587138 +309431997 176407397 +325544178 183227656 +341656359 190047915 +357768540 196868174 +373880721 203688433 +389992902 210508692 +406105083 217328951 +116635918 102368035 +132748099 109188294 +148860280 116008553 +164972461 122828812 +181084642 129649071 +197196823 136469330 +213309004 143289589 +229421185 150109848 +245533366 156930107 +261645547 163750366 +277757728 170570625 +293869909 177390884 +309982090 184211143 +326094271 191031402 +342206452 197851661 +358318633 204671920 +374430814 211492179 +390542995 218312438 +406655176 225132697 +422767357 231952956 +133298192 116992040 +149410373 123812299 +165522554 130632558 +181634735 137452817 +197746916 144273076 +213859097 151093335 +229971278 157913594 +246083459 164733853 +262195640 171554112 +278307821 178374371 +294420002 185194630 +310532183 192014889 +326644364 198835148 +342756545 205655407 +358868726 212475666 +374980907 219295925 +391093088 226116184 +407205269 232936443 +423317450 239756702 +439429631 246576961 +149960466 131616045 +166072647 138436304 +182184828 145256563 +198297009 152076822 +214409190 158897081 +230521371 165717340 +246633552 172537599 +262745733 179357858 +278857914 186178117 +294970095 192998376 +311082276 199818635 +327194457 206638894 +343306638 213459153 +359418819 220279412 +375531000 227099671 +391643181 233919930 +407755362 240740189 +423867543 247560448 +439979724 254380707 +456091905 261200966 +166622740 146240050 +182734921 153060309 +198847102 159880568 +214959283 166700827 +231071464 173521086 +247183645 180341345 +263295826 187161604 +279408007 193981863 +295520188 200802122 +311632369 207622381 +327744550 214442640 +343856731 221262899 +359968912 228083158 +376081093 234903417 +392193274 241723676 +408305455 248543935 +424417636 255364194 +440529817 262184453 +456641998 269004712 +472754179 275824971 +183285014 160864055 +199397195 167684314 +215509376 174504573 +231621557 181324832 +247733738 188145091 +263845919 194965350 +279958100 201785609 +296070281 208605868 +312182462 215426127 +328294643 222246386 +344406824 229066645 +360519005 235886904 +376631186 242707163 +392743367 249527422 +408855548 256347681 +424967729 263167940 +441079910 269988199 +457192091 276808458 +473304272 283628717 +489416453 290448976 +199947288 175488060 +216059469 182308319 +232171650 189128578 +248283831 195948837 +264396012 202769096 +280508193 209589355 +296620374 216409614 +312732555 223229873 +328844736 230050132 +344956917 236870391 +361069098 243690650 +377181279 250510909 +393293460 257331168 +409405641 264151427 +425517822 270971686 +441630003 277791945 +457742184 284612204 +473854365 291432463 +489966546 298252722 +506078727 305072981 +216609562 190112065 +232721743 196932324 +248833924 203752583 +264946105 210572842 +281058286 217393101 +297170467 224213360 +313282648 231033619 +329394829 237853878 +345507010 244674137 +361619191 251494396 +377731372 258314655 +393843553 265134914 +409955734 271955173 +426067915 278775432 +442180096 285595691 +458292277 292415950 +474404458 299236209 +490516639 306056468 +506628820 312876727 +522741001 319696986 +233271836 204736070 +249384017 211556329 +265496198 218376588 +281608379 225196847 +297720560 232017106 +313832741 238837365 +329944922 245657624 +346057103 252477883 +362169284 259298142 +378281465 266118401 +394393646 272938660 +410505827 279758919 +426618008 286579178 +442730189 293399437 +458842370 300219696 +474954551 307039955 +491066732 313860214 +507178913 320680473 +523291094 327500732 +539403275 334320991 +249934110 219360075 +266046291 226180334 +282158472 233000593 +298270653 239820852 +314382834 246641111 +330495015 253461370 +346607196 260281629 +362719377 267101888 +378831558 273922147 +394943739 280742406 +411055920 287562665 +427168101 294382924 +443280282 301203183 +459392463 308023442 +475504644 314843701 +491616825 321663960 +507729006 328484219 +523841187 335304478 +539953368 342124737 +556065549 348944996 +266596384 233984080 +282708565 240804339 +298820746 247624598 +314932927 254444857 +331045108 261265116 +347157289 268085375 +363269470 274905634 +379381651 281725893 +395493832 288546152 +411606013 295366411 +427718194 302186670 +443830375 309006929 +459942556 315827188 +476054737 322647447 +492166918 329467706 +508279099 336287965 +524391280 343108224 +540503461 349928483 +556615642 356748742 +572727823 363569001 +283258658 248608085 +299370839 255428344 +315483020 262248603 +331595201 269068862 +347707382 275889121 +363819563 282709380 +379931744 289529639 +396043925 296349898 +412156106 303170157 +428268287 309990416 +444380468 316810675 +460492649 323630934 +476604830 330451193 +492717011 337271452 +508829192 344091711 +524941373 350911970 +541053554 357732229 +557165735 364552488 +573277916 371372747 +589390097 378193006 +299920932 263232090 +316033113 270052349 +332145294 276872608 +348257475 283692867 +364369656 290513126 +380481837 297333385 +396594018 304153644 +412706199 310973903 +428818380 317794162 +444930561 324614421 +461042742 331434680 +477154923 338254939 +493267104 345075198 +509379285 351895457 +525491466 358715716 +541603647 365535975 +557715828 372356234 +573828009 379176493 +589940190 385996752 +606052371 392817011 +316583206 277856095 +332695387 284676354 +348807568 291496613 +364919749 298316872 +381031930 305137131 +397144111 311957390 +413256292 318777649 +429368473 325597908 +445480654 332418167 +461592835 339238426 +477705016 346058685 +493817197 352878944 +509929378 359699203 +526041559 366519462 +542153740 373339721 +558265921 380159980 +574378102 386980239 +590490283 393800498 +606602464 400620757 +622714645 407441016 +333245480 292480100 +349357661 299300359 +365469842 306120618 +381582023 312940877 +397694204 319761136 +413806385 326581395 +429918566 333401654 +446030747 340221913 +462142928 347042172 +478255109 353862431 +494367290 360682690 +510479471 367502949 +526591652 374323208 +542703833 381143467 +558816014 387963726 +574928195 394783985 +591040376 401604244 +607152557 408424503 +623264738 415244762 +639376919 422065021 diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/judge.json b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/judge.json new file mode 100644 index 0000000000000000000000000000000000000000..b243545e7c144f3029990728ba8cccc32031f11e --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/judge.json @@ -0,0 +1,14 @@ +{ + "time_limit_s": 2.0, + "time_limit_source": "statement", + "memory_mb": 2048, + "memory_source": "default (the statement gives none)", + "mode": "custom", + "validator_flags": null, + "comparison": null, + "validator": "_verify/checkers/2024/F-friendly-rivalry", + "tests_dir": "data", + "answer_suffix": ".ans", + "n_sample": 3, + "n_secret": 37 +} diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/meta.json b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/meta.json new file mode 100644 index 0000000000000000000000000000000000000000..d99e2c4b1bff9674b904b4e6715232c4c6d1afd5 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/meta.json @@ -0,0 +1,9 @@ +{ + "year": "2024", + "letter": "F", + "title": "Friendly Rivalry", + "slug": "friendly-rivalry", + "source_pdf": "contest_problems.pdf", + "page_start": 11, + "page_end": 12 +} diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/page.html b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/page.html new file mode 100644 index 0000000000000000000000000000000000000000..0bd90109e7c1875f6cb53952c90c8d9b3fbfc0e9 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/page.html @@ -0,0 +1,415 @@ + F. Friendly Rivalry | Ethan Pham
ICPC 2024
ICPC 2024

F. Friendly Rivalry

The leaders of the International Coalition for Planetary Change (ICPC), a non-profit fighting for envi- ronmental awareness, are worried that their regional chapters are not doing enough to make a real impact on climate change. Inspired by the latest studie...

Updated May 21, 2026
Track ICPC
Year 2024
Statement Text + PDF
TeXC++Statement textStatement PDF

Problem Statement

Formatted from the contest statement text, with sample tests broken out into copyable blocks.

Time limit 2 seconds

The leaders of the International Coalition for Planetary Change (ICPC), a non-profit fighting for envi- ronmental awareness, are worried that their regional chapters are not doing enough to make a real impact on climate change. Inspired by the latest studies that competition is one of the best motivators, they have decided to start a competition between their chapters. At the same time, the ICPC does not want to slow the spread of ideas. To encourage chapters to share effective climate change methods, the ICPC has decided to assign their 2n chapters into two teams, the green team and the blue team. For balance, each team should consist of exactly n chapters. To ensure the teams are not getting in each other’s way, the ICPC wants the two teams to be as far apart as possible. Specifically, the Euclidean distance between the closest pair of chapters belonging to different teams should be as large as possible. Help the ICPC set up the teams according to these rules.

Input

The first line contains an integer n (1 ≤ n ≤ 500), the size of each team. Chapters are numbered from 1 to 2n. Each of the remaining 2n lines contains two integers xi and yi (−109 ≤ xi , yi ≤ 109 ), the Cartesian coordinates of the location of the ith chapter. All chapters are at distinct locations.

Output

Output n + 1 numbers. The first number is the distance between the two closest chapters belonging to different teams. The next n numbers are the chapters belonging to the blue team. If there are multiple ways to divide the teams with the same minimal distance, output any of them. The distance should have an absolute or relative error of at most 10−6 .

Sample Tests

Sample 1
Sample Input
 2
+ 0   1
+ 1   0
+ 1   1
+ 0   0
Sample Output
1.000000
+1
+2
Sample 2
Sample Input
 2
+ 0 1
+ -1 -1
+ 1 0
+ 2 2
Sample Output
2.236068
+4
+2
Sample 3
Sample Input
3
+0   0
+1   1
+2   2
+3   3
+4   4
+5   5
Sample Output
1.414214
+1
+2
+3

Editorial

The solution write-up is rendered from the LaTeX source, with equations kept live through MathJax.

Key Observations

+
  • Fix a candidate distance $D$. If two chapters are closer than $D$, they cannot be on different teams. Therefore every pair of chapters with distance $< D$ must receive the same color.

  • Build a graph whose vertices are the chapters and whose edges connect pairs at distance $< D$. Then every connected component of this graph must be monochromatic.

  • So checking feasibility for $D$ becomes: can we choose some connected components whose total size is exactly $n$? This is a subset-sum problem on component sizes.

  • As $D$ increases, more edges appear, connected components only merge, and feasibility can only become harder. Thus feasibility is monotone, so binary search works.

  • The optimal answer is one of the pairwise distances between chapters, because the graph changes only when $D$ passes such a distance.

+

Algorithm

+
  1. Let $N=2n$. Compute all $\binom{N}{2}$ squared distances and sort them.

  2. For a candidate squared distance $X$:

    +
    1. Build a DSU on the $N$ chapters.

    2. Unite every pair whose squared distance is $< X$.

    3. Extract the connected-component sizes.

    4. Run subset sum on these sizes and check whether sum $n$ is reachable.

    5. Because feasibility is monotone, binary search the sorted distinct squared distances and find the largest one that is feasible.

    6. Run the same DSU once more for the optimal threshold and rebuild the subset-sum DP with parent information. Backtrack to choose which components form the blue team.

    7. Output $\sqrt{X}$ and all chapter indices belonging to the blue team.

    +

    Correctness Proof

    +

    We prove that the algorithm returns the correct answer.

    +

    Lemma 1.

    +

    For a fixed distance $D$, a team assignment is valid with minimum cross-team distance at least $D$ if and only if every connected component of the graph on edges of length $< D$ is monochromatic.

    +

    Proof.

    +

    If two chapters are adjacent in that graph, their distance is $< D$, so they cannot be on different teams. Hence adjacent vertices must have the same color, and therefore every connected component must be monochromatic.

    +

    Conversely, if every connected component is monochromatic, then any blue-green pair lies in different connected components, so there is no graph edge between them. Hence their distance is not $< D$, i.e. it is at least $D$. □

    +

    Lemma 2.

    +

    For a fixed distance $D$, there exists a valid assignment if and only if some subset of connected components has total size exactly $n$.

    +

    Proof.

    +

    By Lemma 1, each connected component must be entirely blue or entirely green. Therefore choosing a valid assignment is exactly choosing which components are blue. Since the blue team must contain exactly $n$ chapters, feasibility is equivalent to selecting component sizes that sum to $n$. □

    +

    Lemma 3.

    +

    If a distance $D$ is feasible, then every smaller distance is also feasible.

    +

    Proof.

    +

    When we decrease $D$, the graph keeps only a subset of the previous edges. Connected components can only split, never merge. Any component selection that worked before can be refined by keeping the same color on each new smaller component, so feasibility cannot be lost when $D$ decreases. □

    +

    Theorem.

    +

    The algorithm outputs the correct answer for every valid input.

    +

    Proof.

    +

    By Lemma 2, the feasibility test used by the algorithm is correct. By Lemma 3, this feasibility predicate is monotone, so binary search finds the largest feasible distance among all candidate pairwise distances. Since the graph changes only when $D$ crosses an existing pairwise distance, this largest feasible candidate is exactly the optimum.

    +

    Finally, the reconstruction DP chooses a subset of connected components of total size $n$, which by Lemma 2 yields a valid optimal team assignment. Therefore the algorithm outputs both the optimal distance and a corresponding blue team. □

    +

    Complexity Analysis

    +

    Let $N=2n \le 1000$ and $M=\binom{N}{2} = O(N^2)$.

    +
    • Building and sorting all distances costs $O(N^2 \log N)$.

    • One feasibility test runs DSU over all edges and one subset-sum over at most $N$ components, so it costs $O(N^2 + Nn)$.

    • We perform $O(\log N^2)=O(\log N)$ such tests in the binary search.

    • Overall the running time is $O(N^2 \log N + (N^2 + Nn)\log N)$, and the memory usage is $O(N^2)$ for the edge list.

    +

    Implementation Notes

    +
    • Compare squared distances, not floating-point distances, during the entire search. Take the square root only for the final output.

    • The threshold uses ``strictly less than'': edges of length exactly $D$ are allowed to be cross-team, so the DSU must unite only pairs with distance $< D$.

    • Coordinates fit in 32-bit integers, but squared distances require long long.

Code

C++ solution used for this page.

C++

Clean code view with a raw-file link when you want the original source.

Raw file
#include <bits/stdc++.h>
+using namespace std;
+
+namespace {
+
+struct DSU {
+    vector<int> parent;
+    vector<int> size;
+
+    explicit DSU(const int n) : parent(n), size(n, 1) {
+        iota(parent.begin(), parent.end(), 0);
+    }
+
+    int find(const int x) {
+        if (parent[x] == x) {
+            return x;
+        }
+        parent[x] = find(parent[x]);
+        return parent[x];
+    }
+
+    void unite(int a, int b) {
+        a = find(a);
+        b = find(b);
+        if (a == b) {
+            return;
+        }
+        if (size[a] < size[b]) {
+            swap(a, b);
+        }
+        parent[b] = a;
+        size[a] += size[b];
+    }
+};
+
+struct Point {
+    long long x = 0;
+    long long y = 0;
+};
+
+struct Edge {
+    long long dist2 = 0;
+    int u = 0;
+    int v = 0;
+
+    bool operator<(const Edge& other) const {
+        return dist2 < other.dist2;
+    }
+};
+
+long long squared_distance(const Point& a, const Point& b) {
+    const long long dx = a.x - b.x;
+    const long long dy = a.y - b.y;
+    return dx * dx + dy * dy;
+}
+
+bool is_feasible(const int team_size,
+                 const int total_points,
+                 const vector<Edge>& edges,
+                 const long long threshold) {
+    DSU dsu(total_points);
+    for (const Edge& edge : edges) {
+        if (edge.dist2 >= threshold) {
+            break;
+        }
+        dsu.unite(edge.u, edge.v);
+    }
+
+    vector<int> component_sizes;
+    vector<int> seen(total_points, -1);
+    for (int i = 0; i < total_points; ++i) {
+        const int root = dsu.find(i);
+        if (seen[root] != -1) {
+            continue;
+        }
+        seen[root] = static_cast<int>(component_sizes.size());
+        component_sizes.push_back(dsu.size[root]);
+    }
+
+    bitset<501> dp;
+    dp[0] = 1;
+    for (const int size : component_sizes) {
+        dp |= (dp << size);
+    }
+    return dp[team_size];
+}
+
+vector<int> build_solution(const int team_size,
+                           const int total_points,
+                           const vector<Edge>& edges,
+                           const long long threshold) {
+    DSU dsu(total_points);
+    for (const Edge& edge : edges) {
+        if (edge.dist2 >= threshold) {
+            break;
+        }
+        dsu.unite(edge.u, edge.v);
+    }
+
+    vector<int> component_index(total_points, -1);
+    vector<int> component_sizes;
+    vector<vector<int>> component_members;
+    for (int i = 0; i < total_points; ++i) {
+        const int root = dsu.find(i);
+        if (component_index[root] == -1) {
+            component_index[root] = static_cast<int>(component_sizes.size());
+            component_sizes.push_back(0);
+            component_members.push_back({});
+        }
+        const int id = component_index[root];
+        ++component_sizes[id];
+        component_members[id].push_back(i + 1);
+    }
+
+    const int component_count = static_cast<int>(component_sizes.size());
+    vector<vector<char>> can(component_count + 1,
+                             vector<char>(team_size + 1, 0));
+    vector<vector<char>> parent_take(component_count + 1,
+                                     vector<char>(team_size + 1, -1));
+    can[0][0] = 1;
+
+    for (int i = 0; i < component_count; ++i) {
+        for (int sum = 0; sum <= team_size; ++sum) {
+            if (!can[i][sum]) {
+                continue;
+            }
+            if (!can[i + 1][sum]) {
+                can[i + 1][sum] = 1;
+                parent_take[i + 1][sum] = 0;
+            }
+            const int next_sum = sum + component_sizes[i];
+            if (next_sum <= team_size && !can[i + 1][next_sum]) {
+                can[i + 1][next_sum] = 1;
+                parent_take[i + 1][next_sum] = 1;
+            }
+        }
+    }
+
+    vector<int> blue_team;
+    int sum = team_size;
+    for (int i = component_count; i >= 1; --i) {
+        if (parent_take[i][sum] == 1) {
+            for (const int member : component_members[i - 1]) {
+                blue_team.push_back(member);
+            }
+            sum -= component_sizes[i - 1];
+        }
+    }
+    sort(blue_team.begin(), blue_team.end());
+    return blue_team;
+}
+
+void solve() {
+    int team_size;
+    cin >> team_size;
+    const int total_points = 2 * team_size;
+
+    vector<Point> points(total_points);
+    for (Point& point : points) {
+        cin >> point.x >> point.y;
+    }
+
+    vector<Edge> edges;
+    edges.reserve(total_points * (total_points - 1) / 2);
+    for (int i = 0; i < total_points; ++i) {
+        for (int j = i + 1; j < total_points; ++j) {
+            edges.push_back({squared_distance(points[i], points[j]), i, j});
+        }
+    }
+    sort(edges.begin(), edges.end());
+
+    vector<long long> distances;
+    distances.reserve(edges.size());
+    for (const Edge& edge : edges) {
+        if (distances.empty() || distances.back() != edge.dist2) {
+            distances.push_back(edge.dist2);
+        }
+    }
+
+    int low = 0;
+    int high = static_cast<int>(distances.size()) - 1;
+    int best_index = 0;
+    while (low <= high) {
+        const int mid = low + (high - low) / 2;
+        if (is_feasible(team_size, total_points, edges, distances[mid])) {
+            best_index = mid;
+            low = mid + 1;
+        } else {
+            high = mid - 1;
+        }
+    }
+
+    const long long best_dist2 = distances[best_index];
+    const vector<int> blue_team =
+        build_solution(team_size, total_points, edges, best_dist2);
+
+    cout << fixed << setprecision(6)
+         << sqrt(static_cast<long double>(best_dist2)) << '\n';
+    for (const int member : blue_team) {
+        cout << member << '\n';
+    }
+}
+
+}  // namespace
+
+int main() {
+    ios::sync_with_stdio(false);
+    cin.tie(nullptr);
+
+    solve();
+    return 0;
+}
+

Source Files and Assets

Raw files are still available here when you want the original TeX, C++, or statement assets.

Show raw files
\ No newline at end of file diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/solution.cpp b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/solution.cpp new file mode 100644 index 0000000000000000000000000000000000000000..12738ef002fd197ec910ead8798d0c37248e0468 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/solution.cpp @@ -0,0 +1,212 @@ +#include +using namespace std; + +namespace { + +struct DSU { + vector parent; + vector size; + + explicit DSU(const int n) : parent(n), size(n, 1) { + iota(parent.begin(), parent.end(), 0); + } + + int find(const int x) { + if (parent[x] == x) { + return x; + } + parent[x] = find(parent[x]); + return parent[x]; + } + + void unite(int a, int b) { + a = find(a); + b = find(b); + if (a == b) { + return; + } + if (size[a] < size[b]) { + swap(a, b); + } + parent[b] = a; + size[a] += size[b]; + } +}; + +struct Point { + long long x = 0; + long long y = 0; +}; + +struct Edge { + long long dist2 = 0; + int u = 0; + int v = 0; + + bool operator<(const Edge& other) const { + return dist2 < other.dist2; + } +}; + +long long squared_distance(const Point& a, const Point& b) { + const long long dx = a.x - b.x; + const long long dy = a.y - b.y; + return dx * dx + dy * dy; +} + +bool is_feasible(const int team_size, + const int total_points, + const vector& edges, + const long long threshold) { + DSU dsu(total_points); + for (const Edge& edge : edges) { + if (edge.dist2 >= threshold) { + break; + } + dsu.unite(edge.u, edge.v); + } + + vector component_sizes; + vector seen(total_points, -1); + for (int i = 0; i < total_points; ++i) { + const int root = dsu.find(i); + if (seen[root] != -1) { + continue; + } + seen[root] = static_cast(component_sizes.size()); + component_sizes.push_back(dsu.size[root]); + } + + bitset<501> dp; + dp[0] = 1; + for (const int size : component_sizes) { + dp |= (dp << size); + } + return dp[team_size]; +} + +vector build_solution(const int team_size, + const int total_points, + const vector& edges, + const long long threshold) { + DSU dsu(total_points); + for (const Edge& edge : edges) { + if (edge.dist2 >= threshold) { + break; + } + dsu.unite(edge.u, edge.v); + } + + vector component_index(total_points, -1); + vector component_sizes; + vector> component_members; + for (int i = 0; i < total_points; ++i) { + const int root = dsu.find(i); + if (component_index[root] == -1) { + component_index[root] = static_cast(component_sizes.size()); + component_sizes.push_back(0); + component_members.push_back({}); + } + const int id = component_index[root]; + ++component_sizes[id]; + component_members[id].push_back(i + 1); + } + + const int component_count = static_cast(component_sizes.size()); + vector> can(component_count + 1, + vector(team_size + 1, 0)); + vector> parent_take(component_count + 1, + vector(team_size + 1, -1)); + can[0][0] = 1; + + for (int i = 0; i < component_count; ++i) { + for (int sum = 0; sum <= team_size; ++sum) { + if (!can[i][sum]) { + continue; + } + if (!can[i + 1][sum]) { + can[i + 1][sum] = 1; + parent_take[i + 1][sum] = 0; + } + const int next_sum = sum + component_sizes[i]; + if (next_sum <= team_size && !can[i + 1][next_sum]) { + can[i + 1][next_sum] = 1; + parent_take[i + 1][next_sum] = 1; + } + } + } + + vector blue_team; + int sum = team_size; + for (int i = component_count; i >= 1; --i) { + if (parent_take[i][sum] == 1) { + for (const int member : component_members[i - 1]) { + blue_team.push_back(member); + } + sum -= component_sizes[i - 1]; + } + } + sort(blue_team.begin(), blue_team.end()); + return blue_team; +} + +void solve() { + int team_size; + cin >> team_size; + const int total_points = 2 * team_size; + + vector points(total_points); + for (Point& point : points) { + cin >> point.x >> point.y; + } + + vector edges; + edges.reserve(total_points * (total_points - 1) / 2); + for (int i = 0; i < total_points; ++i) { + for (int j = i + 1; j < total_points; ++j) { + edges.push_back({squared_distance(points[i], points[j]), i, j}); + } + } + sort(edges.begin(), edges.end()); + + vector distances; + distances.reserve(edges.size()); + for (const Edge& edge : edges) { + if (distances.empty() || distances.back() != edge.dist2) { + distances.push_back(edge.dist2); + } + } + + int low = 0; + int high = static_cast(distances.size()) - 1; + int best_index = 0; + while (low <= high) { + const int mid = low + (high - low) / 2; + if (is_feasible(team_size, total_points, edges, distances[mid])) { + best_index = mid; + low = mid + 1; + } else { + high = mid - 1; + } + } + + const long long best_dist2 = distances[best_index]; + const vector blue_team = + build_solution(team_size, total_points, edges, best_dist2); + + cout << fixed << setprecision(6) + << sqrt(static_cast(best_dist2)) << '\n'; + for (const int member : blue_team) { + cout << member << '\n'; + } +} + +} // namespace + +int main() { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + solve(); + return 0; +} diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/solution.tex b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/solution.tex new file mode 100644 index 0000000000000000000000000000000000000000..6afafcb5d3ad1f5f4d8c5314c32051a99a151a2c --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/solution.tex @@ -0,0 +1,101 @@ +\documentclass[11pt]{article} +\usepackage[margin=1in]{geometry} +\usepackage[T1]{fontenc} +\usepackage[utf8]{inputenc} +\usepackage{amsmath,amssymb,amsthm} +\usepackage{enumitem} + +\title{ICPC World Finals 2024\\F. Friendly Rivalry} +\author{} +\date{} + +\begin{document} +\maketitle + +\section*{Problem Summary} + +We have $2n$ chapter locations. We must choose exactly $n$ of them for the blue team and the remaining $n$ for the green team so that the minimum Euclidean distance between a blue chapter and a green chapter is as large as possible. + +\section*{Key Observations} + +\begin{itemize}[leftmargin=*] + \item Fix a candidate distance $D$. If two chapters are closer than $D$, they cannot be on different teams. Therefore every pair of chapters with distance $< D$ must receive the same color. + \item Build a graph whose vertices are the chapters and whose edges connect pairs at distance $< D$. Then every connected component of this graph must be monochromatic. + \item So checking feasibility for $D$ becomes: can we choose some connected components whose total size is exactly $n$? This is a subset-sum problem on component sizes. + \item As $D$ increases, more edges appear, connected components only merge, and feasibility can only become harder. Thus feasibility is monotone, so binary search works. + \item The optimal answer is one of the pairwise distances between chapters, because the graph changes only when $D$ passes such a distance. +\end{itemize} + +\section*{Algorithm} + +\begin{enumerate}[leftmargin=*] + \item Let $N=2n$. Compute all $\binom{N}{2}$ squared distances and sort them. + + \item For a candidate squared distance $X$: + \begin{enumerate}[leftmargin=*] + \item Build a DSU on the $N$ chapters. + \item Unite every pair whose squared distance is $< X$. + \item Extract the connected-component sizes. + \item Run subset sum on these sizes and check whether sum $n$ is reachable. + \end{enumerate} + + \item Because feasibility is monotone, binary search the sorted distinct squared distances and find the largest one that is feasible. + + \item Run the same DSU once more for the optimal threshold and rebuild the subset-sum DP with parent information. Backtrack to choose which components form the blue team. + + \item Output $\sqrt{X}$ and all chapter indices belonging to the blue team. +\end{enumerate} + +\section*{Correctness Proof} + +We prove that the algorithm returns the correct answer. + +\paragraph{Lemma 1.} +For a fixed distance $D$, a team assignment is valid with minimum cross-team distance at least $D$ if and only if every connected component of the graph on edges of length $< D$ is monochromatic. + +\paragraph{Proof.} +If two chapters are adjacent in that graph, their distance is $< D$, so they cannot be on different teams. Hence adjacent vertices must have the same color, and therefore every connected component must be monochromatic. + +Conversely, if every connected component is monochromatic, then any blue-green pair lies in different connected components, so there is no graph edge between them. Hence their distance is not $< D$, i.e. it is at least $D$. \qed + +\paragraph{Lemma 2.} +For a fixed distance $D$, there exists a valid assignment if and only if some subset of connected components has total size exactly $n$. + +\paragraph{Proof.} +By Lemma 1, each connected component must be entirely blue or entirely green. Therefore choosing a valid assignment is exactly choosing which components are blue. Since the blue team must contain exactly $n$ chapters, feasibility is equivalent to selecting component sizes that sum to $n$. \qed + +\paragraph{Lemma 3.} +If a distance $D$ is feasible, then every smaller distance is also feasible. + +\paragraph{Proof.} +When we decrease $D$, the graph keeps only a subset of the previous edges. Connected components can only split, never merge. Any component selection that worked before can be refined by keeping the same color on each new smaller component, so feasibility cannot be lost when $D$ decreases. \qed + +\paragraph{Theorem.} +The algorithm outputs the correct answer for every valid input. + +\paragraph{Proof.} +By Lemma 2, the feasibility test used by the algorithm is correct. By Lemma 3, this feasibility predicate is monotone, so binary search finds the largest feasible distance among all candidate pairwise distances. Since the graph changes only when $D$ crosses an existing pairwise distance, this largest feasible candidate is exactly the optimum. + +Finally, the reconstruction DP chooses a subset of connected components of total size $n$, which by Lemma 2 yields a valid optimal team assignment. Therefore the algorithm outputs both the optimal distance and a corresponding blue team. \qed + +\section*{Complexity Analysis} + +Let $N=2n \le 1000$ and $M=\binom{N}{2} = O(N^2)$. + +\begin{itemize}[leftmargin=*] + \item Building and sorting all distances costs $O(N^2 \log N)$. + \item One feasibility test runs DSU over all edges and one subset-sum over at most $N$ components, so it costs $O(N^2 + Nn)$. + \item We perform $O(\log N^2)=O(\log N)$ such tests in the binary search. +\end{itemize} + +Overall the running time is $O(N^2 \log N + (N^2 + Nn)\log N)$, and the memory usage is $O(N^2)$ for the edge list. + +\section*{Implementation Notes} + +\begin{itemize}[leftmargin=*] + \item Compare squared distances, not floating-point distances, during the entire search. Take the square root only for the final output. + \item The threshold uses ``strictly less than'': edges of length exactly $D$ are allowed to be cross-team, so the DSU must unite only pairs with distance $< D$. + \item Coordinates fit in 32-bit integers, but squared distances require \texttt{long long}. +\end{itemize} + +\end{document} diff --git a/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/statement.txt b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/statement.txt new file mode 100644 index 0000000000000000000000000000000000000000..ff358963270945721f4809848b48ba7f55945e98 --- /dev/null +++ b/problems/DP-02/ICPC_WF/2024/F-friendly-rivalry/statement.txt @@ -0,0 +1,54 @@ +Problem F + Friendly Rivalry + Time limit: 2 seconds +The leaders of the International Coalition for Planetary Change (ICPC), a non-profit fighting for envi- +ronmental awareness, are worried that their regional chapters are not doing enough to make a real impact +on climate change. Inspired by the latest studies that competition is one of the best motivators, they have +decided to start a competition between their chapters. +At the same time, the ICPC does not want to slow the spread of ideas. To encourage chapters to share +effective climate change methods, the ICPC has decided to assign their 2n chapters into two teams, the +green team and the blue team. For balance, each team should consist of exactly n chapters. +To ensure the teams are not getting in each other’s way, the ICPC wants the two teams to be as far +apart as possible. Specifically, the Euclidean distance between the closest pair of chapters belonging to +different teams should be as large as possible. +Help the ICPC set up the teams according to these rules. + +Input + +The first line contains an integer n (1 ≤ n ≤ 500), the size of each team. Chapters are numbered from +1 to 2n. Each of the remaining 2n lines contains two integers xi and yi (−10^9 ≤ xi , yi ≤ 10^9), the +Cartesian coordinates of the location of the ith chapter. All chapters are at distinct locations. + +Output + +Output n + 1 numbers. The first number is the distance between the two closest chapters belonging to +different teams. The next n numbers are the chapters belonging to the blue team. If there are multiple +ways to divide the teams with the same minimal distance, output any of them. The distance should have +an absolute or relative error of at most 10^-6. + + Sample Input 1 Sample Output 1 + 2 1.000000 + 0 1 1 + 1 0 2 + 1 1 + 0 0 + + Sample Input 2 Sample Output 2 + 2 2.236068 + 0 1 4 + -1 -1 2 + 1 0 + 2 2 + +48th ICPC World Championship Problem F: Friendly Rivalry © ICPC Foundation 11 + +Sample Input 3 Sample Output 3 +3 1.414214 +0 0 1 +1 1 2 +2 2 3 +3 3 +4 4 +5 5 + +48th ICPC World Championship Problem F: Friendly Rivalry © ICPC Foundation 12