Submission #1062311

#TimeUsernameProblemLanguageResultExecution timeMemory
1062311kunzaZa183Flights (JOI22_flights)C++17
0 / 100
4 ms1068 KiB
#include "Ali.h" #include <bits/stdc++.h> using namespace std; namespace { int variable_example = 0; vector<vector<int>> adjlist; } // namespace void Init(int N, vector<int> U, vector<int> V) { 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) { auto decode = [&](string S) { int cur = 0; for (auto a : S) { cur *= 2; cur += a - '0'; } return cur; }; int a = decode(S.substr(0, 10)), b = decode(S.substr(10, 10)); int ans; function<void(int, int, int, int)> dfs = [&](int cur, int par, int len, int target) { if (cur == target) { ans = len; return; } for (auto a : adjlist[cur]) if (a != par) dfs(a, cur, len + 1, target); }; dfs(a, a, 0, b); auto base2 = [](int cur) { string tmp = ""; for (int i = 0; i < 10; i++) { tmp.push_back('0' + cur % 2); cur /= 2; } reverse(tmp.begin(), tmp.end()); return tmp; }; return base2(ans); }
#include "Benjamin.h" #include <bits/stdc++.h> using namespace std; namespace { int variable_example = 0; } // namespace string SendB(int N, int X, int Y) { auto base2 = [](int cur) { string tmp = ""; for (int i = 0; i < 10; i++) { tmp.push_back('0' + cur % 2); cur /= 2; } reverse(tmp.begin(), tmp.end()); return tmp; }; string s1 = base2(X), s2 = base2(Y); return s1 + s2; } int Answer(string T) { auto decode = [&](string S) { int cur = 0; for (auto a : S) { cur *= 2; cur += a - '0'; } return cur; }; 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...