Submission #41742

#TimeUsernameProblemLanguageResultExecution timeMemory
41742festAmusement Park (JOI17_amusement_park)C++14
10 / 100
34 ms13712 KiB
#include "Joi.h" // fest #include <bits/stdc++.h> #define pb push_back #define F first #define S second #define y1 dasdasfasfas #define x1 wqdadfasfasfas #define All(c) c.begin(), c.end() #define SZ(A) (int((A).size())) #define umap unordered_map #define FILENAME "" #define __ fflush(stdout) typedef long long ll; typedef long double ld; using namespace std; inline double Time() {return (clock() * 1.0) / CLOCKS_PER_SEC; } static const int N = 200500, inf = 1e9 * 2, MOD = (int)1e9 + 7; static char CH[N]; static const ll INF = 1e18; static const int dx[] = {1, -1, 0, 0, -1, 1, -1, 1}; static const int dy[] = {0, 0, 1, -1, -1, 1, 1, -1}; void Joi(int n, int m, int A[], int B[], long long x, int T) { if (T <= 2) { for (int i = 0; i < 60; i++) { if (x & (1ll << i)) MessageBoard(i, 1); else MessageBoard(i, 0); } for (int i = 60; i < n; i++) MessageBoard(i, 0); } else { for (int i = 0; i < n; i += 60) { for (int j = 0; j < 60; j++) { if (i + j >= n) break; if (x & (1ll << j)) MessageBoard(i + j, 1); else MessageBoard(i + j, 0); } } } }
#include "Ioi.h" // fest #include <bits/stdc++.h> #define pb push_back #define F first #define S second #define y1 dasdasfasfas #define x1 wqdadfasfasfas #define All(c) c.begin(), c.end() #define SZ(A) (int((A).size())) #define umap unordered_map #define FILENAME "" #define __ fflush(stdout) typedef long long ll; typedef long double ld; using namespace std; inline double Time() {return (clock() * 1.0) / CLOCKS_PER_SEC; } static const int N = 200500, inf = 1e9 * 2, MOD = (int)1e9 + 7; static char CH[N]; static const ll INF = 1e18; static const int dx[] = {1, -1, 0, 0, -1, 1, -1, 1}; static const int dy[] = {0, 0, 1, -1, -1, 1, 1, -1}; static bool was[N]; static int rev[N]; static vector<int> g[N]; void dfs(int v, int pr) { was[v] = 1; for (auto u : g[v]) { if (was[u]) continue; rev[u] = Move(u); dfs(u, v); } if (pr) Move(pr); } long long Ioi(int n, int m, int A[], int B[], int start, int msg, int T) { for (int i = 0; i < m; i++) g[A[i]].pb(B[i]), g[B[i]].pb(A[i]); rev[start] = msg; if (T <= 2) { dfs(start, 0); ll ret = 0; for (int i = 0; i < 60; i++) ret |= ((rev[i] * 1ll) << i); return ret; } int v = start; int cnt = 120; while (v > 0 && cnt) { cnt--; v--; rev[v] = Move(v); } int st = ((v + 59) / 60) * 60; while (v < st) { v++; rev[v] = Move(v); } ll ret = 0; for (int i = st; i < st + 60; i++) { if (i != st) rev[i] = Move(i); ret |= ((rev[i] * 1ll) << (i - st)); } return ret; }

Compilation message (stderr)

Joi.cpp:25:13: warning: 'CH' defined but not used [-Wunused-variable]
 static char CH[N];
             ^

Ioi.cpp:25:13: warning: 'CH' defined but not used [-Wunused-variable]
 static char CH[N];
             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...