Submission #690363

#TimeUsernameProblemLanguageResultExecution timeMemory
690363Dan4LifeHexagonal Territory (APIO21_hexagon)C++17
0 / 100
1 ms212 KiB
#include "hexagon.h" #include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = (ll)1e9+7; int poww(int a, int b){ if(b==0) return 1; int x = poww(a,b/2); x*=x,x%=MOD; if(b&1)x*=a,x%=MOD; return x; } int draw_territory(int N, int A, int B, vector<int> D, vector<int> L) { ll ans = L[0]+1; ans*=ans+1; ans%=MOD; ans*=poww(2,MOD-2); ans%=MOD; ans*=A, ans%=MOD; return ans%MOD; }
#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...