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 |
---|---|---|---|---|---|---|
838 | IndiaHacks 2nd Elimination 2017 (unofficial, unrated mirror, ICPC rules) | FINISHED | False | 10800 | 229737299 | Aug. 7, 2017, 6:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 98 ) | F | Expected Earnings | PROGRAMMING | 2800 |
B'You are playing a game with a bag of red and black balls. Initially, you are told that the bag has n balls total. In addition, you are also told that the bag has probability pi xe2 x80 x89/ xe2 x80 x89106 of containing exactly i red balls. You now would like to buy balls from this bag. You really like the color red, so red balls are worth a unit of 1, while black balls are worth nothing. To buy a ball, if there are still balls in the bag, you pay a cost c with 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89c xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891, and draw a ball randomly from the bag. You can choose to stop buying at any point (and you can even choose to not buy anything at all). Given that you buy optimally to maximize the expected profit (i.e. # red balls - cost needed to obtain them), print the maximum expected profit. The first line of input will contain two integers n, xe2 x80 x89X (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910 xe2 x80 x89000, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89X xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). The next line of input will contain n xe2 x80 x89+ xe2 x80 x891 integers p0, xe2 x80 x89p1, xe2 x80 x89... pn (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106, ) The value of c can be computed as . Print a single floating point number representing the optimal expected value. Your answer will be accepted if it has absolute or relative error at most 10 xe2 x80 x89- xe2 x80 x899. More specifically, if your answer is a and the jury answer is b, your answer will be accepted if . Here, there is equal probability for the bag to contain 0,1,2,3 red balls. Also, it costs 0.2 to draw a ball from the bag. '... |
53736 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
50589874 | 0202 | F | Feb. 28, 2019, 6:45 a.m. | OK | GNU C++11 | TESTS | 74 | 249 | 102400 | 2800 | |
57873767 | lopare | F | July 28, 2019, 3:49 a.m. | OK | GNU C++11 | TESTS | 74 | 249 | 102400 | 2800 | |
57769356 | py_ultron | F | July 25, 2019, 11:07 p.m. | OK | GNU C++11 | TESTS | 74 | 249 | 102400 | 2800 | |
47609550 | samjia2000 | F | Dec. 28, 2018, 7:20 a.m. | OK | GNU C++11 | TESTS | 74 | 296 | 819200 | 2800 | |
34212419 | zhouyuyang | F | Jan. 16, 2018, 4:28 a.m. | OK | GNU C++11 | TESTS | 74 | 810 | 2457600 | 2800 | |
31962904 | TadijaSebez | F | Nov. 1, 2017, 8:48 p.m. | OK | GNU C++11 | TESTS | 74 | 811 | 102400 | 2800 | |
33214442 | Flying_Dragon_02 | F | Dec. 13, 2017, 1:18 p.m. | OK | GNU C++11 | TESTS | 74 | 811 | 2150400 | 2800 | |
69296007 | Cyanic | F | Jan. 22, 2020, 12:14 p.m. | OK | GNU C++14 | TESTS | 74 | 686 | 614400 | 2800 | |
29479562 | NiroBC | F | Aug. 15, 2017, 11:12 a.m. | OK | GNU C++14 | TESTS | 74 | 795 | 2457600 | 2800 | |
33828387 | nicecoder37 | F | Dec. 31, 2017, 9:21 a.m. | OK | GNU C++14 | TESTS | 74 | 811 | 2150400 | 2800 | |
31470936 | zhamaliddinkalzhan | F | Oct. 18, 2017, 6:50 a.m. | OK | GNU C++14 | TESTS | 74 | 811 | 2457600 | 2800 | |
31797732 | mishobaxa1234 | F | Oct. 27, 2017, 1:51 p.m. | OK | GNU C++14 | TESTS | 74 | 826 | 614400 | 2800 | |
38257608 | kut_kjb1994 | F | May 15, 2018, 5:49 a.m. | OK | GNU C++14 | TESTS | 74 | 1091 | 3584000 | 2800 | |
38258729 | kut_kjb1994 | F | May 15, 2018, 6:45 a.m. | OK | GNU C++14 | TESTS | 74 | 1107 | 3584000 | 2800 | |
40855423 | Vatinkriv | F | July 27, 2018, 4:58 p.m. | OK | GNU C++14 | TESTS | 74 | 1497 | 512000 | 2800 | |
57340699 | Benq | F | July 19, 2019, 6:21 p.m. | OK | GNU C++17 | TESTS | 74 | 234 | 204800 | 2800 | |
50544325 | Shayan.P | F | Feb. 26, 2019, 8:09 p.m. | OK | GNU C++17 | TESTS | 74 | 467 | 716800 | 2800 | |
29991609 | edwin.ansari | F | Sept. 1, 2017, 4:12 p.m. | OK | Java 8 | TESTS | 74 | 873 | 0 | 2800 | |
29282988 | Hank2006 | F | Aug. 8, 2017, 10:25 a.m. | OK | Java 8 | TESTS | 74 | 873 | 20992000 | 2800 | |
29281981 | Lemonbabu | F | Aug. 8, 2017, 9:08 a.m. | OK | Java 8 | TESTS | 74 | 873 | 20992000 | 2800 | |
29421499 | colintian | F | Aug. 13, 2017, 3:23 a.m. | OK | Java 8 | TESTS | 74 | 873 | 20992000 | 2800 | |
29375819 | ecjtu-nzf | F | Aug. 12, 2017, 11:20 a.m. | OK | Java 8 | TESTS | 74 | 873 | 20992000 | 2800 | |
29318249 | StlenHandle | F | Aug. 10, 2017, 5:34 a.m. | OK | Java 8 | TESTS | 74 | 873 | 20992000 | 2800 | |
31687202 | tmph17 | F | Oct. 24, 2017, 3:34 p.m. | OK | Java 8 | TESTS | 74 | 889 | 20992000 | 2800 | |
29266058 | Don_1234 | F | Aug. 7, 2017, 1:41 p.m. | OK | Java 8 | TESTS | 74 | 904 | 20992000 | 2800 | |
32092664 | Georgia_001 | F | Nov. 6, 2017, 11:36 a.m. | OK | Java 8 | TESTS | 74 | 951 | 0 | 2800 | |
31034101 | Los_Angelos_Laycurse | F | Oct. 5, 2017, 12:54 p.m. | OK | MS C++ | TESTS | 74 | 405 | 512000 | 2800 | |
31034023 | Los_Angelos_Laycurse | F | Oct. 5, 2017, 12:51 p.m. | OK | MS C++ | TESTS | 74 | 421 | 512000 | 2800 | |
40980292 | ReaLNero1 | F | July 30, 2018, 5:27 p.m. | OK | MS C++ | TESTS | 74 | 436 | 307200 | 2800 |
Back to search problems