Submission #100032

# Submission time Handle Problem Language Result Execution time Memory
100032 2019-03-09T06:52:52 Z oolimry Broken Device (JOI17_broken_device) C++14
0 / 100
10 ms 1004 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;
void Anna( int N, long long X, int K, int P[] ){
    set<int> bad;
    for(int i = 0;i < K;i++){
        bad.insert(P[i]);
    }
    int bin[60];
    for(int i = 0;i < 60;i++){
        long long f = 1ll << i;

        if(f&X){
            bin[i] = 1;
        }
        else{
            bin[i] = 0;
        }
    }
    int c = 0;
  for( int i = 0; i < N; i++ ){
    if(bad.find(i) != bad.end()) Set(i,0);
    else if(bad.find(i+1) != bad.end()) Set(i,0);
    else{
        if(c == 60){
            Set(i,0);
        }
        Set(i,1);
        Set(i+1,bin[c]);
        c++;
        i++;
    }
  }
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;
long long Bruno( int N, int A[] ){
  long long ans = 0ll;
  int bin[60];
  int c = 0;
  for(int i = 0;i < N;i++){
    if(A[i] == 0) continue;
    else{
        bin[c] = A[i+1];
        c++;
        i++;
    }
  }

  for(int i = 59;i >= 0;i--){
    ans *= 2ll;
    ans += (long long) bin[i];
  }
//cout << ans;
  return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 640 KB Wrong Answer [1]
2 Incorrect 4 ms 776 KB Wrong Answer [1]
3 Incorrect 5 ms 640 KB Wrong Answer [1]
4 Incorrect 4 ms 1004 KB Wrong Answer [2]
5 Incorrect 4 ms 772 KB Wrong Answer [1]
6 Incorrect 5 ms 876 KB Wrong Answer [2]
7 Incorrect 5 ms 768 KB Wrong Answer [2]
8 Incorrect 4 ms 904 KB Wrong Answer [1]
9 Incorrect 4 ms 768 KB Wrong Answer [1]
10 Incorrect 5 ms 872 KB Wrong Answer [2]
11 Incorrect 4 ms 776 KB Wrong Answer [1]
12 Incorrect 5 ms 872 KB Wrong Answer [2]
13 Incorrect 5 ms 864 KB Wrong Answer [2]
14 Incorrect 5 ms 644 KB Wrong Answer [1]
15 Incorrect 4 ms 776 KB Wrong Answer [1]
16 Incorrect 4 ms 776 KB Wrong Answer [2]
17 Incorrect 4 ms 876 KB Wrong Answer [2]
18 Incorrect 4 ms 640 KB Wrong Answer [2]
19 Incorrect 4 ms 896 KB Wrong Answer [1]
20 Incorrect 6 ms 880 KB Wrong Answer [2]
21 Incorrect 4 ms 776 KB Wrong Answer [1]
22 Incorrect 4 ms 640 KB Wrong Answer [2]
23 Incorrect 10 ms 904 KB Wrong Answer [1]
24 Incorrect 6 ms 868 KB Wrong Answer [2]
25 Incorrect 5 ms 776 KB Wrong Answer [1]
26 Incorrect 4 ms 684 KB Wrong Answer [2]
27 Incorrect 6 ms 868 KB Wrong Answer [2]
28 Incorrect 4 ms 644 KB Wrong Answer [1]
29 Incorrect 5 ms 640 KB Wrong Answer [1]
30 Incorrect 6 ms 872 KB Wrong Answer [1]
31 Incorrect 5 ms 776 KB Wrong Answer [1]
32 Incorrect 4 ms 640 KB Wrong Answer [2]
33 Incorrect 5 ms 640 KB Wrong Answer [1]
34 Incorrect 4 ms 776 KB Wrong Answer [1]
35 Incorrect 4 ms 640 KB Wrong Answer [1]
36 Incorrect 5 ms 876 KB Wrong Answer [1]
37 Incorrect 7 ms 776 KB Wrong Answer [2]
38 Incorrect 4 ms 768 KB Wrong Answer [1]
39 Incorrect 4 ms 848 KB Wrong Answer [2]
40 Incorrect 4 ms 776 KB Wrong Answer [1]