Submission #1202224

#TimeUsernameProblemLanguageResultExecution timeMemory
1202224Kavelmydex육각형 영역 (APIO21_hexagon)C++20
Compilation error
0 ms0 KiB
/*
I: 
1. The path does not conatin layers. 
Must compute: 
1. the number of cells in the territory. 
======================
======================
*/
#include "hex.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long 
#define vi vector<int>  
#define pi pair<int,int>
#define pb push_back
#define sz(x) ((int)x.size())
#define sp ' '
#define endl "\n"
#define all(x) (x).begin(),(x).end()
#define rep(i,x,n) for(int i=x; i<=n; ++i)
#define For(i,n) rep(i,0,n-1)   
#define ff first 
#define ss second
#define ld long double
#define mp make_pair

const int mxN=6e5+10,OO=1e18,mod=1e9+7;  
const int dx[]{0,0,-1,1}, dy[]{1,-1,0,0};

void cmn(int &a,int b){a = min(a,b);}
void cmx(int &a,int b){a = max(a,b);}

int draw_territory(int N, int A, int B,vector<int> D, vector<int> L) {
  ll v=L.back(),ans=v;
  ans = v * (v+1)/2; ans %= mod;
  if(N==3){
    assert(L[0]==L[1]&&L[1]==L[2]);
  }
  return ans;
}

Compilation message (stderr)

hexagon.cpp:9:10: fatal error: hex.h: No such file or directory
    9 | #include "hex.h"
      |          ^~~~~~~
compilation terminated.