#include "hexagon.h"
#include <vector>
int draw_territory(int N, int A, int B,
std::vector<int> D, std::vector<int> L) {
long long ans=0,x=L[0]+1,i=0,mod=1e9+7;
ans=x*(x+1)/2%mod*A%mod;
for(;i<x;i++)
ans=(ans+i*(i+1)%mod*B%mod)%mod;
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1255 ms |
392 KB |
Output is correct |
2 |
Correct |
1245 ms |
396 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1258 ms |
396 KB |
Output is correct |
2 |
Correct |
1251 ms |
404 KB |
Output is correct |
3 |
Correct |
1250 ms |
400 KB |
Output is correct |
4 |
Correct |
1244 ms |
400 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
424 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
1 ms |
344 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
1 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
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 |
1274 ms |
396 KB |
Output is correct |
2 |
Correct |
1263 ms |
400 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 |
360 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1259 ms |
396 KB |
Output is correct |
2 |
Correct |
1249 ms |
396 KB |
Output is correct |
3 |
Correct |
1267 ms |
596 KB |
Output is correct |
4 |
Correct |
1258 ms |
592 KB |
Output is correct |
5 |
Incorrect |
271 ms |
396 KB |
Output isn't correct |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |