Codeforces Round 161 (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
263 Codeforces Round 161 (Div. 2) FINISHED False 7200 373472999 Jan. 16, 2013, 3:30 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 8949 ) B Squares PROGRAMMING greedy implementation sortings 1000

B'Vasya has found a piece of paper with a coordinate system written on it. There are n distinct squares drawn in this coordinate system. Let 's number the squares with integers from 1 to n. It turned out that points with coordinates (0, xe2 x80 x890) and (ai, xe2 x80 x89ai) are the opposite corners of the i-th square. Vasya wants to find such integer point (with integer coordinates) of the plane, that belongs to exactly k drawn squares. We 'll say that a point belongs to a square, if the point is located either inside the square, or on its boundary. Help Vasya find a point that would meet the described limits. The first line contains two space-separated integers n, k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8950). The second line contains space-separated integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). It is guaranteed that all given squares are distinct. In a single line print two space-separated integers x and y (0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x, xe2 x80 x89y xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- the coordinates of the point that belongs to exactly k squares. If there are multiple answers, you are allowed to print any of them. If there is no answer, print "-1" (without the quotes).'...

Tutorials

Codeforces Round #161 Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
36065184 Narden B March 8, 2018, 8:51 a.m. OK FPC TESTS 45 30 1638400 1000
36123897 NadimM B March 9, 2018, 4:38 p.m. OK GNU C++ TESTS 45 30 2048000 1000
36075259 vjudge3 B March 8, 2018, 3:12 p.m. OK GNU C++ TESTS 45 30 2048000 1000
36044289 vjudge5 B March 7, 2018, 12:38 p.m. OK GNU C++ TESTS 45 30 2048000 1000
35453423 Darth_YARIK_WEIDER B Feb. 18, 2018, 5:51 p.m. OK GNU C++ TESTS 45 30 2048000 1000
36086257 vjudge1 B March 9, 2018, 3:53 a.m. OK GNU C++ TESTS 45 30 2867200 1000
41578504 vjudge3 B Aug. 14, 2018, 6:41 a.m. OK GNU C++ TESTS 45 60 0 1000
38450543 vjudge5 B May 20, 2018, 7:15 a.m. OK GNU C++ TESTS 45 60 0 1000
39944699 vjudge5 B July 4, 2018, 6:47 a.m. OK GNU C++ TESTS 45 60 307200 1000
39460523 vjudge5 B June 21, 2018, 11:39 a.m. OK GNU C++ TESTS 45 60 307200 1000
38263770 Scut82 B May 15, 2018, 10:10 a.m. OK GNU C++ TESTS 45 60 3481600 1000
50150336 Kurogami B Feb. 19, 2019, 7:04 a.m. OK GNU C11 TESTS 45 60 0 1000
62701181 Pulkit-Mishra B Oct. 16, 2019, 3:07 p.m. OK GNU C11 TESTS 45 60 0 1000
64077787 DevJewel B Nov. 2, 2019, 9:15 a.m. OK GNU C11 TESTS 45 62 0 1000
57854412 You_Know_Who B July 27, 2019, 2:27 p.m. OK GNU C11 TESTS 45 62 0 1000
57854392 You_Know_Who B July 27, 2019, 2:26 p.m. OK GNU C11 TESTS 45 62 0 1000
57854363 You_Know_Who B July 27, 2019, 2:26 p.m. OK GNU C11 TESTS 45 62 0 1000
55941063 kaiboy B June 22, 2019, 4:40 p.m. OK GNU C11 TESTS 45 62 0 1000
55667580 vjudge1 B June 17, 2019, 5:20 a.m. OK GNU C11 TESTS 45 62 0 1000
53833367 Alexandr_Masniy B May 6, 2019, 10:59 p.m. OK GNU C11 TESTS 45 62 0 1000
53270951 Aa23 B April 25, 2019, 6:13 a.m. OK GNU C11 TESTS 45 62 0 1000
39586034 ahmedelhemaly1997 B June 24, 2018, 1:36 a.m. OK GNU C++11 TESTS 45 30 0 1000
35789877 hopeAconce B Feb. 28, 2018, 3:42 p.m. OK GNU C++11 TESTS 45 30 2048000 1000
36044332 rajunahidhasan0 B March 7, 2018, 12:39 p.m. OK GNU C++11 TESTS 45 30 2150400 1000
44688748 Parmis_sadeghi B Oct. 22, 2018, 11:02 a.m. OK GNU C++11 TESTS 45 60 0 1000
44759750 SAIF_IIT-JU B Oct. 24, 2018, 6:20 a.m. OK GNU C++11 TESTS 45 60 0 1000
47705999 vikhyat_kumeria B Dec. 29, 2018, 8:22 p.m. OK GNU C++11 TESTS 45 60 0 1000
49696506 fadlia68 B Feb. 10, 2019, 2 p.m. OK GNU C++11 TESTS 45 60 0 1000
48534552 luogu_bot5 B Jan. 18, 2019, 1:37 p.m. OK GNU C++11 TESTS 45 60 0 1000
51925709 vjudge5 B March 28, 2019, 7:32 a.m. OK GNU C++11 TESTS 45 60 0 1000
41661700 _PCoder B Aug. 16, 2018, 6:34 p.m. OK GNU C++11 TESTS 45 60 0 1000
54499122 agtxdy_orz B May 22, 2019, 7:30 p.m. OK GNU C++14 TESTS 45 30 0 1000
50207007 awaracoder B Feb. 19, 2019, 7:51 p.m. OK GNU C++14 TESTS 45 30 0 1000
42464019 killg B Sept. 4, 2018, 2:57 p.m. OK GNU C++14 TESTS 45 30 0 1000
39814798 yvasant B July 1, 2018, 7:31 a.m. OK GNU C++14 TESTS 45 30 0 1000
39646555 klimencuks B June 25, 2018, 10:35 a.m. OK GNU C++14 TESTS 45 30 0 1000
38442722 redcpp B May 19, 2018, 9:13 p.m. OK GNU C++14 TESTS 45 30 307200 1000
35466693 L_user B Feb. 19, 2018, 9:51 a.m. OK GNU C++14 TESTS 45 30 1945600 1000
37897026 rav.gupta B May 5, 2018, 6:03 a.m. OK GNU C++14 TESTS 45 30 3379200 1000
37005370 himanshu8mishra B April 5, 2018, 6:28 p.m. OK GNU C++14 TESTS 45 30 3379200 1000
36501029 kumarsushil B March 22, 2018, 12:11 p.m. OK GNU C++14 TESTS 45 30 3379200 1000
42780443 gsr007 B Sept. 11, 2018, 8:44 p.m. OK GNU C++17 TESTS 45 30 0 1000
41540578 blazeva1 B Aug. 12, 2018, 10:30 p.m. OK GNU C++17 TESTS 45 30 0 1000
45123722 KobeDuu_ B Oct. 31, 2018, 6:43 a.m. OK GNU C++17 TESTS 45 30 0 1000
46262989 ivan.v.gerasimov B Nov. 26, 2018, 9:56 p.m. OK GNU C++17 TESTS 45 30 0 1000
61187020 OrlandoIsay B Sept. 23, 2019, 11:44 p.m. OK GNU C++17 TESTS 45 30 0 1000
66579341 Salmakishk B Dec. 10, 2019, 8:40 a.m. OK GNU C++17 TESTS 45 30 0 1000
69054309 embiway B Jan. 18, 2020, 1:52 p.m. OK GNU C++17 TESTS 45 30 0 1000
48283517 afyuda6 B Jan. 12, 2019, 9:05 a.m. OK GNU C++17 TESTS 45 30 204800 1000
37545230 Mohamed38 B April 23, 2018, 6:37 a.m. OK GNU C++17 TESTS 45 30 3686400 1000
37836433 De_Lord B May 2, 2018, 10:25 a.m. OK GNU C++17 TESTS 45 30 4198400 1000
60074169 edsomjr B Sept. 5, 2019, 12:05 p.m. OK Haskell TESTS 45 92 102400 1000
52917408 jedikni B April 17, 2019, 4:24 p.m. OK Haskell TESTS 45 92 102400 1000
68886160 ndaidemf B Jan. 15, 2020, 9:35 p.m. OK Java 11 TESTS 45 436 0 1000
68779272 manan_0104 B Jan. 14, 2020, 2:27 p.m. OK Java 8 TESTS 45 218 0 1000
61437067 formalist B Sept. 28, 2019, 5:05 p.m. OK Java 8 TESTS 45 218 0 1000
45396942 I.A.K.O.V B Nov. 7, 2018, 5:31 a.m. OK Java 8 TESTS 45 218 0 1000
61468922 sunnym0rning B Sept. 29, 2019, 11:32 a.m. OK Java 8 TESTS 45 218 0 1000
55938371 Bashar. B June 22, 2019, 3:09 p.m. OK Java 8 TESTS 45 248 0 1000
58968996 lansergecs B Aug. 17, 2019, 7:15 p.m. OK Java 8 TESTS 45 248 0 1000
55495585 Ikari_stream B June 12, 2019, 12:23 p.m. OK Java 8 TESTS 45 248 0 1000
51903328 bencebosko B March 27, 2019, 2:21 p.m. OK Java 8 TESTS 45 248 0 1000
51196213 abhi.raj21jan B March 11, 2019, 7:18 p.m. OK Java 8 TESTS 45 248 0 1000
49350633 CharlesDai B Feb. 2, 2019, 8:17 a.m. OK Java 8 TESTS 45 248 0 1000
41268139 Photon_ B Aug. 6, 2018, 8:25 a.m. OK JavaScript TESTS 45 62 1331200 1000
64461854 vjudge4 B Nov. 7, 2019, 10:39 a.m. OK Kotlin TESTS 45 312 204800 1000
50888878 nemars B March 6, 2019, 12:26 p.m. OK Mono C# TESTS 45 124 3584000 1000
47321886 vjudge4 B Dec. 21, 2018, 8:15 a.m. OK MS C++ TESTS 45 60 0 1000
50202843 vjudge1 B Feb. 19, 2019, 5:54 p.m. OK MS C++ TESTS 45 60 0 1000
36420838 Schullz B March 19, 2018, 9:06 p.m. OK MS C++ TESTS 45 60 3481600 1000
36408941 I_love_sad_crying_cats B March 19, 2018, 11:33 a.m. OK MS C++ TESTS 45 60 3481600 1000
66607181 Yousef_Belal B Dec. 10, 2019, 7:07 p.m. OK MS C++ TESTS 45 62 0 1000
59218564 vjudge2 B Aug. 21, 2019, 11:20 a.m. OK MS C++ TESTS 45 62 0 1000
56999074 vjudge3 B July 14, 2019, 2:06 a.m. OK MS C++ TESTS 45 62 0 1000
50870342 Whirligig B March 6, 2019, 12:48 a.m. OK MS C++ TESTS 45 62 0 1000
50260252 vjudge2 B Feb. 20, 2019, 11:32 p.m. OK MS C++ TESTS 45 62 0 1000
66607207 vjudge3 B Dec. 10, 2019, 7:07 p.m. OK MS C++ TESTS 45 62 0 1000
61030624 HishamDroubi B Sept. 21, 2019, 5:34 p.m. OK MS C++ 2017 TESTS 45 62 0 1000
61034030 a7madsam B Sept. 21, 2019, 6:54 p.m. OK MS C++ 2017 TESTS 45 62 0 1000
59710242 Moen1578 B Aug. 30, 2019, 2:22 p.m. OK MS C++ 2017 TESTS 45 62 0 1000
54999709 wjli B June 3, 2019, 3:31 a.m. OK MS C++ 2017 TESTS 45 62 0 1000
54091783 JuicyCloud12609 B May 14, 2019, 11:11 a.m. OK MS C++ 2017 TESTS 45 62 0 1000
50228459 asdcfvghn B Feb. 20, 2019, 8:05 a.m. OK MS C++ 2017 TESTS 45 62 0 1000
64496703 vjudge4 B Nov. 8, 2019, 12:32 a.m. OK MS C++ 2017 TESTS 45 62 307200 1000
56545890 Gimber B July 5, 2019, 7:37 a.m. OK PascalABC.NET TESTS 45 374 0 1000
53096119 VLA_DA_DA B April 21, 2019, 1:37 p.m. OK PascalABC.NET TESTS 45 622 0 1000
59703741 sajjad_firouze B Aug. 30, 2019, 11:47 a.m. OK PyPy 3 TESTS 45 248 0 1000
47297110 vjudge5 B Dec. 20, 2018, 12:30 p.m. OK PyPy 3 TESTS 45 248 0 1000
45256954 vjudge1 B Nov. 3, 2018, 8:31 p.m. OK PyPy 3 TESTS 45 248 0 1000
45252244 vjudge1 B Nov. 3, 2018, 5:18 p.m. OK PyPy 3 TESTS 45 248 0 1000
53965918 MEJlAHXOJluK B May 10, 2019, 4:59 p.m. OK PyPy 3 TESTS 45 278 0 1000
59811558 iamssk B Aug. 31, 2019, 1:47 p.m. OK PyPy 3 TESTS 45 278 0 1000
47297305 vjudge3 B Dec. 20, 2018, 12:36 p.m. OK PyPy 3 TESTS 45 278 0 1000
62587723 galim665 B Oct. 14, 2019, 7:33 p.m. OK PyPy 3 TESTS 45 280 0 1000
61673925 WA-----Me-----AC B Oct. 1, 2019, 7:43 p.m. OK PyPy 3 TESTS 45 280 0 1000
59704382 essi B Aug. 30, 2019, 12:02 p.m. OK PyPy 3 TESTS 45 280 0 1000
36248514 daniboyrc B March 13, 2018, 12:39 p.m. OK Python 2 TESTS 45 124 4608000 1000
35723766 Liana41 B Feb. 26, 2018, 7:52 a.m. OK Python 2 TESTS 45 124 4608000 1000
50408902 vjudge4 B Feb. 23, 2019, 11:49 p.m. OK Python 2 TESTS 45 342 0 1000
47021899 franckmy B Dec. 15, 2018, 3:21 a.m. OK Python 2 TESTS 45 342 0 1000
38980249 __Melodies B June 5, 2018, 11:01 p.m. OK Python 3 TESTS 45 156 0 1000
37041475 Paixao B April 7, 2018, 7:22 a.m. OK Python 3 TESTS 45 186 7065600 1000
37040327 Evil__Coder B April 7, 2018, 6:46 a.m. OK Python 3 TESTS 45 186 7065600 1000
37038935 yash918 B April 7, 2018, 5:58 a.m. OK Python 3 TESTS 45 186 7065600 1000
55386594 yerzh B June 10, 2019, 7:35 a.m. OK Python 3 TESTS 45 216 0 1000
40576299 saazaad000 B July 20, 2018, 11:28 a.m. OK Python 3 TESTS 45 216 0 1000
40576242 saa081600 B July 20, 2018, 11:27 a.m. OK Python 3 TESTS 45 216 0 1000
37041404 Bamal B April 7, 2018, 7:20 a.m. OK Python 3 TESTS 45 216 7065600 1000
67588217 r57shell B Dec. 25, 2019, 9:05 a.m. OK Python 3 TESTS 45 218 0 1000
64530086 exception420 B Nov. 8, 2019, 3:07 p.m. OK Python 3 TESTS 45 218 0 1000
35855946 ______u______ B March 2, 2018, 8:11 p.m. OK Ruby TESTS 45 124 6451200 1000
35855889 ______n______ B March 2, 2018, 8:09 p.m. OK Ruby TESTS 45 124 6451200 1000
35855423 _____i_____ B March 2, 2018, 8:01 p.m. OK Ruby TESTS 45 124 6451200 1000
35855389 _____k_____ B March 2, 2018, 8 p.m. OK Ruby TESTS 45 124 6451200 1000
35844276 ______h______ B March 2, 2018, 3:27 p.m. OK Ruby TESTS 45 124 6451200 1000
35844140 ______k______ B March 2, 2018, 3:24 p.m. OK Ruby TESTS 45 124 6451200 1000
35843848 ______i______ B March 2, 2018, 3:19 p.m. OK Ruby TESTS 45 124 6451200 1000
35841636 ______M______ B March 2, 2018, 2:38 p.m. OK Ruby TESTS 45 124 6451200 1000

remove filters

Back to search problems