답안 #994788

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
994788 2024-06-08T05:44:31 Z thelegendary08 육각형 영역 (APIO21_hexagon) C++14
3 / 100
1 ms 348 KB
#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;
    sdist += n * (n+1) % mod * (2*n+1) % mod / 6 % mod;
    sdist += n * (n+1) / 2 % mod;
    sdist %= mod;
	ll ans = (sz * A % mod) + (sdist * B % mod);
	return ans % mod;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 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 -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 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 -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 0 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 -