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 |
---|---|---|---|---|---|---|
997 | Codeforces Round 493 (Div. 1) | FINISHED | False | 7200 | 201369299 | July 1, 2018, 2:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1737 ) | C | Sky Full of Stars | PROGRAMMING | combinatorics math | 2600 |
B"On one of the planets of Solar system, in Atmosphere University, many students are fans of bingo game. It is well known that one month on this planet consists of n^2 days, so calendars, represented as square matrix n by n are extremely popular. Weather conditions are even more unusual. Due to the unique composition of the atmosphere, when interacting with sunlight, every day sky takes one of three colors: blue, green or red. To play the bingo, you need to observe the sky for one month -- after each day, its cell is painted with the color of the sky in that day, that is, blue, green or red. At the end of the month, students examine the calendar. If at least one row or column contains only cells of one color, that month is called lucky. Let's call two colorings of calendar different, if at least one cell has different colors in them. It is easy to see that there are 3^{n cdot n} different colorings. How much of them are lucky? Since this number can be quite large, print it modulo 998244353 . The first and only line of input contains a single integer n ( 1 <= n <= 1000 ,000 ) -- the number of rows and columns in the calendar. Print one number -- number of lucky colorings of the calendar modulo 998244353 In the first sample any coloring is lucky, since the only column contains cells of only one color. In the second sample, there are a lot of lucky colorings, in particular, the following colorings are lucky: While these colorings are not lucky: "... |
60357 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
65435551 | hos.lyric | C | Nov. 20, 2019, 1:18 p.m. | OK | D | TESTS | 42 | 764 | 42905600 | 2600 | |
39866824 | nwi | C | July 2, 2018, 11:48 a.m. | OK | GNU C++ | TESTS | 42 | 499 | 15872000 | 2600 | |
40079008 | OrangeLee | C | July 8, 2018, 8 a.m. | OK | GNU C++ | TESTS | 42 | 514 | 24064000 | 2600 | |
40026697 | Scut82 | C | July 6, 2018, 10:16 a.m. | OK | GNU C++ | TESTS | 42 | 623 | 12288000 | 2600 | |
40026739 | Scut82 | C | July 6, 2018, 10:18 a.m. | OK | GNU C++ | TESTS | 42 | 624 | 8294400 | 2600 | |
41231432 | mayaohua2003 | C | Aug. 5, 2018, 3:23 a.m. | OK | GNU C++ | TESTS | 42 | 686 | 23859200 | 2600 | |
39861491 | hankairu | C | July 2, 2018, 8:14 a.m. | OK | GNU C++ | TESTS | 42 | 763 | 32358400 | 2600 | |
40029482 | tkandi | C | July 6, 2018, 12:10 p.m. | OK | GNU C++ | TESTS | 42 | 795 | 16076800 | 2600 | |
39866189 | Efina | C | July 2, 2018, 11:22 a.m. | OK | GNU C++ | TESTS | 42 | 888 | 7987200 | 2600 | |
39881197 | zhangqingqi | C | July 3, 2018, 1:27 a.m. | OK | GNU C++ | TESTS | 42 | 1045 | 24064000 | 2600 | |
39942879 | vjudge5 | C | July 4, 2018, 5:19 a.m. | OK | GNU C++ | TESTS | 42 | 1092 | 24576000 | 2600 | |
44113375 | nealchen | C | Oct. 11, 2018, 12:57 p.m. | OK | GNU C11 | TESTS | 42 | 343 | 8294400 | 2600 | |
40931729 | ReaLNero1 | C | July 30, 2018, 1:16 a.m. | OK | GNU C++11 | TESTS | 42 | 280 | 7987200 | 2600 | |
39851588 | scott_wu | C | July 1, 2018, 9:23 p.m. | OK | GNU C++11 | TESTS | 42 | 295 | 7987200 | 2600 | |
39851576 | scott_wu | C | July 1, 2018, 9:22 p.m. | OK | GNU C++11 | TESTS | 42 | 296 | 7987200 | 2600 | |
39851317 | scott_wu | C | July 1, 2018, 9:05 p.m. | OK | GNU C++11 | TESTS | 42 | 296 | 16076800 | 2600 | |
39851642 | scott_wu | C | July 1, 2018, 9:28 p.m. | OK | GNU C++11 | TESTS | 42 | 312 | 7987200 | 2600 | |
39851506 | scott_wu | C | July 1, 2018, 9:16 p.m. | OK | GNU C++11 | TESTS | 42 | 312 | 16076800 | 2600 | |
39851518 | scott_wu | C | July 1, 2018, 9:17 p.m. | OK | GNU C++11 | TESTS | 42 | 312 | 16076800 | 2600 | |
39850828 | scott_wu | C | July 1, 2018, 8:32 p.m. | OK | GNU C++11 | TESTS | 42 | 312 | 20070400 | 2600 | |
39850592 | scott_wu | C | July 1, 2018, 8:18 p.m. | OK | GNU C++11 | TESTS | 42 | 327 | 12083200 | 2600 | |
66598312 | John_zyj | C | Dec. 10, 2019, 3:32 p.m. | OK | GNU C++11 | TESTS | 42 | 327 | 16076800 | 2600 | |
45397993 | david7ch | C | Nov. 7, 2018, 6:24 a.m. | OK | GNU C++14 | TESTS | 42 | 327 | 24064000 | 2600 | |
39850195 | ecnerwala | C | July 1, 2018, 7:56 p.m. | OK | GNU C++14 | TESTS | 42 | 342 | 4812800 | 2600 | |
39849695 | ecnerwala | C | July 1, 2018, 7:32 p.m. | OK | GNU C++14 | TESTS | 42 | 343 | 4812800 | 2600 | |
39850032 | ecnerwala | C | July 1, 2018, 7:49 p.m. | OK | GNU C++14 | TESTS | 42 | 343 | 4812800 | 2600 | |
39849997 | ecnerwala | C | July 1, 2018, 7:47 p.m. | OK | GNU C++14 | TESTS | 42 | 358 | 4812800 | 2600 | |
39850007 | ecnerwala | C | July 1, 2018, 7:47 p.m. | OK | GNU C++14 | TESTS | 42 | 358 | 4812800 | 2600 | |
39863088 | FallDream | C | July 2, 2018, 9:14 a.m. | OK | GNU C++14 | TESTS | 42 | 468 | 12288000 | 2600 | |
59633851 | little_misfortune | C | Aug. 28, 2019, 7:32 p.m. | OK | GNU C++14 | TESTS | 42 | 514 | 7987200 | 2600 | |
39849204 | ecnerwala | C | July 1, 2018, 7:11 p.m. | OK | GNU C++14 | TESTS | 42 | 545 | 0 | 2600 | |
39849346 | ecnerwala | C | July 1, 2018, 7:17 p.m. | OK | GNU C++14 | TESTS | 42 | 546 | 0 | 2600 | |
69653595 | user202729_ | C | Jan. 28, 2020, 6:28 a.m. | OK | GNU C++17 | TESTS | 42 | 124 | 11980800 | 2600 | |
69183114 | user202729_ | C | Jan. 20, 2020, 10:59 a.m. | OK | GNU C++17 | TESTS | 42 | 202 | 3993600 | 2600 | |
68572652 | user202729_ | C | Jan. 11, 2020, 3:14 a.m. | OK | GNU C++17 | TESTS | 42 | 218 | 7987200 | 2600 | |
69182941 | user202729_ | C | Jan. 20, 2020, 10:55 a.m. | OK | GNU C++17 | TESTS | 42 | 264 | 3993600 | 2600 | |
68392291 | user202729_ | C | Jan. 8, 2020, 9:14 a.m. | OK | GNU C++17 | TESTS | 42 | 280 | 3993600 | 2600 | |
68391885 | user202729_ | C | Jan. 8, 2020, 9:01 a.m. | OK | GNU C++17 | TESTS | 42 | 312 | 3993600 | 2600 | |
59137355 | SGHD | C | Aug. 20, 2019, 1:09 p.m. | OK | GNU C++17 | TESTS | 42 | 373 | 24064000 | 2600 | |
39855748 | vjudge2 | C | July 2, 2018, 3:15 a.m. | OK | GNU C++17 | TESTS | 42 | 405 | 16076800 | 2600 | |
39850783 | Wild_Hamster | C | July 1, 2018, 8:29 p.m. | OK | GNU C++17 | TESTS | 42 | 405 | 32153600 | 2600 | |
39851072 | Wild_Hamster | C | July 1, 2018, 8:49 p.m. | OK | GNU C++17 | TESTS | 42 | 420 | 64307200 | 2600 | |
39840278 | uwi | C | July 1, 2018, 3:22 p.m. | OK | Java 8 | TESTS | 42 | 904 | 22118400 | 2600 | |
39881771 | xodiac | C | July 3, 2018, 2:10 a.m. | OK | Java 8 | TESTS | 42 | 1216 | 22118400 | 2600 | |
61585545 | Suzukaze | C | Oct. 1, 2019, 4:42 a.m. | OK | Java 8 | TESTS | 42 | 1856 | 3276800 | 2600 | |
39830108 | Petr | C | July 1, 2018, 2:27 p.m. | OK | Java 8 | TESTS | 42 | 2745 | 22425600 | 2600 | |
39843399 | ilyakor | C | July 1, 2018, 3:51 p.m. | OK | Java 8 | TESTS | 42 | 2870 | 2252800 | 2600 | |
39840703 | Tom--CCS | C | July 1, 2018, 3:25 p.m. | OK | Java 8 | TESTS | 42 | 3400 | 23142400 | 2600 | |
39872236 | dalt | C | July 2, 2018, 3:14 p.m. | OK | Java 8 | TESTS | 42 | 3415 | 36454400 | 2600 | |
40853627 | PrakharJain | C | July 27, 2018, 4 p.m. | OK | Java 8 | TESTS | 42 | 3665 | 15360000 | 2600 | |
39838722 | wa1tz719 | C | July 1, 2018, 3:11 p.m. | OK | MS C++ | TESTS | 42 | 1013 | 8806400 | 2600 | |
39840851 | 16silver | C | July 1, 2018, 3:27 p.m. | OK | MS C++ | TESTS | 42 | 2152 | 24064000 | 2600 | |
39941401 | vjudge5 | C | July 4, 2018, 3:37 a.m. | OK | MS C++ | TESTS | 42 | 2605 | 12083200 | 2600 | |
40878579 | jqwang | C | July 28, 2018, 9:35 a.m. | OK | MS C++ | TESTS | 42 | 2698 | 7987200 | 2600 | |
43647850 | vjudge4 | C | Oct. 1, 2018, 2:27 p.m. | OK | MS C++ | TESTS | 42 | 2823 | 40038400 | 2600 | |
43647967 | vjudge2 | C | Oct. 1, 2018, 2:30 p.m. | OK | MS C++ | TESTS | 42 | 2839 | 40038400 | 2600 | |
43647766 | vjudge5 | C | Oct. 1, 2018, 2:25 p.m. | OK | MS C++ | TESTS | 42 | 2854 | 40140800 | 2600 | |
57254397 | vjudge2 | C | July 18, 2019, 1:44 a.m. | OK | MS C++ | TESTS | 42 | 2901 | 8396800 | 2600 | |
43647901 | vjudge2 | C | Oct. 1, 2018, 2:28 p.m. | OK | MS C++ | TESTS | 42 | 3088 | 7987200 | 2600 | |
57191639 | vjudge2 | C | July 17, 2019, 10:50 a.m. | OK | MS C++ | TESTS | 42 | 3120 | 7987200 | 2600 |
Back to search problems