Submission #1077125

# Submission time Handle Problem Language Result Execution time Memory
1077125 2024-08-27T01:21:24 Z LCJLY Broken Device (JOI17_broken_device) C++14
0 / 100
2 ms 1208 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]);
		}
	}
}
#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;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 800 KB Wrong Answer [2]
2 Incorrect 0 ms 800 KB Wrong Answer [2]
3 Incorrect 0 ms 812 KB Wrong Answer [2]
4 Incorrect 0 ms 812 KB Wrong Answer [2]
5 Incorrect 0 ms 800 KB Wrong Answer [2]
6 Incorrect 0 ms 812 KB Wrong Answer [2]
7 Incorrect 1 ms 812 KB Wrong Answer [2]
8 Incorrect 1 ms 808 KB Wrong Answer [2]
9 Incorrect 1 ms 1064 KB Wrong Answer [2]
10 Incorrect 1 ms 812 KB Wrong Answer [2]
11 Incorrect 0 ms 800 KB Wrong Answer [2]
12 Incorrect 1 ms 808 KB Wrong Answer [2]
13 Incorrect 1 ms 812 KB Wrong Answer [2]
14 Incorrect 0 ms 812 KB Wrong Answer [2]
15 Incorrect 1 ms 812 KB Wrong Answer [2]
16 Incorrect 2 ms 812 KB Wrong Answer [2]
17 Incorrect 0 ms 812 KB Wrong Answer [2]
18 Incorrect 1 ms 812 KB Wrong Answer [2]
19 Incorrect 1 ms 800 KB Wrong Answer [2]
20 Incorrect 0 ms 808 KB Wrong Answer [2]
21 Incorrect 1 ms 812 KB Wrong Answer [2]
22 Incorrect 0 ms 812 KB Wrong Answer [2]
23 Incorrect 1 ms 808 KB Wrong Answer [2]
24 Incorrect 0 ms 812 KB Wrong Answer [2]
25 Incorrect 0 ms 800 KB Wrong Answer [2]
26 Incorrect 0 ms 812 KB Wrong Answer [2]
27 Incorrect 1 ms 1208 KB Wrong Answer [2]
28 Incorrect 1 ms 812 KB Wrong Answer [2]
29 Incorrect 0 ms 800 KB Wrong Answer [2]
30 Incorrect 0 ms 808 KB Wrong Answer [2]
31 Incorrect 1 ms 800 KB Wrong Answer [2]
32 Incorrect 0 ms 812 KB Wrong Answer [2]
33 Incorrect 1 ms 796 KB Wrong Answer [2]
34 Incorrect 0 ms 812 KB Wrong Answer [2]
35 Incorrect 1 ms 812 KB Wrong Answer [2]
36 Incorrect 0 ms 812 KB Wrong Answer [2]
37 Incorrect 0 ms 812 KB Wrong Answer [2]
38 Incorrect 1 ms 796 KB Wrong Answer [2]
39 Incorrect 0 ms 812 KB Wrong Answer [2]
40 Incorrect 0 ms 800 KB Wrong Answer [2]