Submission #1043756

#TimeUsernameProblemLanguageResultExecution timeMemory
1043756mindiyakGame (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include "game.h" #pragma GCC optimize("O1,O2,O3,Ofast,unroll-loops") #include <bits/stdc++.h> #include <string> #include <iostream> #include <cmath> #include <numeric> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; typedef pair<int, int> pi; typedef pair<int, int> pl; typedef pair<ld, ld> pd; typedef vector<int> vi; typedef vector<bool> vb; typedef vector<vector<int>> vvi; typedef vector<ld> vd; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define FOR(i, a, b) for (int i = a; i < (b); i++) #define F0R(i, a) for (int i = 0; i < (a); i++) #define FORd(i, a, b) for (int i = (b)-1; i >= a; i--) #define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--) #define trav(a, x) for (auto &a : x) #define uid(a, b) uniform_int_distribution<int>(a, b)(rng) #define len(x) (int)(x).size() #define mp make_pair #define pb push_back #define F first #define nl endl #define S second #define lb lower_bound #define ub upper_bound #define aint(x) x.begin(), x.end() #define raint(x) x.rbegin(), x.rend() #define ins insert const int MOD = 1000000007; int N; vector<set<int>> arr; vvvector<set<int>>i paths; int found = 0; void initialize(int n) { N = n; arr = vector<set<int>>(1502); paths = vector<set<int>>(1502); FOR(i,0,N){ FOR(j,0,N){ if(i == j)continue; arr[i].insert(j); } } } int hasEdge(int u, int v) { if(u==v)return 1; arr[u].erase(v); arr[v].erase(u); if(paths[u].count(v) || paths[v].count(u))return 1; if(arr[u].size() == 0 || arr[v].size() == 0){ paths[u].insert(v); paths[v].insert(u); return 1; } // found = 0; // dfs(u,-1,v); // if(found)return 1; return 0; }

Compilation message (stderr)

game.cpp:43:1: error: 'vvvector' does not name a type
   43 | vvvector<set<int>>i paths;
      | ^~~~~~~~
game.cpp: In function 'void initialize(int)':
game.cpp:49:5: error: 'paths' was not declared in this scope
   49 |     paths = vector<set<int>>(1502);
      |     ^~~~~
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:63:8: error: 'paths' was not declared in this scope
   63 |     if(paths[u].count(v) || paths[v].count(u))return 1;
      |        ^~~~~
game.cpp:66:9: error: 'paths' was not declared in this scope
   66 |         paths[u].insert(v);
      |         ^~~~~