답안 #131575

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
131575 2019-07-17T09:59:02 Z mahmoudbadawy Broken Device (JOI17_broken_device) C++17
0 / 100
5 ms 892 KB
#include "Annalib.h"
#include <bits/stdc++.h>

using namespace std;

int br[155];

void Anna( int N, long long X, int K, int P[] ){
	for(int i=0;i<N;i++) br[i]=0;
	for(int i=0;i<K;i++) br[P[i]]=1;
	for(int i=0;i<N;i++)
	{
		if(i+1<N&&br[i]==0&&(br[i+1]==0||(X%2==0&&br[i+1]==1)))
		{
			Set(i,1); Set(i+1,X&1); X/=2;
			i++;
		}
		/*else
			Set(i,0);*/
	}
	if(X && K<=15) assert(false);
}
#include "Brunolib.h"
#include <bits/stdc++.h>

using namespace std;

int cur[60];

long long Bruno( int N, int A[] ){
	long long ans=0;
	int co=0;
	for(int i=0;i<N-1;i++)
	{
		//cout << i << endl;
		if(A[i])
		{
			cur[co++]=A[i+1];
			i++;
		}
	}
	for(int i=co-1;i>=0;i--) ans=ans*2+cur[i];
	//cout << ans << endl;
	//cout << "DONE" << endl;
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 760 KB Wrong Answer [4]
2 Incorrect 4 ms 760 KB Wrong Answer [4]
3 Incorrect 4 ms 760 KB Wrong Answer [4]
4 Incorrect 4 ms 756 KB Wrong Answer [4]
5 Incorrect 4 ms 760 KB Wrong Answer [4]
6 Incorrect 4 ms 632 KB Wrong Answer [4]
7 Incorrect 4 ms 632 KB Wrong Answer [4]
8 Incorrect 4 ms 868 KB Wrong Answer [4]
9 Incorrect 4 ms 760 KB Wrong Answer [4]
10 Incorrect 4 ms 760 KB Wrong Answer [4]
11 Incorrect 4 ms 888 KB Wrong Answer [4]
12 Incorrect 4 ms 760 KB Wrong Answer [4]
13 Incorrect 4 ms 856 KB Wrong Answer [4]
14 Incorrect 4 ms 716 KB Wrong Answer [4]
15 Incorrect 4 ms 628 KB Wrong Answer [4]
16 Incorrect 4 ms 760 KB Wrong Answer [4]
17 Incorrect 4 ms 632 KB Wrong Answer [4]
18 Incorrect 4 ms 632 KB Wrong Answer [4]
19 Incorrect 4 ms 760 KB Wrong Answer [4]
20 Incorrect 4 ms 892 KB Wrong Answer [4]
21 Incorrect 4 ms 760 KB Wrong Answer [4]
22 Incorrect 4 ms 760 KB Wrong Answer [4]
23 Incorrect 4 ms 760 KB Wrong Answer [4]
24 Incorrect 4 ms 632 KB Wrong Answer [4]
25 Incorrect 4 ms 632 KB Wrong Answer [4]
26 Incorrect 4 ms 888 KB Wrong Answer [4]
27 Incorrect 4 ms 756 KB Wrong Answer [4]
28 Incorrect 4 ms 888 KB Wrong Answer [4]
29 Incorrect 4 ms 632 KB Wrong Answer [4]
30 Incorrect 4 ms 888 KB Wrong Answer [4]
31 Incorrect 4 ms 632 KB Wrong Answer [4]
32 Incorrect 4 ms 760 KB Wrong Answer [4]
33 Incorrect 4 ms 632 KB Wrong Answer [4]
34 Incorrect 4 ms 760 KB Wrong Answer [4]
35 Incorrect 4 ms 760 KB Wrong Answer [4]
36 Incorrect 4 ms 836 KB Wrong Answer [4]
37 Incorrect 4 ms 768 KB Wrong Answer [4]
38 Incorrect 4 ms 768 KB Wrong Answer [4]
39 Incorrect 4 ms 768 KB Wrong Answer [4]
40 Incorrect 4 ms 852 KB Wrong Answer [4]