Submission #999073

# Submission time Handle Problem Language Result Execution time Memory
999073 2024-06-15T06:10:16 Z AdamGS Broken Device (JOI17_broken_device) C++17
0 / 100
7 ms 1756 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) {
    ll a=rng();
    if(a&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%2!=a || czy[akt]) ++akt;
    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) {
    ll a=rng();
    if(a&1) x^=1ll<<(ll)i;
  }
  return x;
}
# Verdict Execution time Memory Grader output
1 Runtime error 6 ms 1624 KB Execution killed with signal 6
2 Runtime error 6 ms 1628 KB Execution killed with signal 6
3 Runtime error 6 ms 1700 KB Execution killed with signal 6
4 Runtime error 6 ms 1628 KB Execution killed with signal 6
5 Runtime error 7 ms 1736 KB Execution killed with signal 6
6 Runtime error 6 ms 1628 KB Execution killed with signal 6
7 Runtime error 6 ms 1628 KB Execution killed with signal 6
8 Runtime error 6 ms 1628 KB Execution killed with signal 6
9 Runtime error 6 ms 1628 KB Execution killed with signal 6
10 Runtime error 7 ms 1628 KB Execution killed with signal 6
11 Runtime error 6 ms 1628 KB Execution killed with signal 6
12 Runtime error 6 ms 1628 KB Execution killed with signal 6
13 Runtime error 6 ms 1624 KB Execution killed with signal 6
14 Runtime error 6 ms 1628 KB Execution killed with signal 6
15 Runtime error 6 ms 1628 KB Execution killed with signal 6
16 Runtime error 7 ms 1712 KB Execution killed with signal 6
17 Runtime error 6 ms 1624 KB Execution killed with signal 6
18 Runtime error 6 ms 1628 KB Execution killed with signal 6
19 Runtime error 6 ms 1628 KB Execution killed with signal 6
20 Runtime error 6 ms 1628 KB Execution killed with signal 6
21 Runtime error 6 ms 1624 KB Execution killed with signal 6
22 Runtime error 6 ms 1628 KB Execution killed with signal 6
23 Runtime error 6 ms 1628 KB Execution killed with signal 6
24 Runtime error 6 ms 1528 KB Execution killed with signal 6
25 Runtime error 6 ms 1624 KB Execution killed with signal 6
26 Runtime error 6 ms 1628 KB Execution killed with signal 6
27 Runtime error 6 ms 1628 KB Execution killed with signal 6
28 Runtime error 6 ms 1624 KB Execution killed with signal 6
29 Runtime error 6 ms 1756 KB Execution killed with signal 6
30 Runtime error 6 ms 1624 KB Execution killed with signal 6
31 Runtime error 6 ms 1628 KB Execution killed with signal 6
32 Runtime error 6 ms 1628 KB Execution killed with signal 6
33 Runtime error 6 ms 1628 KB Execution killed with signal 6
34 Runtime error 6 ms 1628 KB Execution killed with signal 6
35 Runtime error 6 ms 1628 KB Execution killed with signal 6
36 Runtime error 6 ms 1720 KB Execution killed with signal 6
37 Runtime error 6 ms 1704 KB Execution killed with signal 6
38 Runtime error 6 ms 1628 KB Execution killed with signal 6
39 Runtime error 6 ms 1628 KB Execution killed with signal 6
40 Runtime error 6 ms 1624 KB Execution killed with signal 6