Submission #578503

# Submission time Handle Problem Language Result Execution time Memory
578503 2022-06-17T06:29:10 Z alireza_kaviani Broken Device (JOI17_broken_device) C++17
85 / 100
35 ms 2556 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const ll LOG = 60;
const ll MAXN = 150;


void Anna(int N, ll x, int K, int P[]){
    vector<int> mark(MAXN , 0);
    for(int i = 0 ; i < K ; i++){
        mark[P[i]] = 1;
    }
    for(int i = 0 ; i < N ; i += 2){
        if(mark[i] || mark[i + 1]){
            Set(i , 0);
            Set(i + 1 , 0);
            continue;
        }
        if(x % 3 == 0){
            Set(i , 1);
            Set(i + 1 , 0);
        }
        if(x % 3 == 1){
            Set(i , 0);
            Set(i + 1 , 1);
        }
        if(x % 3 == 2){
            Set(i , 1);
            Set(i + 1 , 1);
        }
        x /= 3;
    }
}
#include "Brunolib.h"
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const ll LOG = 60;
const ll MAXN = 150;

long long Bruno(int N, int A[]){
    ll ans = 0 , val = 1;
    for(int i = 0 ; i < N ; i += 2){
        if(A[i] == 0 && A[i + 1] == 0){
            continue;
        }
        ans += (A[i] + A[i + 1] * 2 - 1) * val;
        val *= 3;
    }
    return ans;
}
# Verdict Execution time Memory Grader output
1 Partially correct 28 ms 2360 KB Output is partially correct - L* = 37
2 Partially correct 31 ms 2228 KB Output is partially correct - L* = 37
3 Partially correct 30 ms 2356 KB Output is partially correct - L* = 37
4 Partially correct 32 ms 2432 KB Output is partially correct - L* = 37
5 Partially correct 31 ms 2332 KB Output is partially correct - L* = 37
6 Partially correct 31 ms 2292 KB Output is partially correct - L* = 37
7 Partially correct 30 ms 2244 KB Output is partially correct - L* = 37
8 Partially correct 31 ms 2256 KB Output is partially correct - L* = 37
9 Partially correct 33 ms 2296 KB Output is partially correct - L* = 37
10 Partially correct 30 ms 2248 KB Output is partially correct - L* = 37
11 Partially correct 30 ms 2228 KB Output is partially correct - L* = 37
12 Partially correct 31 ms 2336 KB Output is partially correct - L* = 37
13 Partially correct 31 ms 2348 KB Output is partially correct - L* = 37
14 Partially correct 32 ms 2248 KB Output is partially correct - L* = 37
15 Partially correct 30 ms 2220 KB Output is partially correct - L* = 37
16 Partially correct 31 ms 2328 KB Output is partially correct - L* = 37
17 Partially correct 31 ms 2372 KB Output is partially correct - L* = 37
18 Partially correct 28 ms 2308 KB Output is partially correct - L* = 37
19 Partially correct 30 ms 2244 KB Output is partially correct - L* = 37
20 Partially correct 31 ms 2252 KB Output is partially correct - L* = 37
21 Partially correct 32 ms 2280 KB Output is partially correct - L* = 37
22 Partially correct 30 ms 2272 KB Output is partially correct - L* = 37
23 Partially correct 30 ms 2332 KB Output is partially correct - L* = 37
24 Partially correct 32 ms 2272 KB Output is partially correct - L* = 37
25 Partially correct 31 ms 2364 KB Output is partially correct - L* = 37
26 Partially correct 28 ms 2232 KB Output is partially correct - L* = 37
27 Partially correct 30 ms 2252 KB Output is partially correct - L* = 37
28 Partially correct 30 ms 2256 KB Output is partially correct - L* = 37
29 Partially correct 31 ms 2264 KB Output is partially correct - L* = 37
30 Partially correct 28 ms 2248 KB Output is partially correct - L* = 37
31 Partially correct 30 ms 2232 KB Output is partially correct - L* = 37
32 Partially correct 31 ms 2348 KB Output is partially correct - L* = 37
33 Partially correct 31 ms 2340 KB Output is partially correct - L* = 37
34 Partially correct 28 ms 2292 KB Output is partially correct - L* = 37
35 Partially correct 32 ms 2244 KB Output is partially correct - L* = 37
36 Partially correct 35 ms 2556 KB Output is partially correct - L* = 37
37 Partially correct 28 ms 2248 KB Output is partially correct - L* = 37
38 Partially correct 30 ms 2292 KB Output is partially correct - L* = 37
39 Partially correct 31 ms 2272 KB Output is partially correct - L* = 37
40 Partially correct 31 ms 2256 KB Output is partially correct - L* = 37