题意:给定 n 个地方,然后再给 m 个任务,每个任务必须在规定的地方完成,并且必须按顺序完成,问你最少时间. 析:没什么可说的,就是模拟,记录当前的位置,然后去找和下一个位置相差多长时间,然后更新当前位置即可. 代码如下: #include <bits/stdc++.h> using namespace std; const int maxn = 1e5 + 5; typedef long long LL; int main(){ int n, m, x; while(cin >>…
B - Bing it Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVALive 4764 Description I guess most of you played cards on the trip to Harbin, but I'm sure you have never played the following card game. Thi…