Submission #763298

# Submission time Handle Problem Language Result Execution time Memory
763298 2023-06-22T07:54:48 Z jmyszka2007 Amusement Park (JOI17_amusement_park) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include "Joi.h"
#define vi static vector<int>
#define pb push_back
typedef long long ll;
constexpr int LIM = 1e4;
int bit[60];
vi g[LIM + 10];
bool vis[LIM + 10];
static void dfs(int v, int kol) {
	vis[v] = 1;
	MessageBoard(v, bit[kol % 60]);
	for(auto x : g[v]) {
		if(!vis[x]) {
			dfs(x, kol + 1);
		}
	}
}
void Joi(int N, int M, int A[], int B[], ll x, int t) {
	for(int i = 0; i < 60; i++) {
		if(x & (1ll << i)) {
			bit[i] = 1;
		}
	}
	for(int i = 0; i < M; i++) {
		g[A[i]].pb(B[i]);
		g[B[i]].pb(A[i]);
	}
	dfs(0, 0);
}
#include "Ioi.h"
#include <bits/stdc++.h>
#define vi static vector<int>
typedef long long ll;
constexpr int LIM = 1e4;
vi g2[LIM + 10];
bool vis2[LIM + 10];
int kol2[LIM + 10];
long long Ioi(int N, int M, int A[], int B[], int P, int V, int T) {
	return 0;
}

Compilation message

Joi.cpp:3:19: error: 'vector' does not name a type
    3 | #define vi static vector<int>
      |                   ^~~~~~
Joi.cpp:8:1: note: in expansion of macro 'vi'
    8 | vi g[LIM + 10];
      | ^~
Joi.cpp: In function 'void dfs(int, int)':
Joi.cpp:13:15: error: 'g' was not declared in this scope
   13 |  for(auto x : g[v]) {
      |               ^
Joi.cpp: In function 'void Joi(int, int, int*, int*, ll, int)':
Joi.cpp:26:3: error: 'g' was not declared in this scope
   26 |   g[A[i]].pb(B[i]);
      |   ^

Ioi.cpp:3:19: error: 'vector' does not name a type
    3 | #define vi static vector<int>
      |                   ^~~~~~
Ioi.cpp:6:1: note: in expansion of macro 'vi'
    6 | vi g2[LIM + 10];
      | ^~