Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.
ContestId |
Name |
Phase |
Frozen |
Duration (Seconds) |
Relative Time |
Start Time |
---|---|---|---|---|---|---|
1949 | European Championship 2024 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 20548799 | March 24, 2024, 10 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 327 ) | K | Make Triangle | PROGRAMMING | constructive algorithms math |
B'You are given n positive integers x_1, x_2, ldots, x_n and three positive integers n_a, n_b, n_c satisfying n_a+n_b+n_c = n . You want to split the n positive integers into three groups, so that: Determine if this is possible. If this is possible, find one way to do so. Each test contains multiple test cases. The first line contains an integer t ( 1 <= t <= 100 ,000 ) -- the number of test cases. The descriptions of the t test cases follow. The first line of each test case contains the integers n, n_a, n_b, n_c ( 3 <= q n <= q 200 ,000, 1 <= q n_a,n_b,n_c <= q n-2, n_a+n_b+n_c = n ) -- the number of integers to split into three groups, and the desired sizes of the three groups. The second line of each test case contains n integers x_1, x_2, ldots, x_n ( 1 <= q x_i <= q 10^{9} ). It is guaranteed that the sum of n over all test cases does not exceed 200 ,000 . For each test case, print texttt{YES} if it is possible to split the numbers into three groups satisfying all the conditions. Otherwise, print texttt{NO} . If such a split exists, then describe the three groups as follows. On the next line, print n_a integers a_1, a_2, ldots, a_{n_a} -- the numbers in the first group. On the next line, print n_b integers b_1, b_2, ldots, b_{n_b} -- the numbers in the second group. On the next line, print n_c integers c_1, c_2, ldots, c_{n_c} -- the numbers in the third group. These n_a+n_b+n_c=n integers should be a permutation of x_1, x_2, ldots, x_n , and they should satisfy the conditions from the statement. If there are multiple solutions, print any of them. In the first test case, we can put two 1 s into each group: the sum in each group would be 2 , and there exists a triangle with positive area and sides 2 , 2 , 2 . In the second and third test cases, it can be shown that there is '... |
European Championship 2024 (EUC) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
253096654 | wywcgs Zhuojie panghupanghu | K | March 24, 2024, 2:19 p.m. | OK | C++14 (GCC 6-32) | TESTS | 39 | 140 | 6144000 | ||
253078983 | crazy_sea A_zjzj 275307894a | K | March 24, 2024, 12:06 p.m. | OK | C++14 (GCC 6-32) | TESTS | 39 | 140 | 26726400 | ||
253083597 | Kirill22 Ormlis | K | March 24, 2024, 12:41 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 124 | 3481600 | ||
253151123 | anpoli99 | K | March 25, 2024, 2:01 a.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 124 | 3584000 | ||
253088983 | tyler178 applese Timsei | K | March 24, 2024, 1:22 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 124 | 5017600 | ||
253076255 | PubabaOnO orzdevinwang jqdai0815 | K | March 24, 2024, 11:44 a.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 124 | 20172800 | ||
253098376 | IraG antonis.white | K | March 24, 2024, 2:31 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 140 | 6348800 | ||
253094378 | nvmdava JettyOller jefrai | K | March 24, 2024, 2:01 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 155 | 2560000 | ||
253092256 | HuaJun limanjun feeder1 | K | March 24, 2024, 1:45 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 155 | 12288000 | ||
253144704 | Kilani | K | March 24, 2024, 11:10 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 171 | 5017600 | ||
253089769 | misteg168 BernatP Esomer | K | March 24, 2024, 1:27 p.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 218 | 11468800 | ||
253148400 | N_z__ | K | March 25, 2024, 12:46 a.m. | OK | C++17 (GCC 7-32) | TESTS | 39 | 436 | 5017600 | ||
253152319 | swiftc | K | March 25, 2024, 2:32 a.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 78 | 5120000 | ||
253083561 | tourist ecnerwala | K | March 24, 2024, 12:41 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 78 | 8294400 | ||
253104723 | ub33 | K | March 24, 2024, 3:20 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 93 | 8601600 | ||
253079367 | Tikhon228 Pechalka Kapt | K | March 24, 2024, 12:09 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 109 | 15564800 | ||
253098803 | dXqwq | K | March 24, 2024, 2:34 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 140 | 6041600 | ||
253097476 | mmoeez48 squishybanana04 kevinyang | K | March 24, 2024, 2:24 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 140 | 20992000 | ||
253131436 | MarcosK | K | March 24, 2024, 7:46 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 171 | 28979200 | ||
253087693 | Cirno_9baka A.K.E.E. QAQAutoMaton | K | March 24, 2024, 1:12 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 234 | 4710400 | ||
253097449 | DishonoredRighteous iakovlev.zakhar golikovnik | K | March 24, 2024, 2:24 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 249 | 5120000 | ||
253109345 | N_z__ | K | March 24, 2024, 4:02 p.m. | OK | C++20 (GCC 13-64) | TESTS | 39 | 436 | 4915200 | ||
253088449 | arvindf232 | K | March 24, 2024, 1:18 p.m. | OK | Kotlin 1.9 | TESTS | 39 | 639 | 34918400 |
Back to search problems