Submission #1108064

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11080642024-11-02 16:14:31abczzMinerals (JOI19_minerals)C++17
Compilation error
0 ms0 KiB
#include "minerals.h"
#include <iostream>
#include <vector>
#include <random>
#define ll long long
using namespace std;
vector <ll> X, Y;
bool B[100000];
vector <ll> st[400000];
ll sz, z;
random_device rd;
ll query(ll u) {
B[u] ^= 1;
return Query(u);
}
mt19937 mt(rd());
void solve(ll id, ll l, ll r) {
if (l == r) {
Answer(X[l], st[id][0]);
return;
}
ll mid = (l+r)/2, a = 0, b = 0;
shuffle(st[id].begin(), st[id].end(), mt);
for (auto u : st[id]) {
if (a == mid-l+1) {
st[id*2+1].push_back(u);
continue;
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

minerals.cpp: In function 'void solve(long long int, long long int, long long int)':
minerals.cpp:25:3: error: 'shuffle' was not declared in this scope
   25 |   shuffle(st[id].begin(), st[id].end(), mt);
      |   ^~~~~~~
minerals.cpp:54:3: error: 'sort' was not declared in this scope; did you mean 'qsort'?
   54 |   sort(st[id*2+1].begin(), st[id*2+1].end(), [](auto a, auto b) {
      |   ^~~~
      |   qsort
minerals.cpp: In function 'void Solve(int)':
minerals.cpp:78:3: error: 'shuffle' was not declared in this scope
   78 |   shuffle(X.begin(), X.end(), mt);
      |   ^~~~~~~