COMPFEST 13 - Finals Online Mirror (Unrated, ICPC Rules, Teams Preferred)

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
1575 COMPFEST 13 - Finals Online Mirror (Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 104084663 Oct. 2, 2021, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 725 ) K Knitting Batik PROGRAMMING implementation math

B'Mr. Chanek wants to knit a batik, a traditional cloth from Indonesia. The cloth forms a grid a with size n x m . There are k colors, and each cell in the grid can be one of the k colors. Define a sub-rectangle as an ordered pair of two cells ((x_1, y_1), (x_2, y_2)) , denoting the top-left cell and bottom-right cell (inclusively) of a sub-rectangle in a . Two sub-rectangles ((x_1, y_1), (x_2, y_2)) and ((x_3, y_3), (x_4, y_4)) have the same pattern if and only if the following holds: Count the number of possible batik color combinations, such that the subrectangles ((a_x, a_y),(a_x + r - 1, a_y + c - 1)) and ((b_x, b_y),(b_x + r - 1, b_y + c - 1)) have the same pattern. Output the answer modulo 10^9 + 7 . The first line contains five integers n , m , k , r , and c ( 1 <= q n, m <= q 10^9 , 1 <= q k <= q 10^9 , 1 <= q r <= q min(10^6, n) , 1 <= q c <= q min(10^6, m) ) -- the size of the batik, the number of colors, and size of the sub-rectangle. The second line contains four integers a_x , a_y , b_x , and b_y ( 1 <= q a_x, b_x <= q n , 1 <= q a_y, b_y <= q m ) -- the top-left corners of the first and second sub-rectangle. Both of the sub-rectangles given are inside the grid ( 1 <= q a_x + r - 1 , b_x + r - 1 <= q n , 1 <= q a_y + c - 1 , b_y + c - 1 <= q m ). Output an integer denoting the number of possible batik color combinations modulo 10^9 + 7 . The following are all 32 possible color combinations in the first example. '...

Tutorials

COMPFEST 13 — Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
130591519 Pranav_g19 shashwat259 aryanbidani K Oct. 2, 2021, 6:26 p.m. OK GNU C++14 TESTS 30 15 3788800
130584205 Melania ttee K Oct. 2, 2021, 4:46 p.m. OK GNU C++14 TESTS 30 15 3788800
130592378 nandonathaniel K Oct. 2, 2021, 6:38 p.m. OK GNU C++14 TESTS 30 30 3788800
130591699 waynetseng0105 spentplaying K Oct. 2, 2021, 6:28 p.m. OK GNU C++14 TESTS 30 30 3788800
130585009 Dart-Xeyter shart23 sevlll K Oct. 2, 2021, 4:57 p.m. OK GNU C++14 TESTS 30 30 3788800
130584265 nwi K Oct. 2, 2021, 4:47 p.m. OK GNU C++14 TESTS 30 31 3686400
130587753 molhaam1 you_dont_know_me Geo_Ghaffar K Oct. 2, 2021, 5:34 p.m. OK GNU C++14 TESTS 30 31 3788800
130590991 AwakeAnay 100gods jenishmonpara K Oct. 2, 2021, 6:19 p.m. OK GNU C++14 TESTS 30 31 3788800
130589301 chenjb shb123 FrostStar K Oct. 2, 2021, 5:56 p.m. OK GNU C++14 TESTS 30 31 3788800
130585303 khuebeo ngfam_kongu chemthan K Oct. 2, 2021, 5:01 p.m. OK GNU C++14 TESTS 30 31 3788800
130570320 Retired_MiFaFaOvO TLE Miracle03 K Oct. 2, 2021, 2:14 p.m. OK GNU C++17 TESTS 30 15 3788800
130593829 old_player K Oct. 2, 2021, 7:03 p.m. OK GNU C++17 TESTS 30 15 3788800
130576956 gisp_zjz K Oct. 2, 2021, 3:20 p.m. OK GNU C++17 TESTS 30 15 3788800
130590785 Bugman K Oct. 2, 2021, 6:15 p.m. OK GNU C++17 TESTS 30 15 3891200
130580961 aarr afterall Amoo_Safar K Oct. 2, 2021, 4:05 p.m. OK GNU C++17 TESTS 30 30 3788800
130586960 TheScrasse K Oct. 2, 2021, 5:23 p.m. OK GNU C++17 TESTS 30 30 3788800
130586586 rheallyc cxaphoenix K Oct. 2, 2021, 5:18 p.m. OK GNU C++17 TESTS 30 30 3788800
130590548 serotonin K Oct. 2, 2021, 6:12 p.m. OK GNU C++17 TESTS 30 31 3686400
130605645 ShJ K Oct. 3, 2021, 12:17 a.m. OK GNU C++17 TESTS 30 31 3788800
130593874 old_player K Oct. 2, 2021, 7:03 p.m. OK GNU C++17 TESTS 30 31 3788800
130577256 tabr K Oct. 2, 2021, 3:24 p.m. OK GNU C++17 (64) TESTS 30 15 4300800
130603626 arwaeystoamneg K Oct. 2, 2021, 10:52 p.m. OK GNU C++17 (64) TESTS 30 15 4300800
130594097 roy.satyam K Oct. 2, 2021, 7:08 p.m. OK GNU C++17 (64) TESTS 30 15 4300800
130593100 IceKnight1093 K Oct. 2, 2021, 6:50 p.m. OK GNU C++17 (64) TESTS 30 15 4300800
130584561 emthrm K Oct. 2, 2021, 4:51 p.m. OK GNU C++17 (64) TESTS 30 15 4300800
130583890 dario2994 K Oct. 2, 2021, 4:42 p.m. OK GNU C++17 (64) TESTS 30 15 4300800
130583109 triple__a kimoyami Roundgod K Oct. 2, 2021, 4:31 p.m. OK GNU C++17 (64) TESTS 30 15 4300800
130581674 lucccff poppies star_city K Oct. 2, 2021, 4:14 p.m. OK GNU C++17 (64) TESTS 30 15 4300800
130579080 SSRS_ K Oct. 2, 2021, 3:44 p.m. OK GNU C++17 (64) TESTS 30 15 4300800
130578588 tute7627 noimi K Oct. 2, 2021, 3:38 p.m. OK GNU C++17 (64) TESTS 30 15 4300800
130593389 clyring K Oct. 2, 2021, 6:55 p.m. OK Haskell TESTS 30 31 11673600
130590384 Xinull Liswiera Anastasia_Yun K Oct. 2, 2021, 6:10 p.m. OK .NET Core C# TESTS 30 93 11366400
130578207 googol_S0 PCTprobability K Oct. 2, 2021, 3:34 p.m. OK PyPy 3 TESTS 30 92 20172800
130606537 HollwoQ_Pelw K Oct. 3, 2021, 1:10 a.m. OK PyPy 3 TESTS 30 93 20172800
130584183 sansen K Oct. 2, 2021, 4:46 p.m. OK Rust TESTS 30 31 3788800

remove filters

Back to search problems