답안 #44481

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
44481 2018-04-02T09:57:37 Z khohko Broken Device (JOI17_broken_device) C++17
0 / 100
69 ms 13520 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;
//
//}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 44 ms 3312 KB Output isn't correct - L* = 0
2 Partially correct 44 ms 3720 KB Output is partially correct - L* = 14
3 Incorrect 47 ms 4384 KB Output isn't correct - L* = 0
4 Partially correct 50 ms 4728 KB Output is partially correct - L* = 14
5 Incorrect 46 ms 4784 KB Output isn't correct - L* = 0
6 Incorrect 48 ms 5064 KB Output isn't correct - L* = 0
7 Incorrect 45 ms 5568 KB Output isn't correct - L* = 0
8 Partially correct 44 ms 5624 KB Output is partially correct - L* = 14
9 Incorrect 51 ms 5872 KB Output isn't correct - L* = 0
10 Incorrect 44 ms 6120 KB Output isn't correct - L* = 0
11 Incorrect 44 ms 6384 KB Output isn't correct - L* = 0
12 Partially correct 43 ms 6648 KB Output is partially correct - L* = 14
13 Partially correct 43 ms 6864 KB Output is partially correct - L* = 14
14 Incorrect 45 ms 7368 KB Output isn't correct - L* = 0
15 Partially correct 43 ms 7600 KB Output is partially correct - L* = 14
16 Incorrect 41 ms 7656 KB Output isn't correct - L* = 0
17 Incorrect 41 ms 8160 KB Output isn't correct - L* = 0
18 Incorrect 43 ms 8232 KB Output isn't correct - L* = 0
19 Incorrect 49 ms 8384 KB Output isn't correct - L* = 0
20 Incorrect 44 ms 8632 KB Output isn't correct - L* = 0
21 Partially correct 43 ms 8864 KB Output is partially correct - L* = 14
22 Incorrect 45 ms 9136 KB Output isn't correct - L* = 0
23 Partially correct 44 ms 9360 KB Output is partially correct - L* = 14
24 Incorrect 43 ms 9600 KB Output isn't correct - L* = 0
25 Incorrect 44 ms 9848 KB Output isn't correct - L* = 0
26 Partially correct 48 ms 10096 KB Output is partially correct - L* = 14
27 Incorrect 45 ms 10344 KB Output isn't correct - L* = 0
28 Partially correct 47 ms 10736 KB Output is partially correct - L* = 14
29 Partially correct 43 ms 10840 KB Output is partially correct - L* = 14
30 Incorrect 43 ms 11080 KB Output isn't correct - L* = 0
31 Incorrect 46 ms 11320 KB Output isn't correct - L* = 0
32 Partially correct 48 ms 11560 KB Output is partially correct - L* = 14
33 Incorrect 69 ms 11808 KB Output isn't correct - L* = 0
34 Partially correct 52 ms 12048 KB Output is partially correct - L* = 15
35 Incorrect 44 ms 12296 KB Output isn't correct - L* = 0
36 Incorrect 44 ms 12536 KB Output isn't correct - L* = 0
37 Partially correct 60 ms 12912 KB Output is partially correct - L* = 14
38 Incorrect 44 ms 13032 KB Output isn't correct - L* = 0
39 Partially correct 48 ms 13280 KB Output is partially correct - L* = 14
40 Incorrect 66 ms 13520 KB Output isn't correct - L* = 0