P3113 [USACO14DEC] Marathon G
Description
An avid marathon runner herself, Bessie enjoys creating marathon courses for her fellow cows to run. She has most recently designed a route specified by N checkpoints (1
Input Format
INPUT: (file marathon.in)
The first line gives N and Q (1
Output Format
OUTPUT: (file marathon.out)
For each sub-route length request, output on a single line the desired length.