Submission #964080

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9640802024-04-16 09:40:54oblantisWerewolf (IOI18_werewolf)C++17
Compilation error
0 ms0 KiB
//#pragma gcc target("avx2,bmi,bmi2,lzcnt,popcnt")
//#pragma gcc optimize("o3,unroll-loops")
#include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define pb push_back
#define ss second
#define ff first
#define vt vector
#define uid(a, b) uniform_int_distribution<int>(a, b)(mt)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const ll inf = 1e18;
const int mod = 1e9+7;
const int maxn = 2e5;
mt19937 mt(chrono::steady_clock::now().time_since_epoch().count());
void solve() {
}
#include "werewolf.h"
vt<int> s[maxn], g[maxn], eg[maxn], g[maxn];
int n, q, m, i1[maxn], i2[maxn], p[maxn], sz[maxn], cnt, xl[maxn], xr[maxn];
bool was[maxn];
int get(int v){
if(p[v] == v)return v;
return (p[v] = get(p[v]));
}
void go(int v){
i1[v] = cnt++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

werewolf.cpp:22:37: error: redefinition of 'std::vector<int> g [200000]'
   22 | vt<int> s[maxn], g[maxn], eg[maxn], g[maxn];
      |                                     ^
werewolf.cpp:22:18: note: 'std::vector<int> g [200000]' previously declared here
   22 | vt<int> s[maxn], g[maxn], eg[maxn], g[maxn];
      |                  ^
werewolf.cpp: In function 'std::vector<int> check_validity(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
werewolf.cpp:5:12: error: request for member 'push_back' in 's.std::vector<int>::operator[](((std::vector<int>::size_type)l.std::vector<int>::operator[](((std::vector<int>::size_type)i))))', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
    5 | #define pb push_back
      |            ^~~~~~~~~
werewolf.cpp:52:17: note: in expansion of macro 'pb'
   52 |         s[l[i]].pb(i);
      |                 ^~
werewolf.cpp:83:25: error: 'begin' was not declared in this scope
   83 |         for(auto j : s[i]){
      |                         ^
werewolf.cpp:83:25: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
                 from werewolf.cpp:3:
/usr/include/c++/10/valarray:1224:5: note:   'std::begin'
 1224 |     begin(const valarray<_Tp>& __va)
      |     ^~~~~
In file included from /usr/include/c++/10/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
                 from werewolf.cpp:3:
/usr/include/c++/10/bits/fs_dir.h:549:3: note:   'std::filesystem::__cxx11::begin'
  549 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
werewolf.cpp:83:25: error: 'end' was not declared in this scope
   83 |         for(auto j : s[i]){
      |                         ^
werewolf.cpp:83:25: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
                 from werewolf.cpp:3:
/usr/include/c++/10/valarray:1244:5: note:   'std::end'
 1244 |     end(const valarray<_Tp>& __va)
      |     ^~~
In file included from /usr/include/c++/10/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
                 from werewolf.cpp:3:
/usr/include/c++/10/bits/fs_dir.h:554:3: note:   'std::filesystem::__cxx11::end'
  554 |   end(recursive_directory_iterator) noexcept
      |   ^~~
werewolf.cpp:85:13: error: 'rng1' was not declared in this scope
   85 |             rng1[j] = {xl[i1[s[j]]] + 1, xr[i1[s[j]]] - 1};
      |             ^~~~