답안 #1077205

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1077205 2024-08-27T02:56:15 Z thelegendary08 Broken Device (JOI17_broken_device) C++14
0 / 100
1 ms 1032 KB
#include "Annalib.h"

void Anna( int N, long long X, int K, int P[] ){
	if(P[0] <= 60){
		for(int i = N - 1; i>=N-60; i--){
			Set(i, (((1<<(i - (N - 60))) & X) > 0));
		}
	}
	else{
		for(int i  = 0; i<60; i++){
			Set(i, (((1<<i) & X) > 0));
		}
	}
}
#include "Brunolib.h"

long long Bruno( int N, int A[] ){
  	int f = -1;
  	for(int i = 0; i<N; i++){
  		if(A[i] == 1){
  			f = i;
  			break;
  		}
  	}
  	if(f == -1)return 0;
  	else if(f >= 60){
  		int ans = 0;
  		for(int i=N-60; i < N; i++){
  			ans += A[i] * (1 << (i - N + 60));
  		}
  		return ans;
  	}
	else{
		int ans = 0;
		for(int i = 0; i<60; i++){
			ans += A[i] * (1 << i);
		}
		return ans;
	}
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 780 KB Wrong Answer [4]
2 Incorrect 0 ms 792 KB Wrong Answer [4]
3 Incorrect 1 ms 780 KB Wrong Answer [4]
4 Incorrect 0 ms 792 KB Wrong Answer [4]
5 Incorrect 0 ms 780 KB Wrong Answer [4]
6 Incorrect 0 ms 788 KB Wrong Answer [4]
7 Incorrect 1 ms 780 KB Wrong Answer [4]
8 Incorrect 0 ms 792 KB Wrong Answer [4]
9 Incorrect 0 ms 792 KB Wrong Answer [4]
10 Incorrect 0 ms 776 KB Wrong Answer [4]
11 Incorrect 0 ms 792 KB Wrong Answer [4]
12 Incorrect 0 ms 792 KB Wrong Answer [4]
13 Incorrect 0 ms 792 KB Wrong Answer [4]
14 Incorrect 1 ms 780 KB Wrong Answer [4]
15 Incorrect 0 ms 792 KB Wrong Answer [4]
16 Incorrect 0 ms 788 KB Wrong Answer [4]
17 Incorrect 1 ms 792 KB Wrong Answer [4]
18 Incorrect 0 ms 780 KB Wrong Answer [4]
19 Incorrect 0 ms 792 KB Wrong Answer [4]
20 Incorrect 0 ms 780 KB Wrong Answer [4]
21 Incorrect 0 ms 792 KB Wrong Answer [4]
22 Incorrect 0 ms 780 KB Wrong Answer [4]
23 Incorrect 0 ms 776 KB Wrong Answer [4]
24 Incorrect 0 ms 780 KB Wrong Answer [4]
25 Incorrect 0 ms 792 KB Wrong Answer [4]
26 Incorrect 0 ms 792 KB Wrong Answer [4]
27 Incorrect 1 ms 788 KB Wrong Answer [4]
28 Incorrect 0 ms 1032 KB Wrong Answer [4]
29 Incorrect 0 ms 792 KB Wrong Answer [4]
30 Incorrect 0 ms 788 KB Wrong Answer [4]
31 Incorrect 0 ms 796 KB Wrong Answer [4]
32 Incorrect 0 ms 796 KB Wrong Answer [4]
33 Incorrect 0 ms 808 KB Wrong Answer [4]
34 Incorrect 1 ms 804 KB Wrong Answer [4]
35 Incorrect 0 ms 808 KB Wrong Answer [4]
36 Incorrect 0 ms 796 KB Wrong Answer [4]
37 Incorrect 1 ms 808 KB Wrong Answer [4]
38 Incorrect 0 ms 796 KB Wrong Answer [4]
39 Incorrect 0 ms 796 KB Wrong Answer [4]
40 Incorrect 0 ms 796 KB Wrong Answer [4]