# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
569436 | Turkhuu | Hexagonal Territory (APIO21_hexagon) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#include "hexagon.h"
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);
}
ans *= b;
ans += (l[0] + 1) * (l[0] + 2) * a;
return ans;
}
return 0;
}