Codeforces Round 382 (Div. 1)

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
736 Codeforces Round 382 (Div. 1) FINISHED False 7200 251558699 Nov. 27, 2016, 4:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 464 ) D Permutations PROGRAMMING math matrices 2700

B'Ostap Bender is worried that people started to forget that he is the Great Combinator. Now he wants to show them his skills in combinatorics. Now he studies the permutations of length n. He has a list of m valid pairs, pair ai and bi means that he is allowed to place integers bi at position ai. He knows that the number of permutations that use only valid pairs is odd. Now, for each pair he wants to find out, will the number of valid permutations be odd if he removes this pair (and only it) from the list. The first line contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892000, n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89min(n2, xe2 x80 x89500 xe2 x80 x89000)) -- the number of elements in the permutation. Then follow m lines, each containing some valid pair (ai, xe2 x80 x89bi) (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai, xe2 x80 x89bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n). It 's guaranteed that no pair occurs in the input twice and that the total number of valid permutations (i.e. using only allowed pairs position-elements) is odd. Print m lines, one line for each valid pair. The i-th line should contain "YES" if after Ostap removes the i-th pair (and only it) the remaining number of valid permutations is odd. Otherwise, print xc2 xabNO xc2 xbb.'...

Tutorials

48659

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
31909742 yml D Oct. 31, 2017, 3:29 a.m. OK GNU C++ TESTS 36 264 5017600 2700
33396122 dwjshift D Dec. 19, 2017, 3:17 a.m. OK GNU C++ TESTS 36 265 7065600 2700
26309461 a13223400732 D April 12, 2017, 1:24 a.m. OK GNU C++ TESTS 36 265 7168000 2700
40983135 ReaLNero1 D July 30, 2018, 6:44 p.m. OK GNU C++ TESTS 36 280 5017600 2700
22727455 UsedToBe D Dec. 6, 2016, 10:08 a.m. OK GNU C++ TESTS 36 280 5734400 2700
26680706 jiyutian D April 26, 2017, 11:43 a.m. OK GNU C++ TESTS 36 280 6963200 2700
23727126 Dylans D Jan. 12, 2017, 1:10 a.m. OK GNU C++ TESTS 36 280 7065600 2700
23170080 ELNUR.ktl D Dec. 20, 2016, 5:30 a.m. OK GNU C++ TESTS 36 280 7577600 2700
28241094 xjtt D July 3, 2017, 2:08 a.m. OK GNU C++ TESTS 36 295 11161600 2700
26498954 a13223400732 D April 19, 2017, 3:18 p.m. OK GNU C++ TESTS 36 296 7168000 2700
55577327 RedStar_13 D June 15, 2019, 2:54 a.m. OK GNU C++11 TESTS 36 217 5120000 2700
44095850 emoairx D Oct. 11, 2018, 12:10 a.m. OK GNU C++11 TESTS 36 218 5120000 2700
44096188 yasugongshang D Oct. 11, 2018, 12:43 a.m. OK GNU C++11 TESTS 36 218 6041600 2700
55588225 RedStar_13 D June 15, 2019, 10:51 a.m. OK GNU C++11 TESTS 36 233 5017600 2700
44095814 emoairx D Oct. 11, 2018, 12:06 a.m. OK GNU C++11 TESTS 36 233 5017600 2700
68908017 dsl2002 D Jan. 16, 2020, 7:08 a.m. OK GNU C++11 TESTS 36 234 5017600 2700
68760350 Rubbish12345 D Jan. 14, 2020, 8:35 a.m. OK GNU C++11 TESTS 36 234 5017600 2700
53959492 justin_cao D May 10, 2019, 1:25 p.m. OK GNU C++11 TESTS 36 234 5017600 2700
55588076 RedStar_13 D June 15, 2019, 10:46 a.m. OK GNU C++11 TESTS 36 249 5017600 2700
44095888 emoairx D Oct. 11, 2018, 12:14 a.m. OK GNU C++11 TESTS 36 265 5017600 2700
33241093 whzzt D Dec. 14, 2017, 1:36 p.m. OK GNU C++14 TESTS 36 218 7987200 2700
49822963 waynetuinfor D Feb. 12, 2019, 9:53 a.m. OK GNU C++14 TESTS 36 233 5427200 2700
23361051 Ali.Pi D Dec. 27, 2016, 2:34 p.m. OK GNU C++14 TESTS 36 265 13516800 2700
22550308 unused D Nov. 27, 2016, 6:01 p.m. OK GNU C++14 TESTS 36 265 13516800 2700
31382245 Merln D Oct. 16, 2017, 5:19 a.m. OK GNU C++14 TESTS 36 280 7065600 2700
22561712 YakutovDmitriy D Nov. 27, 2016, 11:05 p.m. OK GNU C++14 TESTS 36 296 113868800 2700
22561733 YakutovDmitriy D Nov. 27, 2016, 11:08 p.m. OK GNU C++14 TESTS 36 311 113868800 2700
22561680 YakutovDmitriy D Nov. 27, 2016, 11:02 p.m. OK GNU C++14 TESTS 36 311 113868800 2700
22561691 YakutovDmitriy D Nov. 27, 2016, 11:04 p.m. OK GNU C++14 TESTS 36 327 113868800 2700
22558997 AndreySergunin D Nov. 27, 2016, 7:55 p.m. OK GNU C++14 TESTS 36 343 7372800 2700
56985184 Benq D July 13, 2019, 3:33 p.m. OK GNU C++17 TESTS 36 343 5017600 2700
57151541 hjk1030 D July 16, 2019, 2:59 p.m. OK GNU C++17 TESTS 36 374 5017600 2700
47175888 ToTLeS D Dec. 17, 2018, 5:28 p.m. OK GNU C++17 TESTS 36 405 6041600 2700
48713744 _Happy_New_Year_ D Jan. 22, 2019, 10 a.m. OK GNU C++17 TESTS 36 405 33689600 2700
61096338 HirasawaaYui D Sept. 23, 2019, 3:23 a.m. OK GNU C++17 TESTS 36 420 5017600 2700
57273911 Vax D July 18, 2019, 10:01 a.m. OK GNU C++17 TESTS 36 420 7372800 2700
47175954 ToTLeS D Dec. 17, 2018, 5:30 p.m. OK GNU C++17 TESTS 36 421 6041600 2700
55223269 kefaa2 D June 6, 2019, 9:37 p.m. OK GNU C++17 TESTS 36 436 5017600 2700
67056279 beet D Dec. 17, 2019, 7 a.m. OK GNU C++17 TESTS 36 451 5017600 2700
41157597 attack233 D Aug. 3, 2018, 1:11 p.m. OK GNU C++17 TESTS 36 452 5017600 2700
22564694 uwi D Nov. 28, 2016, 5:18 a.m. OK Java 8 TESTS 36 482 16691200 2700
22633598 JialinOuyang D Dec. 1, 2016, 1:18 a.m. OK Java 8 TESTS 36 499 0 2700
22614151 JialinOuyang D Nov. 30, 2016, 5:08 a.m. OK Java 8 TESTS 36 514 3993600 2700
22550176 VArtem D Nov. 27, 2016, 6 p.m. OK Java 8 TESTS 36 608 39833600 2700
22582968 mmaxio D Nov. 28, 2016, 6:20 p.m. OK Java 8 TESTS 36 639 0 2700
22561897 Lewin D Nov. 27, 2016, 11:30 p.m. OK Java 8 TESTS 36 1949 13824000 2700
22731226 666qwerty D Dec. 6, 2016, 1:28 p.m. OK MS C++ TESTS 36 810 9011200 2700

remove filters

Back to search problems