답안 #999080

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
999080 2024-06-15T06:18:41 Z AdamGS Broken Device (JOI17_broken_device) C++17
61 / 100
32 ms 2676 KB
#include "Annalib.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
void Anna(int n, ll x, int k, int P[]) {
  mt19937 rng(2137);
  rep(i, 60) if(rng()&1) x^=1ll<<(ll)i;
  vector<int>czy(n), T(n);
  rep(i, k) czy[P[i]]=1;
  ll akt=0;
  rep(i, 60) {
    ll a=0;
    if(x&(1ll<<(ll)i)) a=1;
    while(akt<n && (akt%2!=a || czy[akt])) ++akt;
    if(akt==n) break;
    T[akt]=1;
    ++akt;
  }
  rep(i, n) Set(i, T[i]);
}
#include "Brunolib.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
ll Bruno(int n, int A[]) {
  ll x=0, p=0;
  rep(i, n) if(A[i]) {
    if(i%2==1) x|=1ll<<(ll)p;
    ++p;
  }
  mt19937 rng(2137);
  rep(i, 60) if(rng()&1) x^=1ll<<(ll)i;
  return x;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 27 ms 2396 KB Output is partially correct - L* = 29
2 Partially correct 25 ms 2372 KB Output is partially correct - L* = 30
3 Partially correct 27 ms 2676 KB Output is partially correct - L* = 28
4 Partially correct 28 ms 2396 KB Output is partially correct - L* = 29
5 Partially correct 25 ms 2484 KB Output is partially correct - L* = 29
6 Partially correct 26 ms 2396 KB Output is partially correct - L* = 33
7 Partially correct 25 ms 2396 KB Output is partially correct - L* = 34
8 Partially correct 25 ms 2500 KB Output is partially correct - L* = 25
9 Partially correct 26 ms 2396 KB Output is partially correct - L* = 29
10 Partially correct 26 ms 2392 KB Output is partially correct - L* = 30
11 Partially correct 25 ms 2396 KB Output is partially correct - L* = 30
12 Partially correct 24 ms 2372 KB Output is partially correct - L* = 33
13 Partially correct 25 ms 2392 KB Output is partially correct - L* = 30
14 Partially correct 26 ms 2396 KB Output is partially correct - L* = 31
15 Partially correct 25 ms 2404 KB Output is partially correct - L* = 36
16 Partially correct 25 ms 2392 KB Output is partially correct - L* = 32
17 Partially correct 25 ms 2396 KB Output is partially correct - L* = 29
18 Partially correct 25 ms 2488 KB Output is partially correct - L* = 30
19 Partially correct 25 ms 2396 KB Output is partially correct - L* = 29
20 Partially correct 25 ms 2396 KB Output is partially correct - L* = 29
21 Partially correct 32 ms 2492 KB Output is partially correct - L* = 30
22 Partially correct 25 ms 2396 KB Output is partially correct - L* = 30
23 Partially correct 26 ms 2604 KB Output is partially correct - L* = 31
24 Partially correct 25 ms 2372 KB Output is partially correct - L* = 30
25 Partially correct 25 ms 2544 KB Output is partially correct - L* = 29
26 Partially correct 29 ms 2476 KB Output is partially correct - L* = 28
27 Partially correct 25 ms 2396 KB Output is partially correct - L* = 28
28 Partially correct 25 ms 2560 KB Output is partially correct - L* = 33
29 Partially correct 25 ms 2404 KB Output is partially correct - L* = 33
30 Partially correct 25 ms 2476 KB Output is partially correct - L* = 30
31 Partially correct 25 ms 2512 KB Output is partially correct - L* = 32
32 Partially correct 25 ms 2392 KB Output is partially correct - L* = 32
33 Partially correct 26 ms 2400 KB Output is partially correct - L* = 29
34 Partially correct 25 ms 2372 KB Output is partially correct - L* = 29
35 Partially correct 25 ms 2396 KB Output is partially correct - L* = 30
36 Partially correct 25 ms 2476 KB Output is partially correct - L* = 33
37 Partially correct 25 ms 2396 KB Output is partially correct - L* = 28
38 Partially correct 25 ms 2480 KB Output is partially correct - L* = 33
39 Partially correct 24 ms 2372 KB Output is partially correct - L* = 28
40 Partially correct 25 ms 2392 KB Output is partially correct - L* = 31