Submission #44480

# Submission time Handle Problem Language Result Execution time Memory
44480 2018-04-02T09:56:53 Z khohko Broken Device (JOI17_broken_device) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h
#include "Annalib.h"

#pragma GCC optimize("O3")
using namespace std;
#define ll long long
#define lol long long
#define pb push_back
//#define mp make_pair
#define fr first
#define sc second
#define MAX ((lol)(1e9+100))
#define MX ((lol)(4e9+100))
#define ARRS ((lol)(1e6+100))
#define MOD ((lol)(1e9+7))
#define EP ((double)(1e-9))
#define EPS ((double)(1e-8))
#define pb push_back
#define PI ((double)3.141592653)
#define LG 21



void Anna( int N, long long X, int K, int P[] ){

    ll T[]={1,1,0,0,1,0,0,0,0,0,1,1,1,1,1,1,1,0,1,0,1,0,0,1,0,0,1,0,0,1,1,0,1,0,1,0,1,1,1,0,1,1,0,1,1,0,1,1,1,0,1,0,0,1,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,0,1,1,0,0,0,0,0,0,1,0,0,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,1,0,1,1,0,0,0,1,1,1,1,0,0,0,1,0,1,1,1,0,1,0,0,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0};
    int f[300];
    for(int i=0; i<N; i++)f[i]=0;
    for(int i=0; i<K; i++)
        f[P[i]]=1;
    for(int i=0; i<N; i++){
        if(f[i]){
            Set(i,0);
            continue;
        }
        if((X&1ll)==T[i])
            {Set(i,1);X/=2ll;}
        else Set(i,0);

    }
   // cout<<X<<endl;
}



//int main(){
//    #ifdef KHOKHO
//        freopen("in.in","r",stdin);
//        freopen("out.out","w",stdout);
//    #endif // KHOKHO
//    cin>>n;
//
//}
#include <bits/stdc++.h>
#include "Brunolib.h"

#pragma GCC optimize("O3")
using namespace std;
#define ll long long
#define lol long long
#define pb push_back
//#define mp make_pair
#define fr first
#define sc second
#define MAX ((lol)(1e9+100))
#define MX ((lol)(4e9+100))
#define ARRS ((lol)(1e6+100))
#define MOD ((lol)(1e9+7))
#define EP ((double)(1e-9))
#define EPS ((double)(1e-8))
#define pb push_back
#define PI ((double)3.141592653)
#define LG 21




long long Bruno( int N, int A[] ){
    ll p=0;
    ll k=1;
    ll T[]={1,1,0,0,1,0,0,0,0,0,1,1,1,1,1,1,1,0,1,0,1,0,0,1,0,0,1,0,0,1,1,0,1,0,1,0,1,1,1,0,1,1,0,1,1,0,1,1,1,0,1,0,0,1,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,0,1,1,0,0,0,0,0,0,1,0,0,1,0,1,1,0,0,0,1,1,1,1,1,0,0,0,1,0,1,0,1,1,0,0,0,1,1,1,1,0,0,0,1,0,1,1,1,0,1,0,0,0,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0};

    for(int i=0; i<N; i++){
        if(A[i]){
            if(T[i])p+=k;
            k*=2ll;
        }
    }
  //  cout<<p<<endl;
    return p;
}


//
//int main(){
//    #ifdef KHOKHO
//        freopen("in.in","r",stdin);
//        freopen("out.out","w",stdout);
//    #endif // KHOKHO
//    cin>>n;
//
//}

Compilation message

Anna.cpp:1:24: error: missing terminating > character
 #include <bits/stdc++.h
                        ^