Submission #68007

# Submission time Handle Problem Language Result Execution time Memory
68007 2018-08-15T18:23:38 Z elitewantsyou Broken Device (JOI17_broken_device) C++14
41 / 100
87 ms 3744 KB
#include <bits/stdc++.h>
#include "Annalib.h"

using namespace std;

int gg[1111];

void Anna( int N, long long X, int K, int P[] )
{
        vector < int > v;
        for(int i = 0; i < N; i++){
                gg[i] = 0;
        }
        for(int i = 0; i < K; i++){
                gg[P[i]] = 1;
        }
        for(int i = 0; i < N; i += 2){
                if(gg[i] == 0 && gg[i + 1] == 0){
                        v.push_back(i);
                        //cout << i << " ";
                }
        }
        //cout << endl;
        for(int i = 0; i < N; i++){
                gg[i] = 0;
        }
        for(int i = 0; i < min(61, (int)v.size()); i++){
                gg[v[i]] = 1;
                if(X & (1ll << i)){
                        gg[v[i] + 1] = 1;
                }
        }
        for(int i = 0; i < N; i++){
                Set(i, gg[i]);
        }
}
#include "Brunolib.h"

long long Bruno( int N, int A[] )
{
        long long X = 0;
        int c = 0, g = 0;
        for(int i = 0; i < N; i += 2){
                if(A[i]){
                        X += (1ll << g) * A[i + 1];
                        g++;
                }
        }
        return X;
}

Compilation message

Bruno.cpp: In function 'long long int Bruno(int, int*)':
Bruno.cpp:6:13: warning: unused variable 'c' [-Wunused-variable]
         int c = 0, g = 0;
             ^
# Verdict Execution time Memory Grader output
1 Partially correct 52 ms 3056 KB Output is partially correct - L* = 15
2 Partially correct 51 ms 3232 KB Output is partially correct - L* = 15
3 Partially correct 61 ms 3464 KB Output is partially correct - L* = 16
4 Partially correct 87 ms 3576 KB Output is partially correct - L* = 15
5 Partially correct 69 ms 3656 KB Output is partially correct - L* = 15
6 Partially correct 50 ms 3664 KB Output is partially correct - L* = 15
7 Partially correct 58 ms 3664 KB Output is partially correct - L* = 15
8 Partially correct 75 ms 3712 KB Output is partially correct - L* = 15
9 Partially correct 43 ms 3712 KB Output is partially correct - L* = 16
10 Partially correct 77 ms 3712 KB Output is partially correct - L* = 16
11 Partially correct 48 ms 3736 KB Output is partially correct - L* = 15
12 Partially correct 43 ms 3736 KB Output is partially correct - L* = 16
13 Partially correct 50 ms 3736 KB Output is partially correct - L* = 15
14 Partially correct 51 ms 3736 KB Output is partially correct - L* = 15
15 Partially correct 43 ms 3744 KB Output is partially correct - L* = 15
16 Partially correct 44 ms 3744 KB Output is partially correct - L* = 15
17 Partially correct 45 ms 3744 KB Output is partially correct - L* = 15
18 Partially correct 40 ms 3744 KB Output is partially correct - L* = 15
19 Partially correct 66 ms 3744 KB Output is partially correct - L* = 16
20 Partially correct 43 ms 3744 KB Output is partially correct - L* = 15
21 Partially correct 40 ms 3744 KB Output is partially correct - L* = 15
22 Partially correct 40 ms 3744 KB Output is partially correct - L* = 15
23 Partially correct 44 ms 3744 KB Output is partially correct - L* = 15
24 Partially correct 39 ms 3744 KB Output is partially correct - L* = 15
25 Partially correct 39 ms 3744 KB Output is partially correct - L* = 15
26 Partially correct 45 ms 3744 KB Output is partially correct - L* = 15
27 Partially correct 43 ms 3744 KB Output is partially correct - L* = 15
28 Partially correct 49 ms 3744 KB Output is partially correct - L* = 15
29 Partially correct 44 ms 3744 KB Output is partially correct - L* = 15
30 Partially correct 39 ms 3744 KB Output is partially correct - L* = 15
31 Partially correct 43 ms 3744 KB Output is partially correct - L* = 15
32 Partially correct 53 ms 3744 KB Output is partially correct - L* = 16
33 Partially correct 49 ms 3744 KB Output is partially correct - L* = 15
34 Partially correct 44 ms 3744 KB Output is partially correct - L* = 15
35 Partially correct 46 ms 3744 KB Output is partially correct - L* = 15
36 Partially correct 39 ms 3744 KB Output is partially correct - L* = 15
37 Partially correct 41 ms 3744 KB Output is partially correct - L* = 16
38 Partially correct 64 ms 3744 KB Output is partially correct - L* = 15
39 Partially correct 40 ms 3744 KB Output is partially correct - L* = 15
40 Partially correct 40 ms 3744 KB Output is partially correct - L* = 15