摘要:
贪心 如果有0先变成非0 如果负数的个数 应该变为偶数 之后就是每次将绝对值最小的值加K #include<bits/stdc++.h> using namespace std; const int MAXN = 2e5+5; typedef long long ll; int N,K,X; ll 阅读全文
摘要:
技不如人甘拜下风 这题网上说法有 建反向边和先拓扑 都是为了每个点之前将其前驱都遍历到 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 5005; const int INF = 阅读全文