Submission #100034

# Submission time Handle Problem Language Result Execution time Memory
100034 2019-03-09T06:54:20 Z oolimry Broken Device (JOI17_broken_device) C++14
0 / 100
5 ms 1024 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);
        }
      else{
        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 4 ms 768 KB Wrong Answer [1]
2 Incorrect 4 ms 768 KB Wrong Answer [1]
3 Incorrect 4 ms 640 KB Wrong Answer [1]
4 Incorrect 4 ms 640 KB Wrong Answer [1]
5 Incorrect 4 ms 1024 KB Wrong Answer [1]
6 Incorrect 4 ms 872 KB Wrong Answer [1]
7 Incorrect 4 ms 640 KB Wrong Answer [1]
8 Incorrect 4 ms 776 KB Wrong Answer [1]
9 Incorrect 4 ms 640 KB Wrong Answer [1]
10 Incorrect 2 ms 768 KB Wrong Answer [1]
11 Incorrect 4 ms 776 KB Wrong Answer [1]
12 Incorrect 4 ms 640 KB Wrong Answer [1]
13 Incorrect 4 ms 640 KB Wrong Answer [1]
14 Incorrect 4 ms 768 KB Wrong Answer [1]
15 Incorrect 5 ms 904 KB Wrong Answer [1]
16 Incorrect 5 ms 768 KB Wrong Answer [1]
17 Incorrect 4 ms 640 KB Wrong Answer [1]
18 Incorrect 4 ms 768 KB Wrong Answer [1]
19 Incorrect 4 ms 648 KB Wrong Answer [1]
20 Incorrect 4 ms 684 KB Wrong Answer [1]
21 Incorrect 5 ms 768 KB Wrong Answer [1]
22 Incorrect 4 ms 776 KB Wrong Answer [1]
23 Incorrect 5 ms 640 KB Wrong Answer [1]
24 Incorrect 5 ms 768 KB Wrong Answer [1]
25 Incorrect 4 ms 640 KB Wrong Answer [1]
26 Incorrect 4 ms 776 KB Wrong Answer [1]
27 Incorrect 4 ms 640 KB Wrong Answer [1]
28 Incorrect 5 ms 776 KB Wrong Answer [1]
29 Incorrect 5 ms 640 KB Wrong Answer [1]
30 Incorrect 4 ms 776 KB Wrong Answer [1]
31 Incorrect 5 ms 640 KB Wrong Answer [1]
32 Incorrect 5 ms 776 KB Wrong Answer [1]
33 Incorrect 5 ms 768 KB Wrong Answer [1]
34 Incorrect 5 ms 776 KB Wrong Answer [1]
35 Incorrect 2 ms 648 KB Wrong Answer [1]
36 Incorrect 4 ms 640 KB Wrong Answer [1]
37 Incorrect 4 ms 768 KB Wrong Answer [1]
38 Incorrect 4 ms 640 KB Wrong Answer [1]
39 Incorrect 4 ms 788 KB Wrong Answer [1]
40 Incorrect 4 ms 652 KB Wrong Answer [1]