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-10-11 18:35:450
2015-10-11 18:34:21
2015-10-11 18:30:45
2015-10-11 18:29:15
2015-10-10 21:49:2647
2015-10-07 10:17:460
2015-10-06 18:48:3114
2015-10-06 18:41:490
2015-10-06 00:50:570
2015-10-06 00:40:010
Task:Tontti
Sender:BigKappa
Submission time:2015-10-07 10:17:46
Language:Python3
Status:READY
Score:0

Feedback

groupverdictscore
#1RUNTIME ERROR0
#2RUNTIME ERROR0
#3RUNTIME ERROR0

Test results

testverdicttime (s)group
#1RUNTIME ERROR0.09 / 1.001details
#2RUNTIME ERROR0.07 / 1.001details
#3RUNTIME ERROR0.08 / 1.001details
#4RUNTIME ERROR0.08 / 1.001details
#5RUNTIME ERROR0.08 / 1.001details
#6RUNTIME ERROR0.08 / 1.002details
#7RUNTIME ERROR0.08 / 1.002details
#8RUNTIME ERROR0.09 / 1.002details
#9RUNTIME ERROR0.09 / 1.002details
#10RUNTIME ERROR0.10 / 1.002details
#11RUNTIME ERROR0.08 / 1.003details
#12RUNTIME ERROR0.09 / 1.003details
#13RUNTIME ERROR0.08 / 1.003details
#14RUNTIME ERROR0.09 / 1.003details
#15RUNTIME ERROR0.07 / 1.003details

Code

def countTrees(array, x, y, s):
    ret = 0
    for y1 in range(y, y + s):
        ret += sum(array[y1][x:x+s])
        #print(arr[y1][x:x+s])
    #print("\n")
    return ret

def search(array, s):
    for x in range(arrX - s + 1):
        #print("x: "+str(x))
        for y in range(arrY - s + 1):
            #print("y: "+str(y))
            if countTrees(array, x, y, s) < n:
                pass
            elif countTrees(array, x, y, s) > n:
                search(array, s - 1)
            if countTrees(array, x, y, s) == n:
                #print("found")
                out += 1

def main():
    data = str.split(input())
    arrY = int(data[0])
    arrX = int(data[1])
    n = int(data[2])
    out = 0

    #initialize array
    for y in range(arrY):
        arr.append([])
        for x in range(arrX):
            arr[y].append(False)

    for y in range(arrY):
        row = input()
        for x in range(arrX):
            if row[x] == ".":
                arr[y][x] = False
            else:
                arr[y][x] = True
    
    search(arr, min(arrX, arrY))

    print(out)
        
if __name__ == "__main__":
    main()

Test details

Test 1

Group: 1

Verdict: RUNTIME ERROR

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

correct output
94

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 2

Group: 1

Verdict: RUNTIME ERROR

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

correct output
0

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 3

Group: 1

Verdict: RUNTIME ERROR

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

correct output
4

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 4

Group: 1

Verdict: RUNTIME ERROR

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

correct output
16

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 5

Group: 1

Verdict: RUNTIME ERROR

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

correct output
30

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 6

Group: 2

Verdict: RUNTIME ERROR

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

correct output
9552040

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 7

Group: 2

Verdict: RUNTIME ERROR

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

correct output
1536063

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 8

Group: 2

Verdict: RUNTIME ERROR

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

correct output
288

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 9

Group: 2

Verdict: RUNTIME ERROR

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

correct output
786

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 10

Group: 2

Verdict: RUNTIME ERROR

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

correct output
1763

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 11

Group: 3

Verdict: RUNTIME ERROR

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

correct output
489611392

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 12

Group: 3

Verdict: RUNTIME ERROR

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

correct output
120725884

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 13

Group: 3

Verdict: RUNTIME ERROR

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

correct output
1849

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 14

Group: 3

Verdict: RUNTIME ERROR

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

correct output
2665

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined

Test 15

Group: 3

Verdict: RUNTIME ERROR

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

correct output
5587

view   save

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 48, in <module>
    main()
  File "input/code.py", line 31, in main
    arr.append([])
NameError: name 'arr' is not defined