Submission #530478

# Submission time Handle Problem Language Result Execution time Memory
530478 2022-02-25T13:34:50 Z byunjaewoo Broken Device (JOI17_broken_device) C++17
0 / 100
39 ms 2440 KB
#include "Annalib.h"
#include <bits/stdc++.h>
using namespace std;

bool chk[155];

void Anna( int N, long long X, int K, int P[] ){
    for(int i=0; i<K; i++) chk[P[i]]=true;
    vector<int> V;
    while(X) {
        V.push_back(X%2);
        X/=2;
    }
    for(int i=0, p=0; i<150; i+=2) {
        if(chk[i] || chk[i+1] || p>=V.size()) {
            Set(i, 0); Set(i+1, 0); continue;
        }
        if(V[p]==0) {
            Set(i, 1); Set(i+1, 1);
        }
        else {
            Set(i, 1); Set(i+1, 0);
        }
    }
}
#include <bits/stdc++.h>
using namespace std;
#include "Brunolib.h"

long long Bruno( int N, int A[] ){
    long long x=0;
    for(int i=N-1; i>=0; i-=2) {
        if(!A[i] && !A[i+1]) continue;
        x*=2; x+=(A[i]^A[i+1]);
    }
    return x;
}

Compilation message

Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:15:35: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |         if(chk[i] || chk[i+1] || p>=V.size()) {
      |                                  ~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Partially correct 27 ms 2204 KB Output isn't correct - L* = 0
2 Partially correct 27 ms 2440 KB Output isn't correct - L* = 0
3 Partially correct 27 ms 2216 KB Output isn't correct - L* = 0
4 Partially correct 27 ms 2232 KB Output isn't correct - L* = 0
5 Partially correct 28 ms 2300 KB Output isn't correct - L* = 0
6 Partially correct 28 ms 2204 KB Output isn't correct - L* = 0
7 Partially correct 30 ms 2296 KB Output isn't correct - L* = 0
8 Partially correct 27 ms 2248 KB Output isn't correct - L* = 0
9 Partially correct 28 ms 2264 KB Output isn't correct - L* = 0
10 Partially correct 28 ms 2424 KB Output isn't correct - L* = 0
11 Partially correct 28 ms 2204 KB Output isn't correct - L* = 0
12 Partially correct 28 ms 2212 KB Output isn't correct - L* = 0
13 Partially correct 27 ms 2220 KB Output isn't correct - L* = 0
14 Partially correct 27 ms 2316 KB Output isn't correct - L* = 0
15 Partially correct 29 ms 2204 KB Output isn't correct - L* = 0
16 Partially correct 27 ms 2224 KB Output isn't correct - L* = 0
17 Partially correct 27 ms 2284 KB Output isn't correct - L* = 0
18 Partially correct 27 ms 2312 KB Output isn't correct - L* = 0
19 Partially correct 33 ms 2368 KB Output isn't correct - L* = 0
20 Partially correct 27 ms 2228 KB Output isn't correct - L* = 0
21 Partially correct 28 ms 2240 KB Output isn't correct - L* = 0
22 Partially correct 30 ms 2252 KB Output isn't correct - L* = 0
23 Partially correct 27 ms 2312 KB Output isn't correct - L* = 0
24 Partially correct 27 ms 2304 KB Output isn't correct - L* = 0
25 Partially correct 27 ms 2344 KB Output isn't correct - L* = 0
26 Partially correct 28 ms 2276 KB Output isn't correct - L* = 0
27 Partially correct 28 ms 2336 KB Output isn't correct - L* = 0
28 Partially correct 30 ms 2236 KB Output isn't correct - L* = 0
29 Partially correct 27 ms 2252 KB Output isn't correct - L* = 0
30 Partially correct 27 ms 2176 KB Output isn't correct - L* = 0
31 Partially correct 27 ms 2224 KB Output isn't correct - L* = 0
32 Partially correct 27 ms 2248 KB Output isn't correct - L* = 0
33 Partially correct 27 ms 2272 KB Output isn't correct - L* = 0
34 Partially correct 27 ms 2352 KB Output isn't correct - L* = 0
35 Partially correct 27 ms 2296 KB Output isn't correct - L* = 0
36 Partially correct 30 ms 2412 KB Output isn't correct - L* = 0
37 Partially correct 39 ms 2316 KB Output isn't correct - L* = 0
38 Partially correct 32 ms 2360 KB Output isn't correct - L* = 0
39 Partially correct 31 ms 2224 KB Output isn't correct - L* = 0
40 Partially correct 28 ms 2220 KB Output isn't correct - L* = 0