Submission #260398

# Submission time Handle Problem Language Result Execution time Memory
260398 2020-08-10T08:19:19 Z 임성재(#5050) Broken Device (JOI17_broken_device) C++14
85 / 100
56 ms 3328 KB
#include "Annalib.h"
#include<bits/stdc++.h>
using namespace std;

#define fast ios::sync_with_stdio(false); cin.tie(0);
#define fi first
#define se second
#define em emplace
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define mp make_pair

void Anna( int N, long long X, int K, int P[] ){
  bool chk[222] = {};
  for(int i=0; i<K; i++) {
    chk[P[i]/2] = true;
  }
  
  for(int i=0; i<N/2; i++) {
    if(chk[i]) {
      Set(i*2, 0), Set(i*2+1, 0);
      continue;
    }

    if(X % 3 == 0) Set(i * 2, 0), Set(i * 2 + 1, 1);
    if(X % 3 == 1) Set(i * 2, 1), Set(i * 2 + 1, 0);
    if(X % 3 == 2) Set(i * 2, 1), Set(i * 2 + 1, 1);

    X /= 3;
  }
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;

#define fast ios::sync_with_stdio(false); cin.tie(0);
#define fi first
#define se second
#define em emplace
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define mp make_pair

typedef long long ll;

long long Bruno( int N, int A[] ){
  ll ans = 0;
  ll e = 1;
  for(int i=0; i<N/2; i++) {
    int x = A[i*2]*2 + A[i*2+1] - 1;
    if(x < 0) continue;

    ans += x * e;
    e *= 3;

    //cout << x << " " << ans << endl;
  }

  return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 44 ms 3072 KB Output is partially correct - L* = 37
2 Partially correct 44 ms 3056 KB Output is partially correct - L* = 37
3 Partially correct 49 ms 3312 KB Output is partially correct - L* = 37
4 Partially correct 47 ms 3056 KB Output is partially correct - L* = 37
5 Partially correct 44 ms 3056 KB Output is partially correct - L* = 37
6 Partially correct 47 ms 3072 KB Output is partially correct - L* = 37
7 Partially correct 45 ms 3056 KB Output is partially correct - L* = 37
8 Partially correct 46 ms 3072 KB Output is partially correct - L* = 37
9 Partially correct 44 ms 3056 KB Output is partially correct - L* = 37
10 Partially correct 45 ms 3072 KB Output is partially correct - L* = 37
11 Partially correct 46 ms 3136 KB Output is partially correct - L* = 37
12 Partially correct 47 ms 3072 KB Output is partially correct - L* = 37
13 Partially correct 56 ms 3056 KB Output is partially correct - L* = 37
14 Partially correct 48 ms 3000 KB Output is partially correct - L* = 37
15 Partially correct 45 ms 3056 KB Output is partially correct - L* = 37
16 Partially correct 44 ms 3064 KB Output is partially correct - L* = 37
17 Partially correct 44 ms 3072 KB Output is partially correct - L* = 37
18 Partially correct 44 ms 3056 KB Output is partially correct - L* = 37
19 Partially correct 44 ms 3064 KB Output is partially correct - L* = 37
20 Partially correct 45 ms 3072 KB Output is partially correct - L* = 37
21 Partially correct 44 ms 3072 KB Output is partially correct - L* = 37
22 Partially correct 47 ms 3072 KB Output is partially correct - L* = 37
23 Partially correct 44 ms 3072 KB Output is partially correct - L* = 37
24 Partially correct 45 ms 3072 KB Output is partially correct - L* = 37
25 Partially correct 44 ms 3328 KB Output is partially correct - L* = 37
26 Partially correct 44 ms 3072 KB Output is partially correct - L* = 37
27 Partially correct 50 ms 3048 KB Output is partially correct - L* = 37
28 Partially correct 44 ms 3072 KB Output is partially correct - L* = 37
29 Partially correct 50 ms 3072 KB Output is partially correct - L* = 37
30 Partially correct 43 ms 3056 KB Output is partially correct - L* = 37
31 Partially correct 43 ms 3096 KB Output is partially correct - L* = 37
32 Partially correct 45 ms 3056 KB Output is partially correct - L* = 37
33 Partially correct 44 ms 3056 KB Output is partially correct - L* = 37
34 Partially correct 44 ms 3072 KB Output is partially correct - L* = 37
35 Partially correct 44 ms 3064 KB Output is partially correct - L* = 37
36 Partially correct 43 ms 3072 KB Output is partially correct - L* = 37
37 Partially correct 45 ms 3072 KB Output is partially correct - L* = 37
38 Partially correct 44 ms 3072 KB Output is partially correct - L* = 37
39 Partially correct 48 ms 2880 KB Output is partially correct - L* = 37
40 Partially correct 49 ms 3072 KB Output is partially correct - L* = 37