Submission #979430

#TimeUsernameProblemLanguageResultExecution timeMemory
979430vjudge1Hexagonal Territory (APIO21_hexagon)C++17
9 / 100
1274 ms596 KiB
#include "hexagon.h" #include <vector> int draw_territory(int N, int A, int B, std::vector<int> D, std::vector<int> L) { long long ans=0,x=L[0]+1,i=0,mod=1e9+7; ans=x*(x+1)/2%mod*A%mod; for(;i<x;i++) ans=(ans+i*(i+1)%mod*B%mod)%mod; return ans; }
#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...