Submission #981693

# Submission time Handle Problem Language Result Execution time Memory
981693 2024-05-13T13:04:20 Z IUA_Hasin Hexagonal Territory (APIO21_hexagon) C++17
Compilation error
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