답안 #536503

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
536503 2022-03-13T12:52:24 Z smessaris 육각형 영역 (APIO21_hexagon) C++14
3 / 100
1704 ms 472 KB
#include<bits/stdc++.h>
#define pb push_back
#define ios ios::sync_with_stdio(0);cin.tie(0);

using namespace std;
using ll = long long;

const int mod = 1e9 + 7;
const int MAX = 2e5 + 5;

int draw_territory(int N, int A, int B,vector<int> D, vector<int> L){
    ll ans = ((((L[0] + 1) * 1LL * (L[0] + 2)) / 2) % mod);
    ans *= A;
    ans %= mod;
    for(int i=0;i<(L[0] + 1);i++){
        ans += (((i * (i + 1)) % mod) * B) % mod;
        ans %= mod;
    }
    sort(L.begin(),L.end());
    assert(L[0] == L.back());
    return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1586 ms 288 KB Output is correct
2 Correct 1601 ms 276 KB Output is correct
3 Correct 1 ms 304 KB Output is correct
4 Correct 1 ms 216 KB Output is correct
5 Correct 1 ms 216 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1615 ms 280 KB Output is correct
2 Correct 1642 ms 212 KB Output is correct
3 Incorrect 1563 ms 284 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 436 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1704 ms 292 KB Output is correct
2 Correct 1656 ms 288 KB Output is correct
3 Runtime error 1 ms 340 KB Execution killed with signal 6
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 468 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1659 ms 280 KB Output is correct
2 Correct 1613 ms 276 KB Output is correct
3 Incorrect 1632 ms 284 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 472 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -