Submission #981369

#TimeUsernameProblemLanguageResultExecution timeMemory
981369UnforgettableplHexagonal Territory (APIO21_hexagon)C++17
9 / 100
1 ms500 KiB
#include <bits/stdc++.h> using namespace std; const __int128 modulo = 1e9+7; const __int128 inverse2 = 500000004; const __int128 inverse3 = 333333336; int draw_territory(int N, int A, int B, std::vector<int> D, std::vector<int> L) { __int128 len = L[0]+1ll; return (int)((len*(len+1)*inverse2*__int128(A) + (((len-1)*len*(len+1))%modulo)*inverse3*__int128(B))%modulo); }
#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...