답안 #488763

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
488763 2021-11-20T11:51:11 Z Theo830 육각형 영역 (APIO21_hexagon) C++17
3 / 100
1370 ms 340 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e9+7;
const ll MOD = 998244353;
typedef pair<ll,ll> ii;
#define iii pair<ii,ll>
#define f(i,a,b) for(ll i = a;i < b;i++)
#define pb push_back
#define vll vector<ll>
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
///I hope I will get uprating and don't make mistakes
///I will never stop programming
///sqrt(-1) Love C++
///Please don't hack me
///@TheofanisOrfanou Theo830
///Think different approaches (bs,dp,greedy,graphs,shortest paths,mst)
///Stay Calm
///Look for special cases
///Beware of overflow and array bounds
///Think the problem backwards
///APIO 2021 vc
#include "hexagon.h"
int draw_territory(int N, int A, int B,std::vector<int> D, std::vector<int> L){
    ll ans = 0;
    f(i,1,L[0] + 2){
        ans += (i * A) % INF;
        ans %= INF;
    }
    sort(all(L));
    assert(L[0] == L.back());
    return ans;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 1309 ms 204 KB Output is correct
2 Correct 1322 ms 280 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 208 KB Output is correct
5 Correct 0 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1370 ms 264 KB Output is correct
2 Correct 1323 ms 276 KB Output is correct
3 Incorrect 1322 ms 272 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1362 ms 268 KB Output is correct
2 Correct 1324 ms 276 KB Output is correct
3 Runtime error 1 ms 336 KB Execution killed with signal 6
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1365 ms 272 KB Output is correct
2 Correct 1337 ms 272 KB Output is correct
3 Incorrect 1321 ms 272 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -