Submission #1062403

#TimeUsernameProblemLanguageResultExecution timeMemory
1062403kunzaZa183Flights (JOI22_flights)C++17
0 / 100
1 ms332 KiB
#include "Ali.h" #include <bits/stdc++.h> using namespace std; namespace { int variable_example = 0; vector<vector<int>> adjlist; auto decode = [](string S) { int cur = 0; for (auto a : S) { cur *= 2; cur += a - '0'; } return cur; }; auto base2 = [](int cur, int len) { string tmp = ""; for (int i = 0; i < len; i++) { tmp.push_back('0' + cur % 2); cur /= 2; } reverse(tmp.begin(), tmp.end()); return tmp; }; int N; } // namespace void Init(int N, vector<int> U, vector<int> V) { ::N = N; for (int i = 0; i < N; i++) SetID(i, i); adjlist.clear(); adjlist.resize(N); for (int i = 0; i < N - 1; i++) { adjlist[U[i]].push_back(V[i]), adjlist[V[i]].push_back(U[i]); } } string SendA(string S) { int val = decode(S); int from = val / 100, rem = val % 100; cerr << from << ' ' << rem << "\n"; vector<int> dis(N); function<void(int, int, int)> dfs = [&](int cur, int par, int len) { dis[cur] = len; for (auto a : adjlist[cur]) if (a != par) dfs(a, cur, len + 1); }; dfs(from, from, 0); string tmp; for (int i = rem; i < rem + 99 && i < N; i++) tmp += base2(dis[i], 14); cerr << tmp << "\n"; return tmp; }
#include "Benjamin.h" #include <bits/stdc++.h> using namespace std; namespace { int variable_example = 0; auto decode = [](string S) { int cur = 0; for (auto a : S) { cur *= 2; cur += a - '0'; } return cur; }; auto base2 = [](int cur, int len) { string tmp = ""; for (int i = 0; i < len; i++) { tmp.push_back('0' + cur % 2); cur /= 2; } reverse(tmp.begin(), tmp.end()); return tmp; }; const int maxsend = 1e2; } // namespace string SendB(int N, int X, int Y) { cerr << X << " " << Y << "\n"; int val = X * maxsend + Y % maxsend; return base2(val, 20); } int Answer(string T) { return decode(T); }

Compilation message (stderr)

Ali.cpp:7:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    7 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
grader_ali.cpp:10:8: warning: '{anonymous}::_randmem' defined but not used [-Wunused-variable]
   10 |   char _randmem[12379];
      |        ^~~~~~~~

Benjamin.cpp:7:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    7 | int variable_example = 0;
      |     ^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...