Submission #71444

# Submission time Handle Problem Language Result Execution time Memory
71444 2018-08-24T16:43:56 Z RezwanArefin01 Broken Device (JOI17_broken_device) C++17
85 / 100
73 ms 13008 KB
#include <bits/stdc++.h>
#include "Annalib.h"
using namespace std; 

void Anna( int N, long long X, int K, int P[] ){
    vector<int> can(150, 1); 
    for(int i = 0; i < K; i++) 
        can[P[i]] = 0; 
    for(int i = 149; i >= 0; i -= 2) {
        int a = i - 1, b = i; 
        if(can[a] && can[b] && X) {
            int D = 1 + (X % 3); X /= 3; 
            Set(b, D & 1); D >>= 1;
            Set(a, D & 1); 
        } else {
            Set(a, 0); Set(b, 0); 
        }
    }
}
#include <bits/stdc++.h>
#include "Brunolib.h"
using namespace std;

long long Bruno( int N, int A[] ){
    long long X = 0;
    for(int i = 0; i < 150; i += 2) {
        int y = 2 * A[i] + A[i + 1]; 
        if(y) X = 3 * X + y - 1; 
    } return X;
}
# Verdict Execution time Memory Grader output
1 Partially correct 49 ms 3312 KB Output is partially correct - L* = 37
2 Partially correct 52 ms 3496 KB Output is partially correct - L* = 37
3 Partially correct 47 ms 4160 KB Output is partially correct - L* = 37
4 Partially correct 53 ms 4384 KB Output is partially correct - L* = 37
5 Partially correct 50 ms 4552 KB Output is partially correct - L* = 37
6 Partially correct 54 ms 5016 KB Output is partially correct - L* = 37
7 Partially correct 51 ms 5016 KB Output is partially correct - L* = 37
8 Partially correct 59 ms 5232 KB Output is partially correct - L* = 37
9 Partially correct 68 ms 5480 KB Output is partially correct - L* = 37
10 Partially correct 56 ms 5728 KB Output is partially correct - L* = 37
11 Partially correct 51 ms 5960 KB Output is partially correct - L* = 37
12 Partially correct 54 ms 6208 KB Output is partially correct - L* = 37
13 Partially correct 58 ms 6696 KB Output is partially correct - L* = 37
14 Partially correct 65 ms 6696 KB Output is partially correct - L* = 37
15 Partially correct 55 ms 6936 KB Output is partially correct - L* = 37
16 Partially correct 45 ms 7184 KB Output is partially correct - L* = 37
17 Partially correct 50 ms 7424 KB Output is partially correct - L* = 37
18 Partially correct 53 ms 7664 KB Output is partially correct - L* = 37
19 Partially correct 50 ms 7904 KB Output is partially correct - L* = 37
20 Partially correct 60 ms 8408 KB Output is partially correct - L* = 37
21 Partially correct 57 ms 8408 KB Output is partially correct - L* = 37
22 Partially correct 50 ms 8632 KB Output is partially correct - L* = 37
23 Partially correct 59 ms 8872 KB Output is partially correct - L* = 37
24 Partially correct 53 ms 9328 KB Output is partially correct - L* = 37
25 Partially correct 59 ms 9344 KB Output is partially correct - L* = 37
26 Partially correct 55 ms 9592 KB Output is partially correct - L* = 37
27 Partially correct 56 ms 9840 KB Output is partially correct - L* = 37
28 Partially correct 54 ms 10088 KB Output is partially correct - L* = 37
29 Partially correct 56 ms 10328 KB Output is partially correct - L* = 37
30 Partially correct 63 ms 10840 KB Output is partially correct - L* = 37
31 Partially correct 73 ms 10912 KB Output is partially correct - L* = 37
32 Partially correct 73 ms 11368 KB Output is partially correct - L* = 37
33 Partially correct 49 ms 11560 KB Output is partially correct - L* = 37
34 Partially correct 48 ms 11560 KB Output is partially correct - L* = 37
35 Partially correct 47 ms 11784 KB Output is partially correct - L* = 37
36 Partially correct 56 ms 12032 KB Output is partially correct - L* = 37
37 Partially correct 48 ms 12280 KB Output is partially correct - L* = 37
38 Partially correct 59 ms 12544 KB Output is partially correct - L* = 37
39 Partially correct 50 ms 12800 KB Output is partially correct - L* = 37
40 Partially correct 48 ms 13008 KB Output is partially correct - L* = 37