Submission #1097371

#TimeUsernameProblemLanguageResultExecution timeMemory
1097371thangdz2k7Stray Cat (JOI20_stray)C++17
15 / 100
36 ms16752 KiB
// author : thembululquaUwU // 3.9.2024 #include <bits/stdc++.h> #include "Anthony.h" #define pb push_back #define fi first #define se second #define endl '\n' using namespace std; using ll = long long; using ii = pair <int, int>; using vi = vector <int>; const int MaxN = 2e5; const int mod = 1e9 + 7; void maxl(auto &a, auto b) {a = max(a, b);} void minl(auto &a, auto b) {a = min(a, b);} vector <int> s = {0, 1, 0, 0, 1, 1}; vector <int> Mark(int n, int m, int a, int b, vi u, vi v){ vi ans(m); vector <vector <ii>> adj(n); for (int i = 0; i < m; ++ i){ adj[u[i]].pb({v[i], i}); adj[v[i]].pb({u[i], i}); } vi dep(n, 0); auto bfs = [&](){ queue <int> qu; qu.push(0); dep[0] = 1; while (qu.size()){ int u = qu.front(); qu.pop(); for (auto [v, id] : adj[u]){ if (!dep[v]) dep[v] = dep[u] + 1, ans[id] = dep[u] % 3, qu.push(v); else ans[id] = dep[v] % 3; } } }; if (a > 2) bfs(); return ans; }
// author : thembululquaUwU // 3.9.2024 #include <bits/stdc++.h> #include "Catherine.h" #define pb push_back #define fi first #define se second #define endl '\n' using namespace std; using ll = long long; using ii = pair <int, int>; using vi = vector <int>; const int MaxN = 2e5; const int mod = 1e9 + 7; void maxl(auto &a, auto b) {a = max(a, b);} void minl(auto &a, auto b) {a = min(a, b);} int a, b; void Init(int A, int B) {a = A; b = B;} int Move(vector <int> y){ if (a > 2){ if (!y[0] && !y[1]) return 2; if (!y[2] && !y[0]) return 1; if (!y[2] && !y[1]) return 0; if (!y[0]) return 1; if (!y[2]) return 0; return 2; } }

Compilation message (stderr)

Anthony.cpp:19:11: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   19 | void maxl(auto &a, auto b) {a = max(a, b);}
      |           ^~~~
Anthony.cpp:19:20: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   19 | void maxl(auto &a, auto b) {a = max(a, b);}
      |                    ^~~~
Anthony.cpp:20:11: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   20 | void minl(auto &a, auto b) {a = min(a, b);}
      |           ^~~~
Anthony.cpp:20:20: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   20 | void minl(auto &a, auto b) {a = min(a, b);}
      |                    ^~~~
Anthony.cpp: In function 'std::vector<int> Mark(int, int, int, int, vi, vi)':
Anthony.cpp:44:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   44 |     if (a > 2) bfs(); return ans;
      |     ^~
Anthony.cpp:44:23: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   44 |     if (a > 2) bfs(); return ans;
      |                       ^~~~~~

Catherine.cpp:19:11: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   19 | void maxl(auto &a, auto b) {a = max(a, b);}
      |           ^~~~
Catherine.cpp:19:20: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   19 | void maxl(auto &a, auto b) {a = max(a, b);}
      |                    ^~~~
Catherine.cpp:20:11: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   20 | void minl(auto &a, auto b) {a = min(a, b);}
      |           ^~~~
Catherine.cpp:20:20: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   20 | void minl(auto &a, auto b) {a = min(a, b);}
      |                    ^~~~
Catherine.cpp: In function 'int Move(std::vector<int>)':
Catherine.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
   35 | }
      | ^
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...