MemSQL Start[c]UP 3.0 - Round 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
859 MemSQL Start[c]UP 3.0 - Round 1 FINISHED False 9000 231855887 Sept. 16, 2017, 5:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1886 ) E Desk Disorder PROGRAMMING combinatorics dfs and similar ds graphs trees 2100

B"A new set of desks just arrived, and it's about time! Things were getting quite cramped in the office. You've been put in charge of creating a new seating chart for the engineers. The desks are numbered, and you sent out a survey to the engineering team asking each engineer the number of the desk they currently sit at, and the number of the desk they would like to sit at (which may be the same as their current desk). Each engineer must either remain where they sit, or move to the desired seat they indicated in the survey. No two engineers currently sit at the same desk, nor may any two engineers sit at the same desk in the new seating arrangement. How many seating arrangements can you create that meet the specified requirements? The answer may be very large, so compute it modulo 1000000007 xe2 x80 x89= xe2 x80 x89109 xe2 x80 x89+ xe2 x80 x897. Input will begin with a line containing N (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89N xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100000), the number of engineers. N lines follow, each containing exactly two integers. The i-th line contains the number of the current desk of the i-th engineer and the number of the desk the i-th engineer wants to move to. Desks are numbered from 1 to 2 xc2 xb7N. It is guaranteed that no two engineers sit at the same desk. Print the number of possible assignments, modulo 1000000007 xe2 x80 x89= xe2 x80 x89109 xe2 x80 x89+ xe2 x80 x897. These are the possible assignments for the first example: "...

Tutorials

Tutorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
30406098 MrLolthe1st E Sept. 16, 2017, 9:40 p.m. OK FPC TESTS 36 62 9625600 2100
30402102 heklo E Sept. 16, 2017, 7:46 p.m. OK FPC TESTS 36 62 9625600 2100
30910093 codemart786 E Oct. 1, 2017, 1:30 p.m. OK GNU C TESTS 36 46 5017600 2100
30855641 89991807 E Sept. 30, 2017, 5:50 a.m. OK GNU C++ TESTS 36 31 5222400 2100
30463786 wzp666 E Sept. 18, 2017, 12:30 p.m. OK GNU C++ TESTS 36 31 5734400 2100
30400708 PaidySung E Sept. 16, 2017, 7:31 p.m. OK GNU C++ TESTS 36 31 6860800 2100
39687900 vjudge1 E June 27, 2018, 12:17 a.m. OK GNU C++ TESTS 36 31 7782400 2100
35612833 lijiamu E Feb. 24, 2018, 1:27 a.m. OK GNU C++ TESTS 36 31 8499200 2100
31597006 Idvzchuscvol E Oct. 22, 2017, 8:10 a.m. OK GNU C++ TESTS 36 31 11571200 2100
40101212 hl666 E July 9, 2018, 5:24 a.m. OK GNU C++ TESTS 36 46 3174400 2100
30402709 gangsterveggies E Sept. 16, 2017, 7:52 p.m. OK GNU C++ TESTS 36 46 3174400 2100
30661817 black_horse2014 E Sept. 24, 2017, 9:50 a.m. OK GNU C++ TESTS 36 46 3379200 2100
30770222 vjudge4 E Sept. 27, 2017, 7:28 a.m. OK GNU C++ TESTS 36 46 3686400 2100
30771841 AragakiAyase E Sept. 27, 2017, 8:44 a.m. OK GNU C++11 TESTS 36 30 5632000 2100
30771344 AragakiAyase E Sept. 27, 2017, 8:19 a.m. OK GNU C++11 TESTS 36 30 5632000 2100
30771768 AragakiAyase E Sept. 27, 2017, 8:40 a.m. OK GNU C++11 TESTS 36 30 5734400 2100
62548175 zzy2005 E Oct. 14, 2019, 7:24 a.m. OK GNU C++11 TESTS 36 31 3174400 2100
47380142 ljl E Dec. 22, 2018, 8:18 p.m. OK GNU C++11 TESTS 36 31 3174400 2100
62655754 qq125ZZsb E Oct. 16, 2019, 1:25 a.m. OK GNU C++11 TESTS 36 31 3686400 2100
44981889 Ebola_Emperor E Oct. 28, 2018, 9:04 a.m. OK GNU C++11 TESTS 36 31 3686400 2100
62541296 M_sea E Oct. 14, 2019, 3:35 a.m. OK GNU C++11 TESTS 36 31 3891200 2100
62335047 Dream-chasing_Juvenile E Oct. 11, 2019, 12:07 a.m. OK GNU C++11 TESTS 36 31 4505600 2100
63296892 luogu_bot4 E Oct. 24, 2019, 1:12 p.m. OK GNU C++11 TESTS 36 31 5017600 2100
30809867 _AjReme_ E Sept. 28, 2017, 4:02 p.m. OK GNU C++14 TESTS 36 31 5632000 2100
30398399 ch_egor E Sept. 16, 2017, 6:55 p.m. OK GNU C++14 TESTS 36 46 2457600 2100
30399530 woqja125 E Sept. 16, 2017, 7:14 p.m. OK GNU C++14 TESTS 36 46 3788800 2100
30405237 vanvector E Sept. 16, 2017, 8:57 p.m. OK GNU C++14 TESTS 36 61 11366400 2100
30394840 snuke E Sept. 16, 2017, 6:08 p.m. OK GNU C++14 TESTS 36 62 1638400 2100
30809667 venkat1997 E Sept. 28, 2017, 3:54 p.m. OK GNU C++14 TESTS 36 62 1843200 2100
30399179 MyLegendaryTime E Sept. 16, 2017, 7:09 p.m. OK GNU C++14 TESTS 36 62 2969600 2100
50756435 bhargav_0085 E March 3, 2019, 5:28 p.m. OK GNU C++14 TESTS 36 62 3072000 2100
50396765 Googal E Feb. 23, 2019, 4:15 p.m. OK GNU C++14 TESTS 36 62 3072000 2100
30418885 cxt E Sept. 17, 2017, 11:22 a.m. OK GNU C++14 TESTS 36 62 3072000 2100
44472932 orzcyand1317 E Oct. 18, 2018, 7:18 a.m. OK GNU C++17 TESTS 36 31 6656000 2100
52587135 Trisolaris E April 11, 2019, 1:28 a.m. OK GNU C++17 TESTS 36 46 6656000 2100
64630558 zzq233 E Nov. 10, 2019, 10:01 a.m. OK GNU C++17 TESTS 36 62 5222400 2100
64630494 zzq233 E Nov. 10, 2019, 10 a.m. OK GNU C++17 TESTS 36 62 5222400 2100
60231356 _Weiss E Sept. 7, 2019, 4:35 p.m. OK GNU C++17 TESTS 36 62 10649600 2100
54784735 aryaman E May 29, 2019, 2:44 a.m. OK GNU C++17 TESTS 36 77 1638400 2100
49523166 K.Chaitanya E Feb. 6, 2019, 9:32 a.m. OK GNU C++17 TESTS 36 77 2662400 2100
59695113 pkgunboat E Aug. 30, 2019, 8:12 a.m. OK GNU C++17 TESTS 36 77 5222400 2100
48410598 vjudge2 E Jan. 15, 2019, 7:28 a.m. OK GNU C++17 TESTS 36 77 9216000 2100
48410502 ArshiaDadras E Jan. 15, 2019, 7:25 a.m. OK GNU C++17 TESTS 36 77 9216000 2100
30405376 Martynas E Sept. 16, 2017, 9:01 p.m. OK Go TESTS 36 62 26112000 2100
69834253 zhanyi_xiaolu E Jan. 30, 2020, 11:22 a.m. OK Java 11 TESTS 36 389 35123200 2100
58628034 ajkdrag E Aug. 11, 2019, 6:18 p.m. OK Java 8 TESTS 36 140 0 2100
33665581 happybelly E Dec. 27, 2017, 9:51 a.m. OK Java 8 TESTS 36 155 20684800 2100
30394894 Petr E Sept. 16, 2017, 6:08 p.m. OK Java 8 TESTS 36 171 0 2100
31876176 G.Mohamed E Oct. 29, 2017, 7:49 p.m. OK Java 8 TESTS 36 171 1945600 2100
30403905 intrepidcoder E Sept. 16, 2017, 8:04 p.m. OK Java 8 TESTS 36 171 2560000 2100
33666026 happybelly E Dec. 27, 2017, 10:12 a.m. OK Java 8 TESTS 36 171 20684800 2100
30419284 kubusgol E Sept. 17, 2017, 11:35 a.m. OK Java 8 TESTS 36 187 102400 2100
30406529 dusty.and.rusty E Sept. 16, 2017, 10:17 p.m. OK Java 8 TESTS 36 202 0 2100
30397145 uwi E Sept. 16, 2017, 6:36 p.m. OK Java 8 TESTS 36 202 4403200 2100
30406776 dusty.and.rusty E Sept. 16, 2017, 10:40 p.m. OK Java 8 TESTS 36 217 0 2100
30410484 og.kostya E Sept. 17, 2017, 6:18 a.m. OK MS C# TESTS 36 108 15462400 2100
30400210 leign E Sept. 16, 2017, 7:22 p.m. OK MS C# TESTS 36 109 6348800 2100
30406155 fiver E Sept. 16, 2017, 9:46 p.m. OK MS C# TESTS 36 171 80076800 2100
30397526 azukun E Sept. 16, 2017, 6:41 p.m. OK MS C# TESTS 36 234 20787200 2100
30398070 dzhulgakov E Sept. 16, 2017, 6:50 p.m. OK MS C++ TESTS 36 46 3686400 2100
30397850 RAD E Sept. 16, 2017, 6:47 p.m. OK MS C++ TESTS 36 77 9216000 2100
30398646 Oleg_Smirnov E Sept. 16, 2017, 6:59 p.m. OK MS C++ TESTS 36 93 10649600 2100
30400480 bayleef E Sept. 16, 2017, 7:27 p.m. OK MS C++ TESTS 36 109 15257600 2100
30412444 AleksanderBalobanov E Sept. 17, 2017, 7:50 a.m. OK MS C++ TESTS 36 124 26726400 2100
30407903 mostafa_9a7c2 E Sept. 17, 2017, 1:20 a.m. OK MS C++ TESTS 36 156 3379200 2100
30407700 mostafa_9a7c2 E Sept. 17, 2017, 12:55 a.m. OK MS C++ TESTS 36 156 4403200 2100
33099878 marszed E Dec. 11, 2017, 11:07 a.m. OK MS C++ TESTS 36 171 10547200 2100
30406986 mostafa_9a7c2 E Sept. 16, 2017, 11:05 p.m. OK MS C++ TESTS 36 186 9830400 2100
36373707 GMNY E March 17, 2018, 11:20 p.m. OK MS C++ TESTS 36 187 11161600 2100
54733317 pajenegod E May 28, 2019, 2:46 a.m. OK PyPy 2 TESTS 36 373 20684800 2100
30398051 nwi E Sept. 16, 2017, 6:50 p.m. OK Python 2 TESTS 36 623 22016000 2100
39865661 Ali_Pi E July 2, 2018, 11 a.m. OK Python 2 TESTS 36 872 19251200 2100
30790803 yugle7 E Sept. 27, 2017, 9:55 p.m. OK Python 3 TESTS 36 748 16896000 2100
30399582 OgieKako E Sept. 16, 2017, 7:15 p.m. OK Rust TESTS 36 155 11878400 2100

remove filters

Back to search problems