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 23:58:1047
2015-10-11 23:53:560
2015-10-11 23:44:4314
2015-10-11 01:05:300
2015-10-10 18:31:5714
2015-10-06 11:06:0347
2015-10-06 10:43:140
2015-10-06 10:33:130
2015-09-30 19:09:4214
2015-09-30 18:50:280
Task:Tontti
Sender:MusserO
Submission time:2015-10-11 23:44:43
Language:C++
Status:READY
Score:14

Feedback

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

Test results

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

Code

#include <iostream>
#include <algorithm>

using namespace std;

int main(int argc, char** argv) {
    long long n, m, x;
    long long v = 0;
    cin >> n >> m >> x;
    string s;
    long long r[min(n, m)+1][n][m];
    for (long long i = 0; i < n; ++i){
        cin >> s;
        for (long long j = 0; j < m; ++j){
            r[0][i][j] = 0;
            r[1][i][j] = s[j] == '*';
            if (r[1][i][j] == x) ++v;
        }
    }
    for (long long k = 2; k <= min(n, m); ++k){
        for (long long i = k-1; i < n; ++i){
            for (long long j = k-1; j < m; ++j){
                r[k][i][j] = r[1][i][j] + r[k-1][i-1][j] + r[k-1][i][j-1] -
                             r[k-2][i-1][j-1] + r[1][i-k+1][j-k+1];
                if (r[k][i][j] == x) ++v;
            }
        }
    }
    cout << v << "\n";
    return 0;
}

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: RUNTIME ERROR

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

correct output
9552040

view   save

user output
(empty)

Test 7

Group: 2

Verdict: RUNTIME ERROR

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

correct output
1536063

view   save

user output
(empty)

Test 8

Group: 2

Verdict: RUNTIME ERROR

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

correct output
288

view   save

user output
(empty)

Test 9

Group: 2

Verdict: RUNTIME ERROR

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

correct output
786

view   save

user output
(empty)

Test 10

Group: 2

Verdict: RUNTIME ERROR

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

correct output
1763

view   save

user output
(empty)

Test 11

Group: 3

Verdict: RUNTIME ERROR

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

correct output
489611392

view   save

user output
(empty)

Test 12

Group: 3

Verdict: RUNTIME ERROR

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

correct output
120725884

view   save

user output
(empty)

Test 13

Group: 3

Verdict: RUNTIME ERROR

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

correct output
1849

view   save

user output
(empty)

Test 14

Group: 3

Verdict: RUNTIME ERROR

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

correct output
2665

view   save

user output
(empty)

Test 15

Group: 3

Verdict: RUNTIME ERROR

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

correct output
5587

view   save

user output
(empty)