답안 #556421

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
556421 2022-05-03T05:40:59 Z blue Broken Device (JOI17_broken_device) C++17
0 / 100
262 ms 2760 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;
    }
  }

  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 202 ms 2460 KB Output isn't correct - L* = 0
2 Partially correct 214 ms 2508 KB Output isn't correct - L* = 0
3 Partially correct 226 ms 2552 KB Output isn't correct - L* = 0
4 Partially correct 211 ms 2424 KB Output isn't correct - L* = 0
5 Partially correct 236 ms 2436 KB Output isn't correct - L* = 0
6 Partially correct 206 ms 2468 KB Output isn't correct - L* = 0
7 Partially correct 221 ms 2460 KB Output isn't correct - L* = 0
8 Partially correct 219 ms 2516 KB Output isn't correct - L* = 0
9 Partially correct 206 ms 2548 KB Output isn't correct - L* = 0
10 Partially correct 250 ms 2408 KB Output isn't correct - L* = 0
11 Partially correct 209 ms 2648 KB Output isn't correct - L* = 0
12 Partially correct 216 ms 2456 KB Output isn't correct - L* = 0
13 Partially correct 209 ms 2440 KB Output isn't correct - L* = 0
14 Partially correct 208 ms 2760 KB Output isn't correct - L* = 0
15 Partially correct 218 ms 2412 KB Output isn't correct - L* = 0
16 Partially correct 214 ms 2460 KB Output isn't correct - L* = 0
17 Partially correct 208 ms 2428 KB Output isn't correct - L* = 0
18 Partially correct 200 ms 2460 KB Output isn't correct - L* = 0
19 Partially correct 205 ms 2492 KB Output isn't correct - L* = 0
20 Partially correct 257 ms 2688 KB Output isn't correct - L* = 0
21 Partially correct 209 ms 2540 KB Output isn't correct - L* = 0
22 Partially correct 205 ms 2484 KB Output isn't correct - L* = 0
23 Partially correct 262 ms 2424 KB Output isn't correct - L* = 0
24 Partially correct 201 ms 2504 KB Output isn't correct - L* = 0
25 Partially correct 203 ms 2652 KB Output isn't correct - L* = 0
26 Partially correct 225 ms 2632 KB Output isn't correct - L* = 0
27 Partially correct 217 ms 2476 KB Output isn't correct - L* = 0
28 Partially correct 210 ms 2516 KB Output isn't correct - L* = 0
29 Partially correct 220 ms 2608 KB Output isn't correct - L* = 0
30 Partially correct 210 ms 2508 KB Output isn't correct - L* = 0
31 Partially correct 215 ms 2504 KB Output isn't correct - L* = 0
32 Partially correct 219 ms 2624 KB Output isn't correct - L* = 0
33 Partially correct 205 ms 2420 KB Output isn't correct - L* = 0
34 Partially correct 212 ms 2516 KB Output isn't correct - L* = 0
35 Partially correct 231 ms 2524 KB Output isn't correct - L* = 0
36 Partially correct 207 ms 2476 KB Output isn't correct - L* = 0
37 Partially correct 226 ms 2424 KB Output isn't correct - L* = 0
38 Partially correct 224 ms 2748 KB Output isn't correct - L* = 0
39 Partially correct 209 ms 2520 KB Output isn't correct - L* = 0
40 Partially correct 225 ms 2516 KB Output isn't correct - L* = 0