CSES - Putka Open 2020 – 1/5 - Results
Submission details
Task:Ruudukko
Sender:rasastusni
Submission time:2020-09-06 22:15:30 +0300
Language:Python3 (CPython3)
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#10.02 s1, 2, 3details
#20.02 s1, 2, 3details
#30.02 s1, 2, 3details
#40.02 s1, 2, 3details
#50.02 s1, 2, 3details
#60.02 s1, 2, 3details
#70.02 s2, 3details
#80.02 s2, 3details
#90.02 s2, 3details
#100.02 s2, 3details
#110.02 s2, 3details
#120.02 s2, 3details
#130.02 s3details
#140.02 s3details
#150.02 s3details
#160.02 s3details
#170.02 s3details
#180.02 s3details

Code

n = int(raw_input())

prev_choices = None
for i in range(n):
	row_choices = []
	for j,x in enumerate(raw_input()):
		choices = set()
		if i > 0:
			choices.update(prev_choices[j])
		if j > 0:
			choices.update(row_choices[-1])
		if i == 0 and j == 0:
			choices.add(0)
		if x == 'o':
			choices = set([ch + 1 for ch in list(choices)])
		row_choices.append(choices)
	prev_choices = row_choices
print(len(prev_choices[-1]))

Test details

Test 1

Group: 1, 2, 3

Verdict:

input
10
..........
..........
..........
..........
...

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 2

Group: 1, 2, 3

Verdict:

input
10
o.o.......
..........
.o...o.oo.
..o...o.oo
...

correct output
9

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 3

Group: 1, 2, 3

Verdict:

input
10
o......o..
oo.oo.....
oooo....oo
o.......oo
...

correct output
14

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 4

Group: 1, 2, 3

Verdict:

input
10
..ooooo.oo
.ooo.o..oo
.....ooo.o
ooo.ooo.oo
...

correct output
12

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 5

Group: 1, 2, 3

Verdict:

input
10
oooooooooo
ooo....ooo
.oo.oo.ooo
oooooooooo
...

correct output
10

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 6

Group: 1, 2, 3

Verdict:

input
10
oooooooooo
oooooooooo
oooooooooo
oooooooooo
...

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 7

Group: 2, 3

Verdict:

input
100
.................................

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 8

Group: 2, 3

Verdict:

input
100
.........o.....o.........o..o....

correct output
114

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 9

Group: 2, 3

Verdict:

input
100
oo..oo.oo..o...o..o.o..o.........

correct output
151

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 10

Group: 2, 3

Verdict:

input
100
o..o.ooo..oo.o.o.o..o.o..o..oo...

correct output
143

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 11

Group: 2, 3

Verdict:

input
100
oo..oooooooooooo.oooo.o.o.oooo...

correct output
115

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 12

Group: 2, 3

Verdict:

input
100
oooooooooooooooooooooooooooooo...

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 13

Group: 3

Verdict:

input
1000
.................................

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 14

Group: 3

Verdict:

input
1000
o..........o...o...o...o.........

correct output
1121

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 15

Group: 3

Verdict:

input
1000
.o.............o....o.o......o...

correct output
1583

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 16

Group: 3

Verdict:

input
1000
oooooo.oooooo.....oooo..o...o....

correct output
1574

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 17

Group: 3

Verdict:

input
1000
ooooo.oo.oooooooooo...o...oo.....

correct output
1147

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...

Test 18

Group: 3

Verdict:

input
1000
oooooooooooooooooooooooooooooo...

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 1, in <module>
    n = int...