Submission #824497

#TimeUsernameProblemLanguageResultExecution timeMemory
824497HanksburgerHexagonal Territory (APIO21_hexagon)C++17
0 / 100
1 ms344 KiB
#include "hexagon.h" #include <bits/stdc++.h> using namespace std; const long long mod=1000000007, inv2=500000004, inv3=333333336; vector<long long> d, l; int draw_territory(int nn, int aa, int bb, vector<int> dd, vector<int> ll) { long long n=nn, a=aa, b=bb; for (long long i=0; i<n; i++) d.push_back(dd[i]), l.push_back(ll[i]); return (l[0]*(l[0]+1)%mod*inv2%mod*a%mod+l[0]*(l[0]+1)%mod*(l[0]+2)%mod*inv3%mod*b%mod)%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...