All-Ukrainian School Olympiad in Informatics

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
76 All-Ukrainian School Olympiad in Informatics FINISHED False 18000 473796022 April 12, 2011, noon

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 2133 ) A Gift PROGRAMMING dsu graphs sortings trees 2300

The kingdom of Olympia consists of N cities and M bidirectional roads. Each road connects exactly two cities and two cities can be connected with more than one road. Also it possible that some roads connect city with itself making a loop. All roads are constantly plundered with bandits. After a while bandits became bored of wasting time in road robberies, so they suggested the king of Olympia to pay off. According to the offer, bandits want to get a gift consisted of gold and silver coins. Offer also contains a list of restrictions: for each road it is known g i — the smallest amount of gold and s i — the smallest amount of silver coins that should be in the gift to stop robberies on the road. That is, if the gift contains a gold and b silver coins, then bandits will stop robberies on all the roads that g i ≤ a and s i ≤ b . Unfortunately kingdom treasury doesn't contain neither gold nor silver coins, but there are Olympian tugriks in it. The cost of one gold coin in tugriks is G , and the cost of one silver coin in tugriks is S . King really wants to send bandits such gift that for any two cities there will exist a safe path between them. Your task is to find the minimal cost in Olympian tugriks of the required gift. The first line of the input contains two integers N and M ( 2 ≤ N ≤ 200 , 1 ≤ M ≤ 50 000 ) — the number of cities and the number of roads, respectively. The second line contains two integers G and S ( 1 ≤ G , S ≤ 10 9 ) — the prices of gold and silver coins in tugriks. The following M lines contain information about the offer. Each of the records in list is given as four integers x i , y i , g i , s i , where x i and y i are the numbers of cities that the road connects and g i , s i are minimal gold and silver coins requirements for the i -th road ( 1 ≤ x i , y i ≤ N , 1 ≤ g i , s i ≤ 10 9 ). Cities are numbered from 1 to N . It is possible that there are more than one road between a pair of cities. It is possible that a road connects the cit

Tutorials

All-Ukrainian School Olympiad in Informatics: editorial (A,B,C,D,E,F)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
413677 maxim_polt A April 28, 2011, 3:54 a.m. OK Delphi TESTS 21 310 1638400 2300
379437 tourist A April 12, 2011, 1:03 p.m. OK Delphi TESTS 21 310 1638400 2300
13201822 ghostmath A Sept. 24, 2015, 9:33 a.m. OK FPC TESTS 21 156 819200 2300
2415512 luogan A Oct. 23, 2012, 3:16 a.m. OK FPC TESTS 21 187 819200 2300
10610683 ez_ljh A April 6, 2015, 9:33 a.m. OK FPC TESTS 21 218 1433600 2300
65481252 luogu_bot3 A Nov. 21, 2019, 11:45 a.m. OK FPC TESTS 21 248 1433600 2300
549166 vlad107 A July 17, 2011, 9:15 a.m. OK FPC TESTS 21 470 16691200 2300
17170742 jiangyx A April 5, 2016, 11:52 a.m. OK FPC TESTS 21 528 9728000 2300
10610790 ez_cjb A April 6, 2015, 9:44 a.m. OK FPC TESTS 21 530 1433600 2300
10610868 ez_cjb A April 6, 2015, 9:54 a.m. OK FPC TESTS 21 530 5632000 2300
381475 Sereja A April 12, 2011, 5 p.m. OK FPC TESTS 21 630 1843200 2300
380777 Pro_Coder A April 12, 2011, 3:15 p.m. OK FPC TESTS 21 630 1843200 2300
388426 scottai1 A April 15, 2011, 12:43 a.m. OK GNU C TESTS 21 170 3788800 2300
813783 joey2005 A Oct. 29, 2011, 4:58 a.m. OK GNU C TESTS 21 780 2355200 2300
2675912 Leo_Yu A Nov. 29, 2012, 8:03 a.m. OK GNU C++ TESTS 21 46 2048000 2300
34531775 szpszp A Jan. 25, 2018, 12:11 a.m. OK GNU C++ TESTS 21 60 3072000 2300
2911089 moondance A Jan. 13, 2013, 12:25 p.m. OK GNU C++ TESTS 21 62 819200 2300
3794658 ljcc A May 30, 2013, 2:17 p.m. OK GNU C++ TESTS 21 62 1228800 2300
34531779 vjudge5 A Jan. 25, 2018, 12:11 a.m. OK GNU C++ TESTS 21 62 3072000 2300
3794659 vjtest A May 30, 2013, 2:17 p.m. OK GNU C++ TESTS 21 78 1228800 2300
525939 tsotne A July 2, 2011, 11:54 a.m. OK GNU C++ TESTS 21 90 2969600 2300
13908642 chongjg A Oct. 28, 2015, 5:24 a.m. OK GNU C++ TESTS 21 92 819200 2300
40992837 ReaLNero1 A July 31, 2018, 1:36 a.m. OK GNU C++ TESTS 21 92 1024000 2300
13873279 tgopknight A Oct. 26, 2015, 1:41 p.m. OK GNU C++ TESTS 21 92 1126400 2300
2510637 roosephu A Nov. 5, 2012, 11:57 a.m. OK GNU C++0x TESTS 21 93 921600 2300
1185596 Archon.JK A Feb. 16, 2012, 3:55 p.m. OK GNU C++0x TESTS 21 200 3072000 2300
5645915 equation314 A Jan. 9, 2014, 3:18 p.m. OK GNU C++0x TESTS 21 404 819200 2300
9397775 aliasadiiii A Jan. 10, 2015, 2:04 p.m. OK GNU C++0x TESTS 21 528 2150400 2300
8602664 marat.snowbear A Nov. 7, 2014, 12:31 p.m. OK GNU C++0x TESTS 21 590 2048000 2300
2757753 apia A Dec. 13, 2012, 12:11 p.m. OK GNU C++0x TESTS 21 656 1638400 2300
1977195 mruxim A Aug. 4, 2012, 7:06 p.m. OK GNU C++0x TESTS 21 730 2252800 2300
9977690 Tzn-40 A Feb. 24, 2015, 7:15 a.m. OK GNU C++0x TESTS 21 810 1638400 2300
8613428 DarthKnight A Nov. 8, 2014, 10:33 a.m. OK GNU C++0x TESTS 21 904 171110400 2300
22416142 666sb666 A Nov. 23, 2016, 4:42 a.m. OK GNU C++11 TESTS 21 92 1228800 2300
28021736 Naziur_R A June 25, 2017, 12:03 p.m. OK GNU C++11 TESTS 21 92 3993600 2300
33701751 FlappyFish A Dec. 28, 2017, 6:02 a.m. OK GNU C++11 TESTS 21 122 4403200 2300
14046064 harrypotter192 A Nov. 3, 2015, 5:35 p.m. OK GNU C++11 TESTS 21 124 819200 2300
58330597 lzzAKIOI A Aug. 5, 2019, 9:15 a.m. OK GNU C++11 TESTS 21 154 8089600 2300
66772659 lzht A Dec. 13, 2019, 8:33 a.m. OK GNU C++11 TESTS 21 156 1024000 2300
11885114 mathjohnfh A July 1, 2015, 4:35 p.m. OK GNU C++11 TESTS 21 156 1228800 2300
62209029 flyinto A Oct. 9, 2019, 1:58 p.m. OK GNU C++11 TESTS 21 156 5734400 2300
38085886 cuizhuyefei A May 10, 2018, 6:02 a.m. OK GNU C++11 TESTS 21 156 10854400 2300
62178479 luogu_bot4 A Oct. 9, 2019, 5:27 a.m. OK GNU C++11 TESTS 21 186 819200 2300
31935039 -Morass- A Oct. 31, 2017, 10:46 p.m. OK GNU C++14 TESTS 21 156 4710400 2300
60928939 bansals888 A Sept. 20, 2019, 1:08 p.m. OK GNU C++14 TESTS 21 186 1228800 2300
66819700 vjudge1 A Dec. 14, 2019, 7:02 a.m. OK GNU C++14 TESTS 21 186 1331200 2300
60708295 vjudge3 A Sept. 17, 2019, 6:42 a.m. OK GNU C++14 TESTS 21 186 2355200 2300
60708277 Berted A Sept. 17, 2019, 6:42 a.m. OK GNU C++14 TESTS 21 186 2457600 2300
34418453 I_love_chickpea A Jan. 21, 2018, 3:29 p.m. OK GNU C++14 TESTS 21 186 2867200 2300
37258148 Cmise A April 12, 2018, 6:09 p.m. OK GNU C++14 TESTS 21 186 6758400 2300
57306937 Lucky_Glass A July 19, 2019, 4:30 a.m. OK GNU C++14 TESTS 21 216 819200 2300
66631858 vjudge3 A Dec. 11, 2019, 11:29 a.m. OK GNU C++14 TESTS 21 218 1126400 2300
56232687 Rodrigoaf61 A June 28, 2019, 2:51 p.m. OK GNU C++14 TESTS 21 218 2457600 2300
61060607 kenimo A Sept. 22, 2019, 9:23 a.m. OK GNU C++17 TESTS 21 186 1638400 2300
58180282 jyf111 A Aug. 2, 2019, 2:54 p.m. OK GNU C++17 TESTS 21 216 1228800 2300
39179799 ruo A June 12, 2018, 4:08 a.m. OK GNU C++17 TESTS 21 218 819200 2300
47781757 ajaybgunjal A Dec. 31, 2018, 8:32 a.m. OK GNU C++17 TESTS 21 248 1024000 2300
61946185 mikimowski A Oct. 5, 2019, 11:29 p.m. OK GNU C++17 TESTS 21 248 1638400 2300
62895573 vjudge1 A Oct. 18, 2019, 11:35 p.m. OK GNU C++17 TESTS 21 248 6451200 2300
56960864 vjudge4 A July 13, 2019, 6:33 a.m. OK GNU C++17 TESTS 21 248 6451200 2300
64736516 Guaguapi A Nov. 12, 2019, 10:31 a.m. OK GNU C++17 TESTS 21 248 16076800 2300
40912179 Wrj A July 29, 2018, 9:27 a.m. OK GNU C++17 TESTS 21 280 819200 2300
38627615 Dup4 A May 26, 2018, 7:52 a.m. OK GNU C++17 TESTS 21 280 1638400 2300
380223 Egor A April 12, 2011, 2:14 p.m. OK Java 6 TESTS 21 390 90828800 2300
393670 Di735 A April 16, 2011, 5:51 a.m. OK Java 6 TESTS 21 420 43724800 2300
381168 OgieKako A April 12, 2011, 4:12 p.m. OK Java 6 TESTS 21 880 43315200 2300
380785 ivan.metelsky A April 12, 2011, 3:16 p.m. OK Java 6 TESTS 21 940 43315200 2300
17714060 mkirsche A May 5, 2016, 3:16 a.m. OK Java 7 TESTS 21 1558 39731200 2300
17714022 mkirsche A May 5, 2016, 3:07 a.m. OK Java 7 TESTS 21 1996 39731200 2300
23348823 Chapecoense A Dec. 26, 2016, 9:25 p.m. OK Java 8 TESTS 21 716 65843200 2300
59886712 rishus23 A Sept. 2, 2019, 8:23 a.m. OK Java 8 TESTS 21 778 0 2300
11877034 AlexFetisov A July 1, 2015, 6:20 a.m. OK Java 8 TESTS 21 872 0 2300
24604996 og.kostya A Feb. 12, 2017, 9:09 a.m. OK MS C# TESTS 21 716 12390400 2300
1384195 AndrewZhernov A March 21, 2012, 12:55 p.m. OK MS C++ TESTS 21 80 2969600 2300
1384149 AndrewZhernov A March 21, 2012, 12:39 p.m. OK MS C++ TESTS 21 80 2969600 2300
1383977 AndrewZhernov A March 21, 2012, 11:16 a.m. OK MS C++ TESTS 21 80 2969600 2300
380916 Coder A April 12, 2011, 3:33 p.m. OK MS C++ TESTS 21 80 2969600 2300
1384256 AndrewZhernov A March 21, 2012, 1:12 p.m. OK MS C++ TESTS 21 90 2560000 2300
1384238 AndrewZhernov A March 21, 2012, 1:07 p.m. OK MS C++ TESTS 21 90 2560000 2300
1384199 AndrewZhernov A March 21, 2012, 12:57 p.m. OK MS C++ TESTS 21 90 2969600 2300
1384146 AndrewZhernov A March 21, 2012, 12:39 p.m. OK MS C++ TESTS 21 90 2969600 2300
1384134 AndrewZhernov A March 21, 2012, 12:32 p.m. OK MS C++ TESTS 21 90 2969600 2300
381906 KADR A April 12, 2011, 8:31 p.m. OK MS C++ TESTS 21 200 2355200 2300
58791583 vjudge5 A Aug. 14, 2019, 2:41 a.m. OK MS C++ 2017 TESTS 21 248 819200 2300
66674767 Jimmyokok A Dec. 12, 2019, 10:52 a.m. OK MS C++ 2017 TESTS 21 342 1228800 2300
66854278 vjudge3 A Dec. 14, 2019, 12:08 p.m. OK MS C++ 2017 TESTS 21 342 2048000 2300
66674879 Jimmyokok A Dec. 12, 2019, 10:55 a.m. OK MS C++ 2017 TESTS 21 374 1228800 2300
66783655 vjudge5 A Dec. 13, 2019, 12:54 p.m. OK MS C++ 2017 TESTS 21 404 1228800 2300
66783961 vjudge4 A Dec. 13, 2019, 1 p.m. OK MS C++ 2017 TESTS 21 498 1433600 2300
66815444 vjudge2 A Dec. 14, 2019, 5:28 a.m. OK MS C++ 2017 TESTS 21 528 1228800 2300
66784027 vjudge1 A Dec. 13, 2019, 1:02 p.m. OK MS C++ 2017 TESTS 21 530 1228800 2300
66815390 vjudge4 A Dec. 14, 2019, 5:26 a.m. OK MS C++ 2017 TESTS 21 560 1228800 2300
66815294 vjudge1 A Dec. 14, 2019, 5:23 a.m. OK MS C++ 2017 TESTS 21 590 1228800 2300

remove filters

Back to search problems