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 <bits/stdc++.h>
#define lint long long int
#define pb push_back
using namespace std;
const int INF = 1e9;
const int MOD = 1E9+7;
int draw_territory(int N, int A, int B, vector<int> D, vector<int> L){
int length = L[0]+1;
int sum = 0, times = 0;
for(int i = 0; i <= length; i ++){
sum += ((i*(i+1))%MOD);
sum %= MOD;
times += i+1;
}
sum *= B;
sum %= MOD;
sum += ((times*A)&MOD);
return sum;
}
# | 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... |