Problem S
Drivers
Languages
de
en
et
is
lt
sv
Task
A worldwide logistics company is called Loners since all of
the drivers ride alone. It is very important to the managers of
the company to be able to answer their clients quickly and
accurately about whether or not the drivers are going to
deliver their goods safely from city
The driver’s job demands responsibility and alertness. For
this reason, they are required to rest at a hotel no less
frequently than every
Input
On the first line three integers separated by spaces are
presented:
On the following
On the remaining
Output
For each query, your program has to output
Constraints
Subtasks
No. |
Points |
Additional constraints |
1 |
10 |
|
2 |
11 |
|
3 |
11 |
|
4 |
23 |
|
5 |
45 |
No additional constraints. |
Examples
Even though the road between cities 1-5 exists (
The road between 3-4 does not exist.
There is a direct way between cities 2-4. It is possible to travel between these cities in the time that is allowed.
Sample Input 1 | Sample Output 1 |
---|---|
5 3 3 1 3 9 2 4 2 3 5 8 1 5 6 3 4 100 2 4 3 |
NE NE TAIP |