Codeforces Round 365 (Div. 2)

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
703 Codeforces Round 365 (Div. 2) FINISHED False 8100 267288304 Aug. 4, 2016, 3:15 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5713 ) B Mishka and trip PROGRAMMING implementation math 1400

B"Little Mishka is a great traveller and she visited many countries. After thinking about where to travel this time, she chose XXX -- beautiful, but little-known northern country. Here are some interesting facts about XXX: Mishka started to gather her things for a trip, but didn't still decide which route to follow and thus she asked you to help her determine summary price of passing each of the roads in XXX. Formally, for every pair of cities a and b (a xe2 x80 x89< xe2 x80 x89b), such that there is a road between a and b you are to find sum of products ca xc2 xb7cb. Will you help her? The first line of the input contains two integers n and k (3 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100 xe2 x80 x89000, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the number of cities in XXX and the number of capital cities among them. The second line of the input contains n integers c1, xe2 x80 x89c2, xe2 x80 x89..., xe2 x80 x89cn (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ci xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910 xe2 x80 x89000) -- beauty values of the cities. The third line of the input contains k distinct integers id1, xe2 x80 x89id2, xe2 x80 x89..., xe2 x80 x89idk (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89idi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- indices of capital cities. Indices are given in ascending order. Print the only integer -- summary price of passing each of the roads in XXX. This image describes first sample case: It is easy to see that summary price is equal to 17. This image describes second sample case: It is easy to see that summary price is equal to 71. "...

Tutorials

Codeforces Round #365 (Div. 2) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
49943248 vjudge5 B Feb. 15, 2019, 10:50 a.m. OK Clang++17 Diagnostics TESTS 63 77 921600 1400
19639284 ruban B Aug. 4, 2016, 8:56 p.m. OK Delphi TESTS 63 31 9420800 1400
19636347 I_Love_Sasha_Golovach B Aug. 4, 2016, 5:26 p.m. OK Delphi TESTS 63 31 26624000 1400
21636908 lerom B Oct. 21, 2016, 8:55 a.m. OK FPC TESTS 63 31 1024000 1400
20307891 Sanja B Aug. 31, 2016, 4:44 p.m. OK FPC TESTS 63 31 1024000 1400
19635436 anatolyefimov B Aug. 4, 2016, 5:20 p.m. OK FPC TESTS 63 31 2150400 1400
20212189 unnamed_04 B Aug. 28, 2016, 1:18 p.m. OK FPC TESTS 63 31 2355200 1400
19743393 Zeron B Aug. 9, 2016, 8:21 a.m. OK FPC TESTS 63 31 2355200 1400
19651684 MaRos B Aug. 5, 2016, 12:36 p.m. OK FPC TESTS 63 31 2355200 1400
19822911 longNH.IT17 B Aug. 12, 2016, 7:56 a.m. OK FPC TESTS 63 31 2457600 1400
19672109 DEATHW1NG B Aug. 6, 2016, 2:56 p.m. OK FPC TESTS 63 31 2457600 1400
19663847 gamo B Aug. 6, 2016, 6:39 a.m. OK FPC TESTS 63 31 2457600 1400
19958558 vjudge5 B Aug. 19, 2016, 6:33 a.m. OK FPC TESTS 63 31 2560000 1400
19966933 rainboy B Aug. 19, 2016, 4:04 p.m. OK GNU C TESTS 63 31 2662400 1400
19896761 Ideas_are_bulletproof B Aug. 15, 2016, 10:42 p.m. OK GNU C TESTS 63 31 2662400 1400
21765155 GT_18 B Oct. 25, 2016, 6:58 a.m. OK GNU C TESTS 63 46 819200 1400
20752866 repeater99 B Sept. 19, 2016, 11:01 a.m. OK GNU C TESTS 63 46 819200 1400
20749911 md_mahbub B Sept. 19, 2016, 8:09 a.m. OK GNU C TESTS 63 46 1024000 1400
21902458 aditya.todi B Oct. 31, 2016, 2:56 a.m. OK GNU C TESTS 63 46 1638400 1400
21225294 Rizro B Oct. 6, 2016, 3:35 a.m. OK GNU C TESTS 63 46 1638400 1400
20774690 pratik0509 B Sept. 20, 2016, 11:57 a.m. OK GNU C TESTS 63 46 1638400 1400
20165744 griez7 B Aug. 26, 2016, 12:51 a.m. OK GNU C TESTS 63 46 2252800 1400
19713017 dayamoydatta96 B Aug. 7, 2016, 6:50 p.m. OK GNU C TESTS 63 46 2252800 1400
20489258 FHW_SO_WALL B Sept. 10, 2016, 3:14 a.m. OK GNU C++ TESTS 63 15 614400 1400
21966760 vjudge2 B Nov. 1, 2016, 12:18 p.m. OK GNU C++ TESTS 63 15 1638400 1400
19642216 HoneyCat B Aug. 5, 2016, 2:34 a.m. OK GNU C++ TESTS 63 15 3686400 1400
19644313 Jaihk662 B Aug. 5, 2016, 5:36 a.m. OK GNU C++ TESTS 63 15 4505600 1400
22161478 vjudge2 B Nov. 11, 2016, 11:14 a.m. OK GNU C++ TESTS 63 31 204800 1400
20311057 hsniper B Aug. 31, 2016, 8:07 p.m. OK GNU C++ TESTS 63 31 409600 1400
22385651 vjudge1 B Nov. 21, 2016, 2:44 p.m. OK GNU C++ TESTS 63 31 512000 1400
20752556 ws_syx B Sept. 19, 2016, 10:45 a.m. OK GNU C++ TESTS 63 31 512000 1400
20645150 Amirnasr B Sept. 15, 2016, 5:15 p.m. OK GNU C++ TESTS 63 31 512000 1400
21201633 moldi B Oct. 5, 2016, 5:50 a.m. OK GNU C++ TESTS 63 31 716800 1400
23925984 vjudge1 B Jan. 18, 2017, 3:44 p.m. OK GNU C11 TESTS 63 31 3072000 1400
21093438 FBD B Oct. 1, 2016, 4:57 p.m. OK GNU C11 TESTS 63 46 1228800 1400
46929300 vjudge4 B Dec. 12, 2018, 10:46 a.m. OK GNU C11 TESTS 63 46 1638400 1400
23902191 vjudge1 B Jan. 17, 2017, 12:55 p.m. OK GNU C11 TESTS 63 46 3481600 1400
36386532 vjudge2 B March 18, 2018, 11:25 a.m. OK GNU C11 TESTS 63 46 4915200 1400
36388685 vjudge4 B March 18, 2018, 12:43 p.m. OK GNU C11 TESTS 63 46 4915200 1400
36386447 vjudge3 B March 18, 2018, 11:21 a.m. OK GNU C11 TESTS 63 46 4915200 1400
19659481 ketan_007 B Aug. 5, 2016, 10:54 p.m. OK GNU C11 TESTS 63 46 10752000 1400
36388868 vjudge3 B March 18, 2018, 12:50 p.m. OK GNU C11 TESTS 63 61 4915200 1400
62884609 kaiboy B Oct. 18, 2019, 5:56 p.m. OK GNU C11 TESTS 63 62 409600 1400
20776729 ixvii0iv B Sept. 20, 2016, 1:21 p.m. OK GNU C++11 TESTS 63 15 819200 1400
20292902 Domonion B Aug. 31, 2016, 2:46 a.m. OK GNU C++11 TESTS 63 15 921600 1400
19653017 VAVAvile B Aug. 5, 2016, 1:53 p.m. OK GNU C++11 TESTS 63 15 2560000 1400
19669310 happycat B Aug. 6, 2016, noon OK GNU C++11 TESTS 63 15 3379200 1400
19682145 sicon54 B Aug. 7, 2016, 7:29 a.m. OK GNU C++11 TESTS 63 15 3686400 1400
19644334 yukun133 B Aug. 5, 2016, 5:37 a.m. OK GNU C++11 TESTS 63 15 4505600 1400
19643424 Bobocan B Aug. 5, 2016, 4:28 a.m. OK GNU C++11 TESTS 63 15 26112000 1400
19641389 rxdoi B Aug. 5, 2016, 1:20 a.m. OK GNU C++11 TESTS 63 30 2867200 1400
19659613 hackssssss B Aug. 5, 2016, 11:23 p.m. OK GNU C++11 TESTS 63 30 3379200 1400
20445161 ruoxuanwang B Sept. 7, 2016, 7:51 p.m. OK GNU C++11 TESTS 63 31 307200 1400
52535222 vjudge4 B April 9, 2019, 3:16 p.m. OK GNU C++14 TESTS 63 46 512000 1400
21918915 seong2035 B Oct. 31, 2016, 1:51 p.m. OK GNU C++14 TESTS 63 46 512000 1400
22693448 islam_said B Dec. 4, 2016, 10:18 a.m. OK GNU C++14 TESTS 63 46 512000 1400
27117947 akumar1503 B May 15, 2017, 8:41 a.m. OK GNU C++14 TESTS 63 46 512000 1400
49944493 DICS B Feb. 15, 2019, 11:25 a.m. OK GNU C++14 TESTS 63 46 512000 1400
49944632 vjudge5 B Feb. 15, 2019, 11:28 a.m. OK GNU C++14 TESTS 63 46 512000 1400
30831258 oToToT B Sept. 29, 2017, 1:53 p.m. OK GNU C++14 TESTS 63 46 819200 1400
27268050 OmarAhmed B May 21, 2017, 1:31 p.m. OK GNU C++14 TESTS 63 46 819200 1400
27268029 OmarAhmed B May 21, 2017, 1:29 p.m. OK GNU C++14 TESTS 63 46 819200 1400
52466026 ishvinderdhillon B April 7, 2019, 3:43 p.m. OK GNU C++14 TESTS 63 46 819200 1400
40208358 lukagvritishvili B July 11, 2018, 5:09 p.m. OK GNU C++17 TESTS 63 46 409600 1400
68997470 our B Jan. 17, 2020, 6 p.m. OK GNU C++17 TESTS 63 46 512000 1400
46250871 _lucifer_ B Nov. 26, 2018, 2:05 p.m. OK GNU C++17 TESTS 63 46 921600 1400
48877294 Ivan_Bespalov B Jan. 24, 2019, 8:45 a.m. OK GNU C++17 TESTS 63 46 1126400 1400
53653209 vjudge4 B May 2, 2019, 2:53 a.m. OK GNU C++17 TESTS 63 46 1638400 1400
52933487 Chr1s_love_Xuan B April 18, 2019, 4:39 a.m. OK GNU C++17 TESTS 63 46 1638400 1400
47302579 1615112487 B Dec. 20, 2018, 2:57 p.m. OK GNU C++17 TESTS 63 46 1740800 1400
47315797 Farrell12138 B Dec. 21, 2018, 3:13 a.m. OK GNU C++17 TESTS 63 46 1740800 1400
47314481 Muskmelon_seed B Dec. 21, 2018, 12:46 a.m. OK GNU C++17 TESTS 63 46 1740800 1400
47302959 Farrell12138 B Dec. 20, 2018, 3:10 p.m. OK GNU C++17 TESTS 63 46 1740800 1400
19638135 mipt.vi002 B Aug. 4, 2016, 7:36 p.m. OK Haskell TESTS 63 109 63897600 1400
20514425 pavel.rosputko B Sept. 10, 2016, 7:44 p.m. OK Haskell TESTS 63 904 45363200 1400
19707337 MarcoXerox B Aug. 7, 2016, 3:46 p.m. OK Haskell TESTS 63 904 95436800 1400
19672559 jeffrey.xiao B Aug. 6, 2016, 3:23 p.m. OK Java 7 TESTS 63 124 39116800 1400
19685658 Hartha B Aug. 7, 2016, 11:24 a.m. OK Java 7 TESTS 63 140 40345600 1400
19647543 sevimlikedicik B Aug. 5, 2016, 8:29 a.m. OK Java 7 TESTS 63 140 40345600 1400
19680230 shrpshtr B Aug. 7, 2016, 5:13 a.m. OK Java 7 TESTS 63 156 43827200 1400
19648355 pd_008 B Aug. 5, 2016, 9:09 a.m. OK Java 7 TESTS 63 171 41164800 1400
19682883 kalc B Aug. 7, 2016, 8:14 a.m. OK Java 7 TESTS 63 202 44441600 1400
19669155 Eighth B Aug. 6, 2016, 11:50 a.m. OK Java 7 TESTS 63 374 39321600 1400
19685695 Hartha B Aug. 7, 2016, 11:26 a.m. OK Java 7 TESTS 63 389 39321600 1400
19637967 _rancho B Aug. 4, 2016, 7:30 p.m. OK Java 7 TESTS 63 436 39321600 1400
19955845 megaspazz B Aug. 19, 2016, 2:12 a.m. OK Java 8 TESTS 63 109 20480000 1400
49647282 dmitriy0712 B Feb. 9, 2019, 5:29 a.m. OK Java 8 TESTS 63 124 0 1400
30054517 Bibhuti B Sept. 4, 2017, 1:56 p.m. OK Java 8 TESTS 63 124 0 1400
20668832 parth015 B Sept. 16, 2016, 8:57 p.m. OK Java 8 TESTS 63 124 0 1400
20457538 gdmclellan B Sept. 8, 2016, 11:55 a.m. OK Java 8 TESTS 63 124 0 1400
19955826 megaspazz B Aug. 19, 2016, 2:10 a.m. OK Java 8 TESTS 63 124 20480000 1400
19955761 megaspazz B Aug. 19, 2016, 2:03 a.m. OK Java 8 TESTS 63 124 20480000 1400
19771237 carvajal B Aug. 10, 2016, 6:32 p.m. OK Java 8 TESTS 63 124 20480000 1400
19715837 JialinOuyang B Aug. 7, 2016, 10:03 p.m. OK Java 8 TESTS 63 124 20480000 1400
19674060 Wolfje B Aug. 6, 2016, 5:09 p.m. OK Java 8 TESTS 63 124 20480000 1400
51242008 nemars B March 12, 2019, 11:30 p.m. OK Mono C# TESTS 63 109 24371200 1400
21422639 og.kostya B Oct. 14, 2016, 12:46 p.m. OK MS C# TESTS 63 77 9420800 1400
23489757 m1_k3 B Jan. 1, 2017, 8:13 p.m. OK MS C# TESTS 63 77 9830400 1400
21174205 DanilaMaestro B Oct. 3, 2016, 9:54 p.m. OK MS C# TESTS 63 93 14028800 1400
19728849 loro B Aug. 8, 2016, 1:10 p.m. OK MS C# TESTS 63 93 28262400 1400
19658604 AymanWizard B Aug. 5, 2016, 9 p.m. OK MS C# TESTS 63 93 30924800 1400
21174220 DanilaMaestro B Oct. 3, 2016, 9:56 p.m. OK MS C# TESTS 63 108 14028800 1400
20432749 Chubcheg B Sept. 7, 2016, 9:55 a.m. OK MS C# TESTS 63 108 18227200 1400
19753714 anahim465 B Aug. 9, 2016, 7:47 p.m. OK MS C# TESTS 63 108 27648000 1400
19728806 ChinaKing B Aug. 8, 2016, 1:07 p.m. OK MS C# TESTS 63 109 35737600 1400
19643701 fr0st B Aug. 5, 2016, 4:54 a.m. OK MS C# TESTS 63 124 31334400 1400
49971531 vjudge1 B Feb. 16, 2019, 2:37 a.m. OK MS C++ TESTS 63 31 819200 1400
20535688 sianzhan B Sept. 11, 2016, 4:02 p.m. OK MS C++ TESTS 63 31 1228800 1400
19645897 charles123 B Aug. 5, 2016, 7:05 a.m. OK MS C++ TESTS 63 31 2457600 1400
19687548 NotEvenWrong B Aug. 7, 2016, 1:40 p.m. OK MS C++ TESTS 63 31 2969600 1400
19636028 Alexicon B Aug. 4, 2016, 5:24 p.m. OK MS C++ TESTS 63 31 3686400 1400
19765556 sylviaaah B Aug. 10, 2016, 12:40 p.m. OK MS C++ TESTS 63 31 4505600 1400
19981488 Mosyagin B Aug. 20, 2016, 12:08 p.m. OK MS C++ TESTS 63 31 7065600 1400
22708229 siscon_org B Dec. 5, 2016, 9:40 a.m. OK MS C++ TESTS 63 46 921600 1400
54518990 vjudge5 B May 23, 2019, 11:29 a.m. OK MS C++ TESTS 63 46 1228800 1400
54518492 vjudge3 B May 23, 2019, 11:14 a.m. OK MS C++ TESTS 63 46 1228800 1400
64781874 Mad112233 B Nov. 13, 2019, 7:29 a.m. OK MS C++ 2017 TESTS 63 155 819200 1400
64019380 CtrlAlt B Nov. 1, 2019, 3:33 p.m. OK MS C++ 2017 TESTS 63 171 4608000 1400
19674510 mayakin B Aug. 6, 2016, 5:39 p.m. OK PHP TESTS 63 452 26624000 1400
31818102 shmabulock devanshslnk B Oct. 27, 2017, 7:53 p.m. OK PyPy 2 TESTS 63 124 10649600 1400
21808194 abhigupta4 B Oct. 26, 2016, 9:12 p.m. OK PyPy 2 TESTS 63 124 10752000 1400
25760459 Trunks B March 24, 2017, 12:31 a.m. OK PyPy 2 TESTS 63 124 34816000 1400
19694865 nealzane B Aug. 7, 2016, 2:27 p.m. OK PyPy 2 TESTS 63 140 32665600 1400
63746696 kchau B Oct. 29, 2019, 6:43 p.m. OK PyPy 3 TESTS 63 233 13312000 1400
42495230 chandak_vikas B Sept. 5, 2018, 2:03 p.m. OK PyPy 3 TESTS 63 249 10547200 1400
19635659 akhmetov.anuar B Aug. 4, 2016, 5:21 p.m. OK PyPy 3 TESTS 63 264 35020800 1400
19657907 sobir_bobiev B Aug. 5, 2016, 7:48 p.m. OK PyPy 3 TESTS 63 280 32358400 1400
27332170 mola.mola B May 25, 2017, 8:35 a.m. OK PyPy 3 TESTS 63 295 9625600 1400
19673095 yashar_sb_sb B Aug. 6, 2016, 4:01 p.m. OK PyPy 3 TESTS 63 311 34201600 1400
20212194 Vosatorp B Aug. 28, 2016, 1:19 p.m. OK PyPy 3 TESTS 63 405 32460800 1400
19951092 wolffd B Aug. 18, 2016, 5:51 p.m. OK Python 2 TESTS 63 202 12083200 1400
19943824 siscos B Aug. 18, 2016, 10:02 a.m. OK Python 2 TESTS 63 217 12595200 1400
30306216 mhorst B Sept. 13, 2017, 12:05 p.m. OK Python 2 TESTS 63 218 7782400 1400
22125969 Sungmin B Nov. 9, 2016, 8:22 a.m. OK Python 2 TESTS 63 218 7782400 1400
22651665 thepotatoranch B Dec. 2, 2016, 4:49 a.m. OK Python 2 TESTS 63 218 7884800 1400
34082009 laoliumang B Jan. 11, 2018, 6:13 a.m. OK Python 2 TESTS 63 218 12185600 1400
23414765 maiquynhtruong B Dec. 30, 2016, 7:50 a.m. OK Python 2 TESTS 63 218 12185600 1400
19639687 jrying B Aug. 4, 2016, 9:29 p.m. OK Python 2 TESTS 63 218 12390400 1400
19750463 cavehubiao B Aug. 9, 2016, 4:03 p.m. OK Python 2 TESTS 63 233 12288000 1400
19786164 inovak B Aug. 11, 2016, 2:35 p.m. OK Python 2 TESTS 63 234 13209600 1400
19649449 mihanikus B Aug. 5, 2016, 10:13 a.m. OK Python 3 TESTS 63 140 16691200 1400
29603289 Qumeric B Aug. 19, 2017, 4:16 p.m. OK Python 3 TESTS 63 171 9932800 1400
20500021 harry_potter_28 B Sept. 10, 2016, 3:16 p.m. OK Python 3 TESTS 63 171 11980800 1400
19981346 orailly B Aug. 20, 2016, 11:59 a.m. OK Python 3 TESTS 63 171 14438400 1400
19647586 yinxiaoyu B Aug. 5, 2016, 8:31 a.m. OK Python 3 TESTS 63 171 16179200 1400
19920844 arknave B Aug. 17, 2016, 6:28 a.m. OK Python 3 TESTS 63 171 16691200 1400
19903844 trengo B Aug. 16, 2016, 9:12 a.m. OK Python 3 TESTS 63 187 14438400 1400
19647631 yinxiaoyu B Aug. 5, 2016, 8:33 a.m. OK Python 3 TESTS 63 187 16179200 1400
19664287 rpk74m B Aug. 6, 2016, 7:04 a.m. OK Python 3 TESTS 63 202 13721600 1400
19639602 future_loops B Aug. 4, 2016, 9:22 p.m. OK Python 3 TESTS 63 202 14233600 1400
19966973 SakurakoujiRuna B Aug. 19, 2016, 4:06 p.m. OK Ruby TESTS 63 264 36556800 1400
19754636 smas B Aug. 9, 2016, 9:13 p.m. OK Scala TESTS 63 373 47206400 1400
21654840 reldan B Oct. 22, 2016, 12:23 a.m. OK Scala TESTS 63 811 11468800 1400

remove filters

Back to search problems