# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
569426 | 2022-05-27T11:41:51 Z | Turkhuu | Hexagonal Territory (APIO21_hexagon) | C++17 | 0 ms | 0 KB |
#include "hexagon.h" #include <bits/stdc++.h> const int mod = 1000000007; int draw_territory(int n, int a, int b, vector<int> d, vector<int> l){ if(n == 3){ long long ans = 0; for(int i = 1; i <= l[0]; i++){ ans += i * (i + 1) % mod; } ans *= b; ans += n * a; return ans; } return 0; }