#include "hexagon.h"
#ifndef EVAL
#include "grader.cpp"
#endif
#include "bits/stdc++.h"
using namespace std;
#define ar array
const int mod = 1e9 + 7;
const int MAXN = 505 * 505;
const int N = 4e3 + 5;
const int H = 2e3;
int bp(int a, int b){
int r = 1;
while(b){
if(b & 1) r = r * 1ll * a % mod;
b >>= 1, a = a * 1ll * a % mod;
} return r;
}
int draw_territory(int n, int A, int B, vector<int> d, vector<int> l) {
if(n == 3){
int L = l[0];
int res = (L + 1) * 1ll * (L + 2) / 2 % mod * A % mod;
res = (res + L * 1ll * (L + 1) % mod * (2 * L + 1) % mod * bp(6, mod - 2) % mod * B % mod) % mod;
return res;
}
assert(false);
//~ int ch[6][3] = {
//~ {1, 1},
//~ {1, 0},
//~ {0, -1},
//~ {-1, -1},
//~ {-1, 0},
//~ {0, 1}
//~ };
//~ vector<int> is[N];
//~ ar<int, 2> c {};
//~ for(int i=0;i<n;i++){ --d[i];
//~ for(int k=0;k<l[i];k++){
//~ for(int t=0;t<2;t++) c[t] += ch[d[i]][t];
//~ if(c[1] || c[0]) is[c[1] + H].push_back(c[0]);
//~ }
//~ }
//~ for(int i=0;i<N;i++){
//~ sort(is[i].begin(), is[i].end());
//~ }
//~ assert(false);
//~ auto check = [&](int x, int y){
//~ x += H;
//~ auto it = upper_bound(is[x].begin(), is[x].end(),
//~ };
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
292 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
300 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Incorrect |
1 ms |
300 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
0 ms |
212 KB |
Output is correct |
3 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 6 |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
340 KB |
Execution killed with signal 6 |
2 |
Halted |
0 ms |
0 KB |
- |