Submission #737357

#TimeUsernameProblemLanguageResultExecution timeMemory
737357keisuke6Hexagonal Territory (APIO21_hexagon)C++14
3 / 100
1 ms212 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 /= 3; b = (b+1000000007)*B%1000000007; int ans = a+b; ans = (ans+1000000007)%1000000007; 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...