摘要:
A. 签到 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n,m,k,r,c; 4 int Ans[50005]; 5 int main() 6 { 7 scanf("%d%d%d%d%d",&n,&m,&k,&r,&c); 8 for 阅读全文
摘要:
A. 考虑\(k\)次多项式你问\(k+1\)和\(k+2\)个点值得到的是一样的,也就是新增的最高次系数为\(0\) 每次高斯消元解个方程就行了 1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 co 阅读全文
摘要:
A. 签到题。排序后贪心。 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 const int MAXN = 100000 + 10; 6 7 int n, x; 8 int a[MAXN]; 9 10 int main() { 11 阅读全文
摘要:
A. 就是个带限制的最短路,多开一维状态\(dis(i,j)\)表示到点\(i\),走的路程是\(j\)的最小值 注意各种细节就行了 1 #include<bits/stdc++.h> 2 using namespace std; 3 struct Point 4 { 5 int x,y; 6 Po 阅读全文