Submission #718386

# Submission time Handle Problem Language Result Execution time Memory
718386 2023-04-04T01:16:31 Z ThegeekKnight16 Broken Device (JOI17_broken_device) C++17
41 / 100
45 ms 2456 KB
#include <bits/stdc++.h>
#include "Annalib.h"
using namespace std;

void Anna( int N, long long X, int K, int P[] )
{
    // cerr << N << '\n';
    vector<bool> Marc(N);
    for (int i = 0; i < K; i++) Marc[P[i]] = 1;

    int atual = 59;
    for(int i = 0; i < N; i += 2)
    {
        if (Marc[i] || Marc[i+1] || atual < 0)
        {
            // cerr << "Seta " << i << " e " << i+1 << " para 0" << '\n';
            Set(i, 0);
            Set(i+1, 0);
        }
        else
        {
            int aux = ((bool)(X & (1LL << atual)));
            // cerr << "Seta " << i << " para 1 e " << i+1 << " para " << aux << '\n';
            Set(i, 1);
            Set(i+1, aux);
            --atual;
        }
    }
}
#include <bits/stdc++.h>
#include "Brunolib.h"
using namespace std;

long long Bruno( int N, int A[] )
{
    long long resp = 0;
    for (int i = 0; i < N; i += 2)
    {
        if (A[i])
        {
            // cerr << "Adiciona " << A[i+1] << '\n';
            resp <<= 1LL;
            resp |= A[i+1];
        }
    }
    return resp;
}
# Verdict Execution time Memory Grader output
1 Partially correct 30 ms 2388 KB Output is partially correct - L* = 15
2 Partially correct 34 ms 2256 KB Output is partially correct - L* = 15
3 Partially correct 34 ms 2304 KB Output is partially correct - L* = 15
4 Partially correct 45 ms 2320 KB Output is partially correct - L* = 15
5 Partially correct 39 ms 2264 KB Output is partially correct - L* = 15
6 Partially correct 36 ms 2232 KB Output is partially correct - L* = 15
7 Partially correct 34 ms 2296 KB Output is partially correct - L* = 15
8 Partially correct 31 ms 2228 KB Output is partially correct - L* = 15
9 Partially correct 32 ms 2212 KB Output is partially correct - L* = 15
10 Partially correct 41 ms 2184 KB Output is partially correct - L* = 15
11 Partially correct 42 ms 2292 KB Output is partially correct - L* = 15
12 Partially correct 32 ms 2180 KB Output is partially correct - L* = 15
13 Partially correct 31 ms 2332 KB Output is partially correct - L* = 15
14 Partially correct 34 ms 2392 KB Output is partially correct - L* = 15
15 Partially correct 41 ms 2260 KB Output is partially correct - L* = 15
16 Partially correct 35 ms 2216 KB Output is partially correct - L* = 15
17 Partially correct 31 ms 2336 KB Output is partially correct - L* = 15
18 Partially correct 30 ms 2228 KB Output is partially correct - L* = 15
19 Partially correct 30 ms 2228 KB Output is partially correct - L* = 15
20 Partially correct 44 ms 2348 KB Output is partially correct - L* = 15
21 Partially correct 33 ms 2288 KB Output is partially correct - L* = 15
22 Partially correct 32 ms 2296 KB Output is partially correct - L* = 15
23 Partially correct 33 ms 2456 KB Output is partially correct - L* = 15
24 Partially correct 31 ms 2300 KB Output is partially correct - L* = 15
25 Partially correct 30 ms 2308 KB Output is partially correct - L* = 15
26 Partially correct 32 ms 2280 KB Output is partially correct - L* = 15
27 Partially correct 37 ms 2248 KB Output is partially correct - L* = 15
28 Partially correct 39 ms 2212 KB Output is partially correct - L* = 15
29 Partially correct 31 ms 2348 KB Output is partially correct - L* = 15
30 Partially correct 30 ms 2300 KB Output is partially correct - L* = 15
31 Partially correct 31 ms 2244 KB Output is partially correct - L* = 15
32 Partially correct 33 ms 2240 KB Output is partially correct - L* = 15
33 Partially correct 31 ms 2356 KB Output is partially correct - L* = 15
34 Partially correct 30 ms 2364 KB Output is partially correct - L* = 15
35 Partially correct 30 ms 2292 KB Output is partially correct - L* = 15
36 Partially correct 30 ms 2336 KB Output is partially correct - L* = 15
37 Partially correct 30 ms 2248 KB Output is partially correct - L* = 16
38 Partially correct 30 ms 2264 KB Output is partially correct - L* = 15
39 Partially correct 44 ms 2228 KB Output is partially correct - L* = 15
40 Partially correct 37 ms 2292 KB Output is partially correct - L* = 15