답안 #1011389

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1011389 2024-06-30T12:58:50 Z 12345678 Broken Device (JOI17_broken_device) C++17
85 / 100
36 ms 2728 KB
#include "Annalib.h"
#include <bits/stdc++.h>

using namespace std;

const int nx=150;

void Anna( int N, long long X, int K, int P[] ){
    vector<int> b(nx);
    for (int i=0; i<K; i++) b[P[i]]=1;
    for (int i=0; i<75; i++)
    {
        if (b[2*i]||b[2*i+1]||X==0) Set(2*i, 0), Set(2*i+1, 0);
        else Set(2*i, ((X%3)+1)/2), Set(2*i+1, ((X%3)+1)%2), X/=3;
    }
}
#include "Brunolib.h"
#include <bits/stdc++.h>

using namespace std;

#define ll long long

const int kx=60;

long long Bruno( int N, int A[] ){
    vector<ll> p(kx);
    ll res=0, cnt=0;
    p[0]=1;
    for (int i=1; i<kx; i++) p[i]=p[i-1]*3;
    for (int i=0; i<75; i++) if (A[2*i]||A[2*i+1]) res+=p[cnt]*(A[2*i]*2+A[2*i+1]-1),cnt++; 
    return res;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 24 ms 2692 KB Output is partially correct - L* = 37
2 Partially correct 25 ms 2396 KB Output is partially correct - L* = 37
3 Partially correct 23 ms 2696 KB Output is partially correct - L* = 37
4 Partially correct 23 ms 2308 KB Output is partially correct - L* = 37
5 Partially correct 27 ms 2384 KB Output is partially correct - L* = 37
6 Partially correct 31 ms 2472 KB Output is partially correct - L* = 37
7 Partially correct 20 ms 2548 KB Output is partially correct - L* = 37
8 Partially correct 24 ms 2372 KB Output is partially correct - L* = 37
9 Partially correct 25 ms 2512 KB Output is partially correct - L* = 37
10 Partially correct 22 ms 2572 KB Output is partially correct - L* = 37
11 Partially correct 22 ms 2476 KB Output is partially correct - L* = 37
12 Partially correct 22 ms 2608 KB Output is partially correct - L* = 37
13 Partially correct 26 ms 2716 KB Output is partially correct - L* = 37
14 Partially correct 25 ms 2468 KB Output is partially correct - L* = 37
15 Partially correct 36 ms 2596 KB Output is partially correct - L* = 37
16 Partially correct 26 ms 2636 KB Output is partially correct - L* = 37
17 Partially correct 23 ms 2504 KB Output is partially correct - L* = 37
18 Partially correct 27 ms 2536 KB Output is partially correct - L* = 37
19 Partially correct 23 ms 2584 KB Output is partially correct - L* = 37
20 Partially correct 28 ms 2644 KB Output is partially correct - L* = 37
21 Partially correct 24 ms 2480 KB Output is partially correct - L* = 37
22 Partially correct 24 ms 2396 KB Output is partially correct - L* = 37
23 Partially correct 23 ms 2660 KB Output is partially correct - L* = 37
24 Partially correct 27 ms 2512 KB Output is partially correct - L* = 37
25 Partially correct 25 ms 2652 KB Output is partially correct - L* = 37
26 Partially correct 25 ms 2440 KB Output is partially correct - L* = 37
27 Partially correct 26 ms 2428 KB Output is partially correct - L* = 37
28 Partially correct 23 ms 2476 KB Output is partially correct - L* = 37
29 Partially correct 25 ms 2396 KB Output is partially correct - L* = 37
30 Partially correct 22 ms 2388 KB Output is partially correct - L* = 37
31 Partially correct 27 ms 2516 KB Output is partially correct - L* = 37
32 Partially correct 24 ms 2728 KB Output is partially correct - L* = 37
33 Partially correct 23 ms 2608 KB Output is partially correct - L* = 37
34 Partially correct 20 ms 2572 KB Output is partially correct - L* = 37
35 Partially correct 27 ms 2536 KB Output is partially correct - L* = 37
36 Partially correct 24 ms 2396 KB Output is partially correct - L* = 37
37 Partially correct 27 ms 2372 KB Output is partially correct - L* = 37
38 Partially correct 34 ms 2568 KB Output is partially correct - L* = 37
39 Partially correct 22 ms 2480 KB Output is partially correct - L* = 37
40 Partially correct 25 ms 2388 KB Output is partially correct - L* = 37