Submission details
Task:Cow heist
Sender:aalto26bw_008
Submission time:2026-09-09 16:28:08 +0300
Language:C++ (C++20)
Status:READY
Result:ACCEPTED
Test results
testverdicttime
#1ACCEPTED0.00 sdetails
#2ACCEPTED0.00 sdetails
#3ACCEPTED0.00 sdetails
#4ACCEPTED0.00 sdetails
#5ACCEPTED0.00 sdetails
#6ACCEPTED0.00 sdetails
#7ACCEPTED0.00 sdetails
#8ACCEPTED0.00 sdetails
#9ACCEPTED0.00 sdetails
#10ACCEPTED0.00 sdetails
#11ACCEPTED0.00 sdetails
#12ACCEPTED0.00 sdetails
#13ACCEPTED0.00 sdetails
#14ACCEPTED0.00 sdetails
#15ACCEPTED0.00 sdetails
#16ACCEPTED0.00 sdetails
#17ACCEPTED0.00 sdetails
#18ACCEPTED0.00 sdetails
#19ACCEPTED0.00 sdetails
#20ACCEPTED0.00 sdetails
#21ACCEPTED0.00 sdetails
#22ACCEPTED0.00 sdetails
#23ACCEPTED0.00 sdetails
#24ACCEPTED0.00 sdetails
#25ACCEPTED0.00 sdetails
#26ACCEPTED0.00 sdetails
#27ACCEPTED0.00 sdetails
#28ACCEPTED0.00 sdetails
#29ACCEPTED0.00 sdetails
#30ACCEPTED0.00 sdetails
#31ACCEPTED0.00 sdetails
#32ACCEPTED0.00 sdetails
#33ACCEPTED0.00 sdetails
#34ACCEPTED0.00 sdetails
#35ACCEPTED0.00 sdetails
#36ACCEPTED0.00 sdetails
#37ACCEPTED0.00 sdetails
#38ACCEPTED0.00 sdetails
#39ACCEPTED0.00 sdetails
#40ACCEPTED0.00 sdetails
#41ACCEPTED0.00 sdetails
#42ACCEPTED0.00 sdetails
#43ACCEPTED0.00 sdetails
#44ACCEPTED0.00 sdetails
#45ACCEPTED0.00 sdetails
#46ACCEPTED0.00 sdetails
#47ACCEPTED0.00 sdetails
#48ACCEPTED0.00 sdetails
#49ACCEPTED0.00 sdetails
#50ACCEPTED0.00 sdetails
#51ACCEPTED0.00 sdetails
#52ACCEPTED0.00 sdetails
#53ACCEPTED0.00 sdetails
#54ACCEPTED0.00 sdetails
#55ACCEPTED0.00 sdetails
#56ACCEPTED0.00 sdetails
#57ACCEPTED0.00 sdetails
#58ACCEPTED0.01 sdetails
#59ACCEPTED0.01 sdetails
#60ACCEPTED0.01 sdetails
#61ACCEPTED0.01 sdetails
#62ACCEPTED0.01 sdetails

Code

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define die(x) return cout << x << endl, 0
#define all(o) o.begin(), o.end()
#define endl '\n'
#define IOS ios::sync_with_stdio(0), cin.tie(0)
#define FILE freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)
#define SZ(x) ((int)(x).size())
typedef long double ld;
typedef long long ll;
int gcd(int x,int y){ return (!y ? x : gcd(y, x%y)); }
int to_int(string sconvert){stringstream geek(sconvert);int xconvert = 0; geek >> xconvert; return xconvert;}
const int MAXN=200000+30,MAX_LOG=40,INF=1e18+10,MOD=1e9+7;
const double PI = acos(-1);
int mod(int x) { return (x % MOD + MOD) % MOD; }
int power(int x,int y){
    if(y==0)return 1;
    int c=power(x,y/2);
    c=(c*c)%MOD;
    if(y%2)c=(c*x)%MOD;
    return c;
}


// vector<int> g[MAXN];
// int visited[MAXN];
// int color[MAXN];
// int max_color = 1;
// int is_impossible = 0;

// vector<pair<int,int>> edges;
// int dfs(int v, int root){
//     visited[v]=1;

//     int ones = 0;
//     int twos = 0;
//     int is_leaf = 1;
//     for(int u:g[v]){
//         // cout <<v<<"pp pp"<<u<<" " <<visited[u]<<endl;
//         if(!visited[u]){
//             is_leaf = 0;
//             int c = dfs(u, root);
//             if (c == 1) ones++;
//             else twos ++;
//         }
//         else{
//             int c = color [u];
//             // cout <<c<<endl;
//             if (c != 0){
//                 if (c == 1) ones++;
//                 else twos ++; 
//             }
//         }
//     }

//     if(is_leaf){
//         // cout<<v<<" kk"<<g[v].size()<<endl;

//         color[v] = 1;
//         return 1;
//     }

//     // cout<<ones<<" "<<twos<<"--- "<<v<<endl;
//     if (ones>0 && twos >0){
//         is_impossible=1;
//         return 1;
//     }
//     else if (ones>=0){
//         color[v]=2;
//         return 2;
//     }
//     else{
//         color[v]=1;
//         return 1;
//     }
// }




// int a[MAXN];
// int b[MAXN];
int n, m;

int MAIN(){
    int n;
    cin >> n;

    for (int i = 0; i < n; i++) {
        int cows;
        cin>>cows;
    }

    for (int i = 0; i < 30; i++) {
        if (i > 0) cout << ' ';
        cout << (i < 20 ? (1LL << i) : 0);
    }
    cout << endl;
    return 0;
}
int32_t main(){
    IOS;
    int t=1;
    // cin>>t;
    while(t--)MAIN();
    return 0;
}

Test details

Test 1

Verdict: ACCEPTED

input
1
11

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

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

Test 2

Verdict: ACCEPTED

input
2
9 20

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

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

Test 3

Verdict: ACCEPTED

input
3
18 2 8

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

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

Test 4

Verdict: ACCEPTED

input
3
4 9 15

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

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

Test 5

Verdict: ACCEPTED

input
3
4 16 15

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

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

Test 6

Verdict: ACCEPTED

input
4
8 10 6 14

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

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

Test 7

Verdict: ACCEPTED

input
4
14 15 6 9

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

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

Test 8

Verdict: ACCEPTED

input
5
11 12 15 17 13

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

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

Test 9

Verdict: ACCEPTED

input
5
9 20 15 19 1

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

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

Test 10

Verdict: ACCEPTED

input
5
9 4 1 19 11

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

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

Test 11

Verdict: ACCEPTED

input
5
12 2 15 17 6

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

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

Test 12

Verdict: ACCEPTED

input
5
20 19 11 4 20

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

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

Test 13

Verdict: ACCEPTED

input
5
5 2 18 17 5

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

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

Test 14

Verdict: ACCEPTED

input
5
18 19 7 5 17

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

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

Test 15

Verdict: ACCEPTED

input
5
2 5 16 7 9

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

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

Test 16

Verdict: ACCEPTED

input
5
18 1 20 5 18

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

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

Test 17

Verdict: ACCEPTED

input
5
1 8 11 10 10

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

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

Test 18

Verdict: ACCEPTED

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
1 2 4 8 16 32 64 128 256 512 1...

Test 19

Verdict: ACCEPTED

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 2 4 8 16 32 64 128 256 512 1...

Test 20

Verdict: ACCEPTED

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 2 4 8 16 32 64 128 256 512 1...

Test 21

Verdict: ACCEPTED

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
1 2 4 8 16 32 64 128 256 512 1...

Test 22

Verdict: ACCEPTED

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
1 2 4 8 16 32 64 128 256 512 1...

Test 23

Verdict: ACCEPTED

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
1 2 4 8 16 32 64 128 256 512 1...

Test 24

Verdict: ACCEPTED

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 4 8 16 32 64 128 256 512 1...

Test 25

Verdict: ACCEPTED

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
1 2 4 8 16 32 64 128 256 512 1...

Test 26

Verdict: ACCEPTED

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 2 4 8 16 32 64 128 256 512 1...

Test 27

Verdict: ACCEPTED

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 2 4 8 16 32 64 128 256 512 1...

Test 28

Verdict: ACCEPTED

input
100
548938 592979 715351 844456 60...

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

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

Test 29

Verdict: ACCEPTED

input
100
417116 997410 720487 932768 11...

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

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

Test 30

Verdict: ACCEPTED

input
100
436094 185124 25933 931751 549...

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

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

Test 31

Verdict: ACCEPTED

input
100
550922 70741 708308 840139 290...

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

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

Test 32

Verdict: ACCEPTED

input
100
967248 900825 547356 172735 97...

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

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

Test 33

Verdict: ACCEPTED

input
100
222044 55193 870929 831516 206...

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

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

Test 34

Verdict: ACCEPTED

input
100
893062 947690 332055 209454 82...

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

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

Test 35

Verdict: ACCEPTED

input
100
76326 227391 780095 319045 438...

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

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

Test 36

Verdict: ACCEPTED

input
100
873627 11117 968759 239494 869...

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

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

Test 37

Verdict: ACCEPTED

input
100
10377 364544 501988 499243 495...

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

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

Test 38

Verdict: ACCEPTED

input
200
548938 592979 715351 844456 60...

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

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

Test 39

Verdict: ACCEPTED

input
200
417116 997410 720487 932768 11...

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

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

Test 40

Verdict: ACCEPTED

input
200
436094 185124 25933 931751 549...

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

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

Test 41

Verdict: ACCEPTED

input
200
550922 70741 708308 840139 290...

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

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

Test 42

Verdict: ACCEPTED

input
200
967248 900825 547356 172735 97...

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

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

Test 43

Verdict: ACCEPTED

input
200
222044 55193 870929 831516 206...

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

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

Test 44

Verdict: ACCEPTED

input
200
893062 947690 332055 209454 82...

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

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

Test 45

Verdict: ACCEPTED

input
200
76326 227391 780095 319045 438...

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

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

Test 46

Verdict: ACCEPTED

input
200
873627 11117 968759 239494 869...

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

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

Test 47

Verdict: ACCEPTED

input
200
10377 364544 501988 499243 495...

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

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

Test 48

Verdict: ACCEPTED

input
1000
548938 592979 715351 844456 60...

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

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

Test 49

Verdict: ACCEPTED

input
1000
417116 997410 720487 932768 11...

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

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

Test 50

Verdict: ACCEPTED

input
1000
436094 185124 25933 931751 549...

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

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

Test 51

Verdict: ACCEPTED

input
1000
550922 70741 708308 840139 290...

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

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

Test 52

Verdict: ACCEPTED

input
1000
967248 900825 547356 172735 97...

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

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

Test 53

Verdict: ACCEPTED

input
1000
222044 55193 870929 831516 206...

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

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

Test 54

Verdict: ACCEPTED

input
1000
893062 947690 332055 209454 82...

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

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

Test 55

Verdict: ACCEPTED

input
1000
76326 227391 780095 319045 438...

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

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

Test 56

Verdict: ACCEPTED

input
1000
873627 11117 968759 239494 869...

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

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

Test 57

Verdict: ACCEPTED

input
1000
10377 364544 501988 499243 495...

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

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

Test 58

Verdict: ACCEPTED

input
100000
548938 592979 715351 844456 60...

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

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

Test 59

Verdict: ACCEPTED

input
100000
417116 997410 720487 932768 11...

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

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

Test 60

Verdict: ACCEPTED

input
100000
436094 185124 25933 931751 549...

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

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

Test 61

Verdict: ACCEPTED

input
100000
550922 70741 708308 840139 290...

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

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

Test 62

Verdict: ACCEPTED

input
100000
967248 900825 547356 172735 97...

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

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