Submission #249821

# Submission time Handle Problem Language Result Execution time Memory
249821 2020-07-15T21:23:13 Z Blagojce Broken Device (JOI17_broken_device) C++11
0 / 100
54 ms 3096 KB
#include <bits/stdc++.h> 
#define fr(i, n, m) for(int i = (n); i < (m); i ++)
#define pb push_back
#define st first
#define nd second
#define pq priority_queue
#define all(x) begin(x), end(x)
#include <time.h>
#include <cmath>

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,ll> pii;

const int i_inf = 1e9;
const ll inf = 1e18;
const ll mod = 1000000007;
const ld eps = 1e-13;
const ld pi  = 3.14159265359;
 
mt19937 _rand(time(NULL));
clock_t timer = clock();
const int mxn = 5e5;

#include "Annalib.h"

void Anna(int N, long long X, int K, int P[]){
	bool ok[150];
	memset(ok, false, sizeof(ok));
	fr(i, 0, K) ok[P[i]] = true;
	
	fr(i, 0, 75){
		if(!ok[i+75]){
			Set(i, 1);
		}
		else{
			Set(i, 0);
		}
	}
	int tmp = 0;
	fr(i, 0, 75){
		if(tmp>60){
			Set(i+75, 0);
			continue;
		}
		if(!ok[i+75]){
			if(X&(1LL<<tmp)){
				Set(i+75, 1);
			}
			else{
				Set(i+75, 0);
			}
			tmp ++;
		}
		else{
			Set(i+75, 0);
		}
	}
}
#include <bits/stdc++.h> 
#define fr(i, n, m) for(int i = (n); i < (m); i ++)
#define pb push_back
#define st first
#define nd second
#define pq priority_queue
#define all(x) begin(x), end(x)
#include <time.h>
#include <cmath>

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,ll> pii;

const int i_inf = 1e9;
const ll inf = 1e18;
const ll mod = 1000000007;
const ld eps = 1e-13;
const ld pi  = 3.14159265359;
 
mt19937 _rand(time(NULL));
clock_t timer = clock();
const int mxn = 5e5;

#include "Brunolib.h"

long long Bruno( int N, int A[]){
	vector<int> pos;
	fr(i, 0, 75) if(A[i] == 1) pos.pb(i+75);
	ll ret = 0;
	fr(i, 0, pos.size()){
		if(A[pos[i]] == 1) ret |= (1LL<<i);
	}
	
	
	return ret;
}

Compilation message

Bruno.cpp: In function 'long long int Bruno(int, int*)':
Bruno.cpp:2:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
 #define fr(i, n, m) for(int i = (n); i < (m); i ++)
                                        ^
Bruno.cpp:32:2: note: in expansion of macro 'fr'
  fr(i, 0, pos.size()){
  ^~
# Verdict Execution time Memory Grader output
1 Partially correct 38 ms 3056 KB Output isn't correct - L* = 0
2 Partially correct 38 ms 3072 KB Output isn't correct - L* = 0
3 Partially correct 37 ms 3056 KB Output isn't correct - L* = 0
4 Partially correct 39 ms 3056 KB Output isn't correct - L* = 0
5 Partially correct 39 ms 3056 KB Output isn't correct - L* = 0
6 Partially correct 38 ms 3056 KB Output isn't correct - L* = 0
7 Partially correct 38 ms 3072 KB Output isn't correct - L* = 0
8 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
9 Partially correct 38 ms 3072 KB Output isn't correct - L* = 0
10 Partially correct 41 ms 3072 KB Output isn't correct - L* = 0
11 Partially correct 49 ms 3056 KB Output isn't correct - L* = 0
12 Partially correct 54 ms 3072 KB Output isn't correct - L* = 0
13 Partially correct 38 ms 3072 KB Output isn't correct - L* = 0
14 Partially correct 51 ms 3072 KB Output isn't correct - L* = 0
15 Partially correct 38 ms 3072 KB Output isn't correct - L* = 0
16 Partially correct 51 ms 3072 KB Output isn't correct - L* = 0
17 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
18 Partially correct 44 ms 3064 KB Output isn't correct - L* = 0
19 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
20 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
21 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
22 Partially correct 38 ms 3072 KB Output isn't correct - L* = 0
23 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
24 Partially correct 40 ms 3072 KB Output isn't correct - L* = 0
25 Partially correct 38 ms 3072 KB Output isn't correct - L* = 0
26 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
27 Partially correct 40 ms 3096 KB Output isn't correct - L* = 0
28 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
29 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
30 Partially correct 39 ms 3056 KB Output isn't correct - L* = 0
31 Partially correct 39 ms 3056 KB Output isn't correct - L* = 0
32 Partially correct 40 ms 3056 KB Output isn't correct - L* = 0
33 Partially correct 38 ms 3072 KB Output isn't correct - L* = 0
34 Partially correct 38 ms 3072 KB Output isn't correct - L* = 0
35 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
36 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
37 Partially correct 39 ms 3072 KB Output isn't correct - L* = 0
38 Partially correct 40 ms 2936 KB Output isn't correct - L* = 0
39 Partially correct 39 ms 3056 KB Output isn't correct - L* = 0
40 Partially correct 38 ms 3072 KB Output isn't correct - L* = 0