Submission #737352

#TimeUsernameProblemLanguageResultExecution timeMemory
737352keisuke6Hexagonal Territory (APIO21_hexagon)C++14
3 / 100
1 ms236 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 a = ((long long)(L[0]+1)*(L[0]+2)/2%1000000007)*A%1000000007; long long b = (long long)(L[0]-1)*L[0]%1000000007*(L[0]+1)%1000000007; while(b%3) b += 1000000007; b = (b+1000000007)*B%1000000007; return (int)((a+b)%1000000007); }
#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...