Submission #792370

# Submission time Handle Problem Language Result Execution time Memory
792370 2023-07-25T03:36:16 Z MON Job Scheduling (CEOI12_jobs) C++14
10 / 100
9 ms 3448 KB
#include<iostream>
#include<cmath>
#include<vector>
using namespace std;

constexpr int NMAX = 1e5 + 1;

vector<int> t[NMAX];

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr),cout.tie(nullptr);

    int n,d,m,ti; cin >> n >> d >> m;
    for(int i = 1; i <= n ; i++)
        {
            cin >> ti;
            int id = min(n,ti + d);
            t[id].emplace_back(i);
        }

    int ans = 0,sp = 0;
    for(int i = 1; i <= n ; i++)
        {
            sp += t[i].size();
            ans = max(ans,(int)ceil(1.0 * sp / i));
        }

    cout << ans << '\n';
    for(int i = 1; i <= n ; i++) cout << "0\n";
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 2772 KB Output isn't correct
2 Incorrect 2 ms 2772 KB Output isn't correct
3 Incorrect 2 ms 2772 KB Output isn't correct
4 Incorrect 2 ms 2772 KB Output isn't correct
5 Incorrect 2 ms 2772 KB Output isn't correct
6 Incorrect 2 ms 2772 KB Output isn't correct
7 Incorrect 2 ms 2772 KB Output isn't correct
8 Incorrect 2 ms 2772 KB Output isn't correct
9 Correct 8 ms 3448 KB Output is correct
10 Correct 8 ms 3412 KB Output is correct
11 Incorrect 1 ms 2644 KB Output isn't correct
12 Incorrect 1 ms 2644 KB Output isn't correct
13 Incorrect 1 ms 2644 KB Output isn't correct
14 Incorrect 2 ms 2772 KB Output isn't correct
15 Incorrect 1 ms 2644 KB Output isn't correct
16 Incorrect 2 ms 2772 KB Output isn't correct
17 Incorrect 2 ms 2772 KB Output isn't correct
18 Incorrect 2 ms 2772 KB Output isn't correct
19 Incorrect 9 ms 3412 KB Output isn't correct
20 Incorrect 2 ms 2772 KB Output isn't correct