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 |
---|---|---|---|---|---|---|
1847 | Codeforces Round 882 (Div. 2) | FINISHED | False | 8100 | 48525863 | July 6, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 335 ) | E | Triangle Platinum? | PROGRAMMING | implementation interactive |
B'This is an interactive problem. Made in Heaven is a rather curious Stand. Of course, it is (arguably) the strongest Stand in existence, but it is also an ardent puzzle enjoyer. For example, it gave Qtaro the following problem recently: Made in Heaven has n hidden integers a_1, a_2, ... , a_n ( 3 <= n <= 5000 , 1 <= a_i <= 4 ). Qtaro must determine all the a_i by asking Made in Heaven some queries of the following form: By asking at most 5500 such questions, Qtaro must either tell Made in Heaven all the values of the a_i , or report that it is not possible to uniquely determine them. Unfortunately due to the universe reboot, Qtaro is not as smart as Jotaro. Please help Qtaro solve Made In Heaven 's problem. ^ dagger Three positive integers a, b, c are said to form the sides of a non-degenerate triangle if and only if all of the following three inequalities hold: The interaction begins with reading n ( 3 <= n <= 5000 ), the number of hidden integers. To ask a question corresponding to the triple (i, j, k) ( 1 <= q i < j < k <= q n ), output "? i j k " without quotes. Afterward, you should read a single integer s . If the numbers a_i cannot be uniquely determined print "! -1 " without quotes. On the other hand, if you have determined all the values of a_i print "! a_1 a_2 ... a_n " on a single line. The interactor is non-adaptive. The hidden array a_1, a_2, ... , a_n is fixed beforehand and is not changed during the interaction process. After printing a query do not forget to output the end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use: Hacks You can hack a solution with the following input format. The first line contains a single integer n ( 3 <= n <= 5000 ) -- the number of hidden integers. The second line contains n integers a_1, a_2, '... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
212458145 | Serval | E | July 6, 2023, 6:23 p.m. | OK | GNU C++14 | TESTS | 123 | 62 | 0 | ||
212497681 | PhatDapChai | E | July 7, 2023, 3:35 a.m. | OK | GNU C++14 | TESTS | 123 | 62 | 204800 | ||
212491595 | _Fake4Fun | E | July 7, 2023, 2:23 a.m. | OK | GNU C++14 | TESTS | 123 | 77 | 204800 | ||
212456058 | Dominater069 | E | July 6, 2023, 6:09 p.m. | OK | GNU C++17 | TESTS | 123 | 61 | 102400 | ||
212448516 | Morphymorphymorphy | E | July 6, 2023, 4:49 p.m. | OK | GNU C++17 | TESTS | 123 | 61 | 204800 | ||
212461060 | kennyzzhang | E | July 6, 2023, 6:48 p.m. | OK | GNU C++17 | TESTS | 123 | 61 | 5324800 | ||
212460784 | limbo16 | E | July 6, 2023, 6:45 p.m. | OK | GNU C++17 | TESTS | 123 | 62 | 512000 | ||
212461702 | limbo16 | E | July 6, 2023, 6:54 p.m. | OK | GNU C++17 | TESTS | 123 | 77 | 204800 | ||
212465516 | ecottea | E | July 6, 2023, 7:16 p.m. | OK | GNU C++17 | TESTS | 123 | 77 | 307200 | ||
212460339 | _gladiator_ | E | July 6, 2023, 6:41 p.m. | OK | GNU C++17 | TESTS | 123 | 92 | 512000 | ||
212461373 | Jarif_Rahman | E | July 6, 2023, 6:50 p.m. | OK | GNU C++17 | TESTS | 123 | 186 | 204800 | ||
212453495 | Rubikun | E | July 6, 2023, 5:55 p.m. | OK | GNU C++17 (64) | TESTS | 123 | 62 | 0 | ||
212445790 | 244mhq | E | July 6, 2023, 4:42 p.m. | OK | GNU C++17 (64) | TESTS | 123 | 62 | 102400 | ||
212452566 | minato | E | July 6, 2023, 5:51 p.m. | OK | GNU C++17 (64) | TESTS | 123 | 77 | 102400 | ||
212507809 | wsyear | E | July 7, 2023, 5:49 a.m. | OK | GNU C++17 (64) | TESTS | 123 | 77 | 307200 | ||
212456922 | WiwiHo | E | July 6, 2023, 6:14 p.m. | OK | GNU C++17 (64) | TESTS | 123 | 77 | 409600 | ||
212486875 | Larry0101 | E | July 7, 2023, 1:11 a.m. | OK | GNU C++17 (64) | TESTS | 123 | 77 | 1740800 | ||
212476455 | MateoCV | E | July 6, 2023, 9:38 p.m. | OK | GNU C++17 (64) | TESTS | 123 | 77 | 6963200 | ||
212487642 | Irmuun.Ch | E | July 7, 2023, 1:23 a.m. | OK | GNU C++17 (64) | TESTS | 123 | 78 | 0 | ||
212502843 | rniya | E | July 7, 2023, 4:44 a.m. | OK | GNU C++17 (64) | TESTS | 123 | 140 | 0 | ||
212446950 | PurpleCrayon | E | July 6, 2023, 4:45 p.m. | OK | GNU C++17 (64) | TESTS | 123 | 780 | 185036800 | ||
212504288 | retired_user | E | July 7, 2023, 5:05 a.m. | OK | GNU C++20 (64) | TESTS | 123 | 61 | 0 | ||
212445672 | potato167 | E | July 6, 2023, 4:41 p.m. | OK | GNU C++20 (64) | TESTS | 123 | 61 | 0 | ||
212489462 | joww | E | July 7, 2023, 1:53 a.m. | OK | GNU C++20 (64) | TESTS | 123 | 61 | 102400 | ||
212485854 | yangster67 | E | July 7, 2023, 12:51 a.m. | OK | GNU C++20 (64) | TESTS | 123 | 62 | 0 | ||
212446795 | irkstepanov | E | July 6, 2023, 4:44 p.m. | OK | GNU C++20 (64) | TESTS | 123 | 62 | 0 | ||
212499696 | Anemone_ | E | July 7, 2023, 4 a.m. | OK | GNU C++20 (64) | TESTS | 123 | 62 | 102400 | ||
212461269 | andrei_C1 | E | July 6, 2023, 6:50 p.m. | OK | GNU C++20 (64) | TESTS | 123 | 62 | 102400 | ||
212460326 | Ronnie007 | E | July 6, 2023, 6:41 p.m. | OK | GNU C++20 (64) | TESTS | 123 | 62 | 102400 | ||
212458761 | panelka | E | July 6, 2023, 6:28 p.m. | OK | GNU C++20 (64) | TESTS | 123 | 62 | 102400 | ||
212454578 | Gheal | E | July 6, 2023, 6 p.m. | OK | GNU C++20 (64) | TESTS | 123 | 62 | 102400 | ||
212456591 | Dukkha | E | July 6, 2023, 6:12 p.m. | OK | Java 17 | TESTS | 123 | 483 | 1433600 | ||
212457185 | Dukkha | E | July 6, 2023, 6:16 p.m. | OK | Java 17 | TESTS | 123 | 545 | 1331200 | ||
212463013 | alexwice | E | July 6, 2023, 7:07 p.m. | OK | PyPy 3-64 | TESTS | 123 | 499 | 11161600 | ||
212500315 | parthtotalfun | E | July 7, 2023, 4:09 a.m. | OK | PyPy 3-64 | TESTS | 123 | 998 | 9625600 |
Back to search problems