답안 #310988

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
310988 2020-10-09T01:21:39 Z peuch Broken Device (JOI17_broken_device) C++17
0 / 100
2 ms 1024 KB
#include "Annalib.h"
#include<bits/stdc++.h>
using namespace std;

void Anna(int N, long long X, int K, int P[]){
	
	int marc[N + 10];
	memset(marc, 0, sizeof(marc));
	
	for(int i = 0; i < K; i++)
		marc[P[i]] = 1;

	int it1 = 60, it2 = N - 1;
	
	for(; it1 >= 0; it1--){
		while((marc[it2] || marc[it2 - 1]) && it2 > 1) {
			Set(it2, 0);
			it2--;
		}
		Set(it2, 1);
		it2--;	
		if((1LL << ((long long)it1)) & X) Set(it2, 1);
		else Set(it2, 0);
		it2--;
	}
	
	while(it2 >= 0){
		Set(it2, 0);
		it2--;
	}
	
	return;
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;

long long Bruno(int N, int A[]){
	
	int it1 = 60, it2 = N - 1;
	long long ret = 0;
	
	for(; it2 > 0; it2--){
		if(A[it2]){
			it2--;
			ret |= ((long long) A[it2]) << (long long)it1;
			it1--;
		}
		if(it1 < 0) break;
	}

	return ret;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 772 KB Wrong Answer [1]
2 Incorrect 1 ms 776 KB Wrong Answer [1]
3 Incorrect 0 ms 772 KB Wrong Answer [1]
4 Incorrect 0 ms 644 KB Wrong Answer [1]
5 Incorrect 1 ms 780 KB Wrong Answer [1]
6 Incorrect 0 ms 900 KB Wrong Answer [1]
7 Incorrect 1 ms 780 KB Wrong Answer [1]
8 Incorrect 0 ms 772 KB Wrong Answer [1]
9 Incorrect 0 ms 1024 KB Wrong Answer [1]
10 Incorrect 0 ms 644 KB Wrong Answer [1]
11 Incorrect 0 ms 780 KB Wrong Answer [1]
12 Incorrect 0 ms 644 KB Wrong Answer [1]
13 Incorrect 1 ms 772 KB Wrong Answer [1]
14 Incorrect 0 ms 776 KB Wrong Answer [1]
15 Incorrect 0 ms 772 KB Wrong Answer [1]
16 Incorrect 1 ms 776 KB Wrong Answer [1]
17 Incorrect 0 ms 772 KB Wrong Answer [1]
18 Incorrect 0 ms 788 KB Wrong Answer [1]
19 Incorrect 1 ms 644 KB Wrong Answer [1]
20 Incorrect 0 ms 780 KB Wrong Answer [1]
21 Incorrect 0 ms 784 KB Wrong Answer [1]
22 Incorrect 0 ms 772 KB Wrong Answer [1]
23 Incorrect 0 ms 772 KB Wrong Answer [1]
24 Incorrect 0 ms 776 KB Wrong Answer [1]
25 Incorrect 2 ms 804 KB Wrong Answer [1]
26 Incorrect 2 ms 780 KB Wrong Answer [1]
27 Incorrect 0 ms 644 KB Wrong Answer [1]
28 Incorrect 2 ms 772 KB Wrong Answer [1]
29 Incorrect 0 ms 644 KB Wrong Answer [1]
30 Incorrect 1 ms 780 KB Wrong Answer [1]
31 Incorrect 1 ms 772 KB Wrong Answer [1]
32 Incorrect 0 ms 644 KB Wrong Answer [1]
33 Incorrect 2 ms 784 KB Wrong Answer [1]
34 Incorrect 1 ms 788 KB Wrong Answer [1]
35 Incorrect 1 ms 644 KB Wrong Answer [1]
36 Incorrect 1 ms 784 KB Wrong Answer [1]
37 Incorrect 0 ms 772 KB Wrong Answer [1]
38 Incorrect 1 ms 780 KB Wrong Answer [1]
39 Incorrect 2 ms 776 KB Wrong Answer [1]
40 Incorrect 1 ms 784 KB Wrong Answer [1]