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 |
---|---|---|---|---|---|---|
1354 | Educational Codeforces Round 87 (Rated for Div. 2) | FINISHED | False | 7200 | 147645611 | May 17, 2020, 9:20 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 808 ) | G | Find a Gift | PROGRAMMING | binary search interactive probabilities | 2600 |
B'This is an interactive problem. Don 't forget to flush output after printing queries using cout.flush() or fflush(stdout) in C++ or similar functions in other programming languages. There are n gift boxes in a row, numbered from 1 to n from left to right. It 's known that exactly k of them contain valuable gifts -- other boxes contain just lucky stones. All boxes look the same and differ only in weight. All boxes with stones have the same weight and are strictly heavier than boxes with valuable items. But valuable gifts may be different, so the boxes with valuable items may have different weights. You can ask no more than 50 queries (printing an answer doesn 't count). By each query you can compare total weights of two non-intersecting subsets of boxes a_1, a_2, ... , a_{k_a} and b_1, b_2, ... , b_{k_b} . In return you 'll get one of four results: Using such queries (or, maybe, intuition) find the box with a valuable gift with the minimum index. The input consists of several cases. In the beginning, you receive the integer T ( 1 <= T <= 500 ) -- the number of test cases. At the beginning of each test case, you receive two integers n and k ( 2 <= n <= 1000 , 1 <= k <= frac{n}{2} ) -- the number of boxes in a row and the number of boxes with valuable gifts. It 's guaranteed that the order of boxes is fixed beforehand and that the sum of n in one test doesn 't exceed 1000 . For each test case print the minimum index among all boxes with a valuable gift in the following format: "! x " where x ( 1 <= x <= n ) -- the index of the box. Print each query in three lines. In the first line print the sizes of subset in the following format: "? k_a k_b " where k_a and k_b ( 1 <= k_a, k_b <= n ; k_a + k_b <= n ) -- the corresponding sizes. In the second line print k_a integers a_1, a_2, ... , a_{k_a} ( 1 <= a'... |
77593 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
81610034 | hydra_mafia1 | G | May 27, 2020, 11:05 a.m. | OK | GNU C++11 | TESTS | 100 | 31 | 0 | 2600 | |
81504872 | hdgfgs | G | May 26, 2020, 3:03 p.m. | OK | GNU C++11 | TESTS | 100 | 31 | 0 | 2600 | |
81139536 | __fr__y__ | G | May 24, 2020, 7:12 a.m. | OK | GNU C++11 | TESTS | 100 | 31 | 0 | 2600 | |
80954396 | kumaraditya1999 | G | May 22, 2020, 4:46 p.m. | OK | GNU C++11 | TESTS | 100 | 31 | 0 | 2600 | |
81576592 | RainAir | G | May 27, 2020, 3:23 a.m. | OK | GNU C++11 | TESTS | 100 | 31 | 307200 | 2600 | |
80666447 | SANJIN | G | May 19, 2020, 7:59 a.m. | OK | GNU C++11 | TESTS | 100 | 31 | 307200 | 2600 | |
80608141 | jxdxhy | G | May 18, 2020, 1:49 p.m. | OK | GNU C++11 | TESTS | 100 | 31 | 3891200 | 2600 | |
80609464 | 3.141592653 | G | May 18, 2020, 2:05 p.m. | OK | GNU C++11 | TESTS | 100 | 31 | 4915200 | 2600 | |
81632187 | anodiebird | G | May 27, 2020, 3:09 p.m. | OK | GNU C++11 | TESTS | 100 | 46 | 0 | 2600 | |
81425077 | 18380120126 | G | May 25, 2020, 11:11 p.m. | OK | GNU C++11 | TESTS | 100 | 46 | 0 | 2600 | |
80850074 | leaf1415 | G | May 21, 2020, 12:11 p.m. | OK | GNU C++14 | TESTS | 100 | 46 | 0 | 2600 | |
80702711 | Peti | G | May 19, 2020, 3:18 p.m. | OK | GNU C++14 | TESTS | 100 | 46 | 0 | 2600 | |
80701961 | Muhammad_Hokimiyon | G | May 19, 2020, 3:10 p.m. | OK | GNU C++14 | TESTS | 100 | 46 | 0 | 2600 | |
80699733 | Peti | G | May 19, 2020, 2:49 p.m. | OK | GNU C++14 | TESTS | 100 | 46 | 0 | 2600 | |
80649844 | siddhugzp | G | May 19, 2020, 2:50 a.m. | OK | GNU C++14 | TESTS | 100 | 46 | 0 | 2600 | |
80639993 | jk89 | G | May 18, 2020, 9:02 p.m. | OK | GNU C++14 | TESTS | 100 | 46 | 0 | 2600 | |
81613420 | Luan_girl | G | May 27, 2020, 11:46 a.m. | OK | GNU C++14 | TESTS | 100 | 46 | 204800 | 2600 | |
81476886 | ..vince | G | May 26, 2020, 1:52 p.m. | OK | GNU C++14 | TESTS | 100 | 46 | 204800 | 2600 | |
81040714 | kzvd4729 | G | May 23, 2020, 6:40 p.m. | OK | GNU C++14 | TESTS | 100 | 46 | 204800 | 2600 | |
80688858 | mtnshh | G | May 19, 2020, 12:52 p.m. | OK | GNU C++14 | TESTS | 100 | 46 | 204800 | 2600 | |
80894281 | sdhyabc | G | May 22, 2020, 1:26 a.m. | OK | GNU C++17 | TESTS | 100 | 31 | 204800 | 2600 | |
80621793 | irri | G | May 18, 2020, 4:19 p.m. | OK | GNU C++17 | TESTS | 100 | 31 | 204800 | 2600 | |
81693074 | lukamosiashvili | G | May 28, 2020, 10 a.m. | OK | GNU C++17 | TESTS | 100 | 46 | 0 | 2600 | |
81693023 | lukamosiashvili | G | May 28, 2020, 9:59 a.m. | OK | GNU C++17 | TESTS | 100 | 46 | 0 | 2600 | |
80975012 | pootis | G | May 22, 2020, 11:54 p.m. | OK | GNU C++17 | TESTS | 100 | 46 | 0 | 2600 | |
80974936 | matheus_aguilar | G | May 22, 2020, 11:51 p.m. | OK | GNU C++17 | TESTS | 100 | 46 | 0 | 2600 | |
80889191 | yukihana0416 | G | May 21, 2020, 9:28 p.m. | OK | GNU C++17 | TESTS | 100 | 46 | 0 | 2600 | |
80800396 | h4rdlyfunc710n4l | G | May 20, 2020, 6:46 p.m. | OK | GNU C++17 | TESTS | 100 | 46 | 0 | 2600 | |
80727777 | Psychik | G | May 19, 2020, 9:33 p.m. | OK | GNU C++17 | TESTS | 100 | 46 | 0 | 2600 | |
80722984 | dantrag | G | May 19, 2020, 7:43 p.m. | OK | GNU C++17 | TESTS | 100 | 46 | 0 | 2600 | |
81460244 | zjsdut | G | May 26, 2020, 10:31 a.m. | OK | GNU C++17 (64) | TESTS | 100 | 31 | 0 | 2600 | |
81386681 | olphe | G | May 25, 2020, 1:20 p.m. | OK | GNU C++17 (64) | TESTS | 100 | 31 | 0 | 2600 | |
80699217 | nikolapesic2802 | G | May 19, 2020, 2:44 p.m. | OK | GNU C++17 (64) | TESTS | 100 | 31 | 0 | 2600 | |
80648535 | Polygon-yg | G | May 19, 2020, 2:11 a.m. | OK | GNU C++17 (64) | TESTS | 100 | 31 | 102400 | 2600 | |
80578268 | WZYYN | G | May 18, 2020, 7:15 a.m. | OK | GNU C++17 (64) | TESTS | 100 | 31 | 4300800 | 2600 | |
80797884 | Phortox | G | May 20, 2020, 6:08 p.m. | OK | GNU C++17 (64) | TESTS | 100 | 46 | 0 | 2600 | |
80784551 | aurinegro | G | May 20, 2020, 3:13 p.m. | OK | GNU C++17 (64) | TESTS | 100 | 46 | 0 | 2600 | |
80741356 | Diegogrc | G | May 20, 2020, 5:04 a.m. | OK | GNU C++17 (64) | TESTS | 100 | 46 | 0 | 2600 | |
80707954 | mrboorger | G | May 19, 2020, 4:18 p.m. | OK | GNU C++17 (64) | TESTS | 100 | 46 | 0 | 2600 | |
80707911 | mrboorger | G | May 19, 2020, 4:17 p.m. | OK | GNU C++17 (64) | TESTS | 100 | 46 | 0 | 2600 | |
80555921 | Reds020 | G | May 17, 2020, 9:43 p.m. | OK | Java 11 | TESTS | 100 | 343 | 24780800 | 2600 | |
80556096 | Reds020 | G | May 17, 2020, 9:48 p.m. | OK | Java 11 | TESTS | 100 | 374 | 24780800 | 2600 | |
80584984 | aman28rwt | G | May 18, 2020, 8:49 a.m. | OK | Java 8 | TESTS | 100 | 171 | 21196800 | 2600 | |
80645883 | golions | G | May 19, 2020, 12:31 a.m. | OK | Java 8 | TESTS | 100 | 202 | 0 | 2600 | |
81398478 | MagentaCobra | G | May 25, 2020, 3:38 p.m. | OK | Java 8 | TESTS | 100 | 233 | 0 | 2600 | |
80645797 | golions | G | May 19, 2020, 12:28 a.m. | OK | Java 8 | TESTS | 100 | 233 | 0 | 2600 | |
80705593 | Taran_1407 | G | May 19, 2020, 3:49 p.m. | OK | Java 8 | TESTS | 100 | 296 | 0 | 2600 | |
80559955 | ijxjdjd | G | May 18, 2020, 12:26 a.m. | OK | Java 8 | TESTS | 100 | 342 | 20684800 | 2600 | |
80670100 | PizzaLovers007 | G | May 19, 2020, 8:46 a.m. | OK | Java 8 | TESTS | 100 | 390 | 0 | 2600 | |
81378774 | cristian1997 | G | May 25, 2020, 11:46 a.m. | OK | Kotlin | TESTS | 100 | 186 | 0 | 2600 | |
80568259 | Tlatoani | G | May 18, 2020, 4:29 a.m. | OK | Kotlin | TESTS | 100 | 202 | 21811200 | 2600 | |
80953467 | egaeus.code | G | May 22, 2020, 4:35 p.m. | OK | Kotlin | TESTS | 100 | 218 | 102400 | 2600 | |
80979638 | Spheniscine | G | May 23, 2020, 3:08 a.m. | OK | Kotlin | TESTS | 100 | 218 | 1228800 | 2600 | |
80953548 | egaeus.code | G | May 22, 2020, 4:36 p.m. | OK | Kotlin | TESTS | 100 | 280 | 102400 | 2600 | |
81045390 | pikachan14 | G | May 23, 2020, 7:58 p.m. | OK | MS C++ 2017 | TESTS | 100 | 62 | 0 | 2600 | |
81045364 | akai14 | G | May 23, 2020, 7:57 p.m. | OK | MS C++ 2017 | TESTS | 100 | 77 | 0 | 2600 | |
80575052 | liouzhou_101 | G | May 18, 2020, 6:30 a.m. | OK | PyPy 3 | TESTS | 100 | 577 | 32563200 | 2600 | |
80523467 | tpyHard | G | May 17, 2020, 1:25 p.m. | OK | PyPy 3 | TESTS | 100 | 670 | 33689600 | 2600 | |
80522805 | tpyHard | G | May 17, 2020, 1:15 p.m. | OK | PyPy 3 | TESTS | 100 | 686 | 33382400 | 2600 | |
80523167 | tpyHard | G | May 17, 2020, 1:20 p.m. | OK | PyPy 3 | TESTS | 100 | 686 | 33792000 | 2600 | |
80576459 | liouzhou_101 | G | May 18, 2020, 6:49 a.m. | OK | PyPy 3 | TESTS | 100 | 717 | 32972800 | 2600 | |
80576605 | liouzhou_101 | G | May 18, 2020, 6:52 a.m. | OK | PyPy 3 | TESTS | 100 | 748 | 32768000 | 2600 | |
80576256 | liouzhou_101 | G | May 18, 2020, 6:47 a.m. | OK | PyPy 3 | TESTS | 100 | 779 | 32768000 | 2600 | |
80559791 | elliptic | G | May 18, 2020, 12:17 a.m. | OK | PyPy 3 | TESTS | 100 | 779 | 33280000 | 2600 | |
80620206 | lucifer1004 | G | May 18, 2020, 4 p.m. | OK | PyPy 3 | TESTS | 100 | 873 | 12697600 | 2600 | |
80737322 | mkawa2 | G | May 20, 2020, 3:19 a.m. | OK | Python 3 | TESTS | 100 | 342 | 614400 | 2600 | |
80568914 | sansen | G | May 18, 2020, 4:45 a.m. | OK | Rust | TESTS | 100 | 62 | 3788800 | 2600 |
Back to search problems