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 "hexagon.h"
#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int draw_territory(int N, int A, int B, std::vector<int> D, std::vector<int> L) {
ll n = L[0] + 1;
ll sz = n * (n + 1)/2;
ll sdist = 0;
for(int i = 0;i<n;i++){
sdist += i * (i + 1);
}
return sz * A + sdist * B;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |