Submission #530883

# Submission time Handle Problem Language Result Execution time Memory
530883 2022-02-27T04:27:19 Z qwerasdfzxcl Broken Device (JOI17_broken_device) C++14
85 / 100
44 ms 2652 KB
#include "Annalib.h"
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

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

using namespace std;
typedef long long ll;

long long Bruno( int N, int A[] ){
    ll ans = 0;
    for (int i=148;i>=0;i-=2){
        if (!A[i] && !A[i+1]) continue;
        ans *= 3;
        if (A[i]==0 && A[i+1]==1) ans += 0;
        else if (A[i]==1 && A[i+1]==0) ans += 1;
        else ans += 2;
    }
    return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 31 ms 2524 KB Output is partially correct - L* = 37
2 Partially correct 30 ms 2380 KB Output is partially correct - L* = 37
3 Partially correct 28 ms 2540 KB Output is partially correct - L* = 37
4 Partially correct 31 ms 2552 KB Output is partially correct - L* = 37
5 Partially correct 31 ms 2580 KB Output is partially correct - L* = 37
6 Partially correct 28 ms 2620 KB Output is partially correct - L* = 37
7 Partially correct 28 ms 2568 KB Output is partially correct - L* = 37
8 Partially correct 28 ms 2412 KB Output is partially correct - L* = 37
9 Partially correct 29 ms 2592 KB Output is partially correct - L* = 37
10 Partially correct 28 ms 2468 KB Output is partially correct - L* = 37
11 Partially correct 28 ms 2452 KB Output is partially correct - L* = 37
12 Partially correct 39 ms 2476 KB Output is partially correct - L* = 37
13 Partially correct 30 ms 2424 KB Output is partially correct - L* = 37
14 Partially correct 28 ms 2496 KB Output is partially correct - L* = 37
15 Partially correct 29 ms 2536 KB Output is partially correct - L* = 37
16 Partially correct 30 ms 2456 KB Output is partially correct - L* = 37
17 Partially correct 33 ms 2460 KB Output is partially correct - L* = 37
18 Partially correct 39 ms 2496 KB Output is partially correct - L* = 37
19 Partially correct 30 ms 2388 KB Output is partially correct - L* = 37
20 Partially correct 32 ms 2548 KB Output is partially correct - L* = 37
21 Partially correct 28 ms 2420 KB Output is partially correct - L* = 37
22 Partially correct 30 ms 2448 KB Output is partially correct - L* = 37
23 Partially correct 38 ms 2560 KB Output is partially correct - L* = 37
24 Partially correct 34 ms 2544 KB Output is partially correct - L* = 37
25 Partially correct 34 ms 2548 KB Output is partially correct - L* = 37
26 Partially correct 28 ms 2568 KB Output is partially correct - L* = 37
27 Partially correct 28 ms 2584 KB Output is partially correct - L* = 37
28 Partially correct 32 ms 2456 KB Output is partially correct - L* = 37
29 Partially correct 34 ms 2632 KB Output is partially correct - L* = 37
30 Partially correct 31 ms 2580 KB Output is partially correct - L* = 37
31 Partially correct 30 ms 2424 KB Output is partially correct - L* = 37
32 Partially correct 30 ms 2576 KB Output is partially correct - L* = 37
33 Partially correct 28 ms 2512 KB Output is partially correct - L* = 37
34 Partially correct 28 ms 2456 KB Output is partially correct - L* = 37
35 Partially correct 41 ms 2604 KB Output is partially correct - L* = 37
36 Partially correct 44 ms 2572 KB Output is partially correct - L* = 37
37 Partially correct 30 ms 2652 KB Output is partially correct - L* = 37
38 Partially correct 30 ms 2476 KB Output is partially correct - L* = 37
39 Partially correct 31 ms 2460 KB Output is partially correct - L* = 37
40 Partially correct 32 ms 2504 KB Output is partially correct - L* = 37