답안 #1077127

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1077127 2024-08-27T01:22:06 Z LCJLY Broken Device (JOI17_broken_device) C++14
0 / 100
2 ms 1300 KB
#include "Annalib.h"
#include <bits/stdc++.h>
//#include "grader.cpp"
using namespace std;

#define show(x,y) cout << y << " " << #x << endl;
#define show2(x,y,i,j) cout << y << " " << #x << "  " << j << " " << #i << endl;
#define show3(x,y,i,j,p,q) cout << y << " " << #x << "  " << j << " " << i << "  " << q << " " << #p << endl;
#define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl;
typedef pair<int,int>pii; 

void Anna(int n, long long val, int k, int p[]){
	bool amos[155];
	memset(amos,0,sizeof(amos));
	for(int x=0;x<k;x++){
		amos[p[x]]=true;
	}
	
	vector<int>v;
	for(int x=0;x<60;x++){
		if(val&(1LL<<x)) v.push_back(1);
		else v.push_back(0);
	}
	
	int ptr=0;
	for(int x=0;x<n-1;x++){
		if(ptr==(int)v.size()) break;
		if(!amos[x]&&!amos[x-1]){
			Set(x,1);
			Set(x+1,v[ptr]);
			x++;
		}
	}
}
#include "Brunolib.h"
#include <bits/stdc++.h>
//#include "grader.cpp"
using namespace std;

#define show(x,y) cout << y << " " << #x << endl;
#define show2(x,y,i,j) cout << y << " " << #x << "  " << j << " " << #i << endl;
#define show3(x,y,i,j,p,q) cout << y << " " << #x << "  " << j << " " << i << "  " << q << " " << #p << endl;
#define show4(x,y) for(auto it:y) cout << it << " "; cout << #x << endl;
typedef pair<int,int>pii; 

long long Bruno(int n, int a[]){
	long long val=0;
	int cur=0;
	for(int x=0;x<n;x++){
		if(a[x]==1){
			if(a[x+1]==1){
				val+=1LL<<cur;
			}
			cur++;
		}
	}
	return val;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 792 KB Wrong Answer [4]
2 Incorrect 1 ms 788 KB Wrong Answer [4]
3 Incorrect 2 ms 792 KB Wrong Answer [4]
4 Incorrect 0 ms 784 KB Wrong Answer [4]
5 Incorrect 0 ms 788 KB Wrong Answer [4]
6 Incorrect 1 ms 796 KB Wrong Answer [4]
7 Incorrect 2 ms 1300 KB Wrong Answer [4]
8 Incorrect 0 ms 796 KB Wrong Answer [4]
9 Incorrect 1 ms 792 KB Wrong Answer [4]
10 Incorrect 0 ms 800 KB Wrong Answer [4]
11 Incorrect 1 ms 784 KB Wrong Answer [4]
12 Incorrect 1 ms 784 KB Wrong Answer [4]
13 Incorrect 0 ms 784 KB Wrong Answer [4]
14 Incorrect 0 ms 780 KB Wrong Answer [4]
15 Incorrect 0 ms 796 KB Wrong Answer [4]
16 Incorrect 0 ms 796 KB Wrong Answer [4]
17 Incorrect 1 ms 796 KB Wrong Answer [4]
18 Incorrect 0 ms 792 KB Wrong Answer [4]
19 Incorrect 1 ms 796 KB Wrong Answer [4]
20 Incorrect 1 ms 776 KB Wrong Answer [4]
21 Incorrect 0 ms 796 KB Wrong Answer [4]
22 Incorrect 0 ms 796 KB Wrong Answer [4]
23 Incorrect 0 ms 784 KB Wrong Answer [4]
24 Incorrect 0 ms 784 KB Wrong Answer [4]
25 Incorrect 0 ms 796 KB Wrong Answer [4]
26 Incorrect 0 ms 796 KB Wrong Answer [4]
27 Incorrect 1 ms 1012 KB Wrong Answer [4]
28 Incorrect 1 ms 784 KB Wrong Answer [4]
29 Incorrect 0 ms 784 KB Wrong Answer [4]
30 Incorrect 1 ms 796 KB Wrong Answer [4]
31 Incorrect 0 ms 792 KB Wrong Answer [4]
32 Incorrect 0 ms 796 KB Wrong Answer [4]
33 Incorrect 0 ms 784 KB Wrong Answer [4]
34 Incorrect 0 ms 792 KB Wrong Answer [4]
35 Incorrect 0 ms 784 KB Wrong Answer [4]
36 Incorrect 0 ms 792 KB Wrong Answer [4]
37 Incorrect 0 ms 784 KB Wrong Answer [4]
38 Incorrect 0 ms 796 KB Wrong Answer [4]
39 Incorrect 1 ms 788 KB Wrong Answer [4]
40 Incorrect 0 ms 796 KB Wrong Answer [4]