Submission #852137

# Submission time Handle Problem Language Result Execution time Memory
852137 2023-09-21T09:56:46 Z Rafi22 Broken Device (JOI17_broken_device) C++14
0 / 100
32 ms 2716 KB
#include <bits/stdc++.h>
#include "Annalib.h"

#define ll long long
#define ld long double
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
using namespace std;
//int inf=1000000007;
//int mod=1000000007;
//int mod1=998244353;

bool bad[157];
int res[157];

void Anna(int n,ll x,int k,int P[])
{
    for(int i=0;i<150;i++)
    {
        bad[i]=0;
        res[i]=0;
    }
    for(int i=0;i<k;i++) bad[P[i]]=1;
    srand(2137);
    vector<int>X;
    for(int i=59;i>=0;i--)
    {
        if(i<=29) X.pb(i);
        X.pb(i);
        X.pb(i);
    }
    random_shuffle(all(X));
    for(int i=59;i>=0;i--)
    {
        for(int j=0;j<150;j++)
        {
            if(X[j]==i&&!bad[j]&&x>=(1LL<<i))
            {
                res[j]=1;
                x-=(1LL<<i);
            }
        }
    }
    if(x!=0) cout<<"XDDDDDD"<<endl;
    for(int i=0;i<150;i++) Set(i,res[i]);
}

#include <bits/stdc++.h>
#include "Brunolib.h"

#define ll long long
#define ld long double
#define endl '\n'
#define st first
#define nd second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
using namespace std;
//int inf=1000000007;
//int mod=1000000007;
//int mod1=998244353;

ll Bruno(int n,int a[])
{
    srand(2137);
    vector<int>X;
    for(int i=59;i>=0;i--)
    {
        if(i<=29) X.pb(i);
        X.pb(i);
        X.pb(i);
    }
    random_shuffle(all(X));
    ll wyn=0;
    for(int i=0;i<150;i++)
    {
        if(a[i]==1) wyn+=(1LL<<X[i]);
    }
    return wyn;
}

# Verdict Execution time Memory Grader output
1 Incorrect 25 ms 2396 KB Program terminated incorrectly, or you printed something to stdout
2 Incorrect 26 ms 2484 KB Program terminated incorrectly, or you printed something to stdout
3 Incorrect 26 ms 2540 KB Program terminated incorrectly, or you printed something to stdout
4 Incorrect 26 ms 2300 KB Program terminated incorrectly, or you printed something to stdout
5 Incorrect 25 ms 2308 KB Program terminated incorrectly, or you printed something to stdout
6 Incorrect 25 ms 2300 KB Program terminated incorrectly, or you printed something to stdout
7 Incorrect 28 ms 2612 KB Program terminated incorrectly, or you printed something to stdout
8 Incorrect 26 ms 2408 KB Program terminated incorrectly, or you printed something to stdout
9 Incorrect 27 ms 2300 KB Program terminated incorrectly, or you printed something to stdout
10 Incorrect 27 ms 2376 KB Program terminated incorrectly, or you printed something to stdout
11 Incorrect 26 ms 2304 KB Program terminated incorrectly, or you printed something to stdout
12 Incorrect 26 ms 2520 KB Program terminated incorrectly, or you printed something to stdout
13 Incorrect 32 ms 2652 KB Program terminated incorrectly, or you printed something to stdout
14 Incorrect 25 ms 2320 KB Program terminated incorrectly, or you printed something to stdout
15 Incorrect 26 ms 2308 KB Program terminated incorrectly, or you printed something to stdout
16 Incorrect 25 ms 2660 KB Program terminated incorrectly, or you printed something to stdout
17 Incorrect 26 ms 2308 KB Program terminated incorrectly, or you printed something to stdout
18 Incorrect 29 ms 2304 KB Program terminated incorrectly, or you printed something to stdout
19 Incorrect 32 ms 2336 KB Program terminated incorrectly, or you printed something to stdout
20 Incorrect 25 ms 2300 KB Program terminated incorrectly, or you printed something to stdout
21 Incorrect 27 ms 2312 KB Program terminated incorrectly, or you printed something to stdout
22 Incorrect 27 ms 2308 KB Program terminated incorrectly, or you printed something to stdout
23 Incorrect 25 ms 2564 KB Program terminated incorrectly, or you printed something to stdout
24 Incorrect 25 ms 2568 KB Program terminated incorrectly, or you printed something to stdout
25 Incorrect 25 ms 2372 KB Program terminated incorrectly, or you printed something to stdout
26 Incorrect 25 ms 2312 KB Program terminated incorrectly, or you printed something to stdout
27 Incorrect 26 ms 2308 KB Program terminated incorrectly, or you printed something to stdout
28 Incorrect 28 ms 2312 KB Program terminated incorrectly, or you printed something to stdout
29 Incorrect 25 ms 2372 KB Program terminated incorrectly, or you printed something to stdout
30 Incorrect 25 ms 2300 KB Program terminated incorrectly, or you printed something to stdout
31 Incorrect 25 ms 2428 KB Program terminated incorrectly, or you printed something to stdout
32 Incorrect 27 ms 2600 KB Program terminated incorrectly, or you printed something to stdout
33 Incorrect 28 ms 2308 KB Program terminated incorrectly, or you printed something to stdout
34 Incorrect 32 ms 2300 KB Program terminated incorrectly, or you printed something to stdout
35 Incorrect 26 ms 2716 KB Program terminated incorrectly, or you printed something to stdout
36 Incorrect 27 ms 2304 KB Program terminated incorrectly, or you printed something to stdout
37 Incorrect 27 ms 2304 KB Program terminated incorrectly, or you printed something to stdout
38 Incorrect 26 ms 2308 KB Program terminated incorrectly, or you printed something to stdout
39 Incorrect 27 ms 2304 KB Program terminated incorrectly, or you printed something to stdout
40 Incorrect 26 ms 2500 KB Program terminated incorrectly, or you printed something to stdout