답안 #556422

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
556422 2022-05-03T05:41:46 Z blue Broken Device (JOI17_broken_device) C++17
0 / 100
280 ms 2704 KB
#include "Annalib.h"
#include <vector>
#include <iostream>
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 < N; i++)
    cerr << bad[i];
  cerr << "\n";

  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;
      i++;
    }
  }

  return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 221 ms 2700 KB Output isn't correct - L* = 0
2 Partially correct 228 ms 2452 KB Output isn't correct - L* = 0
3 Partially correct 213 ms 2460 KB Output isn't correct - L* = 0
4 Partially correct 231 ms 2448 KB Output isn't correct - L* = 0
5 Partially correct 220 ms 2508 KB Output isn't correct - L* = 0
6 Partially correct 209 ms 2444 KB Output isn't correct - L* = 0
7 Partially correct 280 ms 2456 KB Output isn't correct - L* = 0
8 Partially correct 209 ms 2524 KB Output isn't correct - L* = 0
9 Partially correct 208 ms 2508 KB Output isn't correct - L* = 0
10 Partially correct 240 ms 2488 KB Output isn't correct - L* = 0
11 Partially correct 212 ms 2444 KB Output isn't correct - L* = 0
12 Partially correct 203 ms 2508 KB Output isn't correct - L* = 0
13 Partially correct 208 ms 2524 KB Output isn't correct - L* = 0
14 Partially correct 236 ms 2416 KB Output isn't correct - L* = 0
15 Partially correct 208 ms 2536 KB Output isn't correct - L* = 0
16 Partially correct 208 ms 2492 KB Output isn't correct - L* = 0
17 Partially correct 217 ms 2408 KB Output isn't correct - L* = 0
18 Partially correct 253 ms 2560 KB Output isn't correct - L* = 0
19 Partially correct 200 ms 2468 KB Output isn't correct - L* = 0
20 Partially correct 218 ms 2432 KB Output isn't correct - L* = 0
21 Partially correct 247 ms 2676 KB Output isn't correct - L* = 0
22 Partially correct 202 ms 2440 KB Output isn't correct - L* = 0
23 Partially correct 206 ms 2448 KB Output isn't correct - L* = 0
24 Partially correct 277 ms 2620 KB Output isn't correct - L* = 0
25 Partially correct 213 ms 2536 KB Output isn't correct - L* = 0
26 Partially correct 246 ms 2676 KB Output isn't correct - L* = 0
27 Partially correct 210 ms 2680 KB Output isn't correct - L* = 0
28 Partially correct 273 ms 2400 KB Output isn't correct - L* = 0
29 Partially correct 224 ms 2460 KB Output isn't correct - L* = 0
30 Partially correct 236 ms 2444 KB Output isn't correct - L* = 0
31 Partially correct 246 ms 2560 KB Output isn't correct - L* = 0
32 Partially correct 206 ms 2568 KB Output isn't correct - L* = 0
33 Partially correct 226 ms 2480 KB Output isn't correct - L* = 0
34 Partially correct 244 ms 2420 KB Output isn't correct - L* = 0
35 Partially correct 207 ms 2704 KB Output isn't correct - L* = 0
36 Partially correct 230 ms 2504 KB Output isn't correct - L* = 0
37 Partially correct 210 ms 2560 KB Output isn't correct - L* = 0
38 Partially correct 245 ms 2504 KB Output isn't correct - L* = 0
39 Partially correct 206 ms 2436 KB Output isn't correct - L* = 0
40 Partially correct 202 ms 2472 KB Output isn't correct - L* = 0