Codeforces Round 379 (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
734 Codeforces Round 379 (Div. 2) FINISHED False 7200 252595499 Nov. 15, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3741 ) D Anton and Chess PROGRAMMING implementation 1700

B'Anton likes to play chess. Also, he likes to do programming. That is why he decided to write the program that plays chess. However, he finds the game on 8 to 8 board to too simple, he uses an infinite one instead. The first task he faced is to check whether the king is in check. Anton doesn 't know how to implement this so he asks you to help. Consider that an infinite chess board contains one white king and the number of black pieces. There are only rooks, bishops and queens, as the other pieces are not supported yet. The white king is said to be in check if at least one black piece can reach the cell with the king in one move. Help Anton and write the program that for the given position determines whether the white king is in check. Remainder, on how do chess pieces move: The first line of the input contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89500 xe2 x80 x89000) -- the number of black pieces. The second line contains two integers x0 and y0 ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x0, xe2 x80 x89y0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- coordinates of the white king. Then follow n lines, each of them contains a character and two integers xi and yi ( xe2 x80 x89- xe2 x80 x89109 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89xi, xe2 x80 x89yi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109) -- type of the i-th piece and its position. Character 'B ' stands for the bishop, 'R ' for the rook and 'Q ' for the queen. It 's guaranteed that no two pieces occupy the same position. The only line of the output should contains "YES" (without quotes) if the white king is in check and "NO" (without quotes) otherwise. Picture for the first sample: Picture for the second sample: '...

Tutorials

Tutorial of Codeforces Round #379 (Div. 2)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
36760690 Mohamed38 D March 30, 2018, 11:56 p.m. OK GNU C TESTS 64 280 3276800 1700
34610482 vjudge1 D Jan. 27, 2018, 3:47 p.m. OK GNU C++ TESTS 64 187 2048000 1700
41884367 linners D Aug. 20, 2018, 2:43 a.m. OK GNU C++ TESTS 64 218 0 1700
34603274 vjudge5 D Jan. 27, 2018, 11:10 a.m. OK GNU C++ TESTS 64 218 2048000 1700
34434406 vjudge2 D Jan. 22, 2018, 6:14 a.m. OK GNU C++ TESTS 64 218 2048000 1700
34622434 vjudge3 D Jan. 28, 2018, 3:27 a.m. OK GNU C++ TESTS 64 233 2048000 1700
34620808 vjudge3 D Jan. 28, 2018, 1:34 a.m. OK GNU C++ TESTS 64 233 2048000 1700
41955719 BEllent D Aug. 22, 2018, 6:22 a.m. OK GNU C++ TESTS 64 234 0 1700
38569792 bojverdict1 D May 23, 2018, 6:17 p.m. OK GNU C++ TESTS 64 234 0 1700
36202665 vjudge1 D March 11, 2018, 2:19 p.m. OK GNU C++ TESTS 64 234 2048000 1700
34622389 vjudge4 D Jan. 28, 2018, 3:24 a.m. OK GNU C++ TESTS 64 234 2048000 1700
40983176 ReaLNero1 D July 30, 2018, 6:45 p.m. OK GNU C++11 TESTS 64 93 6041600 1700
59508420 luogu_bot4 D Aug. 26, 2019, 7:03 a.m. OK GNU C++11 TESTS 64 171 6041600 1700
58798589 MLCCqaq__ D Aug. 14, 2019, 6:44 a.m. OK GNU C++11 TESTS 64 202 0 1700
58472050 bojverdict2 D Aug. 9, 2019, 1:06 a.m. OK GNU C++11 TESTS 64 202 0 1700
58472025 luogu_bot1 D Aug. 9, 2019, 1:05 a.m. OK GNU C++11 TESTS 64 202 0 1700
58471771 bojverdict2 D Aug. 9, 2019, 12:55 a.m. OK GNU C++11 TESTS 64 202 0 1700
58385243 luogu_bot5 D Aug. 6, 2019, 11:41 a.m. OK GNU C++11 TESTS 64 202 0 1700
53993060 vjudge1 D May 11, 2019, 1:11 p.m. OK GNU C++11 TESTS 64 202 0 1700
46404727 vjudge4 D Nov. 30, 2018, 2:03 p.m. OK GNU C++11 TESTS 64 202 0 1700
58385284 bojverdict2 D Aug. 6, 2019, 11:42 a.m. OK GNU C++11 TESTS 64 217 0 1700
48367151 qwest D Jan. 13, 2019, 11:47 p.m. OK GNU C++14 TESTS 64 62 6246400 1700
34455355 _AjReme_ D Jan. 22, 2018, 4:53 p.m. OK GNU C++14 TESTS 64 171 1945600 1700
64076850 vjudge3 D Nov. 2, 2019, 9:01 a.m. OK GNU C++14 TESTS 64 280 0 1700
44896550 3015218054 D Oct. 26, 2018, 6:55 a.m. OK GNU C++14 TESTS 64 280 0 1700
68017401 harshkirat D Dec. 31, 2019, 7:36 p.m. OK GNU C++14 TESTS 64 280 6348800 1700
38451552 bojverdict2 D May 20, 2018, 7:56 a.m. OK GNU C++14 TESTS 64 295 307200 1700
34893979 YB_Election monarch.130 ZhangKing D Feb. 3, 2018, 12:14 p.m. OK GNU C++14 TESTS 64 295 1945600 1700
58471776 bojverdict2 D Aug. 9, 2019, 12:55 a.m. OK GNU C++14 TESTS 64 296 0 1700
58233930 badassBitch D Aug. 3, 2019, 6:22 p.m. OK GNU C++14 TESTS 64 311 0 1700
55743964 Forever_Frivolous D June 19, 2019, 9:01 a.m. OK GNU C++14 TESTS 64 312 0 1700
44621622 William324 D Oct. 21, 2018, 6:44 a.m. OK GNU C++17 TESTS 64 296 204800 1700
54055288 shysimon D May 13, 2019, 7:46 a.m. OK GNU C++17 TESTS 64 311 12083200 1700
54055307 vjudge2 D May 13, 2019, 7:46 a.m. OK GNU C++17 TESTS 64 312 12083200 1700
56006490 digu_J D June 24, 2019, 3:48 p.m. OK GNU C++17 TESTS 64 326 9523200 1700
67436050 kaizen_ D Dec. 22, 2019, 5:12 p.m. OK GNU C++17 TESTS 64 327 0 1700
59357131 TiredOfLife D Aug. 23, 2019, 1:55 p.m. OK GNU C++17 TESTS 64 327 0 1700
57092407 parammodi2281 D July 15, 2019, 11:11 a.m. OK GNU C++17 TESTS 64 327 0 1700
54397633 zaher__ D May 19, 2019, 9:54 p.m. OK GNU C++17 TESTS 64 327 0 1700
54014672 asis D May 12, 2019, 5:49 a.m. OK GNU C++17 TESTS 64 327 1126400 1700
54017935 vjudge1 D May 12, 2019, 7:57 a.m. OK GNU C++17 TESTS 64 327 64102400 1700
52549659 sonowz D April 10, 2019, 2:40 a.m. OK Haskell TESTS 64 1497 138752000 1700
39935047 Code.coding D July 3, 2018, 7:55 p.m. OK Java 8 TESTS 64 327 8294400 1700
53803231 about D May 5, 2019, 8:46 p.m. OK Java 8 TESTS 64 373 0 1700
56558665 mennafadali D July 5, 2019, 1:41 p.m. OK Java 8 TESTS 64 374 0 1700
65717792 ishu_yash D Nov. 25, 2019, 5:26 p.m. OK Java 8 TESTS 64 405 0 1700
35136069 DeadInsideOnTest993 D Feb. 10, 2018, 7:51 p.m. OK Java 8 TESTS 64 436 20889600 1700
37417522 KulikAlex D April 17, 2018, 6:53 p.m. OK Java 8 TESTS 64 452 20787200 1700
43069915 rajatjain D Sept. 19, 2018, 8:28 a.m. OK Java 8 TESTS 64 482 0 1700
36893053 aldairmh98 D April 3, 2018, 4:56 a.m. OK Java 8 TESTS 64 638 56320000 1700
47894446 Ondassyn D Jan. 4, 2019, 9:19 a.m. OK Java 8 TESTS 64 1560 0 1700
48989209 Cotheq D Jan. 26, 2019, 1:38 p.m. OK Kotlin TESTS 64 1170 204800 1700
34622187 vjudge4 D Jan. 28, 2018, 3:08 a.m. OK MS C++ TESTS 64 202 2048000 1700
34622181 vjudge2 D Jan. 28, 2018, 3:08 a.m. OK MS C++ TESTS 64 202 2048000 1700
34622141 vjudge5 D Jan. 28, 2018, 3:05 a.m. OK MS C++ TESTS 64 202 2048000 1700
34620297 vjudge1 D Jan. 28, 2018, 12:46 a.m. OK MS C++ TESTS 64 202 2048000 1700
34605961 vjudge1 D Jan. 27, 2018, 12:50 p.m. OK MS C++ TESTS 64 202 2048000 1700
64094307 vjudge3 D Nov. 2, 2019, 1:29 p.m. OK MS C++ TESTS 64 217 0 1700
34608766 szr D Jan. 27, 2018, 2:39 p.m. OK MS C++ TESTS 64 217 2048000 1700
34696747 Nightmare_n D Jan. 30, 2018, 3:58 a.m. OK MS C++ TESTS 64 218 8089600 1700
64070824 vjudge2 D Nov. 2, 2019, 7:20 a.m. OK MS C++ TESTS 64 264 6041600 1700
44531839 vjudge1 D Oct. 19, 2018, 6:54 a.m. OK MS C++ TESTS 64 311 12288000 1700
42441617 aeternalis1 D Sept. 3, 2018, 9:11 p.m. OK PyPy 2 TESTS 64 1559 4710400 1700
38250312 chris.ryba D May 14, 2018, 9:06 p.m. OK Python 2 TESTS 64 1434 6041600 1700
46916210 smi D Dec. 11, 2018, 8:40 p.m. OK Python 3 TESTS 64 2339 72294400 1700
47674468 Dusk_to_gold D Dec. 29, 2018, 8:16 a.m. OK Python 3 TESTS 64 3509 94412800 1700
35281396 ivanilos D Feb. 15, 2018, 3:58 a.m. OK Python 3 TESTS 64 3977 5632000 1700
51818308 togatoga D March 25, 2019, 10:38 a.m. OK Rust TESTS 64 623 5939200 1700

remove filters

Back to search problems