This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |