답안 #310987

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
310987 2020-10-09T01:20:40 Z peuch Broken Device (JOI17_broken_device) C++17
0 / 100
2 ms 1032 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] && (((1LL << ((long long)it1) & X) != 0)))) && 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 784 KB Wrong Answer [1]
2 Incorrect 0 ms 772 KB Wrong Answer [4]
3 Incorrect 1 ms 788 KB Wrong Answer [4]
4 Incorrect 1 ms 784 KB Wrong Answer [4]
5 Incorrect 2 ms 788 KB Wrong Answer [1]
6 Incorrect 1 ms 780 KB Wrong Answer [4]
7 Incorrect 2 ms 644 KB Wrong Answer [1]
8 Incorrect 1 ms 644 KB Wrong Answer [1]
9 Incorrect 0 ms 644 KB Wrong Answer [1]
10 Incorrect 1 ms 788 KB Wrong Answer [1]
11 Incorrect 2 ms 804 KB Wrong Answer [4]
12 Incorrect 2 ms 776 KB Wrong Answer [1]
13 Incorrect 1 ms 784 KB Wrong Answer [1]
14 Incorrect 0 ms 772 KB Wrong Answer [4]
15 Incorrect 1 ms 776 KB Wrong Answer [1]
16 Incorrect 0 ms 772 KB Wrong Answer [4]
17 Incorrect 0 ms 776 KB Wrong Answer [4]
18 Incorrect 2 ms 788 KB Wrong Answer [1]
19 Incorrect 1 ms 772 KB Wrong Answer [1]
20 Incorrect 1 ms 932 KB Wrong Answer [4]
21 Incorrect 1 ms 772 KB Wrong Answer [1]
22 Incorrect 1 ms 772 KB Wrong Answer [4]
23 Incorrect 0 ms 772 KB Wrong Answer [1]
24 Incorrect 0 ms 644 KB Wrong Answer [1]
25 Incorrect 1 ms 784 KB Wrong Answer [1]
26 Incorrect 1 ms 788 KB Wrong Answer [4]
27 Incorrect 1 ms 776 KB Wrong Answer [1]
28 Incorrect 0 ms 644 KB Wrong Answer [1]
29 Incorrect 2 ms 912 KB Wrong Answer [1]
30 Incorrect 2 ms 788 KB Wrong Answer [1]
31 Incorrect 2 ms 772 KB Wrong Answer [1]
32 Incorrect 2 ms 1032 KB Wrong Answer [1]
33 Incorrect 0 ms 644 KB Wrong Answer [1]
34 Incorrect 2 ms 904 KB Wrong Answer [1]
35 Incorrect 1 ms 644 KB Wrong Answer [1]
36 Incorrect 1 ms 776 KB Wrong Answer [1]
37 Incorrect 0 ms 772 KB Wrong Answer [1]
38 Incorrect 1 ms 644 KB Wrong Answer [1]
39 Incorrect 2 ms 784 KB Wrong Answer [4]
40 Incorrect 1 ms 776 KB Wrong Answer [1]