Code Submission Evaluation System Login

Datatähti 2019 alku

Start:2018-10-01 00:00:00
End:2018-10-15 00:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - Datatähti 2019 alku - Results
History
2018-10-02 22:21:310
2018-10-02 17:50:170
2018-10-01 12:50:41100
2018-10-01 12:34:570
2018-10-01 12:30:190
2018-10-01 11:33:400
Task:Kolikot
Sender:nko
Submission time:2018-10-02 22:21:31
Language:C++
Status:READY
Score:0

Feedback

groupverdictscore
#1WRONG ANSWER0
#2WRONG ANSWER0
#3WRONG ANSWER0

Test results

testverdicttime (s)group
#1WRONG ANSWER0.22 / 1.001details
#2WRONG ANSWER0.22 / 1.001details
#3WRONG ANSWER0.24 / 1.001details
#4WRONG ANSWER0.23 / 1.001details
#5WRONG ANSWER0.23 / 1.001details
#6WRONG ANSWER0.23 / 1.001details
#7WRONG ANSWER0.23 / 1.001details
#8WRONG ANSWER0.25 / 1.001details
#9WRONG ANSWER0.22 / 1.001details
#10WRONG ANSWER0.23 / 1.001details
#11WRONG ANSWER0.23 / 1.002details
#12WRONG ANSWER0.23 / 1.002details
#13WRONG ANSWER0.23 / 1.002details
#14WRONG ANSWER0.23 / 1.002details
#15WRONG ANSWER0.23 / 1.002details
#16WRONG ANSWER0.23 / 1.002details
#17WRONG ANSWER0.23 / 1.002details
#18WRONG ANSWER0.24 / 1.002details
#19WRONG ANSWER0.24 / 1.002details
#20WRONG ANSWER0.23 / 1.002details
#21WRONG ANSWER0.25 / 1.003details
#22WRONG ANSWER0.23 / 1.003details
#23WRONG ANSWER0.23 / 1.003details
#24WRONG ANSWER0.24 / 1.003details
#25WRONG ANSWER0.24 / 1.003details
#26WRONG ANSWER0.39 / 1.003details
#27TIME LIMIT EXCEEDED-- / 1.003details
#28TIME LIMIT EXCEEDED-- / 1.003details
#29TIME LIMIT EXCEEDED-- / 1.003details
#30TIME LIMIT EXCEEDED-- / 1.003details

Code

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>

using namespace std;

int main()
{
    int n, k, i, j, a;
    vector <int> taulukko;
    cin >> n >> k;

    for(i = 0; i < n; i++){
        cin >> a;
        taulukko.push_back(a);
    }

    auto left = taulukko.begin();
    auto right = taulukko.begin();
    int *table = new int[101000001]();
    
    i = a = 0;
    j = 1;
    for(;left < taulukko.end();left++){
        right = left;
        for(;right < taulukko.end();right++){
            
            if(table[*right]!=j){
                a++;
                table[*right] = j;
            }
            
            if(a > k)
                break;
            
            i++;
            
        }
        a = 0;
        j++;
    }

    cout << i << endl;

    return 0;
}

Test details

Test 1

Group: 1

Verdict: WRONG ANSWER

input
1
view   save

correct output
1
1
view   save

user output
0
view   save

Test 2

Group: 1

Verdict: WRONG ANSWER

input
2
view   save

correct output
1
2
view   save

user output
0
view   save

Test 3

Group: 1

Verdict: WRONG ANSWER

input
3
view   save

correct output
2
1 2
view   save

user output
6
view   save

Test 4

Group: 1

Verdict: WRONG ANSWER

input
4
view   save

correct output
2
1 3
view   save

user output
10
view   save

Test 5

Group: 1

Verdict: WRONG ANSWER

input
5
view   save

correct output
2
1 4
view   save

user output
0
view   save

Test 6

Group: 1

Verdict: WRONG ANSWER

input
6
view   save

correct output
3
1 2 3
view   save

user output
0
view   save

Test 7

Group: 1

Verdict: WRONG ANSWER

input
7
view   save

correct output
3
1 2 4
view   save

user output
28
view   save

Test 8

Group: 1

Verdict: WRONG ANSWER

input
8
view   save

correct output
3
1 2 5
view   save

user output
36
view   save

Test 9

Group: 1

Verdict: WRONG ANSWER

input
9
view   save

correct output
3
1 2 6
view   save

user output
0
view   save

Test 10

Group: 1

Verdict: WRONG ANSWER

input
10
view   save

correct output
4
1 2 3 4
view   save

user output
0
view   save

Test 11

Group: 2

Verdict: WRONG ANSWER

input
11
view   save

correct output
4
1 2 3 5
view   save

user output
66
view   save

Test 12

Group: 2

Verdict: WRONG ANSWER

input
54
view   save

correct output
9
1 2 3 4 5 6 7 8 18
view   save

user output
1485
view   save

Test 13

Group: 2

Verdict: WRONG ANSWER

input
55
view   save

correct output
10
1 2 3 4 5 6 7 8 9 10
view   save

user output
0
view   save

Test 14

Group: 2

Verdict: WRONG ANSWER

input
56
view   save

correct output
10
1 2 3 4 5 6 7 8 9 11
view   save

user output
1596
view   save

Test 15

Group: 2

Verdict: WRONG ANSWER

input
123
view   save

correct output
15
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
7626
view   save

Test 16

Group: 2

Verdict: WRONG ANSWER

input
819
view   save

correct output
39
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
335790
view   save

Test 17

Group: 2

Verdict: WRONG ANSWER

input
820
view   save

correct output
40
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
336610
view   save

Test 18

Group: 2

Verdict: WRONG ANSWER

input
821
view   save

correct output
40
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
0
view   save

Test 19

Group: 2

Verdict: WRONG ANSWER

input
999
view   save

correct output
44
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
0
view   save

Test 20

Group: 2

Verdict: WRONG ANSWER

input
1000
view   save

correct output
44
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
500500
view   save

Test 21

Group: 3

Verdict: WRONG ANSWER

input
1274
view   save

correct output
49
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
812175
view   save

Test 22

Group: 3

Verdict: WRONG ANSWER

input
1275
view   save

correct output
50
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
813450
view   save

Test 23

Group: 3

Verdict: WRONG ANSWER

input
1276
view   save

correct output
50
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
814726
view   save

Test 24

Group: 3

Verdict: WRONG ANSWER

input
12345
view   save

correct output
156
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
0
view   save

Test 25

Group: 3

Verdict: WRONG ANSWER

input
123456
view   save

correct output
496
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
0
view   save

Test 26

Group: 3

Verdict: WRONG ANSWER

input
10000000
view   save

correct output
4471
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
0
view   save

Test 27

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
100000000
view   save

correct output
14141
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
(no output)
view   save

Test 28

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
500000000
view   save

correct output
31622
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
(no output)
view   save

Test 29

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
999999999
view   save

correct output
44720
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
(no output)
view   save

Test 30

Group: 3

Verdict: TIME LIMIT EXCEEDED

input
1000000000
view   save

correct output
44720
1 2 3 4 5 6 7 8 9 10 11 12 13 ...
view   save

user output
(no output)
view   save