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 |
---|---|---|---|---|---|---|
1080 | Codeforces Round 524 (Div. 2) | FINISHED | False | 8100 | 188778299 | Nov. 24, 2018, 7:35 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1127 ) | E | Sonya and Matrix Beauty | PROGRAMMING | strings | 2400 |
B"Sonya had a birthday recently. She was presented with the matrix of size n x m and consist of lowercase Latin letters. We assume that the rows are numbered by integers from 1 to n from bottom to top, and the columns are numbered from 1 to m from left to right. Let's call a submatrix (i_1, j_1, i_2, j_2) (1 <= q i_1 <= q i_2 <= q n; 1 <= q j_1 <= q j_2 <= q m) elements a_{ij} of this matrix, such that i_1 <= q i <= q i_2 and j_1 <= q j <= q j_2 . Sonya states that a submatrix is beautiful if we can independently reorder the characters in each row (not in column) so that all rows and columns of this submatrix form palidroms. Let's recall that a string is called palindrome if it reads the same from left to right and from right to left. For example, strings abacaba, bcaacb, a are palindromes while strings abca, acbba, ab are not. Help Sonya to find the number of beautiful submatrixes. Submatrixes are different if there is an element that belongs to only one submatrix. The first line contains two integers n and m (1 <= q n, m <= q 250) -- the matrix dimensions. Each of the next n lines contains m lowercase Latin letters. Print one integer -- the number of beautiful submatrixes. In the first example, the following submatrixes are beautiful: ((1, 1), (1, 1)); ((1, 2), (1, 2)); ((1, 3), (1, 3)); ((1, 1), (1, 3)) . In the second example, all submatrixes that consist of one element and the following are beautiful: ((1, 1), (2, 1)); ((1, 1), (1, 3)); ((2, 1), (2, 3)); ((1, 1), (2, 3)); ((2, 1), (2, 2)) . Some of the beautiful submatrixes are: ((1, 1), (1, 5)); ((1, 2), (3, 4)); ((1, 1), (3, 5)) . The submatrix ((1, 1), (3, 5)) is beautiful since it can be reordered as: In such a matrix every row and every column form palindromes. "... |
Codeforces Round #524 (Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
58396065 | tlnllkbp | E | Aug. 6, 2019, 3:40 p.m. | OK | GNU C++11 | TESTS | 79 | 93 | 1024000 | 2400 | |
53876287 | buerdepepeqi | E | May 8, 2019, 12:10 p.m. | OK | GNU C++11 | TESTS | 79 | 124 | 102400 | 2400 | |
48440196 | vjudge5 | E | Jan. 16, 2019, 2:22 a.m. | OK | GNU C++11 | TESTS | 79 | 124 | 102400 | 2400 | |
46741317 | LucienShui | E | Dec. 8, 2018, 2:50 a.m. | OK | GNU C++11 | TESTS | 79 | 124 | 102400 | 2400 | |
46741287 | LucienShui | E | Dec. 8, 2018, 2:48 a.m. | OK | GNU C++11 | TESTS | 79 | 124 | 102400 | 2400 | |
48526498 | mmmod_lqs | E | Jan. 18, 2019, 9:16 a.m. | OK | GNU C++11 | TESTS | 79 | 124 | 20377600 | 2400 | |
48526489 | waaadreamer | E | Jan. 18, 2019, 9:16 a.m. | OK | GNU C++11 | TESTS | 79 | 124 | 20377600 | 2400 | |
46741268 | LucienShui | E | Dec. 8, 2018, 2:47 a.m. | OK | GNU C++11 | TESTS | 79 | 139 | 102400 | 2400 | |
53878493 | buerdepepeqi | E | May 8, 2019, 1:20 p.m. | OK | GNU C++11 | TESTS | 79 | 140 | 102400 | 2400 | |
46741258 | LucienShui | E | Dec. 8, 2018, 2:46 a.m. | OK | GNU C++11 | TESTS | 79 | 140 | 102400 | 2400 | |
48657186 | ReaLNero1 | E | Jan. 21, 2019, 3:35 a.m. | OK | GNU C++14 | TESTS | 79 | 109 | 102400 | 2400 | |
48475565 | passer__ | E | Jan. 17, 2019, 2:12 a.m. | OK | GNU C++14 | TESTS | 79 | 109 | 102400 | 2400 | |
48439918 | passer__ | E | Jan. 16, 2019, 2 a.m. | OK | GNU C++14 | TESTS | 79 | 109 | 102400 | 2400 | |
46175668 | Quang | E | Nov. 24, 2018, 3 p.m. | OK | GNU C++14 | TESTS | 79 | 109 | 102400 | 2400 | |
48475629 | passer__ | E | Jan. 17, 2019, 2:15 a.m. | OK | GNU C++14 | TESTS | 79 | 124 | 102400 | 2400 | |
46190345 | xzz_ioi_2021_ak | E | Nov. 25, 2018, 4:20 a.m. | OK | GNU C++14 | TESTS | 79 | 124 | 3481600 | 2400 | |
46631305 | RNS_MHB | E | Dec. 5, 2018, 3:17 a.m. | OK | GNU C++14 | TESTS | 79 | 140 | 102400 | 2400 | |
46445125 | Shtef | E | Dec. 1, 2018, 1 p.m. | OK | GNU C++14 | TESTS | 79 | 140 | 307200 | 2400 | |
46994063 | alechuang98 | E | Dec. 14, 2018, 7:08 a.m. | OK | GNU C++14 | TESTS | 79 | 140 | 921600 | 2400 | |
46162305 | codeveloppy | E | Nov. 24, 2018, 9:39 a.m. | OK | GNU C++14 | TESTS | 79 | 140 | 7372800 | 2400 | |
46931299 | hyfzbtrs | E | Dec. 12, 2018, 11:45 a.m. | OK | GNU C++17 | TESTS | 79 | 124 | 102400 | 2400 | |
51033682 | TrivialMan | E | March 8, 2019, 2:10 p.m. | OK | GNU C++17 | TESTS | 79 | 124 | 307200 | 2400 | |
48702804 | 201530800126 | E | Jan. 22, 2019, 3:58 a.m. | OK | GNU C++17 | TESTS | 79 | 124 | 307200 | 2400 | |
47522579 | Trote_w | E | Dec. 26, 2018, 1:56 p.m. | OK | GNU C++17 | TESTS | 79 | 124 | 921600 | 2400 | |
46162815 | temp6 | E | Nov. 24, 2018, 9:43 a.m. | OK | GNU C++17 | TESTS | 79 | 139 | 62668800 | 2400 | |
46271124 | vjudge2 | E | Nov. 27, 2018, 8:14 a.m. | OK | GNU C++17 | TESTS | 79 | 140 | 102400 | 2400 | |
46270616 | luogu_bot5 | E | Nov. 27, 2018, 7:48 a.m. | OK | GNU C++17 | TESTS | 79 | 156 | 102400 | 2400 | |
46268448 | 374272 | E | Nov. 27, 2018, 5:49 a.m. | OK | GNU C++17 | TESTS | 79 | 156 | 102400 | 2400 | |
46162446 | imslavko | E | Nov. 24, 2018, 9:40 a.m. | OK | GNU C++17 | TESTS | 79 | 156 | 1433600 | 2400 | |
46170515 | hmc | E | Nov. 24, 2018, 12:38 p.m. | OK | GNU C++17 | TESTS | 79 | 156 | 17203200 | 2400 | |
48417962 | donli | E | Jan. 15, 2019, 11:32 a.m. | OK | Java 8 | TESTS | 79 | 280 | 0 | 2400 | |
46310669 | RedWF | E | Nov. 28, 2018, 12:59 p.m. | OK | Java 8 | TESTS | 79 | 343 | 0 | 2400 | |
46310378 | aabdelzaher | E | Nov. 28, 2018, 12:50 p.m. | OK | Java 8 | TESTS | 79 | 343 | 0 | 2400 | |
46294997 | kessido | E | Nov. 28, 2018, 12:48 a.m. | OK | Java 8 | TESTS | 79 | 389 | 0 | 2400 | |
46294966 | kessido | E | Nov. 28, 2018, 12:44 a.m. | OK | Java 8 | TESTS | 79 | 389 | 0 | 2400 | |
67662537 | dalt | E | Dec. 26, 2019, 4:27 p.m. | OK | Java 8 | TESTS | 79 | 405 | 19353600 | 2400 | |
67661883 | dalt | E | Dec. 26, 2019, 4:10 p.m. | OK | Java 8 | TESTS | 79 | 405 | 19353600 | 2400 | |
46294947 | kessido | E | Nov. 28, 2018, 12:43 a.m. | OK | Java 8 | TESTS | 79 | 420 | 0 | 2400 | |
67661814 | dalt | E | Dec. 26, 2019, 4:09 p.m. | OK | Java 8 | TESTS | 79 | 420 | 19353600 | 2400 | |
61515250 | beginner1010 | E | Sept. 29, 2019, 5:17 p.m. | OK | Java 8 | TESTS | 79 | 467 | 0 | 2400 | |
46187585 | Svyat | E | Nov. 25, 2018, 12:35 a.m. | OK | Kotlin | TESTS | 79 | 576 | 1228800 | 2400 | |
46187572 | Svyat | E | Nov. 25, 2018, 12:33 a.m. | OK | Kotlin | TESTS | 79 | 624 | 1228800 | 2400 | |
46534446 | vjudge2 | E | Dec. 3, 2018, 8:07 a.m. | OK | MS C++ | TESTS | 79 | 373 | 102400 | 2400 | |
46838945 | vjudge4 | E | Dec. 10, 2018, 5:54 a.m. | OK | MS C++ | TESTS | 79 | 389 | 102400 | 2400 | |
46838925 | vjudge2 | E | Dec. 10, 2018, 5:53 a.m. | OK | MS C++ | TESTS | 79 | 389 | 102400 | 2400 | |
50021360 | vjudge3 | E | Feb. 16, 2019, 5:51 p.m. | OK | MS C++ | TESTS | 79 | 530 | 307200 | 2400 | |
62991797 | vjudge4 | E | Oct. 20, 2019, 9:46 a.m. | OK | MS C++ | TESTS | 79 | 561 | 102400 | 2400 | |
47522650 | vjudge2 | E | Dec. 26, 2018, 1:58 p.m. | OK | MS C++ | TESTS | 79 | 577 | 102400 | 2400 | |
54633830 | vjudge2 | E | May 25, 2019, 3:51 p.m. | OK | MS C++ | TESTS | 79 | 623 | 102400 | 2400 | |
46353996 | vjudge2 | E | Nov. 29, 2018, 7:06 a.m. | OK | MS C++ | TESTS | 79 | 623 | 223846400 | 2400 | |
54634707 | vjudge5 | E | May 25, 2019, 4:19 p.m. | OK | MS C++ | TESTS | 79 | 639 | 102400 | 2400 | |
54635303 | vjudge5 | E | May 25, 2019, 4:39 p.m. | OK | MS C++ | TESTS | 79 | 655 | 102400 | 2400 | |
46467978 | kobae964 | E | Dec. 2, 2018, 5:18 a.m. | OK | Rust | TESTS | 79 | 218 | 105881600 | 2400 |
Back to search problems