AIM Tech Round 3 (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
708 AIM Tech Round 3 (Div. 1) FINISHED False 7200 304349123 Aug. 24, 2016, 4:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 1343 ) E Student's Camp PROGRAMMING dp math 3100

Alex studied well and won the trip to student camp Alushta, located on the seashore. Unfortunately, it's the period of the strong winds now and there is a chance the camp will be destroyed! Camp building can be represented as the rectangle of n + 2 concrete blocks height and m blocks width. Every day there is a breeze blowing from the sea. Each block, except for the blocks of the upper and lower levers, such that there is no block to the left of it is destroyed with the probability . Similarly, each night the breeze blows in the direction to the sea. Thus, each block (again, except for the blocks of the upper and lower levers) such that there is no block to the right of it is destroyed with the same probability p . Note, that blocks of the upper and lower level are indestructible , so there are only n · m blocks that can be destroyed. The period of the strong winds will last for k days and k nights. If during this period the building will split in at least two connected components, it will collapse and Alex will have to find another place to spend summer. Find the probability that Alex won't have to look for other opportunities and will be able to spend the summer in this camp. The first line of the input contains two integers n and m ( 1 ≤ n , m ≤ 1500 ) that define the size of the destructible part of building. The second line of the input contains two integers a and b ( 1 ≤ a ≤ b ≤ 10 9 ) that define the probability p . It's guaranteed that integers a and b are coprime. The third line contains a single integer k ( 0 ≤ k ≤ 100 000 ) — the number of days and nights strong wind will blow for. Consider the answer as an irreducible fraction is equal to . Print one integer equal to . It's guaranteed that within the given constraints . In the first sample, each of the four blocks is destroyed with the probability . There are 7 scenarios that result in building not collapsing, and the probability we are looking for is equal to , so you should print

Tutorials

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
20177034 xqxm E Aug. 26, 2016, 2:21 p.m. OK GNU C TESTS 67 249 2048000 3100
40983830 ReaLNero1 E July 30, 2018, 7:03 p.m. OK GNU C++ TESTS 67 78 819200 3100
25161539 ShinFeb E March 3, 2017, 2:28 a.m. OK GNU C++ TESTS 67 78 2867200 3100
21697730 snig E Oct. 23, 2016, 4:17 a.m. OK GNU C++ TESTS 67 93 10137600 3100
20203845 SanSiroWaltz E Aug. 28, 2016, 1:13 a.m. OK GNU C++ TESTS 67 93 12185600 3100
42154997 sdzwyq E Aug. 27, 2018, 2:10 p.m. OK GNU C++ TESTS 67 93 40345600 3100
42305851 luogu_bot1 E Aug. 31, 2018, 11:12 a.m. OK GNU C++ TESTS 67 93 48128000 3100
26354411 jiyutian E April 14, 2017, 10:48 a.m. OK GNU C++ TESTS 67 108 3481600 3100
20382890 xuhaike E Sept. 4, 2016, 1:12 p.m. OK GNU C++ TESTS 67 124 9932800 3100
20415182 Owaski E Sept. 6, 2016, 8:50 a.m. OK GNU C++ TESTS 67 124 10752000 3100
20470935 Mikuri E Sept. 9, 2016, 2:12 a.m. OK GNU C++ TESTS 67 124 38604800 3100
20451573 chitanda E Sept. 8, 2016, 5:34 a.m. OK GNU C++11 TESTS 67 78 409600 3100
63432557 cuizhuyefei E Oct. 26, 2019, 9:33 a.m. OK GNU C++11 TESTS 67 78 1331200 3100
54754911 LJC00118 E May 28, 2019, 2:33 p.m. OK GNU C++11 TESTS 67 78 18944000 3100
20991051 cxaphoenix E Sept. 29, 2016, 12:02 p.m. OK GNU C++11 TESTS 67 93 0 3100
20669319 mahmoud2213 E Sept. 16, 2016, 9:41 p.m. OK GNU C++11 TESTS 67 93 0 3100
20562604 quailty E Sept. 13, 2016, 8:27 a.m. OK GNU C++11 TESTS 67 93 0 3100
39696232 crazy_cloud E June 27, 2018, 8:52 a.m. OK GNU C++11 TESTS 67 93 819200 3100
64358982 Rubbish12345 E Nov. 6, 2019, 11:11 a.m. OK GNU C++11 TESTS 67 93 10752000 3100
65566438 mlby E Nov. 23, 2019, 6:05 a.m. OK GNU C++11 TESTS 67 93 18944000 3100
51260866 Hany01 E March 13, 2019, 1:16 p.m. OK GNU C++11 TESTS 67 93 28057600 3100
63281204 Cyanic E Oct. 24, 2019, 8:44 a.m. OK GNU C++14 TESTS 67 77 19251200 3100
65899380 jiangly E Nov. 28, 2019, 7:58 a.m. OK GNU C++14 TESTS 67 78 819200 3100
64925642 Created_equal E Nov. 15, 2019, 3:29 a.m. OK GNU C++14 TESTS 67 78 11264000 3100
53965290 Quang E May 10, 2019, 4:34 p.m. OK GNU C++14 TESTS 67 78 19353600 3100
68976100 rushcheyo E Jan. 17, 2020, 8:53 a.m. OK GNU C++14 TESTS 67 93 819200 3100
39230012 beginend E June 14, 2018, 2:42 a.m. OK GNU C++14 TESTS 67 93 18944000 3100
64072115 Jayce132 E Nov. 2, 2019, 7:45 a.m. OK GNU C++14 TESTS 67 93 79769600 3100
68339986 nqiiii E Jan. 7, 2020, 2:35 a.m. OK GNU C++14 TESTS 67 108 29491200 3100
68470465 orbitingflea E Jan. 10, 2020, 1:04 a.m. OK GNU C++14 TESTS 67 109 1024000 3100
68404916 nealchen E Jan. 8, 2020, 2:32 p.m. OK GNU C++14 TESTS 67 109 27340800 3100
68833103 LJZ_C E Jan. 15, 2020, 12:42 a.m. OK GNU C++17 TESTS 67 93 10035200 3100
69295803 CMXRYNP E Jan. 22, 2020, 12:10 p.m. OK GNU C++17 TESTS 67 93 18944000 3100
46660569 kefaa2 E Dec. 5, 2018, 7 p.m. OK GNU C++17 TESTS 67 109 2048000 3100
68068185 xz153531 E Jan. 2, 2020, 8:57 a.m. OK GNU C++17 TESTS 67 124 19865600 3100
65276040 Infleaking E Nov. 18, 2019, 1:12 a.m. OK GNU C++17 TESTS 67 124 19865600 3100
57915853 Benq E July 29, 2019, 1:14 a.m. OK GNU C++17 TESTS 67 140 8294400 3100
48650636 Smaug E Jan. 20, 2019, 8:35 p.m. OK GNU C++17 TESTS 67 155 19148800 3100
64434804 jah_melon E Nov. 7, 2019, 12:28 a.m. OK GNU C++17 TESTS 67 171 146944000 3100
42832157 zhaimingshuzms E Sept. 13, 2018, 1:29 p.m. OK GNU C++17 TESTS 67 186 1126400 3100
64500512 Elegia E Nov. 8, 2019, 3:50 a.m. OK GNU C++17 TESTS 67 187 819200 3100
20176999 Los_Angelos_Laycurse E Aug. 26, 2016, 2:19 p.m. OK MS C++ TESTS 67 249 12288000 3100
27193003 Sereja E May 18, 2017, 8:50 a.m. OK MS C++ TESTS 67 919 43417600 3100

remove filters

Back to search problems