Submission #212218

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2122182020-03-22 14:13:56bensonlzlStray Cat (JOI20_stray)C++14
85 / 100
118 ms16588 KiB
#include "Anthony.h"
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> pi;
namespace {
int sub[20005], hv[20005], w[20005], cdepth[20005], rev;
vector<int> edges;
vector<pi> AdjList[20005];
queue<int> q;
int cnt[12] = {1,0,0,1,0,1,1,0,0,1,0,1};
void genchain(int x, int p, int eweight){
//cerr << x << ' ' << p << ' ' << eweight << '\n';
int c = 0;
for (auto it : AdjList[x]){
if (it.first == p) continue;
c++;
}
if (c >= 2){
if (eweight == 1) cdepth[x] = 1;
else cdepth[x] = 0;
for (auto it : AdjList[x]){
if (it.first == p) continue;
cdepth[it.first] = cdepth[x] + 1;
edges[it.second] = cnt[cdepth[x]%12];
genchain(it.first,x,edges[it.second]);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Anthony.cpp: In function 'std::vector<int> Mark(int, int, int, int, std::vector<int>, std::vector<int>)':
Anthony.cpp:57:12: warning: unused variable 'it' [-Wunused-variable]
  for (auto it : edges){
            ^~
Anthony.cpp: At global scope:
Anthony.cpp:10:54: warning: '{anonymous}::rev' defined but not used [-Wunused-variable]
  int sub[20005], hv[20005], w[20005], cdepth[20005], rev;
                                                      ^~~
Anthony.cpp:10:29: warning: '{anonymous}::w' defined but not used [-Wunused-variable]
  int sub[20005], hv[20005], w[20005], cdepth[20005], rev;
                             ^
Anthony.cpp:10:18: warning: '{anonymous}::hv' defined but not used [-Wunused-variable]
  int sub[20005], hv[20005], w[20005], cdepth[20005], rev;
                  ^~
Anthony.cpp:10:6: warning: '{anonymous}::sub' defined but not used [-Wunused-variable]
  int sub[20005], hv[20005], w[20005], cdepth[20005], rev;
      ^~~

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