Educational Codeforces Round 50 (Rated for 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
1036 Educational Codeforces Round 50 (Rated for Div. 2) FINISHED False 7200 201194724 Sept. 7, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 5737 ) B Diagonal Walking v.2 PROGRAMMING math 1600

B"Mikhail walks on a Cartesian plane. He starts at the point (0, 0) , and in one move he can go to any of eight adjacent points. For example, if Mikhail is currently at the point (0, 0) , he can go to any of the following points in one move: If Mikhail goes from the point (x1, y1) to the point (x2, y2) in one move, and x1 ne x2 and y1 ne y2 , then such a move is called a diagonal move. Mikhail has q queries. For the i -th query Mikhail's target is to go to the point (n_i, m_i) from the point (0, 0) in exactly k_i moves. Among all possible movements he want to choose one with the maximum number of diagonal moves. Your task is to find the maximum number of diagonal moves or find that it is impossible to go from the point (0, 0) to the point (n_i, m_i) in k_i moves. Note that Mikhail can visit any point any number of times (even the destination point!). The first line of the input contains one integer q ( 1 <= q <= 10^4 ) -- the number of queries. Then q lines follow. The i -th of these q lines contains three integers n_i , m_i and k_i ( 1 <= n_i, m_i, k_i <= 10^{18} ) -- x -coordinate of the destination point of the query, y -coordinate of the destination point of the query and the number of moves in the query, correspondingly. Print q integers. The i -th integer should be equal to -1 if Mikhail cannot go from the point (0, 0) to the point (n_i, m_i) in exactly k_i moves described above. Otherwise the i -th integer should be equal to the the maximum number of diagonal moves among all possible movements. One of the possible answers to the first test case: (0, 0) to (1, 0) to (1, 1) to (2, 2) . One of the possible answers to the second test case: (0, 0) to (0, 1) to (1, 2) to (0, 3) to (1, 4) to (2, 3) to (3, 2) to (4, 3) . In the third test case Mikhail cannot rea"...

Tutorials

61727

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
49691216 L.Sunitha B Feb. 10, 2019, 11:20 a.m. OK Clang++17 Diagnostics TESTS 7 265 0 1600
42695086 freeraisor B Sept. 9, 2018, 6:28 a.m. OK Clang++17 Diagnostics TESTS 7 467 0 1600
42855261 Konfetka B Sept. 14, 2018, 8:56 a.m. OK Clang++17 Diagnostics TESTS 7 483 0 1600
42660369 ruban B Sept. 8, 2018, 3:37 a.m. OK Delphi TESTS 7 78 64921600 1600
43498334 TShT B Sept. 27, 2018, 3:51 p.m. OK FPC TESTS 7 46 0 1600
45350405 vjudge3 B Nov. 6, 2018, 7:11 a.m. OK FPC TESTS 7 46 0 1600
42744022 darkus-_- B Sept. 10, 2018, 5:58 p.m. OK FPC TESTS 7 46 0 1600
42637775 MinhNguye B Sept. 7, 2018, 4:01 p.m. OK FPC TESTS 7 61 0 1600
42673957 Bear.-. B Sept. 8, 2018, 12:35 p.m. OK FPC TESTS 7 62 0 1600
56775688 bin9638 B July 10, 2019, 2:29 a.m. OK FPC TESTS 7 62 102400 1600
49460031 PhuongPeu B Feb. 4, 2019, 12:30 p.m. OK FPC TESTS 7 62 102400 1600
42641500 hua_xzx B Sept. 7, 2018, 4:17 p.m. OK FPC TESTS 7 77 0 1600
50202657 rainboy B Feb. 19, 2019, 5:50 p.m. OK GNU C11 TESTS 7 46 0 1600
48699907 yueshaoqiang B Jan. 22, 2019, 2:01 a.m. OK GNU C11 TESTS 7 61 0 1600
48706577 2018329600073 B Jan. 22, 2019, 6:13 a.m. OK GNU C11 TESTS 7 61 0 1600
48700329 Pangzhe B Jan. 22, 2019, 2:15 a.m. OK GNU C11 TESTS 7 62 0 1600
48701281 yizhishuaizhuzhu B Jan. 22, 2019, 2:52 a.m. OK GNU C11 TESTS 7 62 0 1600
48701300 duzheting B Jan. 22, 2019, 2:53 a.m. OK GNU C11 TESTS 7 62 0 1600
48704555 yechen123 B Jan. 22, 2019, 5:14 a.m. OK GNU C11 TESTS 7 62 0 1600
48707707 2018329621205 B Jan. 22, 2019, 6:49 a.m. OK GNU C11 TESTS 7 62 0 1600
48733219 Alisa_0228 B Jan. 22, 2019, 2:54 p.m. OK GNU C11 TESTS 7 62 0 1600
48699962 nijiazhou B Jan. 22, 2019, 2:03 a.m. OK GNU C11 TESTS 7 62 0 1600
44771013 vjudge3 B Oct. 24, 2018, 12:23 p.m. OK GNU C++11 TESTS 7 15 0 1600
45696696 khoadcmnd2005 B Nov. 14, 2018, 4:18 a.m. OK GNU C++11 TESTS 7 15 0 1600
50273564 mrdushe B Feb. 21, 2019, 8:41 a.m. OK GNU C++11 TESTS 7 15 0 1600
54440419 kisa7 B May 21, 2019, 8:19 a.m. OK GNU C++11 TESTS 7 15 0 1600
58105289 Tiana B Aug. 1, 2019, 3:49 a.m. OK GNU C++11 TESTS 7 15 0 1600
49923516 Rockett B Feb. 14, 2019, 8:30 p.m. OK GNU C++11 TESTS 7 30 0 1600
52596055 Scut82 B April 11, 2019, 9:05 a.m. OK GNU C++11 TESTS 7 30 0 1600
52596063 Scut82 B April 11, 2019, 9:05 a.m. OK GNU C++11 TESTS 7 30 0 1600
52728982 Scut82 B April 14, 2019, 2:46 a.m. OK GNU C++11 TESTS 7 30 0 1600
63958713 luogu_bot2 B Nov. 1, 2019, 3:47 a.m. OK GNU C++11 TESTS 7 30 0 1600
42659798 nbdyn B Sept. 8, 2018, 3:04 a.m. OK GNU C++14 TESTS 7 15 0 1600
50075000 abgupta531 B Feb. 17, 2019, 8:27 p.m. OK GNU C++14 TESTS 7 30 0 1600
62968145 Mynesis B Oct. 20, 2019, 5:46 a.m. OK GNU C++14 TESTS 7 30 0 1600
62352181 You_Know_Who B Oct. 11, 2019, 9:42 a.m. OK GNU C++14 TESTS 7 30 0 1600
52522899 Origenes B April 9, 2019, 9:50 a.m. OK GNU C++14 TESTS 7 30 0 1600
48783408 Lyrix B Jan. 23, 2019, 7:48 a.m. OK GNU C++14 TESTS 7 30 0 1600
48701690 destiny_ B Jan. 22, 2019, 3:08 a.m. OK GNU C++14 TESTS 7 30 0 1600
48699870 ArcherYH B Jan. 22, 2019, 1:59 a.m. OK GNU C++14 TESTS 7 30 0 1600
48699259 hym_little_cute B Jan. 22, 2019, 1:38 a.m. OK GNU C++14 TESTS 7 30 0 1600
48698565 zstu2018329621262 B Jan. 22, 2019, 1:11 a.m. OK GNU C++14 TESTS 7 30 0 1600
48701325 2018329621146 B Jan. 22, 2019, 2:54 a.m. OK GNU C++17 TESTS 7 15 0 1600
44491203 GeorgeJia B Oct. 18, 2018, 2:32 p.m. OK GNU C++17 TESTS 7 30 0 1600
46566158 le9018468 B Dec. 3, 2018, 11:42 p.m. OK GNU C++17 TESTS 7 30 0 1600
47799279 dtl8 B Dec. 31, 2018, 8:15 p.m. OK GNU C++17 TESTS 7 30 0 1600
50925226 xyw5vplus1 B March 7, 2019, 11:31 a.m. OK GNU C++17 TESTS 7 30 0 1600
57324878 ILgeRiT B July 19, 2019, 11:42 a.m. OK GNU C++17 TESTS 7 30 0 1600
62442914 vjudge1 B Oct. 12, 2019, 8:27 p.m. OK GNU C++17 TESTS 7 30 0 1600
68628903 lucasturci B Jan. 12, 2020, 1:17 a.m. OK GNU C++17 TESTS 7 30 0 1600
69573680 Imagination01 B Jan. 26, 2020, 2:52 p.m. OK GNU C++17 TESTS 7 30 0 1600
42861608 Lancern B Sept. 14, 2018, 1:11 p.m. OK GNU C++17 TESTS 7 30 0 1600
42677326 cacophonix B Sept. 8, 2018, 2:25 p.m. OK Go TESTS 7 62 1126400 1600
43698847 Shadow377 B Oct. 2, 2018, 5:38 p.m. OK Go TESTS 7 78 0 1600
44251265 peter_jerry_ye B Oct. 13, 2018, 10:37 a.m. OK Haskell TESTS 7 156 8499200 1600
65935409 bluesky111 B Nov. 29, 2019, 1:28 a.m. OK Java 8 TESTS 7 124 0 1600
55826918 maheshwari29 B June 20, 2019, 11:20 a.m. OK Java 8 TESTS 7 124 0 1600
52823913 MubtasimShahriar B April 16, 2019, 1:01 p.m. OK Java 8 TESTS 7 124 0 1600
50203376 Dukkha B Feb. 19, 2019, 6:06 p.m. OK Java 8 TESTS 7 124 0 1600
46772715 prituladima B Dec. 8, 2018, 5:58 p.m. OK Java 8 TESTS 7 124 0 1600
46522534 aTan B Dec. 2, 2018, 6:37 p.m. OK Java 8 TESTS 7 124 0 1600
42700951 Aniket144 B Sept. 9, 2018, 10:29 a.m. OK Java 8 TESTS 7 124 0 1600
42692783 SrapZark B Sept. 9, 2018, 3:44 a.m. OK Java 8 TESTS 7 124 0 1600
42674469 AQT B Sept. 8, 2018, 12:50 p.m. OK Java 8 TESTS 7 124 0 1600
42654736 ShowStopper728 B Sept. 7, 2018, 9 p.m. OK Java 8 TESTS 7 124 0 1600
42655380 wleung_bvg B Sept. 7, 2018, 9:35 p.m. OK Kotlin TESTS 7 124 0 1600
59396897 vjudge3 B Aug. 24, 2019, 10:40 a.m. OK Kotlin TESTS 7 202 0 1600
59396562 vjudge4 B Aug. 24, 2019, 10:33 a.m. OK Kotlin TESTS 7 218 0 1600
59137173 vjudge4 B Aug. 20, 2019, 1:05 p.m. OK Kotlin TESTS 7 265 0 1600
55930322 og.kostya B June 22, 2019, 11:09 a.m. OK Mono C# TESTS 7 46 512000 1600
42732185 fr0st B Sept. 10, 2018, 12:09 p.m. OK Mono C# TESTS 7 61 38297600 1600
42644071 levitg B Sept. 7, 2018, 4:29 p.m. OK Mono C# TESTS 7 62 4608000 1600
42638494 kuuso B Sept. 7, 2018, 4:04 p.m. OK Mono C# TESTS 7 62 5734400 1600
42676580 leign B Sept. 8, 2018, 1:59 p.m. OK Mono C# TESTS 7 77 3584000 1600
42641153 omikad B Sept. 7, 2018, 4:16 p.m. OK Mono C# TESTS 7 109 6656000 1600
43107845 eki B Sept. 20, 2018, 9:51 a.m. OK Mono C# TESTS 7 124 3072000 1600
42867959 TrinidadTobago B Sept. 14, 2018, 4:54 p.m. OK Mono C# TESTS 7 124 3072000 1600
42636519 mp913 B Sept. 7, 2018, 3:55 p.m. OK Mono C# TESTS 7 124 3174400 1600
50212704 Mandrade B Feb. 20, 2019, 1:42 a.m. OK Mono C# TESTS 7 124 6758400 1600
48486524 vjudge3 B Jan. 17, 2019, 8:38 a.m. OK MS C++ TESTS 7 15 0 1600
48485182 vjudge1 B Jan. 17, 2019, 8:04 a.m. OK MS C++ TESTS 7 15 0 1600
42691951 lxn B Sept. 9, 2018, 2:37 a.m. OK MS C++ TESTS 7 15 102400 1600
42828481 vjudge3 B Sept. 13, 2018, 11:45 a.m. OK MS C++ TESTS 7 30 0 1600
44949558 vjudge5 B Oct. 27, 2018, 11:26 a.m. OK MS C++ TESTS 7 30 0 1600
46678961 vjudge3 B Dec. 6, 2018, 11:13 a.m. OK MS C++ TESTS 7 30 0 1600
46682524 vjudge4 B Dec. 6, 2018, 12:41 p.m. OK MS C++ TESTS 7 30 0 1600
48699384 kaguya_tsuki B Jan. 22, 2019, 1:42 a.m. OK MS C++ TESTS 7 30 0 1600
42693834 whitestone B Sept. 9, 2018, 5:06 a.m. OK MS C++ TESTS 7 30 0 1600
42767088 vjudge2 B Sept. 11, 2018, 1:41 p.m. OK MS C++ TESTS 7 30 307200 1600
52945306 hwangganzi B April 18, 2019, 11:17 a.m. OK MS C++ 2017 TESTS 7 31 0 1600
51430300 petko_mitkov B March 17, 2019, 11:08 p.m. OK MS C++ 2017 TESTS 7 31 0 1600
67473278 vjudge3 B Dec. 23, 2019, 1:30 p.m. OK MS C++ 2017 TESTS 7 31 0 1600
67691907 vjudge1 B Dec. 27, 2019, 11:29 a.m. OK MS C++ 2017 TESTS 7 31 0 1600
53462145 yp0417180230 B April 28, 2019, 7:54 a.m. OK MS C++ 2017 TESTS 7 46 102400 1600
69069214 tareksamy B Jan. 18, 2020, 8:24 p.m. OK MS C++ 2017 TESTS 7 61 4812800 1600
69665688 Mad112233 B Jan. 28, 2020, 11:14 a.m. OK MS C++ 2017 TESTS 7 92 0 1600
42792472 SoulXrundel B Sept. 12, 2018, 9:28 a.m. OK PascalABC.NET TESTS 7 187 3072000 1600
42791686 Zhamada_ B Sept. 12, 2018, 8:57 a.m. OK PascalABC.NET TESTS 7 187 3174400 1600
44548713 YESMAths B Oct. 19, 2018, 2:29 p.m. OK PyPy 2 TESTS 7 155 4300800 1600
42869184 nealzane B Sept. 14, 2018, 5:43 p.m. OK PyPy 2 TESTS 7 374 6144000 1600
42955602 soumyasarkar1998 B Sept. 16, 2018, 4:09 p.m. OK PyPy 2 TESTS 7 404 5836800 1600
42641779 aaravzen B Sept. 7, 2018, 4:19 p.m. OK PyPy 2 TESTS 7 421 6451200 1600
42636441 pavankatta B Sept. 7, 2018, 3:54 p.m. OK PyPy 2 TESTS 7 436 8499200 1600
45892570 __M.J__ B Nov. 17, 2018, 7:34 p.m. OK PyPy 3 TESTS 7 389 8396800 1600
43664110 DedMartyn B Oct. 1, 2018, 8:49 p.m. OK PyPy 3 TESTS 7 389 9011200 1600
50555302 ygape1s B Feb. 27, 2019, 7:35 a.m. OK PyPy 3 TESTS 7 390 8499200 1600
56534724 111vad111 B July 4, 2019, 11:06 p.m. OK PyPy 3 TESTS 7 390 9728000 1600
60711381 alexara1123 B Sept. 17, 2019, 8:31 a.m. OK PyPy 3 TESTS 7 436 9625600 1600
43271022 LordVader B Sept. 22, 2018, 6:55 p.m. OK PyPy 3 TESTS 7 452 7884800 1600
42658220 MaxWong B Sept. 8, 2018, 1:22 a.m. OK PyPy 3 TESTS 7 452 8294400 1600
42645045 cpicard443 B Sept. 7, 2018, 4:33 p.m. OK PyPy 3 TESTS 7 452 8601600 1600
43065650 kgcurry59 B Sept. 19, 2018, 5:12 a.m. OK PyPy 3 TESTS 7 483 8192000 1600
42764653 yanyikai B Sept. 11, 2018, 12:38 p.m. OK PyPy 3 TESTS 7 483 8294400 1600
46293740 EoinDavey B Nov. 27, 2018, 10:34 p.m. OK Python 2 TESTS 7 202 0 1600
42788021 dantevergil B Sept. 12, 2018, 6:12 a.m. OK Python 2 TESTS 7 202 0 1600
42637200 aman_shahi2 B Sept. 7, 2018, 3:58 p.m. OK Python 2 TESTS 7 217 0 1600
42710525 ruchit2801 B Sept. 9, 2018, 3:51 p.m. OK Python 2 TESTS 7 217 102400 1600
42675090 Ex0d1a B Sept. 8, 2018, 1:10 p.m. OK Python 2 TESTS 7 217 102400 1600
42873317 Temirulan B Sept. 14, 2018, 8:48 p.m. OK Python 2 TESTS 7 217 204800 1600
42635984 wanderer163 B Sept. 7, 2018, 3:52 p.m. OK Python 2 TESTS 7 218 0 1600
42665460 Djok216 B Sept. 8, 2018, 7:28 a.m. OK Python 2 TESTS 7 233 102400 1600
42648442 wangkan2001 B Sept. 7, 2018, 5:17 p.m. OK Python 2 TESTS 7 233 102400 1600
42637119 figdan B Sept. 7, 2018, 3:58 p.m. OK Python 2 TESTS 7 234 0 1600
48267856 Praxis B Jan. 11, 2019, 9:47 p.m. OK Python 3 TESTS 7 155 716800 1600
42694187 PiscesDream B Sept. 9, 2018, 5:30 a.m. OK Python 3 TESTS 7 186 409600 1600
42640123 garvit_mohata B Sept. 7, 2018, 4:11 p.m. OK Python 3 TESTS 7 186 1126400 1600
46046975 Firepaw B Nov. 22, 2018, 3:22 a.m. OK Python 3 TESTS 7 187 0 1600
43698071 spikh B Oct. 2, 2018, 5:18 p.m. OK Python 3 TESTS 7 187 409600 1600
44040197 houssem_tun01 B Oct. 9, 2018, 2:25 p.m. OK Python 3 TESTS 7 187 1126400 1600
43697651 spikh B Oct. 2, 2018, 5:08 p.m. OK Python 3 TESTS 7 187 1331200 1600
55096615 LintuStorm B June 4, 2019, 5:31 p.m. OK Python 3 TESTS 7 202 0 1600
52019445 ashok123 B March 30, 2019, 11:59 a.m. OK Python 3 TESTS 7 202 0 1600
51593301 UTMoonlight B March 20, 2019, 7:58 p.m. OK Python 3 TESTS 7 202 0 1600
42784378 niquefa_diego B Sept. 12, 2018, 2:18 a.m. OK Ruby TESTS 7 171 204800 1600
42646028 vain0 B Sept. 7, 2018, 4:40 p.m. OK Rust TESTS 7 93 0 1600
42647871 clrcldy B Sept. 7, 2018, 5:06 p.m. OK Rust TESTS 7 108 1536000 1600
47362101 yakamoto B Dec. 22, 2018, 9:18 a.m. OK Scala TESTS 7 389 0 1600

remove filters

Back to search problems