답안 #981693

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
981693 2024-05-13T13:04:20 Z IUA_Hasin 육각형 영역 (APIO21_hexagon) C++17
컴파일 오류
0 ms 0 KB
#include "hexagon.h"
#include <bits/stdc++.h>

#define ll                            long long

using namespace std;



int draw_territory(int N, int A, int B, std::vector<int> D, std::vector<int> L) {
       ll len = L[0]+1; 
       ans = A*len;

       return ans;
}

Compilation message

hexagon.cpp: In function 'int draw_territory(int, int, int, std::vector<int>, std::vector<int>)':
hexagon.cpp:12:8: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |        ans = A*len;
      |        ^~~
      |        abs