제출 #824500

#제출 시각아이디문제언어결과실행 시간메모리
824500Hanksburger육각형 영역 (APIO21_hexagon)C++17
9 / 100
1 ms304 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]+1)*(l[0]+2)%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...