CSES - Aalto Competitive Programming 2024 - wk2 - Wed - Results
Submission details
Task:Cow heist
Sender:aalto2024b_004
Submission time:2024-09-11 17:50:04 +0300
Language:C++11
Status:READY
Result:
Test results
testverdicttime
#10.00 sdetails
#20.00 sdetails
#30.00 sdetails
#40.00 sdetails
#50.00 sdetails
#60.00 sdetails
#70.00 sdetails
#80.00 sdetails
#90.00 sdetails
#100.00 sdetails
#110.00 sdetails
#120.00 sdetails
#130.00 sdetails
#140.00 sdetails
#150.00 sdetails
#160.00 sdetails
#170.00 sdetails
#180.00 sdetails
#190.00 sdetails
#200.00 sdetails
#210.00 sdetails
#220.00 sdetails
#230.00 sdetails
#240.00 sdetails
#250.00 sdetails
#260.00 sdetails
#270.00 sdetails
#280.00 sdetails
#290.00 sdetails
#300.00 sdetails
#310.00 sdetails
#320.01 sdetails
#330.00 sdetails
#340.00 sdetails
#350.00 sdetails
#360.00 sdetails
#370.00 sdetails
#380.00 sdetails
#390.00 sdetails
#400.00 sdetails
#410.00 sdetails
#420.00 sdetails
#430.00 sdetails
#440.00 sdetails
#450.00 sdetails
#460.00 sdetails
#470.00 sdetails
#480.00 sdetails
#490.00 sdetails
#500.00 sdetails
#510.01 sdetails
#520.00 sdetails
#530.00 sdetails
#540.00 sdetails
#550.00 sdetails
#560.00 sdetails
#570.00 sdetails
#580.75 sdetails
#590.75 sdetails
#600.75 sdetails
#610.75 sdetails
#620.75 sdetails

Code

#include<iostream>
#include<vector>
#include <algorithm>
using namespace std;



int main(){
    int n;
    cin >> n;
    vector<int> c(n);
    vector<int> X(30);
    for(int i = 0; i < n; ++i)
        cin>> c[i];

    sort(c.begin(), c.end());
    int j = 0;
    for(int i = 0; i < n; ++i ){
        int act = c[i];
        if(c[i] != 0){
            X[j] = act;
            ++j;}
        for(int ix = i; ix < n; ++ix){
            c[i] -= act;
        }
    }
    for(int i = 0; i < n; ++i)
        cout << X[i] <<' ';
    cout <<endl;
}

Test details

Test 1

Verdict:

input
1
11

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
11 

Test 2

Verdict:

input
2
9 20

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
9 20 

Test 3

Verdict:

input
3
18 2 8

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
2 8 18 

Test 4

Verdict:

input
3
4 9 15

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
4 9 15 

Test 5

Verdict:

input
3
4 16 15

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
4 15 16 

Test 6

Verdict:

input
4
8 10 6 14

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
6 8 10 14 

Test 7

Verdict:

input
4
14 15 6 9

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
6 9 14 15 

Test 8

Verdict:

input
5
11 12 15 17 13

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
11 12 13 15 17 

Test 9

Verdict:

input
5
9 20 15 19 1

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
1 9 15 19 20 

Test 10

Verdict:

input
5
9 4 1 19 11

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
1 4 9 11 19 

Test 11

Verdict:

input
5
12 2 15 17 6

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
2 6 12 15 17 

Test 12

Verdict:

input
5
20 19 11 4 20

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
4 11 19 20 20 

Test 13

Verdict:

input
5
5 2 18 17 5

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
2 5 5 17 18 

Test 14

Verdict:

input
5
18 19 7 5 17

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
5 7 17 18 19 

Test 15

Verdict:

input
5
2 5 16 7 9

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
2 5 7 9 16 

Test 16

Verdict:

input
5
18 1 20 5 18

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
1 5 18 18 20 

Test 17

Verdict:

input
5
1 8 11 10 10

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
1 8 10 10 11 

Test 18

Verdict:

input
10
11 12 15 17 13 18 11 17 9 13

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
9 11 11 12 13 13 15 17 17 18 

Test 19

Verdict:

input
10
9 20 15 19 1 3 7 20 3 5

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
1 3 3 5 7 9 15 19 20 20 

Test 20

Verdict:

input
10
9 4 1 19 11 19 9 10 9 7

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
1 4 7 9 9 9 10 11 19 19 

Test 21

Verdict:

input
10
12 2 15 17 6 3 11 12 18 9

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
2 3 6 9 11 12 12 15 17 18 

Test 22

Verdict:

input
10
20 19 11 4 20 18 15 13 14 12

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
4 11 12 13 14 15 18 19 20 20 

Test 23

Verdict:

input
10
5 2 18 17 5 8 19 20 10 2

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
2 2 5 5 8 10 17 18 19 20 

Test 24

Verdict:

input
10
18 19 7 5 17 2 1 8 3 20

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
1 2 3 5 7 8 17 18 19 20 

Test 25

Verdict:

input
10
2 5 16 7 9 20 15 10 20 7

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
2 5 7 7 9 10 15 16 20 20 

Test 26

Verdict:

input
10
18 1 20 5 18 8 11 17 5 9

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
1 5 5 8 9 11 17 18 18 20 

Test 27

Verdict:

input
10
1 8 11 10 10 1 3 7 3 1

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
1 1 1 3 3 7 8 10 10 11 

Test 28

Verdict:

input
100
548938 592979 715351 844456 60...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 29

Verdict:

input
100
417116 997410 720487 932768 11...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 30

Verdict:

input
100
436094 185124 25933 931751 549...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 31

Verdict:

input
100
550922 70741 708308 840139 290...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 32

Verdict:

input
100
967248 900825 547356 172735 97...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 33

Verdict:

input
100
222044 55193 870929 831516 206...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 34

Verdict:

input
100
893062 947690 332055 209454 82...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 35

Verdict:

input
100
76326 227391 780095 319045 438...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 36

Verdict:

input
100
873627 11117 968759 239494 869...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 37

Verdict:

input
100
10377 364544 501988 499243 495...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 38

Verdict:

input
200
548938 592979 715351 844456 60...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 39

Verdict:

input
200
417116 997410 720487 932768 11...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 40

Verdict:

input
200
436094 185124 25933 931751 549...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 41

Verdict:

input
200
550922 70741 708308 840139 290...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 42

Verdict:

input
200
967248 900825 547356 172735 97...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 43

Verdict:

input
200
222044 55193 870929 831516 206...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 44

Verdict:

input
200
893062 947690 332055 209454 82...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 45

Verdict:

input
200
76326 227391 780095 319045 438...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 46

Verdict:

input
200
873627 11117 968759 239494 869...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 47

Verdict:

input
200
10377 364544 501988 499243 495...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 48

Verdict:

input
1000
548938 592979 715351 844456 60...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 49

Verdict:

input
1000
417116 997410 720487 932768 11...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 50

Verdict:

input
1000
436094 185124 25933 931751 549...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 51

Verdict:

input
1000
550922 70741 708308 840139 290...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 52

Verdict:

input
1000
967248 900825 547356 172735 97...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 53

Verdict:

input
1000
222044 55193 870929 831516 206...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 54

Verdict:

input
1000
893062 947690 332055 209454 82...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 55

Verdict:

input
1000
76326 227391 780095 319045 438...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 56

Verdict:

input
1000
873627 11117 968759 239494 869...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 57

Verdict:

input
1000
10377 364544 501988 499243 495...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Error:
malloc(): corrupted top size

Test 58

Verdict:

input
100000
548938 592979 715351 844456 60...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Test 59

Verdict:

input
100000
417116 997410 720487 932768 11...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Test 60

Verdict:

input
100000
436094 185124 25933 931751 549...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Test 61

Verdict:

input
100000
550922 70741 708308 840139 290...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)

Test 62

Verdict:

input
100000
967248 900825 547356 172735 97...

correct output
1 2 4 8 16 32 64 128 256 512 1...

user output
(empty)