Submission #710193

#TimeUsernameProblemLanguageResultExecution timeMemory
710193penguin133Stray Cat (JOI20_stray)C++17
5 / 100
47 ms16888 KiB
#include <bits/stdc++.h> using namespace std; #include "Anthony.h" //#define int long long #define pi pair<int, int> #define pii pair<int, pi> #define fi first #define se second #ifdef _WIN32 #define getchar_unlocked _getchar_nolock #endif namespace { int FunctionExample(int i, int A) { return i % A; } vector <int> adj[20005]; int dist[20005]; } // namespace std::vector<int> Mark(int N, int M, int A, int B, std::vector<int> U, std::vector<int> V) { std::vector<int> X(M); for(int i=0;i<M;i++){ adj[U[i]].push_back(V[i]); adj[V[i]].push_back(U[i]); } queue <int> qu; for(int i=0;i<N;i++)dist[i] = 1e9; dist[0] = 0; qu.push(0); while(!qu.empty()){ int x = qu.front(); qu.pop(); for(auto i : adj[x]){ if(dist[i] > dist[x] + 1)dist[i] = dist[x] + 1, qu.push(i); } } for(int i=0;i<M;i++){ int x = max(dist[U[i]], dist[V[i]]); X[i] = x % 2; } return X; }
#include <bits/stdc++.h> using namespace std; #include "Catherine.h" //#define int long long #define pi pair<int, int> #define pii pair<int, pi> #define fi first #define se second #ifdef _WIN32 #define getchar_unlocked _getchar_nolock #endif mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count()); namespace { int A, B; int variable_example = 0; int prv= -1; } // namespace void Init(int A, int B) { ::A = A; ::B = B; } int Move(std::vector<int> y) { ++variable_example; for (int j = 0; j < A; ++j) { if (y[j] == 1 && j != prv) { prv = j; return j; } } return -1; }

Compilation message (stderr)

Anthony.cpp:15:5: warning: 'int {anonymous}::FunctionExample(int, int)' defined but not used [-Wunused-function]
   15 | int FunctionExample(int i, int A) {
      |     ^~~~~~~~~~~~~~~
#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...