Submission #556420

# Submission time Handle Problem Language Result Execution time Memory
556420 2022-05-03T05:39:10 Z blue Broken Device (JOI17_broken_device) C++17
0 / 100
46 ms 2644 KB
#include "Annalib.h"
#include <vector>
using namespace std;

namespace
{
  using vi = vector<int>;
  using ll = long long;
}


void Anna( int N, long long X, int K, int P[] ){
  vi bit(60);
  for(int i = 0; i < 60; i++)
  {
    bit.push_back(X%2);
    X /= 2;
  }

  vi bad(N, 0);
  for(int i = 0; i < K; i++)
    bad[P[i]] = 1;

  int cb = 0;

  vi encoded(N, 0);

  for(int i = 0; i+1 < N && cb < 60; i++)
  {
    if(!bad[i] && !bad[i+1])
    {
      encoded[i] = 1;
      encoded[i+1] = bit[cb];
      cb++;
    }
  }

  for(int i = 0; i < N; i++)
    Set(i, encoded[i]);
}
#include "Brunolib.h"
#include <vector>
using namespace std;

namespace
{
  using ll = long long;
  using vi = vector<int>;
}

long long Bruno( int N, int A[] )
{
  ll wt = 1;

  ll ans = 0;

  for(int i = 0; i+1 < N; i++)
  {
    if(A[i] == 1)
    {
      ans += wt*A[i+1];
      wt = wt+wt;
    }
  }

  return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 35 ms 2476 KB Output isn't correct - L* = 0
2 Partially correct 33 ms 2452 KB Output isn't correct - L* = 0
3 Partially correct 33 ms 2580 KB Output isn't correct - L* = 0
4 Partially correct 38 ms 2544 KB Output isn't correct - L* = 0
5 Partially correct 33 ms 2464 KB Output isn't correct - L* = 0
6 Partially correct 33 ms 2488 KB Output isn't correct - L* = 0
7 Partially correct 32 ms 2604 KB Output isn't correct - L* = 0
8 Partially correct 34 ms 2528 KB Output isn't correct - L* = 0
9 Partially correct 41 ms 2428 KB Output isn't correct - L* = 0
10 Partially correct 40 ms 2644 KB Output isn't correct - L* = 0
11 Partially correct 36 ms 2436 KB Output isn't correct - L* = 0
12 Partially correct 33 ms 2476 KB Output isn't correct - L* = 0
13 Partially correct 33 ms 2516 KB Output isn't correct - L* = 0
14 Partially correct 38 ms 2472 KB Output isn't correct - L* = 0
15 Partially correct 46 ms 2476 KB Output isn't correct - L* = 0
16 Partially correct 34 ms 2520 KB Output isn't correct - L* = 0
17 Partially correct 32 ms 2528 KB Output isn't correct - L* = 0
18 Partially correct 35 ms 2408 KB Output isn't correct - L* = 0
19 Partially correct 35 ms 2520 KB Output isn't correct - L* = 0
20 Partially correct 36 ms 2556 KB Output isn't correct - L* = 0
21 Partially correct 41 ms 2464 KB Output isn't correct - L* = 0
22 Partially correct 32 ms 2472 KB Output isn't correct - L* = 0
23 Partially correct 32 ms 2464 KB Output isn't correct - L* = 0
24 Partially correct 32 ms 2520 KB Output isn't correct - L* = 0
25 Partially correct 43 ms 2452 KB Output isn't correct - L* = 0
26 Partially correct 34 ms 2476 KB Output isn't correct - L* = 0
27 Partially correct 33 ms 2504 KB Output isn't correct - L* = 0
28 Partially correct 41 ms 2464 KB Output isn't correct - L* = 0
29 Partially correct 33 ms 2532 KB Output isn't correct - L* = 0
30 Partially correct 34 ms 2504 KB Output isn't correct - L* = 0
31 Partially correct 39 ms 2464 KB Output isn't correct - L* = 0
32 Partially correct 37 ms 2416 KB Output isn't correct - L* = 0
33 Partially correct 34 ms 2456 KB Output isn't correct - L* = 0
34 Partially correct 32 ms 2436 KB Output isn't correct - L* = 0
35 Partially correct 38 ms 2600 KB Output isn't correct - L* = 0
36 Partially correct 36 ms 2572 KB Output isn't correct - L* = 0
37 Partially correct 34 ms 2636 KB Output isn't correct - L* = 0
38 Partially correct 34 ms 2440 KB Output isn't correct - L* = 0
39 Partially correct 40 ms 2480 KB Output isn't correct - L* = 0
40 Partially correct 40 ms 2408 KB Output isn't correct - L* = 0