답안 #775122

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
775122 2023-07-06T07:54:00 Z bachhoangxuan Broken Device (JOI17_broken_device) C++17
0 / 100
28 ms 2680 KB
#include "Annalib.h"
#include<bits/stdc++.h>
using namespace std;

void Anna( int N, long long X, int K, int P[] ){
    vector<int> d(N,0);
    for(int i=0;i<K;i++) d[P[i]]=1;
    for(int i=N-3;i>=0;i-=3){
        int a=0,b=0,c=0;
        if(d[i]+d[i+1]+d[i+2]==0){
            if(X%4==0) b=1;
            else a=1,b=X>>1&1,c=X&1;
            X/=4;
        }
        else if(d[i]+d[i+1]+d[i+2]==1){
            if(X&1){
                if(d[i]) b=c=1;
                else a=1;
            }
            else if(d[i+2]) a=X>>1&1,b=1,X/=2;
            else c=1;
            X/=2;
        }
        Set(i,a);Set(i+1,b);Set(i+2,c);
    }
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;

long long Bruno( int N, int A[] ){
    long long res=0;
    for(int i=0;i<N;i+=3){
        int num=A[i]*4+A[i+1]*2+A[i];
        if(num==1) res*=2;
        else if(num>=5) res=res*4+num%4;
        else if(num==2) res*=4;
        else res=res*2+1;
    }
    return res;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 24 ms 2488 KB Output isn't correct - L* = 0
2 Partially correct 24 ms 2480 KB Output isn't correct - L* = 0
3 Partially correct 25 ms 2556 KB Output isn't correct - L* = 0
4 Partially correct 26 ms 2628 KB Output isn't correct - L* = 0
5 Partially correct 24 ms 2560 KB Output isn't correct - L* = 0
6 Partially correct 25 ms 2580 KB Output isn't correct - L* = 0
7 Partially correct 25 ms 2512 KB Output isn't correct - L* = 0
8 Partially correct 25 ms 2680 KB Output isn't correct - L* = 0
9 Partially correct 24 ms 2504 KB Output isn't correct - L* = 0
10 Partially correct 25 ms 2500 KB Output isn't correct - L* = 0
11 Partially correct 26 ms 2620 KB Output isn't correct - L* = 0
12 Partially correct 24 ms 2484 KB Output isn't correct - L* = 0
13 Partially correct 24 ms 2592 KB Output isn't correct - L* = 0
14 Partially correct 25 ms 2504 KB Output isn't correct - L* = 0
15 Partially correct 24 ms 2504 KB Output isn't correct - L* = 0
16 Partially correct 24 ms 2608 KB Output isn't correct - L* = 0
17 Partially correct 25 ms 2572 KB Output isn't correct - L* = 0
18 Partially correct 25 ms 2480 KB Output isn't correct - L* = 0
19 Partially correct 24 ms 2484 KB Output isn't correct - L* = 0
20 Partially correct 25 ms 2668 KB Output isn't correct - L* = 0
21 Partially correct 26 ms 2476 KB Output isn't correct - L* = 0
22 Partially correct 27 ms 2612 KB Output isn't correct - L* = 0
23 Partially correct 24 ms 2484 KB Output isn't correct - L* = 0
24 Partially correct 26 ms 2584 KB Output isn't correct - L* = 0
25 Partially correct 25 ms 2616 KB Output isn't correct - L* = 0
26 Partially correct 24 ms 2484 KB Output isn't correct - L* = 0
27 Partially correct 25 ms 2604 KB Output isn't correct - L* = 0
28 Partially correct 24 ms 2476 KB Output isn't correct - L* = 0
29 Partially correct 26 ms 2584 KB Output isn't correct - L* = 0
30 Partially correct 24 ms 2612 KB Output isn't correct - L* = 0
31 Partially correct 25 ms 2476 KB Output isn't correct - L* = 0
32 Partially correct 28 ms 2524 KB Output isn't correct - L* = 0
33 Partially correct 24 ms 2480 KB Output isn't correct - L* = 0
34 Partially correct 25 ms 2500 KB Output isn't correct - L* = 0
35 Partially correct 24 ms 2500 KB Output isn't correct - L* = 0
36 Partially correct 26 ms 2532 KB Output isn't correct - L* = 0
37 Partially correct 26 ms 2512 KB Output isn't correct - L* = 0
38 Partially correct 26 ms 2540 KB Output isn't correct - L* = 0
39 Partially correct 24 ms 2672 KB Output isn't correct - L* = 0
40 Partially correct 24 ms 2480 KB Output isn't correct - L* = 0