Codeforces Round 729 (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
1542 Codeforces Round 729 (Div. 2) FINISHED False 7200 112035311 July 3, 2021, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 878 ) E2 Abnormal Permutation Pairs (hard version) PROGRAMMING combinatorics dp math

B"This is the hard version of the problem. The only difference between the easy version and the hard version is the constraints on n . You can only make hacks if both versions are solved. A permutation of 1, 2, ldots, n is a sequence of n integers, where each integer from 1 to n appears exactly once. For example, [2,3,1,4] is a permutation of 1, 2, 3, 4 , but [1,4,2,2] isn't because 2 appears twice in it. Recall that the number of inversions in a permutation a_1, a_2, ldots, a_n is the number of pairs of indices (i, j) such that i < j and a_i > a_j . Let p and q be two permutations of 1, 2, ldots, n . Find the number of permutation pairs (p,q) that satisfy the following conditions: Print the number of such pairs modulo mod . Note that mod may not be a prime. The only line contains two integers n and mod ( 1 <= n <= 500 , 1 <= mod <= 10^9 ). Print one integer, which is the answer modulo mod . The following are all valid pairs (p,q) when n=4 . "...

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
121280445 SSL_XJQ E2 July 4, 2021, 4:58 a.m. OK GNU C++11 TESTS 84 405 2355200
121276715 xzsawq E2 July 4, 2021, 3:34 a.m. OK GNU C++11 TESTS 84 530 4096000
121270094 Yukikaze_ E2 July 3, 2021, 11:26 p.m. OK GNU C++11 TESTS 84 639 4300800
121263180 srijon51 E2 July 3, 2021, 7:38 p.m. OK GNU C++11 TESTS 84 936 3072000
121278544 grass8cow E2 July 4, 2021, 4:17 a.m. OK GNU C++11 TESTS 84 1153 262144000
121278328 grass8cow E2 July 4, 2021, 4:12 a.m. OK GNU C++11 TESTS 84 1154 262144000
121274327 q-w-q-w-q E2 July 4, 2021, 2:25 a.m. OK GNU C++11 TESTS 84 1184 505958400
121247128 happyguy656 E2 July 3, 2021, 3:59 p.m. OK GNU C++11 TESTS 84 1216 8089600
121240442 Huah E2 July 3, 2021, 2:59 p.m. OK GNU C++11 TESTS 84 1326 516198400
121274097 zxjk E2 July 4, 2021, 2:18 a.m. OK GNU C++11 TESTS 84 1341 3379200
121271707 xjq E2 July 4, 2021, 12:50 a.m. OK GNU C++14 TESTS 84 421 4096000
121261115 DeadPillow E2 July 3, 2021, 6:58 p.m. OK GNU C++14 TESTS 84 982 3276800
121261039 DeadPillow E2 July 3, 2021, 6:57 p.m. OK GNU C++14 TESTS 84 1138 3686400
121248337 rainboy E2 July 3, 2021, 4:10 p.m. OK GNU C++14 TESTS 84 1419 1945600
121252774 DeadPillow E2 July 3, 2021, 5 p.m. OK GNU C++14 TESTS 84 1638 4505600
121275587 Salemi E2 July 4, 2021, 3:05 a.m. OK GNU C++14 TESTS 84 1777 517222400
121255395 SegT1018 E2 July 3, 2021, 5:35 p.m. OK GNU C++14 TESTS 84 1871 511078400
121249817 Enkognit E2 July 3, 2021, 4:26 p.m. OK GNU C++14 TESTS 84 1887 98713600
121264019 inside_man E2 July 3, 2021, 7:58 p.m. OK GNU C++14 TESTS 84 2012 9420800
121275318 tzc_wk E2 July 4, 2021, 2:57 a.m. OK GNU C++14 TESTS 84 2916 271872000
121277931 fxhd E2 July 4, 2021, 4:03 a.m. OK GNU C++17 TESTS 84 624 85708800
121262949 pikel_rik E2 July 3, 2021, 7:34 p.m. OK GNU C++17 TESTS 84 733 5324800
121241506 ButterCake E2 July 3, 2021, 3:02 p.m. OK GNU C++17 TESTS 84 998 5120000
121262027 xsc E2 July 3, 2021, 7:16 p.m. OK GNU C++17 TESTS 84 1138 1024000
121282963 Gandalf_the_white E2 July 4, 2021, 5:44 a.m. OK GNU C++17 TESTS 84 1278 516198400
121251633 Mathematician2000 E2 July 3, 2021, 4:46 p.m. OK GNU C++17 TESTS 84 1372 252416000
121256746 2qbingxuan E2 July 3, 2021, 5:52 p.m. OK GNU C++17 TESTS 84 1387 7168000
121238675 FightingGold E2 July 3, 2021, 2:54 p.m. OK GNU C++17 TESTS 84 1387 9216000
121244933 rama_pang E2 July 3, 2021, 3:44 p.m. OK GNU C++17 TESTS 84 1419 3072000
121276913 200815147 E2 July 4, 2021, 3:39 a.m. OK GNU C++17 TESTS 84 1450 13004800
121273239 tianbu E2 July 4, 2021, 1:51 a.m. OK GNU C++17 (64) TESTS 84 264 2150400
121254965 nor E2 July 3, 2021, 5:28 p.m. OK GNU C++17 (64) TESTS 84 436 2048000
121254760 nsns E2 July 3, 2021, 5:26 p.m. OK GNU C++17 (64) TESTS 84 436 2048000
121250240 nsns E2 July 3, 2021, 4:31 p.m. OK GNU C++17 (64) TESTS 84 467 2048000
121272455 timmyfeng E2 July 4, 2021, 1:23 a.m. OK GNU C++17 (64) TESTS 84 670 3072000
121262134 ftiasch E2 July 3, 2021, 7:18 p.m. OK GNU C++17 (64) TESTS 84 686 2048000
121241805 tute7627 E2 July 3, 2021, 3:03 p.m. OK GNU C++17 (64) TESTS 84 716 255488000
121252400 smiken E2 July 3, 2021, 4:55 p.m. OK GNU C++17 (64) TESTS 84 779 51609600
121278524 Rahul_73 E2 July 4, 2021, 4:17 a.m. OK GNU C++17 (64) TESTS 84 795 3072000
121278487 kratikadhote E2 July 4, 2021, 4:16 a.m. OK GNU C++17 (64) TESTS 84 795 3072000
121258432 Ant_Man E2 July 3, 2021, 6:15 p.m. OK Kotlin TESTS 84 3276 230604800

remove filters

Back to search problems