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.
Problems
B"You are given a box full of mirrors. Box consists of grid of size n xe2 x80 x89 xc3 x97 xe2 x80 x89m. Each cell of the grid contains a mirror put in the shape of ' ' or ' xe2 x80 x89/ xe2 x80 x89' (45 degree to the horizontal or vertical line). But mirrors in some cells have been destroyed. You want to put new mirrors into these grids so that the following two conditions are satisfied: After you tried putting some mirrors, you find out that there are many ways of doing so. How many possible ways are there? The answer might be large, so please find the result modulo prime number MOD. The first line contains three integers n, m, MOD (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100, 3 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89MOD xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109 xe2 x80 x89+ xe2 x80 x897, MOD is prime), m, n indicates the dimensions of a box and MOD is the number to module the answer. The following n lines each contains a string of length m. Each string contains only ' xe2 x80 x89/ xe2 x80 x89', ' ', '*', where '*' denotes that the mirror in that grid has been destroyed. It is guaranteed that the number of '*' is no more than 200. Output the answer modulo MOD. The only way for sample 1 is shown on the left picture from the statement. The only way for sample 2 is shown on the right picture from the statement. For the third sample, there are 5 possibilities that are listed below: 1. 2. 3. 4. 5. The answer is then module by 3 so the output should be 2."... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
13832860 |
130705009 |
F |
Oct. 25, 2015, 3:27 a.m. |
OK |
GNU C++ |
TESTS |
55 |
15 |
307200 |
|
3400 |
28472133 |
jiyutian |
F |
July 12, 2017, 11:32 a.m. |
OK |
GNU C++ |
TESTS |
55 |
15 |
2560000 |
|
3400 |
33962550 |
Created_equal |
F |
Jan. 6, 2018, 12:27 p.m. |
OK |
GNU C++ |
TESTS |
55 |
15 |
2764800 |
|
3400 |
33824163 |
hzt1 |
F |
Dec. 31, 2017, 3:27 a.m. |
OK |
GNU C++ |
TESTS |
55 |
15 |
2764800 |
|
3400 |
31061682 |
Scut82 |
F |
Oct. 6, 2017, 9:42 a.m. |
OK |
GNU C++ |
TESTS |
55 |
15 |
78336000 |
|
3400 |
13062711 |
Haghani |
F |
Sept. 17, 2015, 7:49 a.m. |
OK |
GNU C++ |
TESTS |
55 |
30 |
409600 |
|
3400 |
13299937 |
TankEngineer |
F |
Sept. 29, 2015, 2:55 p.m. |
OK |
GNU C++ |
TESTS |
55 |
30 |
819200 |
|
3400 |
34060316 |
wh2001_ZY |
F |
Jan. 10, 2018, 1:52 a.m. |
OK |
GNU C++ |
TESTS |
55 |
30 |
2662400 |
|
3400 |
33586157 |
vjudge3 |
F |
Dec. 24, 2017, 7:12 a.m. |
OK |
GNU C++ |
TESTS |
55 |
30 |
2867200 |
|
3400 |
13337816 |
betolex |
F |
Oct. 2, 2015, 2:40 a.m. |
OK |
GNU C++ |
TESTS |
55 |
31 |
307200 |
|
3400 |
32154052 |
rqgao2014 |
F |
Nov. 9, 2017, 9:23 a.m. |
OK |
GNU C++11 |
TESTS |
55 |
15 |
1331200 |
|
3400 |
33903969 |
dy0607 |
F |
Jan. 4, 2018, 1:24 p.m. |
OK |
GNU C++11 |
TESTS |
55 |
15 |
4915200 |
|
3400 |
18990400 |
ntu_vjudge_1 |
F |
July 9, 2016, 6:31 p.m. |
OK |
GNU C++11 |
TESTS |
55 |
15 |
5836800 |
|
3400 |
14170065 |
grothendieck |
F |
Nov. 9, 2015, 12:25 p.m. |
OK |
GNU C++11 |
TESTS |
55 |
15 |
5836800 |
|
3400 |
34290701 |
1919810 |
F |
Jan. 19, 2018, 3:33 a.m. |
OK |
GNU C++11 |
TESTS |
55 |
15 |
19353600 |
|
3400 |
35540208 |
shengdebao |
F |
Feb. 21, 2018, 7:16 a.m. |
OK |
GNU C++11 |
TESTS |
55 |
30 |
5529600 |
|
3400 |
32198717 |
MohanLau |
F |
Nov. 10, 2017, 3:15 p.m. |
OK |
GNU C++11 |
TESTS |
55 |
30 |
6656000 |
|
3400 |
63927546 |
zx2003 |
F |
Oct. 31, 2019, 1:26 p.m. |
OK |
GNU C++11 |
TESTS |
55 |
31 |
307200 |
|
3400 |
63688261 |
panole |
F |
Oct. 29, 2019, 12:23 a.m. |
OK |
GNU C++11 |
TESTS |
55 |
31 |
307200 |
|
3400 |
13140270 |
Best_Rank |
F |
Sept. 22, 2015, 12:13 p.m. |
OK |
GNU C++11 |
TESTS |
55 |
31 |
409600 |
|
3400 |
32152388 |
apiadu |
F |
Nov. 9, 2017, 7:13 a.m. |
OK |
GNU C++14 |
TESTS |
55 |
15 |
1536000 |
|
3400 |
33962977 |
Marco_L_T |
F |
Jan. 6, 2018, 12:54 p.m. |
OK |
GNU C++14 |
TESTS |
55 |
15 |
2764800 |
|
3400 |
64476456 |
nealchen |
F |
Nov. 7, 2019, 2:32 p.m. |
OK |
GNU C++14 |
TESTS |
55 |
31 |
307200 |
|
3400 |
32184084 |
consecutivelimit |
F |
Nov. 10, 2017, 1:39 a.m. |
OK |
GNU C++14 |
TESTS |
55 |
31 |
307200 |
|
3400 |
68684059 |
orbitingflea |
F |
Jan. 13, 2020, 1:53 a.m. |
OK |
GNU C++14 |
TESTS |
55 |
31 |
409600 |
|
3400 |
63412763 |
zsyzsy |
F |
Oct. 26, 2019, 2:04 a.m. |
OK |
GNU C++14 |
TESTS |
55 |
31 |
819200 |
|
3400 |
49943716 |
teafrogsf |
F |
Feb. 15, 2019, 11:03 a.m. |
OK |
GNU C++14 |
TESTS |
55 |
31 |
1228800 |
|
3400 |
49941832 |
teafrogsf |
F |
Feb. 15, 2019, 10:04 a.m. |
OK |
GNU C++14 |
TESTS |
55 |
31 |
1228800 |
|
3400 |
57302989 |
Scut82 |
F |
July 19, 2019, 1:42 a.m. |
OK |
GNU C++14 |
TESTS |
55 |
31 |
2048000 |
|
3400 |
32354913 |
FallDream |
F |
Nov. 16, 2017, 12:30 p.m. |
OK |
GNU C++14 |
TESTS |
55 |
31 |
2150400 |
|
3400 |
69012862 |
AprilGrimoire |
F |
Jan. 18, 2020, 4:22 a.m. |
OK |
GNU C++17 |
TESTS |
55 |
31 |
2355200 |
|
3400 |
51683705 |
great_influence |
F |
March 22, 2019, 1:42 p.m. |
OK |
GNU C++17 |
TESTS |
55 |
31 |
3379200 |
|
3400 |
66221510 |
Fulisike |
F |
Dec. 3, 2019, 10:57 a.m. |
OK |
GNU C++17 |
TESTS |
55 |
31 |
4300800 |
|
3400 |
60928943 |
vjudge2 |
F |
Sept. 20, 2019, 1:08 p.m. |
OK |
GNU C++17 |
TESTS |
55 |
31 |
5836800 |
|
3400 |
60907794 |
HirasawaaYui |
F |
Sept. 20, 2019, 3:46 a.m. |
OK |
GNU C++17 |
TESTS |
55 |
31 |
5836800 |
|
3400 |
67988411 |
zjczzzjczjczzzjc |
F |
Dec. 31, 2019, 1:55 a.m. |
OK |
GNU C++17 |
TESTS |
55 |
31 |
8192000 |
|
3400 |
66773074 |
Elegia |
F |
Dec. 13, 2019, 8:49 a.m. |
OK |
GNU C++17 |
TESTS |
55 |
46 |
307200 |
|
3400 |
69613541 |
gongsuidashen |
F |
Jan. 27, 2020, 12:25 p.m. |
OK |
GNU C++17 |
TESTS |
55 |
46 |
512000 |
|
3400 |
63424107 |
alan_cty |
F |
Oct. 26, 2019, 7:19 a.m. |
OK |
GNU C++17 |
TESTS |
55 |
46 |
2150400 |
|
3400 |
49950434 |
dogcdt |
F |
Feb. 15, 2019, 1:49 p.m. |
OK |
GNU C++17 |
TESTS |
55 |
46 |
2150400 |
|
3400 |
13064489 |
mmaxio |
F |
Sept. 17, 2015, 10:02 a.m. |
OK |
Java 8 |
TESTS |
55 |
140 |
0 |
|
3400 |
15142518 |
HappyNewYearMike |
F |
Dec. 31, 2015, 10:34 p.m. |
OK |
MS C++ |
TESTS |
55 |
15 |
5836800 |
|
3400 |
13062357 |
kostet |
F |
Sept. 17, 2015, 7:23 a.m. |
OK |
MS C++ |
TESTS |
55 |
31 |
5939200 |
|
3400 |
remove filters
Back to search problems