답안 #26401

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
26401 2017-06-29T20:36:38 Z pacu Broken Device (JOI17_broken_device) C++
0 / 100
49 ms 2836 KB
#include "Annalib.h"
using namespace std;

bool broken[150];

void Anna(int N,long long X,int K,int P[])
{
	for(int i=0;i<N;i++)
		broken[i] = 0;
	for(int i=0;i<K;i++)
		broken[P[i]] = 1;
	for(int i=0;i<N;i+=2)
	{
		if(broken[i] || broken[i+1])
		{
			Set(i,0);
			Set(i+1,0);
		}
		else
		{
			if(X%3 == 0) Set(i,0), Set(i+1,1);
			else if(X%3 == 1) Set(i,1), Set(i+1,0);
			else if(X%3 == 2) Set(i,1), Set(i+1,1);
			X /= 3;
		}
	}
}
#include "Brunolib.h"
using namespace std;

long long Bruno(int N,int A[])
{
	long long X = 0;
	for(int i=N-2;i>=0;i-=2)
	{
		if(A[i]==0 && A[i+1]==0) continue;
		if(A[i]==0 && A[i+1]==1) X += 0;
		if(A[i]==1 && A[i+1]==0) X += 1;
		if(A[i]==1 && A[i+1]==1) X += 2;
		X *= 3;
	}
	return X;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 32 ms 2836 KB Output isn't correct - L* = 0
2 Incorrect 39 ms 2836 KB Output isn't correct - L* = 0
3 Incorrect 35 ms 2836 KB Output isn't correct - L* = 0
4 Incorrect 32 ms 2836 KB Output isn't correct - L* = 0
5 Incorrect 32 ms 2836 KB Output isn't correct - L* = 0
6 Incorrect 38 ms 2836 KB Output isn't correct - L* = 0
7 Incorrect 39 ms 2836 KB Output isn't correct - L* = 0
8 Incorrect 35 ms 2836 KB Output isn't correct - L* = 0
9 Incorrect 36 ms 2836 KB Output isn't correct - L* = 0
10 Incorrect 35 ms 2836 KB Output isn't correct - L* = 0
11 Incorrect 39 ms 2836 KB Output isn't correct - L* = 0
12 Incorrect 48 ms 2836 KB Output isn't correct - L* = 0
13 Incorrect 32 ms 2836 KB Output isn't correct - L* = 0
14 Incorrect 28 ms 2836 KB Output isn't correct - L* = 0
15 Incorrect 32 ms 2836 KB Output isn't correct - L* = 0
16 Incorrect 32 ms 2836 KB Output isn't correct - L* = 0
17 Incorrect 28 ms 2836 KB Output isn't correct - L* = 0
18 Incorrect 35 ms 2836 KB Output isn't correct - L* = 0
19 Incorrect 32 ms 2836 KB Output isn't correct - L* = 0
20 Incorrect 39 ms 2836 KB Output isn't correct - L* = 0
21 Incorrect 35 ms 2836 KB Output isn't correct - L* = 0
22 Incorrect 38 ms 2836 KB Output isn't correct - L* = 0
23 Incorrect 35 ms 2836 KB Output isn't correct - L* = 0
24 Incorrect 32 ms 2836 KB Output isn't correct - L* = 0
25 Incorrect 35 ms 2836 KB Output isn't correct - L* = 0
26 Incorrect 28 ms 2836 KB Output isn't correct - L* = 0
27 Incorrect 32 ms 2836 KB Output isn't correct - L* = 0
28 Incorrect 28 ms 2836 KB Output isn't correct - L* = 0
29 Incorrect 26 ms 2836 KB Output isn't correct - L* = 0
30 Incorrect 39 ms 2836 KB Output isn't correct - L* = 0
31 Incorrect 39 ms 2836 KB Output isn't correct - L* = 0
32 Incorrect 39 ms 2836 KB Output isn't correct - L* = 0
33 Incorrect 35 ms 2836 KB Output isn't correct - L* = 0
34 Incorrect 49 ms 2836 KB Output isn't correct - L* = 0
35 Incorrect 35 ms 2836 KB Output isn't correct - L* = 0
36 Incorrect 28 ms 2836 KB Output isn't correct - L* = 0
37 Incorrect 41 ms 2836 KB Output isn't correct - L* = 0
38 Incorrect 35 ms 2836 KB Output isn't correct - L* = 0
39 Incorrect 39 ms 2836 KB Output isn't correct - L* = 0
40 Incorrect 38 ms 2836 KB Output isn't correct - L* = 0