Submission #718381

# Submission time Handle Problem Language Result Execution time Memory
718381 2023-04-04T01:15:00 Z ThegeekKnight16 Broken Device (JOI17_broken_device) C++17
8 / 100
38 ms 2636 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 = 60;
    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 32 ms 2588 KB Output is partially correct - L* = 14
2 Partially correct 31 ms 2540 KB Output is partially correct - L* = 14
3 Partially correct 35 ms 2508 KB Output is partially correct - L* = 14
4 Partially correct 32 ms 2540 KB Output is partially correct - L* = 14
5 Partially correct 36 ms 2516 KB Output is partially correct - L* = 14
6 Partially correct 32 ms 2596 KB Output is partially correct - L* = 14
7 Partially correct 30 ms 2492 KB Output is partially correct - L* = 14
8 Partially correct 37 ms 2508 KB Output is partially correct - L* = 14
9 Partially correct 32 ms 2472 KB Output is partially correct - L* = 14
10 Partially correct 38 ms 2568 KB Output is partially correct - L* = 14
11 Partially correct 32 ms 2476 KB Output is partially correct - L* = 14
12 Partially correct 32 ms 2608 KB Output is partially correct - L* = 14
13 Partially correct 31 ms 2600 KB Output is partially correct - L* = 14
14 Partially correct 34 ms 2636 KB Output is partially correct - L* = 14
15 Partially correct 33 ms 2516 KB Output is partially correct - L* = 15
16 Partially correct 31 ms 2552 KB Output is partially correct - L* = 14
17 Partially correct 34 ms 2472 KB Output is partially correct - L* = 14
18 Partially correct 32 ms 2524 KB Output is partially correct - L* = 14
19 Partially correct 33 ms 2568 KB Output is partially correct - L* = 14
20 Partially correct 33 ms 2632 KB Output is partially correct - L* = 14
21 Partially correct 30 ms 2444 KB Output is partially correct - L* = 14
22 Partially correct 28 ms 2504 KB Output is partially correct - L* = 14
23 Partially correct 31 ms 2520 KB Output is partially correct - L* = 14
24 Partially correct 32 ms 2612 KB Output is partially correct - L* = 14
25 Partially correct 37 ms 2604 KB Output is partially correct - L* = 14
26 Partially correct 36 ms 2448 KB Output is partially correct - L* = 14
27 Partially correct 35 ms 2484 KB Output is partially correct - L* = 14
28 Partially correct 30 ms 2516 KB Output is partially correct - L* = 14
29 Partially correct 28 ms 2464 KB Output is partially correct - L* = 14
30 Partially correct 30 ms 2604 KB Output is partially correct - L* = 14
31 Partially correct 34 ms 2480 KB Output is partially correct - L* = 14
32 Partially correct 34 ms 2568 KB Output is partially correct - L* = 14
33 Partially correct 30 ms 2480 KB Output is partially correct - L* = 14
34 Partially correct 30 ms 2508 KB Output is partially correct - L* = 14
35 Partially correct 31 ms 2464 KB Output is partially correct - L* = 14
36 Partially correct 31 ms 2520 KB Output is partially correct - L* = 14
37 Partially correct 32 ms 2600 KB Output is partially correct - L* = 14
38 Partially correct 31 ms 2504 KB Output is partially correct - L* = 14
39 Partially correct 32 ms 2572 KB Output is partially correct - L* = 14
40 Partially correct 30 ms 2500 KB Output is partially correct - L* = 14