Codeforces Round 335 (Div. 1)

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
605 Codeforces Round 335 (Div. 1) FINISHED False 7200 326728523 Dec. 9, 2015, 4:05 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 1544 ) E Intergalaxy Trips PROGRAMMING probabilities shortest paths 2600

The scientists have recently discovered wormholes — objects in space that allow to travel very long distances between galaxies and star systems. The scientists know that there are n galaxies within reach. You are in the galaxy number 1 and you need to get to the galaxy number n . To get from galaxy i to galaxy j , you need to fly onto a wormhole ( i , j ) and in exactly one galaxy day you will find yourself in galaxy j . Unfortunately, the required wormhole is not always available. Every galaxy day they disappear and appear at random. However, the state of wormholes does not change within one galaxy day. A wormhole from galaxy i to galaxy j exists during each galaxy day taken separately with probability p ij . You can always find out what wormholes exist at the given moment. At each moment you can either travel to another galaxy through one of wormholes that exist at this moment or you can simply wait for one galaxy day to see which wormholes will lead from your current position at the next day. Your task is to find the expected value of time needed to travel from galaxy 1 to galaxy n , if you act in the optimal way. It is guaranteed that this expected value exists. The first line of the input contains a single integer n ( 1 ≤ n ≤ 1000 ) — the number of galaxies within reach. Then follows a matrix of n rows and n columns. Each element p ij represents the probability that there is a wormhole from galaxy i to galaxy j . All the probabilities are given in percents and are integers. It is guaranteed that all the elements on the main diagonal are equal to 100 . Print a single real value — the expected value of the time needed to travel from galaxy 1 to galaxy n if one acts in an optimal way. Your answer will be considered correct if its absolute or relative error does not exceed 10 - 6 . Namely: let's assume that your answer is a , and the answer of the jury is b . The checker program will consider your answer correct, if . In the second sample the wormhole fro

Tutorials

Codeforces Round #335 Problem Analysis

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
36971776 ilovenwd E April 4, 2018, 3:45 p.m. OK GNU C TESTS 97 186 11366400 2600
30696246 ACMLCZH E Sept. 25, 2017, 5:58 a.m. OK GNU C++ TESTS 97 31 7884800 2600
32488911 yylidiw E Nov. 20, 2017, 4:14 a.m. OK GNU C++ TESTS 97 46 8089600 2600
32488840 yylidiw E Nov. 20, 2017, 4:06 a.m. OK GNU C++ TESTS 97 46 8089600 2600
30581484 FallDream E Sept. 21, 2017, 3 p.m. OK GNU C++ TESTS 97 46 8089600 2600
41229431 zhou888 E Aug. 5, 2018, 1:16 a.m. OK GNU C++ TESTS 97 46 8192000 2600
14771645 make777 E Dec. 12, 2015, 12:14 p.m. OK GNU C++ TESTS 97 46 10035200 2600
18105934 mxh1999 E May 26, 2016, 2:51 p.m. OK GNU C++ TESTS 97 46 10444800 2600
26329630 zhan8855 E April 13, 2017, 1:26 a.m. OK GNU C++ TESTS 97 46 13516800 2600
40049514 Anoxiacxy E July 7, 2018, 3:08 a.m. OK GNU C++ TESTS 97 61 8192000 2600
17428857 y0rkl1u E April 22, 2016, 1:43 a.m. OK GNU C++ TESTS 97 61 10444800 2600
30568090 ACMLCZH FallDream ditoly E Sept. 21, 2017, 6:15 a.m. OK GNU C++11 TESTS 97 31 7884800 2600
14974884 SanSiroWaltz E Dec. 24, 2015, 2:58 p.m. OK GNU C++11 TESTS 97 31 7987200 2600
48482903 vjudge3 E Jan. 17, 2019, 6:58 a.m. OK GNU C++11 TESTS 97 46 4096000 2600
40114793 Anson529 E July 9, 2018, 1:56 p.m. OK GNU C++11 TESTS 97 46 4096000 2600
47628318 luogu_bot2 E Dec. 28, 2018, 2:40 p.m. OK GNU C++11 TESTS 97 46 4915200 2600
47627997 ww3113306 E Dec. 28, 2018, 2:40 p.m. OK GNU C++11 TESTS 97 46 4915200 2600
55086842 Rayment E June 4, 2019, 12:53 p.m. OK GNU C++11 TESTS 97 46 7987200 2600
40985567 ReaLNero1 E July 30, 2018, 8:01 p.m. OK GNU C++11 TESTS 97 46 7987200 2600
44767584 luogu_bot5 E Oct. 24, 2018, 10:48 a.m. OK GNU C++11 TESTS 97 46 8089600 2600
44767547 luogu_bot1 E Oct. 24, 2018, 10:47 a.m. OK GNU C++11 TESTS 97 46 8089600 2600
68863429 QAQAutoMaton E Jan. 15, 2020, 12:49 p.m. OK GNU C++14 TESTS 97 46 12288000 2600
66257738 jiangly E Dec. 4, 2019, 6:54 a.m. OK GNU C++14 TESTS 97 156 8704000 2600
60331462 nabid_anzum E Sept. 10, 2019, 6:16 a.m. OK GNU C++14 TESTS 97 171 12800000 2600
63372269 vjudge4 E Oct. 25, 2019, 9:48 a.m. OK GNU C++14 TESTS 97 187 8396800 2600
69282485 dyxg E Jan. 22, 2020, 6:37 a.m. OK GNU C++14 TESTS 97 202 4096000 2600
65934822 zhongyuwei E Nov. 29, 2019, 12:54 a.m. OK GNU C++14 TESTS 97 202 4096000 2600
45577076 xproxmess E Nov. 11, 2018, 9:37 p.m. OK GNU C++14 TESTS 97 202 4096000 2600
47680906 redbag E Dec. 29, 2018, 12:03 p.m. OK GNU C++14 TESTS 97 202 4915200 2600
68116850 nealchen E Jan. 3, 2020, 11:46 a.m. OK GNU C++14 TESTS 97 202 8089600 2600
63904792 Cyanic E Oct. 31, 2019, 6:14 a.m. OK GNU C++14 TESTS 97 202 8089600 2600
67585776 HirasawaaYui E Dec. 25, 2019, 8:13 a.m. OK GNU C++17 TESTS 97 46 8192000 2600
67685538 LJZ_C E Dec. 27, 2019, 8:42 a.m. OK GNU C++17 TESTS 97 62 9011200 2600
65895664 910306264 E Nov. 28, 2019, 6 a.m. OK GNU C++17 TESTS 97 78 9216000 2600
48716472 AM. E Jan. 22, 2019, 11:32 a.m. OK GNU C++17 TESTS 97 186 8601600 2600
49828901 Stalin. E Feb. 12, 2019, 1 p.m. OK GNU C++17 TESTS 97 187 9728000 2600
38591083 majk E May 24, 2018, 3:40 p.m. OK GNU C++17 TESTS 97 187 17203200 2600
56462464 89264270823 E July 3, 2019, 7:26 a.m. OK GNU C++17 TESTS 97 202 8704000 2600
58943967 ZevenWu E Aug. 17, 2019, 8:08 a.m. OK GNU C++17 TESTS 97 202 12288000 2600
38591105 majk E May 24, 2018, 3:41 p.m. OK GNU C++17 TESTS 97 202 17203200 2600
41213682 ShichengXiao E Aug. 4, 2018, 11:58 a.m. OK GNU C++17 TESTS 97 217 8192000 2600
14728102 pashka E Dec. 9, 2015, 5:29 p.m. OK Java 7 TESTS 97 218 0 2600
14797770 chemthan E Dec. 14, 2015, 6:02 a.m. OK Java 7 TESTS 97 390 13312000 2600
14835913 _just4fun_ E Dec. 16, 2015, 2:58 p.m. OK Java 8 TESTS 97 171 0 2600
14734215 uwi E Dec. 9, 2015, 7:14 p.m. OK Java 8 TESTS 97 187 0 2600
14722840 Egor E Dec. 9, 2015, 4:47 p.m. OK Java 8 TESTS 97 187 0 2600
14721319 Lewin E Dec. 9, 2015, 4:37 p.m. OK Java 8 TESTS 97 249 0 2600
14726665 mkirsche E Dec. 9, 2015, 5:16 p.m. OK Java 8 TESTS 97 265 0 2600
14734055 AlexFetisov E Dec. 9, 2015, 7:08 p.m. OK Java 8 TESTS 97 280 0 2600
17157201 raggzy E April 4, 2016, 11:59 a.m. OK Java 8 TESTS 97 405 27750400 2600
19399137 mmaxio E July 25, 2016, 8:31 a.m. OK Java 8 TESTS 97 576 5632000 2600
15219512 hunglv.k52tncntt E Jan. 6, 2016, 11:52 p.m. OK Java 8 TESTS 97 967 0 2600
15219505 hunglv.k52tncntt E Jan. 6, 2016, 11:48 p.m. OK Java 8 TESTS 97 998 0 2600
14726864 izban E Dec. 9, 2015, 5:18 p.m. OK MS C++ TESTS 97 187 13004800 2600
14743643 vml E Dec. 10, 2015, 12:43 p.m. OK MS C++ TESTS 97 576 8294400 2600
14844405 Carups E Dec. 17, 2015, 10:27 a.m. OK MS C++ TESTS 97 686 8089600 2600
69972605 vjudge3 E Feb. 1, 2020, 2:12 p.m. OK MS C++ TESTS 97 1014 8294400 2600
23889258 sdya E Jan. 16, 2017, 7:08 p.m. OK MS C++ TESTS 97 1918 11776000 2600
15687974 Heisenbug E Jan. 31, 2016, 1:39 a.m. OK Ocaml TESTS 97 374 10035200 2600

remove filters

Back to search problems