답안 #227680

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
227680 2020-04-28T12:19:16 Z MKopchev Broken Device (JOI17_broken_device) C++14
0 / 100
88 ms 3576 KB
#include "Annalib.h"
#include<bits/stdc++.h>
using namespace std;
/*
void Set(int pos,int val)
{
    //cout<<pos<<" "<<val<<endl;
}
*/
const int nmax=150,MX=60;

long long nums[nmax]={307422075906420056,31346333476977366,751538979187435120,154279397843784701,739300929372587129,125698079662086764,663114243174628743,1050882811848467797,959905617801813273,385444311530711411,512817536392136995,662574049727954295,721817720375285862,259872109506253906,303151545032480828,460632706631997770,151503837468306586,279601718683009418,116740018002263942,779381898698810472,527462414946696666,42521995335021886,651745690928403659,960342173847439610,449953176040374380,449289592351417448,511130917170489762,541700316481087107,875828381368315472,1072860041540760884,85051844382864560,1001055615071046652,183264904366198881,500471828927634522,63835817811192782,127954344057129018,120838053016377530,758454238486967404,847645413388789654,603036886786340761,298571284009683329,947847276848062166,525766783643089427,827343617554380919,299073670037542655,206859532607704678,603746640398845049,712422028292176765,626717069466205704,62733976766572515,1093023341247510213,1138592857878279399,753979679570537560,134889343266248562,1143981232946249022,910868232526097162,1140166364095265486,30716081070658243,625097675567742946,942505717471056906,410994143216132790,1035630405772317279,248596569379907537,849796041904908245,716682431833171632,739467939849650353,351040795743682201,832126703370898474,310229214718306509,1067105014681501328,1152089508501160316,294920862964873414,257882642513923972,650748885903970599,696722788112087140,44225714599181847,354380675083786504,22689016659869283,685782594107933249,482025007381686430,39965697415777585,1010627280544352788,277080388530849779,685825912296573172,1133448965788314106,403206304060473600,612489193326150393,960401149848092772,660254439597621979,1002629921330663340,1104134162716322574,428377541123903367,404010598941365175,811913507148930765,1026486796668438185,781948228192017253,417720338420997321,394354769471544647,252774326212878532,430299583817921207,100836629183089816,699919924122681091,263129018848148616,693513945272787153,258529894321391257,359790227440116546,354689719563495762,32699430422874488,158974616222830595,986733105668659993,451430498147087728,886439260400903659,831577326609963295,820485178233226598,1073301751126560629,175923829627817950,359087009581246499,886747055001366355,537445543694349529,6519905474125266,840474235874882331,218299792429532457,896941258023383420,793850002809969525,1044710469235155561,960856229949000373,956180450254319954,685046809499042156,467192113633432442,539820084351143198,1043602636746228948,73947066312757177,160508289093219826,835466808124001768,511063839022804958,75086937199374325,1034047236808176843,211667994108275170,474616295036432973,116399098693853368,718936718010168965,1083975336838445884,460478383216489237,895796574262670841,384798448514542971,12250254168084698,93171951658288179,744491278776701441,1063251681161378533,596836909488541205};

pair<long long/*value*/,int/*id*/> basis[nmax];

bool use[nmax];

void add(long long mask,int id)
{
    for(int i=0;i<MX;i++)
    {
        if((mask&(1LL<<i))==0)continue;

        if(basis[i].second==-1)
        {
            //cout<<i<<" -> "<<mask<<" "<<id<<endl;
            basis[i]={mask,id};
            return;
        }

        mask=mask^basis[i].first;
    }
}

bool type[nmax];
void Anna(int N,long long X, int K, int P[])
{
    for(int i=0;i<nmax;i++)use[i]=1,type[i]=0;

    for(int i=0;i<K;i++)use[P[i]]=0;

    for(int i=0;i<MX;i++)basis[i]={0,-1};

    for(int i=0;i<N;i++)
        if(use[i])
        {
            add(nums[i],i);
        }

    long long mask=X;

    for(int i=0;i<MX;i++)
    {
        if((mask&(1LL<<i))==0)continue;

        if(basis[i].second==-1)assert(0==1);

        mask=mask^basis[i].first;

        type[basis[i].second]=1;
    }

    for(int i=0;i<N;i++)
        Set(i,type[i]);
}

/*
int arr[nmax];
int main()
{
    Anna(150,1,0,arr);
}
*/
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;

const int nmax=150;

long long nums[nmax]={307422075906420056,31346333476977366,751538979187435120,154279397843784701,739300929372587129,125698079662086764,663114243174628743,1050882811848467797,959905617801813273,385444311530711411,512817536392136995,662574049727954295,721817720375285862,259872109506253906,303151545032480828,460632706631997770,151503837468306586,279601718683009418,116740018002263942,779381898698810472,527462414946696666,42521995335021886,651745690928403659,960342173847439610,449953176040374380,449289592351417448,511130917170489762,541700316481087107,875828381368315472,1072860041540760884,85051844382864560,1001055615071046652,183264904366198881,500471828927634522,63835817811192782,127954344057129018,120838053016377530,758454238486967404,847645413388789654,603036886786340761,298571284009683329,947847276848062166,525766783643089427,827343617554380919,299073670037542655,206859532607704678,603746640398845049,712422028292176765,626717069466205704,62733976766572515,1093023341247510213,1138592857878279399,753979679570537560,134889343266248562,1143981232946249022,910868232526097162,1140166364095265486,30716081070658243,625097675567742946,942505717471056906,410994143216132790,1035630405772317279,248596569379907537,849796041904908245,716682431833171632,739467939849650353,351040795743682201,832126703370898474,310229214718306509,1067105014681501328,1152089508501160316,294920862964873414,257882642513923972,650748885903970599,696722788112087140,44225714599181847,354380675083786504,22689016659869283,685782594107933249,482025007381686430,39965697415777585,1010627280544352788,277080388530849779,685825912296573172,1133448965788314106,403206304060473600,612489193326150393,960401149848092772,660254439597621979,1002629921330663340,1104134162716322574,428377541123903367,404010598941365175,811913507148930765,1026486796668438185,781948228192017253,417720338420997321,394354769471544647,252774326212878532,430299583817921207,100836629183089816,699919924122681091,263129018848148616,693513945272787153,258529894321391257,359790227440116546,354689719563495762,32699430422874488,158974616222830595,986733105668659993,451430498147087728,886439260400903659,831577326609963295,820485178233226598,1073301751126560629,175923829627817950,359087009581246499,886747055001366355,537445543694349529,6519905474125266,840474235874882331,218299792429532457,896941258023383420,793850002809969525,1044710469235155561,960856229949000373,956180450254319954,685046809499042156,467192113633432442,539820084351143198,1043602636746228948,73947066312757177,160508289093219826,835466808124001768,511063839022804958,75086937199374325,1034047236808176843,211667994108275170,474616295036432973,116399098693853368,718936718010168965,1083975336838445884,460478383216489237,895796574262670841,384798448514542971,12250254168084698,93171951658288179,744491278776701441,1063251681161378533,596836909488541205};

long long Bruno(int N, int A[])
{
    long long ret=0;
    for(int i=0;i<nmax;i++)
        if(A[i])ret=ret^nums[i];
    return ret;
}
/*
int main()
{

}
*/
# 결과 실행 시간 메모리 Grader output
1 Partially correct 76 ms 3312 KB Output isn't correct - L* = 0
2 Partially correct 77 ms 3312 KB Output isn't correct - L* = 0
3 Partially correct 78 ms 3312 KB Output isn't correct - L* = 0
4 Partially correct 82 ms 3312 KB Output isn't correct - L* = 0
5 Partially correct 79 ms 3312 KB Output isn't correct - L* = 0
6 Partially correct 77 ms 3312 KB Output isn't correct - L* = 0
7 Partially correct 78 ms 3312 KB Output isn't correct - L* = 0
8 Partially correct 88 ms 3568 KB Output isn't correct - L* = 0
9 Partially correct 78 ms 3312 KB Output isn't correct - L* = 0
10 Partially correct 79 ms 3312 KB Output isn't correct - L* = 0
11 Partially correct 82 ms 3312 KB Output isn't correct - L* = 0
12 Partially correct 81 ms 3312 KB Output isn't correct - L* = 0
13 Partially correct 79 ms 3312 KB Output isn't correct - L* = 0
14 Partially correct 81 ms 3312 KB Output isn't correct - L* = 0
15 Partially correct 80 ms 3312 KB Output isn't correct - L* = 0
16 Partially correct 79 ms 3312 KB Output isn't correct - L* = 0
17 Partially correct 77 ms 3312 KB Output isn't correct - L* = 0
18 Partially correct 78 ms 3312 KB Output isn't correct - L* = 0
19 Partially correct 80 ms 3312 KB Output isn't correct - L* = 0
20 Partially correct 77 ms 3312 KB Output isn't correct - L* = 0
21 Partially correct 77 ms 3312 KB Output isn't correct - L* = 0
22 Partially correct 77 ms 3312 KB Output isn't correct - L* = 0
23 Partially correct 78 ms 3312 KB Output isn't correct - L* = 0
24 Partially correct 77 ms 3312 KB Output isn't correct - L* = 0
25 Partially correct 81 ms 3312 KB Output isn't correct - L* = 0
26 Partially correct 81 ms 3264 KB Output isn't correct - L* = 0
27 Partially correct 77 ms 3312 KB Output isn't correct - L* = 0
28 Partially correct 81 ms 3312 KB Output isn't correct - L* = 0
29 Partially correct 81 ms 3312 KB Output isn't correct - L* = 0
30 Partially correct 79 ms 3312 KB Output isn't correct - L* = 0
31 Partially correct 78 ms 3312 KB Output isn't correct - L* = 0
32 Partially correct 77 ms 3312 KB Output isn't correct - L* = 0
33 Partially correct 82 ms 3568 KB Output isn't correct - L* = 0
34 Partially correct 78 ms 3320 KB Output isn't correct - L* = 0
35 Partially correct 79 ms 3312 KB Output isn't correct - L* = 0
36 Partially correct 79 ms 3312 KB Output isn't correct - L* = 0
37 Partially correct 81 ms 3576 KB Output isn't correct - L* = 0
38 Partially correct 81 ms 3272 KB Output isn't correct - L* = 0
39 Partially correct 80 ms 3312 KB Output isn't correct - L* = 0
40 Partially correct 80 ms 3248 KB Output isn't correct - L* = 0