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 <vector>
int mod = 1e9+7;
int ma(int a, int b){
return (a+b)%mod;
}
int mm(int a, int b){
return (a*b)%mod;
}
int draw_territory(int N, int A, int B,
std::vector<int> D, std::vector<int> L) {
int k = L[0]-2;
if(L[0]<=2)return L[0]+L[1]+L[2];
int fr = mm(L[0],3),sr=0;
if(k%2)sr = mm((k+1)/2,k);
else sr = mm(k/2,k+1);
return ma(sr,fr) ;
}
# | 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... |