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 |
---|---|---|---|---|---|---|
1252 | 2019-2020 ICPC, Asia Jakarta Regional Contest (Online Mirror, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 159676199 | Oct. 27, 2019, 3:30 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 344 ) | D | Find String in a Grid | PROGRAMMING | data structures dp strings trees | 2900 |
B'You have a grid G containing R rows (numbered from 1 to R , top to bottom) and C columns (numbered from 1 to C , left to right) of uppercase characters. The character in the r^{th} row and the c^{th} column is denoted by G_{r, c} . You also have Q strings containing uppercase characters. For each of the string, you want to find the number of occurrences of the string in the grid. An occurrence of string S in the grid is counted if S can be constructed by starting at one of the cells in the grid, going right 0 or more times, and then going down 0 or more times. Two occurrences are different if the set of cells used to construct the string is different. Formally, for each string S , you would like to count the number of tuples langle r, c, Delta r, Delta c rangle such that: Input begins with a line containing three integers: R C Q ( 1 <= R, C <= 500 ; 1 <= Q <= 200 ,000 ) representing the size of the grid and the number of strings, respectively. The next R lines each contains C uppercase characters representing the grid. The c^{th} character on the r^{th} line is G_{r, c} . The next Q lines each contains a string S containing uppercase characters. The length of this string is a positive integer not more than 200 ,000 . The sum of the length of all Q strings combined is not more than 200 ,000 . For each query in the same order as input, output in a line an integer representing the number of occurrences of the string in the grid. Explanation for the sample input/output #1 '... |
T |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
64875605 | XLor | D | Nov. 14, 2019, 9:43 a.m. | OK | GNU C++11 | TESTS | 48 | 264 | 112947200 | 2900 | |
63529867 | panole zx2003 | D | Oct. 27, 2019, 6:24 a.m. | OK | GNU C++11 | TESTS | 48 | 280 | 178380800 | 2900 | |
66158937 | WZYYN | D | Dec. 2, 2019, 2:23 a.m. | OK | GNU C++11 | TESTS | 48 | 295 | 170905600 | 2900 | |
64159942 | I_love_Y_UME | D | Nov. 3, 2019, 2:07 p.m. | OK | GNU C++11 | TESTS | 48 | 904 | 130457600 | 2900 | |
64454077 | duxing201606 | D | Nov. 7, 2019, 8:07 a.m. | OK | GNU C++11 | TESTS | 48 | 1028 | 219238400 | 2900 | |
66480432 | alpc_qleonardo | D | Dec. 8, 2019, 1:48 a.m. | OK | GNU C++11 | TESTS | 48 | 1169 | 25292800 | 2900 | |
64202064 | liyang21 | D | Nov. 4, 2019, 11:46 a.m. | OK | GNU C++11 | TESTS | 48 | 1310 | 85196800 | 2900 | |
64636617 | Verly | D | Nov. 10, 2019, 11:46 a.m. | OK | GNU C++11 | TESTS | 48 | 1325 | 185139200 | 2900 | |
66480349 | alpc_qleonardo | D | Dec. 8, 2019, 1:42 a.m. | OK | GNU C++11 | TESTS | 48 | 1450 | 25292800 | 2900 | |
64262801 | vjudge1 | D | Nov. 4, 2019, 5:06 p.m. | OK | GNU C++11 | TESTS | 48 | 1497 | 26112000 | 2900 | |
65562915 | mayaohua2003 gtrhetr | D | Nov. 23, 2019, 4:14 a.m. | OK | GNU C++14 | TESTS | 48 | 218 | 83865600 | 2900 | |
64775248 | Maripium | D | Nov. 13, 2019, 3:43 a.m. | OK | GNU C++14 | TESTS | 48 | 233 | 185651200 | 2900 | |
65284748 | congthanh123 | D | Nov. 18, 2019, 7:39 a.m. | OK | GNU C++14 | TESTS | 48 | 249 | 126976000 | 2900 | |
63812912 | sy_chen | D | Oct. 30, 2019, 1:15 p.m. | OK | GNU C++14 | TESTS | 48 | 249 | 126976000 | 2900 | |
63949737 | vjudge5 | D | Oct. 31, 2019, 8:33 p.m. | OK | GNU C++14 | TESTS | 48 | 498 | 184012800 | 2900 | |
65432881 | Isonan | D | Nov. 20, 2019, 12:33 p.m. | OK | GNU C++14 | TESTS | 48 | 561 | 204083200 | 2900 | |
63688746 | TomOwO | D | Oct. 29, 2019, 12:46 a.m. | OK | GNU C++14 | TESTS | 48 | 576 | 244940800 | 2900 | |
63949723 | aviroop123 | D | Oct. 31, 2019, 8:32 p.m. | OK | GNU C++14 | TESTS | 48 | 592 | 184012800 | 2900 | |
64074240 | ae04071 | D | Nov. 2, 2019, 8:21 a.m. | OK | GNU C++14 | TESTS | 48 | 842 | 245862400 | 2900 | |
65916987 | yogahmad77 | D | Nov. 28, 2019, 2:57 p.m. | OK | GNU C++14 | TESTS | 48 | 920 | 123084800 | 2900 | |
66430867 | ljt12138 | D | Dec. 7, 2019, 2:44 a.m. | OK | GNU C++17 | TESTS | 48 | 171 | 98918400 | 2900 | |
63837609 | Roundgod | D | Oct. 30, 2019, 2:46 p.m. | OK | GNU C++17 | TESTS | 48 | 233 | 126976000 | 2900 | |
63889832 | saketh | D | Oct. 31, 2019, 12:31 a.m. | OK | GNU C++17 | TESTS | 48 | 342 | 94208000 | 2900 | |
66431122 | ljt12138 | D | Dec. 7, 2019, 2:58 a.m. | OK | GNU C++17 | TESTS | 48 | 342 | 100966400 | 2900 | |
66431114 | ljt12138 | D | Dec. 7, 2019, 2:57 a.m. | OK | GNU C++17 | TESTS | 48 | 343 | 107315200 | 2900 | |
63749165 | saketh | D | Oct. 29, 2019, 7:35 p.m. | OK | GNU C++17 | TESTS | 48 | 405 | 94105600 | 2900 | |
66007638 | krijgertje | D | Nov. 29, 2019, 11:29 p.m. | OK | GNU C++17 | TESTS | 48 | 545 | 194355200 | 2900 | |
63904383 | Quang ladpro98 _Rampage_ | D | Oct. 31, 2019, 6:04 a.m. | OK | GNU C++17 | TESTS | 48 | 608 | 33177600 | 2900 | |
65167312 | dafeng | D | Nov. 16, 2019, 1:49 p.m. | OK | GNU C++17 | TESTS | 48 | 842 | 175923200 | 2900 | |
65768314 | Minnakhmetov | D | Nov. 26, 2019, 7:06 p.m. | OK | GNU C++17 | TESTS | 48 | 857 | 96870400 | 2900 |
Back to search problems