답안 #1081515

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1081515 2024-08-30T06:47:53 Z vjudge1 Measures (CEOI22_measures) C++14
59 / 100
133 ms 11708 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll n, m, d, i, z, la;
    cin >> n >> m >> d;
    if (n)
    {
        multiset<ll> s;
        while (n--)
        {
            cin >> i;
            s.insert(i);
        }
        while (m--)
        {
            cin >> i;
            s.insert(i);
            z = 0;
            la = -d;
            for (auto h : s)
            {
                la = max(la + d, h);
                z = max(z, la - h);
            }
            if (z % 2)
                cout << z / 2 << ".5 ";
            else
                cout << z / 2 << " ";
        }
    }
    else
    {
        la = -d;
        z = 0;
        while (m--)
        {
            cin >> i;
            la = max(la + d, i);
            z = max(z, la - i);
            if (z % 2)
                cout << z / 2 << ".5 ";
            else
                cout << z / 2 << " ";
        }
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 548 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 348 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 1 ms 548 KB Output is correct
9 Correct 133 ms 11708 KB Output is correct
10 Correct 79 ms 11604 KB Output is correct
11 Correct 61 ms 11680 KB Output is correct
12 Correct 60 ms 11600 KB Output is correct
13 Correct 57 ms 11088 KB Output is correct
14 Correct 47 ms 11604 KB Output is correct
15 Correct 125 ms 11088 KB Output is correct
16 Correct 66 ms 11668 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 3416 KB Output is correct
2 Correct 27 ms 5212 KB Output is correct
3 Correct 27 ms 5212 KB Output is correct
4 Correct 27 ms 2944 KB Output is correct
5 Correct 26 ms 4332 KB Output is correct
6 Correct 25 ms 3336 KB Output is correct
7 Correct 26 ms 4432 KB Output is correct
8 Correct 24 ms 3156 KB Output is correct
9 Correct 23 ms 2908 KB Output is correct
10 Correct 33 ms 5492 KB Output is correct
11 Correct 28 ms 3928 KB Output is correct
12 Correct 30 ms 4944 KB Output is correct
13 Correct 24 ms 3148 KB Output is correct
14 Correct 29 ms 4952 KB Output is correct
15 Correct 27 ms 4692 KB Output is correct
16 Correct 21 ms 2640 KB Output is correct
17 Correct 27 ms 4436 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 3416 KB Output is correct
2 Correct 27 ms 5212 KB Output is correct
3 Correct 27 ms 5212 KB Output is correct
4 Correct 27 ms 2944 KB Output is correct
5 Correct 26 ms 4332 KB Output is correct
6 Correct 25 ms 3336 KB Output is correct
7 Correct 26 ms 4432 KB Output is correct
8 Correct 24 ms 3156 KB Output is correct
9 Correct 23 ms 2908 KB Output is correct
10 Correct 33 ms 5492 KB Output is correct
11 Correct 28 ms 3928 KB Output is correct
12 Correct 30 ms 4944 KB Output is correct
13 Correct 24 ms 3148 KB Output is correct
14 Correct 29 ms 4952 KB Output is correct
15 Correct 27 ms 4692 KB Output is correct
16 Correct 21 ms 2640 KB Output is correct
17 Correct 27 ms 4436 KB Output is correct
18 Incorrect 27 ms 4432 KB Output isn't correct
19 Halted 0 ms 0 KB -