Submission #400841

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4008412021-05-08 18:20:30phistiJob Scheduling (CEOI12_jobs)C++17
100 / 100
697 ms20780 KiB
// The Central Engineering Organization, International (CEOI) has received
// Mjob requests for the next Ndays. To perform a job requires exactly one day
// by one machine. CEOI has access to several machines, each of which can
// perform at most one job per day, sothe organization can do at most as many
// jobs a day as the number of available machines. CEOI aims to work with at
// mostDdays of delay, which means that if a client submits a job for
// processing on day S, then it will be finished no later than on day S+D.
// Task:
// You are to write a program that computes the minimum number of machines that
// the organization needs to process all jobs with at most Ddays of
// delay.
//
// Input
// The first line of the input contains three integers, N(1
// ≤N ≤100000) is the number of days the organization performs jobs, D(0
// ≤D< N) is the maximum number of days permitted for the delay, and M(1 ≤M ≤1
// 000 000) is the number of job requests. The days are numbered from 1to N,
// and the requests are numbered from 1toM. The second line contains
// exactly Mintegers separated by space, the ith number is the day when
// request iis submitted for processing.No jobs are submitted after day
// N–D.
//
// Output
// The first line of the output contains one integer, the minimum
// number ofmachines that the organization needs to be able to process
// all jobs with at most Ddays of delay. The next Nlines describe a
// feasible schedule for processing the requests. The (i+1)th line
// contains the identifiers of the requests scheduled for day i.
// Numbers in a line must be separated by space and terminated by
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

jobs.cpp: In function 'bool is_goodp(std::vector<std::pair<long long int, long long int> >&, sl, sl, sl)':
jobs.cpp:86:8: warning: unused variable 'jobs' [-Wunused-variable]
   86 |     sl jobs = 0;
      |        ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...