Submission #979815

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9798152024-05-11 12:11:09c2zi6Hexagonal Territory (APIO21_hexagon)C++14
47 / 100
102 ms197456 KiB
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define ff first
#define ss second
#define pb push_back
#define all(a) (a).begin(), (a).end()
#define replr(i, a, b) for (int i = int(a); i <= int(b); ++i)
#define reprl(i, a, b) for (int i = int(a); i >= int(b); --i)
#define rep(i, n) for (int i = 0; i < int(n); ++i)
#define mkp(a, b) make_pair(a, b)
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<PII> VPI;
typedef vector<VI> VVI;
typedef vector<VVI> VVVI;
typedef vector<VPI> VVPI;
typedef pair<ll, ll> PLL;
typedef vector<ll> VL;
typedef vector<PLL> VPL;
typedef vector<VL> VVL;
typedef vector<VVL> VVVL;
typedef vector<VPL> VVPL;
template<class T> T setmax(T& a, T b) {if (a < b) return a = b; return a;}
template<class T> T setmin(T& a, T b) {if (a < b) return a; return a = b;}
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
template<class T>
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

hexagon.cpp: In function 'void TEST3::dfs(int, int)':
hexagon.cpp:74:12: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   74 |   for (auto[vi, vj] : harevan(i, j)) if (table[vi][vj] == 2) {
      |            ^
hexagon.cpp: In function 'int TEST3::solve(int, int, int, VI, VI)':
hexagon.cpp:83:9: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   83 |     auto[vi, vj] = harevan(ui, uj)[dir];
      |         ^
hexagon.cpp:91:13: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   91 |    for (auto[vi, vj] : harevan(i, j)) {
      |             ^
hexagon.cpp:108:8: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  108 |    auto[ui, uj] = q.front();
      |        ^
hexagon.cpp:110:13: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  110 |    for (auto[vi, vj] : harevan(ui, uj)) if (table[vi][vj] == 0 && dist[vi][vj] == 2e9) {
      |             ^
hexagon.cpp: In function 'int TEST5::solve(int, int, int, VI, VI)':
hexagon.cpp:165:8: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  165 |    auto[x, y] = polygon.back();
      |        ^
hexagon.cpp: In function 'int TEST3::solve(int, int, int, VI, VI)':
hexagon.cpp:100:6: warning: 'lmi' may be used uninitialized in this function [-Wmaybe-uninitialized]
  100 |   dfs(lmi, lmj);
      |   ~~~^~~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...