Submission #743362

#TimeUsernameProblemLanguageResultExecution timeMemory
743362onebit1024Hexagonal Territory (APIO21_hexagon)C++17
0 / 100
1 ms212 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...