Submission #676037

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6760372022-12-29 01:31:01Hegdahl늑대인간 (IOI18_werewolf)C++17
100 / 100
981 ms163412 KiB
#include "werewolf.h"
#include <bits/stdc++.h>
using namespace std;
template <class F>
struct yc {
F f_;
yc(F &&f) : f_(std::forward<F>(f)) {}
decltype(auto) operator()(auto &&...args) {
return f_(std::ref(*this), std::forward<decltype(args)>(args)...);
}
};
struct krusk {
vector<array<int, 18>> u;
vector<int> l, r, lo, hi;
vector<int> order, where;
vector<int> lm, rm;
krusk(int n, const vector<array<int, 2>> &e)
: u(2 * n - 1),
l(n - 1, -1),
r(n - 1, -1),
lo(2 * n - 1),
hi(2 * n - 1),
where(2 * n - 1, -1),
lm(2 * n - 1, (int)1e9),
rm(2 * n - 1, -(int)1e9) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

werewolf.cpp:11:29: warning: use of 'auto' in parameter declaration only available with '-fconcepts-ts'
   11 |   decltype(auto) operator()(auto &&...args) {
      |                             ^~~~
werewolf.cpp: In instantiation of 'krusk::krusk(int, const std::vector<std::array<int, 2> >&)::<lambda(auto:25, int, int)> [with auto:25 = std::reference_wrapper<yc<krusk::krusk(int, const std::vector<std::array<int, 2> >&)::<lambda(auto:25, int, int)> > >]':
werewolf.cpp:12:14:   required from 'decltype(auto) yc<F>::operator()(auto:23&& ...) [with auto:23 = {int, int}; F = krusk::krusk(int, const std::vector<std::array<int, 2> >&)::<lambda(auto:25, int, int)>]'
werewolf.cpp:82:25:   required from here
werewolf.cpp:68:33: warning: comparison of integer expressions of different signedness: 'int' and 'std::array<int, 18>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   68 |       for (int lvl = 0; lvl + 1 < u[i].size(); ++lvl)
      |                         ~~~~~~~~^~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...