답안 #530486

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
530486 2022-02-25T14:21:10 Z byunjaewoo Broken Device (JOI17_broken_device) C++17
0 / 100
35 ms 2368 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[] ){
    fill(chk, chk+151, 0);
    for(int i=0; i<K; i++) chk[P[i]]=true;
    vector<int> V;
    while(X) {
        V.push_back(X%2);
        X/=2;
    }
    if(V.size()%2) V.push_back(0);
    for(int i=0, p=0; i<150; i+=3) {
        if(chk[i] || chk[i+1] || chk[i+2] || p>=V.size()) {
            Set(i, 0); Set(i+1, 0); Set(i+2, 0); continue;
        }
        int a, b, c;
        if(V[p]) a=1, b=1;
        else a=1, b=0;
        if(V[p+1]) c=!b;
        else c=b;
        Set(i, a); Set(i+1, b); Set(i+2, c);
        p+=2;
    }
}
#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-=3) {
        if(!A[i] && !A[i-1]) continue;
        x*=2; x+=(A[i]^A[i-1]);
        x*=2; x+=(A[i-1]^A[i-2]);
    }
    return x;
}

Compilation message

Anna.cpp: In function 'void Anna(int, long long int, int, int*)':
Anna.cpp:17:47: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |         if(chk[i] || chk[i+1] || chk[i+2] || p>=V.size()) {
      |                                              ~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Partially correct 30 ms 2320 KB Output isn't correct - L* = 0
2 Partially correct 31 ms 2284 KB Output isn't correct - L* = 0
3 Partially correct 30 ms 2244 KB Output isn't correct - L* = 0
4 Partially correct 28 ms 2280 KB Output isn't correct - L* = 0
5 Partially correct 28 ms 2204 KB Output isn't correct - L* = 0
6 Partially correct 28 ms 2224 KB Output isn't correct - L* = 0
7 Partially correct 35 ms 2204 KB Output isn't correct - L* = 0
8 Partially correct 27 ms 2264 KB Output isn't correct - L* = 0
9 Partially correct 27 ms 2216 KB Output isn't correct - L* = 0
10 Partially correct 27 ms 2168 KB Output isn't correct - L* = 0
11 Partially correct 27 ms 2304 KB Output isn't correct - L* = 0
12 Partially correct 27 ms 2296 KB Output isn't correct - L* = 0
13 Partially correct 27 ms 2228 KB Output isn't correct - L* = 0
14 Partially correct 35 ms 2328 KB Output isn't correct - L* = 0
15 Partially correct 28 ms 2224 KB Output isn't correct - L* = 0
16 Partially correct 28 ms 2256 KB Output isn't correct - L* = 0
17 Partially correct 30 ms 2224 KB Output isn't correct - L* = 0
18 Partially correct 27 ms 2316 KB Output isn't correct - L* = 0
19 Partially correct 30 ms 2236 KB Output isn't correct - L* = 0
20 Partially correct 27 ms 2300 KB Output isn't correct - L* = 0
21 Partially correct 30 ms 2220 KB Output isn't correct - L* = 0
22 Partially correct 32 ms 2300 KB Output isn't correct - L* = 0
23 Partially correct 28 ms 2204 KB Output isn't correct - L* = 0
24 Partially correct 28 ms 2224 KB Output isn't correct - L* = 0
25 Partially correct 28 ms 2304 KB Output isn't correct - L* = 0
26 Partially correct 27 ms 2316 KB Output isn't correct - L* = 0
27 Partially correct 35 ms 2368 KB Output isn't correct - L* = 0
28 Partially correct 28 ms 2240 KB Output isn't correct - L* = 0
29 Partially correct 28 ms 2300 KB Output isn't correct - L* = 0
30 Partially correct 28 ms 2284 KB Output isn't correct - L* = 0
31 Partially correct 27 ms 2280 KB Output isn't correct - L* = 0
32 Partially correct 31 ms 2272 KB Output isn't correct - L* = 0
33 Partially correct 27 ms 2292 KB Output isn't correct - L* = 0
34 Partially correct 28 ms 2268 KB Output isn't correct - L* = 0
35 Partially correct 31 ms 2196 KB Output isn't correct - L* = 0
36 Partially correct 27 ms 2248 KB Output isn't correct - L* = 0
37 Partially correct 32 ms 2204 KB Output isn't correct - L* = 0
38 Partially correct 28 ms 2296 KB Output isn't correct - L* = 0
39 Partially correct 28 ms 2276 KB Output isn't correct - L* = 0
40 Partially correct 28 ms 2260 KB Output isn't correct - L* = 0