# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
40733 | Alexa2001 | Skyscraper (JOI16_skyscraper) | C++14 | 468 ms | 4068 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int Nmax = 103, Kmax = 1003;
const int Mod = 1e9 + 7;
typedef long long ll;
int N, K, i, j, k, F, S, new_k, a[Nmax];
int now[Nmax][Kmax][2][2], old[Nmax][Kmax][2][2];
void add_to(int &x, int y, int z)
{
x = (x + (ll)y*z) % Mod;
}
int main()
{
// freopen("input", "r", stdin);
cin >> N >> K;
for(i=1; i<=N; ++i) cin >> a[i];
sort(a+1, a+N+1);
for(i=1; i<N; ++i) a[i] = a[i+1] - a[i];
now[0][0][1][1] = now[0][0][0][1] = now[0][0][1][0] = now[0][0][0][0] = 1;
for(i=1; i<N; ++i)
{
memcpy(old, now, sizeof(now));
memset(now, 0, sizeof(now));
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |