답안 #852136

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
852136 2023-09-21T09:55:22 Z Rafi22 Broken Device (JOI17_broken_device) C++14
0 / 100
29 ms 2972 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<<j))
            {
                res[j]=1;
                x-=(1LL<<j);
            }
        }
    }
    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;
}

# 결과 실행 시간 메모리 Grader output
1 Incorrect 24 ms 2388 KB Program terminated incorrectly, or you printed something to stdout
2 Incorrect 23 ms 2628 KB Program terminated incorrectly, or you printed something to stdout
3 Incorrect 24 ms 2596 KB Program terminated incorrectly, or you printed something to stdout
4 Incorrect 23 ms 2580 KB Program terminated incorrectly, or you printed something to stdout
5 Incorrect 23 ms 2412 KB Program terminated incorrectly, or you printed something to stdout
6 Incorrect 24 ms 2376 KB Program terminated incorrectly, or you printed something to stdout
7 Incorrect 23 ms 2440 KB Program terminated incorrectly, or you printed something to stdout
8 Incorrect 23 ms 2400 KB Program terminated incorrectly, or you printed something to stdout
9 Incorrect 24 ms 2316 KB Program terminated incorrectly, or you printed something to stdout
10 Incorrect 25 ms 2972 KB Program terminated incorrectly, or you printed something to stdout
11 Incorrect 23 ms 2660 KB Program terminated incorrectly, or you printed something to stdout
12 Incorrect 22 ms 2380 KB Program terminated incorrectly, or you printed something to stdout
13 Incorrect 29 ms 2572 KB Program terminated incorrectly, or you printed something to stdout
14 Incorrect 24 ms 2596 KB Program terminated incorrectly, or you printed something to stdout
15 Incorrect 23 ms 2444 KB Program terminated incorrectly, or you printed something to stdout
16 Incorrect 24 ms 2380 KB Program terminated incorrectly, or you printed something to stdout
17 Incorrect 23 ms 2404 KB Program terminated incorrectly, or you printed something to stdout
18 Incorrect 23 ms 2644 KB Program terminated incorrectly, or you printed something to stdout
19 Incorrect 23 ms 2380 KB Program terminated incorrectly, or you printed something to stdout
20 Incorrect 23 ms 2480 KB Program terminated incorrectly, or you printed something to stdout
21 Incorrect 23 ms 2652 KB Program terminated incorrectly, or you printed something to stdout
22 Incorrect 23 ms 2664 KB Program terminated incorrectly, or you printed something to stdout
23 Incorrect 23 ms 2632 KB Program terminated incorrectly, or you printed something to stdout
24 Incorrect 23 ms 2880 KB Program terminated incorrectly, or you printed something to stdout
25 Incorrect 23 ms 2672 KB Program terminated incorrectly, or you printed something to stdout
26 Incorrect 23 ms 2368 KB Program terminated incorrectly, or you printed something to stdout
27 Incorrect 23 ms 2440 KB Program terminated incorrectly, or you printed something to stdout
28 Incorrect 24 ms 2660 KB Program terminated incorrectly, or you printed something to stdout
29 Incorrect 23 ms 2656 KB Program terminated incorrectly, or you printed something to stdout
30 Incorrect 24 ms 2664 KB Program terminated incorrectly, or you printed something to stdout
31 Incorrect 23 ms 2384 KB Program terminated incorrectly, or you printed something to stdout
32 Incorrect 23 ms 2380 KB Program terminated incorrectly, or you printed something to stdout
33 Incorrect 23 ms 2660 KB Program terminated incorrectly, or you printed something to stdout
34 Incorrect 23 ms 2400 KB Program terminated incorrectly, or you printed something to stdout
35 Incorrect 23 ms 2420 KB Program terminated incorrectly, or you printed something to stdout
36 Incorrect 25 ms 2380 KB Program terminated incorrectly, or you printed something to stdout
37 Incorrect 24 ms 2448 KB Program terminated incorrectly, or you printed something to stdout
38 Incorrect 23 ms 2404 KB Program terminated incorrectly, or you printed something to stdout
39 Incorrect 23 ms 2400 KB Program terminated incorrectly, or you printed something to stdout
40 Incorrect 23 ms 2392 KB Program terminated incorrectly, or you printed something to stdout