Code Submission Evaluation System Login

Datatähti 2016 alku

Start:2015-09-28 00:00:00
End:2015-10-12 00:00:00
 

Tasks | Scoreboard | Statistics


CSES - Datatähti 2016 alku - Results
History
2015-12-09 12:32:1447
2015-12-09 12:14:1547
2015-12-09 12:08:0247
2015-12-03 15:35:1047
2015-12-03 15:32:4947
2015-10-11 20:22:3214
2015-10-11 20:21:3314
2015-10-11 02:22:4014
2015-10-11 02:19:350
2015-10-11 00:49:4814
2015-10-11 00:46:0914
2015-10-10 22:14:5514
2015-10-10 17:53:5014
2015-10-10 17:38:330
2015-10-10 17:37:300
2015-10-10 17:37:220
2015-10-10 17:32:140
2015-10-10 17:29:420
2015-10-01 14:56:170
Task:Tontti
Sender:siirikuoppala
Submission time:2015-10-11 20:22:32
Language:Python3
Status:READY
Score:14

Feedback

groupverdictscore
#1ACCEPTED14
#2WRONG ANSWER0
#3TIME LIMIT EXCEEDED0

Test results

testverdicttime (s)group
#1ACCEPTED0.07 / 1.001details
#2ACCEPTED0.07 / 1.001details
#3ACCEPTED0.08 / 1.001details
#4ACCEPTED0.07 / 1.001details
#5ACCEPTED0.08 / 1.001details
#6WRONG ANSWER0.20 / 1.002details
#7WRONG ANSWER0.20 / 1.002details
#8WRONG ANSWER0.22 / 1.002details
#9WRONG ANSWER0.23 / 1.002details
#10WRONG ANSWER0.23 / 1.002details
#11TIME LIMIT EXCEEDED-- / 1.003details
#12TIME LIMIT EXCEEDED-- / 1.003details
#13TIME LIMIT EXCEEDED-- / 1.003details
#14TIME LIMIT EXCEEDED-- / 1.003details
#15TIME LIMIT EXCEEDED-- / 1.003details

Code

'''
Created on 10.10.2015

@author: siiri
'''
from math import sqrt
n, m, puut = input().split(" ")
n=int(n)
m=int(m)
puut=int(puut)
nn=[]
nnn=[0]
for i in range(0,m):
    nnn.append(0)
nn.append(nnn)
i=1
while i<=n:
    s=input()
    h=0
    nnn=[0]
    summa=0
    while h<m:
        if s[h] == "*":
            summa+=1
        nnn.append(summa+nn[i-1][h+1])
        h+=1
    nn.append(nnn)
    i+=1
tulos=0
if n<499:
    x=0
    sivu=sqrt(puut)//1
    if sqrt(puut)%1>0: sivu+=1
    sivu=int(sivu)
    tulos=0
    while sivu<=n and sivu<=m:
        x=0
        while x+sivu<=n:
            y=0
            while y+sivu<=m:
                if nn[x][y]+nn[x+sivu][y+sivu]-nn[x][y+sivu]-nn[x+sivu][y]==puut:
                    tulos+=1
                y+=1
            x+=1
        sivu+=1
        
else:
    if puut<nn[-1][-1]:
        print("lol")
    else:
        g=0
        while g<10:
            g=0
print(tulos)
            
            
            

Test details

Test 1

Group: 1

Verdict: ACCEPTED

input
10 10 1
......*...
.......*..
*..*....*.
*....*....
...
view   save

correct output
94

view   save

user output
94

view   save

Test 2

Group: 1

Verdict: ACCEPTED

input
10 10 5
**********
**********
**********
**********
...
view   save

correct output
0

view   save

user output
0

view   save

Test 3

Group: 1

Verdict: ACCEPTED

input
10 10 10
**...*...*
*..*.**.*.
...**.*..*
*...**.*..
...
view   save

correct output
4

view   save

user output
4

view   save

Test 4

Group: 1

Verdict: ACCEPTED

input
10 10 5
****......
*.*.**..**
....*.*..*
...*.***..
...
view   save

correct output
16

view   save

user output
16

view   save

Test 5

Group: 1

Verdict: ACCEPTED

input
10 10 2
**.***..*.
...*.*....
.***.*...*
***.***..*
...
view   save

correct output
30

view   save

user output
30

view   save

Test 6

Group: 2

Verdict: WRONG ANSWER

input
500 500 1
.................................
view   save

correct output
9552040

view   save

user output
lol
0

view   save

Test 7

Group: 2

Verdict: WRONG ANSWER

input
500 500 5
.................................
view   save

correct output
1536063

view   save

user output
lol
0

view   save

Test 8

Group: 2

Verdict: WRONG ANSWER

input
500 500 25000
**...*...**..*.*..*.**.*..*.*....
view   save

correct output
288

view   save

user output
lol
0

view   save

Test 9

Group: 2

Verdict: WRONG ANSWER

input
500 500 12500
**.**.*..*...*.**...*.***........
view   save

correct output
786

view   save

user output
lol
0

view   save

Test 10

Group: 2

Verdict: WRONG ANSWER

input
500 500 5000
.*.*.**..*.*.**.**..*..**...*....
view   save

correct output
1763

view   save

user output
lol
0

view   save

Test 11

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
2000 2000 1
.................................
view   save

correct output
489611392

view   save

user output
(empty)

Test 12

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
2000 2000 5
.................................
view   save

correct output
120725884

view   save

user output
(empty)

Test 13

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
2000 2000 400000
..*..**.**.**.*.***...**.*..**...
view   save

correct output
1849

view   save

user output
(empty)

Test 14

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
2000 2000 200000
***.*....*.*..*....**..*..*.*....
view   save

correct output
2665

view   save

user output
(empty)

Test 15

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
2000 2000 80000
**.**...*.***.**....**.*....*....
view   save

correct output
5587

view   save

user output
(empty)