摘要:
A. 【NOIP2012 提高组 day2】同余方程 一道水题,用拓展欧几里得来计算,最后x的值要x=(x%b+b)%b;来取得非负最小值。 1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 5 l 阅读全文
摘要:
A. 【NOIP2006 提高组】作业调度方案 思路:先看懂题目,按照题目所给的方法模拟,写的时候还要特别加一个last[]数组保存最后建造时间。 1 #include<bits/stdc++.h> 2 #define LL long long 3 using namespace std; 4 co 阅读全文