#include "hexagon.h"
#include<bits/stdc++.h>
#define ll long long int
using namespace std;
const ll mod = 1e9 + 7;
int draw_territory(int N, int A, int B, std::vector<int> D, std::vector<int> L) {
ll n = L[0] + 1;
ll sz = n * (n + 1)/2;
sz %= mod;
ll sdist = 0;
for(ll i = 0;i<=n;i++){
sdist += i * (i + 1);
sdist %= mod;
}
return (sz * A + sdist * B) % mod;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1082 ms |
348 KB |
Output is correct |
2 |
Correct |
1081 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1081 ms |
348 KB |
Output is correct |
2 |
Correct |
1082 ms |
344 KB |
Output is correct |
3 |
Incorrect |
1083 ms |
408 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1081 ms |
348 KB |
Output is correct |
2 |
Correct |
1081 ms |
348 KB |
Output is correct |
3 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1081 ms |
348 KB |
Output is correct |
2 |
Correct |
1081 ms |
408 KB |
Output is correct |
3 |
Incorrect |
1081 ms |
348 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |