Submission #587734

#TimeUsernameProblemLanguageResultExecution timeMemory
587734M_WHexagonal Territory (APIO21_hexagon)C++17
0 / 100
1305 ms280 KiB
#include <bits/stdc++.h> using namespace std; const long long md = 1e9 + 7; int draw_territory(int N, int A, int B, vector<int> D, vector<int> L) { long long len = L[0]; long long s1 = 0, s2 = 0; for(int i = 1; i <= len; i++){ s1 = (s1 + (((i * 1ll) * ((i + 1) * 1ll)) % md)) % md; s2 = (s2 + i + 1) % md; } s1 = (s1 * (A * 1ll)) % md; s2 = (s2 * (B * 1ll)) % md; s2 = (s2 + (B * 1ll)) % md; return (s1 + s2) % md; }
#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...