Submission #959151

# Submission time Handle Problem Language Result Execution time Memory
959151 2024-04-07T14:19:32 Z Kavelmydex Broken Device (JOI17_broken_device) C++17
0 / 100
41 ms 3048 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pi pair<int,int>
#define vi vector<int>
#define rep(i,x,n) for(int i=x; i<n; ++i)
#define For(i,n) rep(i,0,n)
#define endl "\n"
#define sp ' '
#define pb push_back
#define f first
#define s second
#define sz size()
#define all(x) (x).begin(),(x).end()

const int NN = 200, OO = 1e9, mod = 1e9+7;

int mp[NN], ans[NN];
void Anna( int n, long long X, int K, int P[] ){
  memset(mp,0,sizeof(mp)); memset(ans,0,sizeof(ans));
  assert(n == 150);
  For(i,K){
      mp[P[i]] = 1;
  }
  vi v;
  For(i,60){
    if((1LL<<i) & X){
        v.pb(i);
    }
  }
  for(int i=0; i<=89; ++i){
    bool ok = 1;
    for(int j=i; j<=i+60; ++j){
        ok &= (!mp[j]);
    }
    if(ok){
        ans[i] = 1;
        for(int x: v){
            assert(i+x+1 < n);
            ans[i+x+1] = 1;
        }
        break;
    }
  }
  For(i,n){
    Set(i,ans[i]);
  }
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pi pair<int,int>
#define vi vector<int>
#define rep(i,x,n) for(int i=x; i<n; ++i)
#define For(i,n) rep(i,0,n)
#define endl "\n"
#define sp ' '
#define pb push_back
#define f first
#define s second
#define sz size()
#define all(x) (x).begin(),(x).end()

long long Bruno( int N, int A[] ){
    int fi = 0;
    For(i,N){
        if(A[i]) {
            fi = i;
            break;
        }
    }
    ll ans = 0;
    for(int i=fi+1; i+59<N; ++i){
        if(A[i]){
            ans += (1LL<<(i-fi-1));
        }
    }
    return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 30 ms 2676 KB Output isn't correct - L* = 0
2 Partially correct 30 ms 2752 KB Output isn't correct - L* = 0
3 Partially correct 30 ms 2880 KB Output isn't correct - L* = 0
4 Partially correct 30 ms 2708 KB Output isn't correct - L* = 0
5 Partially correct 30 ms 2948 KB Output isn't correct - L* = 0
6 Partially correct 31 ms 2752 KB Output isn't correct - L* = 0
7 Partially correct 31 ms 3012 KB Output isn't correct - L* = 0
8 Partially correct 33 ms 2668 KB Output isn't correct - L* = 0
9 Partially correct 32 ms 2700 KB Output isn't correct - L* = 0
10 Partially correct 32 ms 2844 KB Output isn't correct - L* = 0
11 Partially correct 30 ms 2784 KB Output isn't correct - L* = 0
12 Partially correct 37 ms 2744 KB Output isn't correct - L* = 0
13 Partially correct 34 ms 3048 KB Output isn't correct - L* = 0
14 Partially correct 34 ms 2940 KB Output isn't correct - L* = 0
15 Partially correct 31 ms 2748 KB Output isn't correct - L* = 0
16 Partially correct 30 ms 2632 KB Output isn't correct - L* = 0
17 Partially correct 30 ms 2872 KB Output isn't correct - L* = 0
18 Partially correct 31 ms 2696 KB Output isn't correct - L* = 0
19 Partially correct 31 ms 2876 KB Output isn't correct - L* = 0
20 Partially correct 32 ms 2776 KB Output isn't correct - L* = 0
21 Partially correct 30 ms 2772 KB Output isn't correct - L* = 0
22 Partially correct 30 ms 2732 KB Output isn't correct - L* = 0
23 Partially correct 30 ms 2772 KB Output isn't correct - L* = 0
24 Partially correct 31 ms 2744 KB Output isn't correct - L* = 0
25 Partially correct 34 ms 2752 KB Output isn't correct - L* = 0
26 Partially correct 30 ms 2684 KB Output isn't correct - L* = 0
27 Partially correct 34 ms 2692 KB Output isn't correct - L* = 0
28 Partially correct 41 ms 2856 KB Output isn't correct - L* = 0
29 Partially correct 40 ms 2832 KB Output isn't correct - L* = 0
30 Partially correct 30 ms 2808 KB Output isn't correct - L* = 0
31 Partially correct 40 ms 2768 KB Output isn't correct - L* = 0
32 Partially correct 38 ms 2852 KB Output isn't correct - L* = 0
33 Partially correct 34 ms 2628 KB Output isn't correct - L* = 0
34 Partially correct 31 ms 2796 KB Output isn't correct - L* = 0
35 Partially correct 31 ms 2944 KB Output isn't correct - L* = 0
36 Partially correct 34 ms 2720 KB Output isn't correct - L* = 0
37 Partially correct 32 ms 2684 KB Output isn't correct - L* = 0
38 Partially correct 32 ms 2752 KB Output isn't correct - L* = 0
39 Partially correct 32 ms 2748 KB Output isn't correct - L* = 0
40 Partially correct 31 ms 2776 KB Output isn't correct - L* = 0