Submission #622478

#TimeUsernameProblemLanguageResultExecution timeMemory
622478KLPPStray Cat (JOI20_stray)C++14
6 / 100
74 ms39872 KiB
#include "Anthony.h" #include <vector> #include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;i++) #define trav(a,v) for(auto a:v) typedef long long int lld; namespace { int FunctionExample(int i, int A) { return i % A; } } // namespace vector<int>nei[1000000]; int dist[1000000]; 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); rep(i,0,N){ dist[i]=-1; } rep(i,0,M){ nei[U[i]].push_back(V[i]); nei[V[i]].push_back(U[i]); } dist[0]=0; queue<int> q; q.push(0); while(!q.empty()){ int v=q.front(); q.pop(); trav(a,nei[v]){ if(dist[a]==-1){ dist[a]=dist[v]+1; q.push(a); } } } rep(i,0,M){ if(dist[U[i]]==dist[V[i]]){ X[i]=3; }else{ X[i]=min(dist[U[i]],dist[V[i]])%3; } } //rep(i,0,N)cout<<dist[i]<<endl; return X; }
#include "Catherine.h" #include <vector> #include<bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;i++) #define trav(a,v) for(auto a:v) typedef long long int lld; namespace { int A, B; int variable_example = 0; } // namespace void Init(int A, int B) { ::A = A; ::B = B; } int Move(std::vector<int> y) { ++variable_example; int tot=0; for (int j = 0; j < 3; ++j) { if (y[j] != 0) { tot++; } } if(tot==1){ for (int j = 0; j < 3; ++j) { if (y[j] != 0) { return j; } } } int sum=6; for (int j = 0; j < 3; ++j) { if (y[j] != 0) { //cout<<j<<" "; sum-=j; } } sum++; sum%=3; //cout<<sum<<endl; return sum; }

Compilation message (stderr)

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