제출 #1350415

#제출 시각아이디문제언어결과실행 시간메모리
1350415SulA육각형 영역 (APIO21_hexagon)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

const int MOD = 1e9+7;
int draw_territory(int k, int a, int b, int *d, int *l) {
  long long n = l[0];
  int cells = n*(2*n - 1) % MOD;
  long long dists = n * (n - 1) % MOD * (2*n - 1) % MOD * 166666668 % MOD;
  dists += n*(n - 1)/2 % MOD;
  cells = cells * a % MOD;
  dists = dists * b % MOD;
  return (cells + dists) % MOD;
}

컴파일 시 표준 에러 (stderr) 메시지

/usr/bin/ld: /tmp/ccMbL39X.o: in function `main':
grader.cpp:(.text.startup+0x220): undefined reference to `draw_territory(int, int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status