Submission #979429

#TimeUsernameProblemLanguageResultExecution timeMemory
979429vjudge1Hexagonal Territory (APIO21_hexagon)C++17
0 / 100
1277 ms404 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],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...