Submission #585839

#TimeUsernameProblemLanguageResultExecution timeMemory
585839SAADKeys (IOI21_keys)C++17
Compilation error
0 ms0 KiB
#define F first #define S second #define rep(i,a,b) for(int i=a;!(a==b&&i!=b)&&((i<=b&&b>=a)||(i>=b&&a>=b));i+=(a<=b?1:-1)) #define pb push_back #define Fbitl __builtin_ffs #define bit1 __builtin_popcount #include <iostream> #include <math.h> #include <algorithm> #include <string.h> #include <vector> #include <queue> #include <map> #include <unordered_map> #include "keys" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<ll> vl; typedef vector<vl> vvl; vi want[2005]; vii road[2005]; bool vis[2005]; bool av[2005]; vector<int> find_reachable(vector<int> r, vector<int> u, vector<int> v, vector<int> c) { vector<int> ans(r.size(), 0); for (int i = 0; i < u.size(); i++) { road[u[i]].push_back({v[i],c[i]}); road[v[i]].push_back({u[i],c[i]}); } for (int i = 0; i < ans.size(); i++) { memset(av, false, sizeof(av)); memset(vis, false, sizeof(vis)); for (auto& i : want) { i.clear(); } priority_queue < pair<bool, pii>> q; q.push({true,{i,r[i]} }); while (!q.empty()) { bool A = q.top().first; int key = q.top().second.second; int t = q.top().second.first; q.pop(); ans[i]++; av[r[t]] = true; vis[t] = true; if (!want[r[t]].empty()) { for (auto j : want[r[t]] ) { if (vis[j]) continue; q.push({true,{j,r[t]} }); vis[j] = true; } want[r[t]].clear(); } for (auto j : road[t]) { if (vis[j.first]) continue; if (av[j.S]) { q.push({ true,{j.F,j.S} }); vis[j.first] = true; } else { want[j.S].push_back(j.F); } } } } return ans; }

Compilation message (stderr)

keys.cpp:16:10: fatal error: keys: No such file or directory
   16 | #include "keys"
      |          ^~~~~~
compilation terminated.