Submission #1151230

#TimeUsernameProblemLanguageResultExecution timeMemory
1151230byunjaewoo길고양이 (JOI20_stray)C++20
15 / 100
34 ms13896 KiB
#include "Anthony.h" #include <bits/stdc++.h> using namespace std; namespace { const int N=20010, INF=1e9; int dist[N]; vector<pair<int, int>> adj[N]; queue<int> q; } vector<int> Mark(int N, int M, int A, int B, vector<int> U, vector<int> V) { for(int i=0; i<M; i++) adj[U[i]].push_back({V[i], i}), adj[V[i]].push_back({U[i], i}); q.push(0), fill(dist+1, dist+N, INF); vector<int> ret(M, 0); int cnt=0; while(!q.empty()) { int curr=q.front(); q.pop(); for(auto [next, k]:adj[curr]) { if(dist[next]>dist[curr]+1) dist[next]=dist[curr]+1, q.push(next); if(dist[next]>=dist[curr]) ret[k]=dist[curr]%3; } } return ret; }
#include "Catherine.h" #include <bits/stdc++.h> using namespace std; namespace { int A, B; } void Init(int A, int B) { ::A=A, ::B=B; } int Move(vector<int> y) { if(y[0] && y[1]) return 0; if(y[1] && y[2]) return 1; if(y[2] && y[0]) return 2; if(y[0]) return 0; if(y[1]) return 1; if(y[2]) return 2; }

Compilation message (stderr)

# 2번째 컴파일 단계

Catherine.cpp: In function 'int Move(std::vector<int>)':
Catherine.cpp:20:1: warning: control reaches end of non-void function [-Wreturn-type]
   20 | }
      | ^
#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...