답안 #999465

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
999465 2024-06-15T14:25:53 Z jcelin Broken Device (JOI17_broken_device) C++14
0 / 100
1 ms 1308 KB
#include<bits/stdc++.h>
#include "Annalib.h"

using namespace std;

typedef vector<int> vi;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;

#define PB push_back
#define PPB pop_back
#define X first
#define Y second
#define all(x) (x).begin(), (x).end()

void Anna(int n, ll x, int k, int* p){
	srand(19719);
	vi pos, del(151, 0);
	for(int i=0; i<n; i++) pos.PB(i);
	random_shuffle(all(pos));
	
	for(int i=0; i<n; i++) del[p[i]] = 1;
	
	for(int i=0; i<75; i++){
		int cr = x % 3;
		x /= (ll)3;
		
		int a = pos[i * 2];
		int b = pos[i * 2 + 1];
		
		if(cr == 0 and !del[b]){
			Set(a, 0);
			Set(a, 1);
		}else if(cr == 1 and !del[a]){
			Set(a, 1);
			Set(b, 0);
		}else if(cr == 2 and !del[a] and !del[b]){
			Set(a, 1);
			Set(b, 1);
		}else{
			Set(a, 0);
			Set(b, 0);
		}
	}
}
#include<bits/stdc++.h>
#include "Brunolib.h"

using namespace std;

typedef vector<int> vi;
typedef long long ll;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef pair<ll, ll> pll;
typedef vector<pll> vpll;

#define PB push_back
#define PPB pop_back
#define X first
#define Y second
#define all(x) (x).begin(), (x).end()


ll Bruno(int n, int* p){
	srand(19719);
	vi pos, ret;
	for(int i=0; i<n; i++) pos.PB(i);
	random_shuffle(all(pos));
	
	
	for(int i=0; i<75; i++){
		int a = pos[i * 2];
		int b = pos[i * 2 + 1];
		
		int vl = p[a] * 2 + p[b];
		if(vl == 0) continue;
		ret.PB(vl - 1);
	}
	reverse(all(ret));
	
	ll ans = 0;
	for(auto &x : ret) ans *= 3, ans += x;
	return ans;
}

# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 812 KB Wrong Answer [2]
2 Incorrect 1 ms 804 KB Wrong Answer [2]
3 Incorrect 0 ms 800 KB Wrong Answer [2]
4 Incorrect 0 ms 800 KB Wrong Answer [2]
5 Incorrect 0 ms 812 KB Wrong Answer [2]
6 Incorrect 0 ms 800 KB Wrong Answer [2]
7 Incorrect 0 ms 812 KB Wrong Answer [2]
8 Incorrect 1 ms 796 KB Wrong Answer [2]
9 Incorrect 1 ms 812 KB Wrong Answer [2]
10 Incorrect 1 ms 796 KB Wrong Answer [2]
11 Incorrect 1 ms 808 KB Wrong Answer [2]
12 Incorrect 1 ms 804 KB Wrong Answer [2]
13 Incorrect 1 ms 800 KB Wrong Answer [2]
14 Incorrect 0 ms 800 KB Wrong Answer [2]
15 Incorrect 0 ms 808 KB Wrong Answer [2]
16 Incorrect 0 ms 812 KB Wrong Answer [2]
17 Incorrect 0 ms 808 KB Wrong Answer [2]
18 Incorrect 0 ms 812 KB Wrong Answer [2]
19 Incorrect 1 ms 800 KB Wrong Answer [2]
20 Incorrect 1 ms 812 KB Wrong Answer [2]
21 Incorrect 1 ms 812 KB Wrong Answer [2]
22 Incorrect 0 ms 1308 KB Wrong Answer [2]
23 Incorrect 0 ms 812 KB Wrong Answer [2]
24 Incorrect 0 ms 812 KB Wrong Answer [2]
25 Incorrect 1 ms 812 KB Wrong Answer [2]
26 Incorrect 1 ms 800 KB Wrong Answer [2]
27 Incorrect 0 ms 1064 KB Wrong Answer [2]
28 Incorrect 0 ms 808 KB Wrong Answer [2]
29 Incorrect 1 ms 812 KB Wrong Answer [2]
30 Incorrect 0 ms 812 KB Wrong Answer [2]
31 Incorrect 1 ms 800 KB Wrong Answer [2]
32 Incorrect 1 ms 812 KB Wrong Answer [2]
33 Incorrect 1 ms 800 KB Wrong Answer [2]
34 Incorrect 1 ms 808 KB Wrong Answer [2]
35 Incorrect 0 ms 800 KB Wrong Answer [2]
36 Incorrect 1 ms 808 KB Wrong Answer [2]
37 Incorrect 1 ms 812 KB Wrong Answer [2]
38 Incorrect 0 ms 1060 KB Wrong Answer [2]
39 Incorrect 0 ms 808 KB Wrong Answer [2]
40 Incorrect 0 ms 796 KB Wrong Answer [2]