「CF 1520A」Do Not Be Distracted! Link. 模拟。 #include<bits/stdc++.h> char now; char get_char(){char res=getchar();while(res<'A' || res>'Z') res=getchar() ...
分类:
其他好文 时间:
2021-05-24 02:42:17
阅读次数:
0
链接:https://ac.nowcoder.com/acm/problem/17193 1 #include<bits/stdc++.h> 2 using namespace std; 3 const int N = 1000100; 4 bitset<N>s,p; 5 int main() { ...
分类:
其他好文 时间:
2021-05-24 01:32:55
阅读次数:
0
很明显的拓扑 推一波: https://www.luogu.com.cn/blog/Hehe-0/p2017-dizzy-cows-g 1 #include<bits/stdc++.h> 2 3 4 using namespace std; 5 const int mmm=1e6+1; 6 7 in ...
分类:
其他好文 时间:
2021-05-23 23:01:52
阅读次数:
0
建两个图,正图和反图。 正图里的边权是现金,反图里的边权是旅游金。 然后分别以1为起点在正图上跑最短路,以n为起点在反图上跑最短路。 这样计算出每个点的答案,取最小,不带修改的情况就做完了。 带修改的情况放线段树上维护一下就好了。 注意巨大坑点:不保证图连通。 #include<bits/stdc+ ...
分类:
其他好文 时间:
2021-05-04 16:28:17
阅读次数:
0
题目链接 维护一个区间最小值同时维护一个区间最小值的减法 #include <bits/stdc++.h> using namespace std; const int N = 100010; int a[N]; int n,k; struct node{ int l,r; int v,add; } ...
分类:
其他好文 时间:
2021-05-04 16:06:56
阅读次数:
0
由于玄学错误以及各种挂分,这场考试连100都没上…… A.序列 玄学思路可以蹭过去,但是log函数在long long的情况下异常玄学,下面这段代码在Windows下运行结果为2,Linux下正确 #include<bits/stdc++.h> using namespace std; #defin ...
分类:
其他好文 时间:
2021-05-04 15:41:20
阅读次数:
0
题目 显然,彼佳所做的 \(a\) 件家务中最简单的家务的复杂度,和瓦西亚所做的 \(b\) 件家务中最难的家务的复杂度之差,就是 \(x\) 。 C++ #include<bits/stdc++.h> using namespace std; int n; int f[2005]; int a,b ...
分类:
其他好文 时间:
2021-05-03 12:54:09
阅读次数:
0
思路清晰就好,不是很难只是有点复杂。 #include<bits/stdc++.h> #define atest using namespace std; int n,l,r,t; int mapp[601][601]; int main(){ cin>>n; cin>>l; cin>>r; cin ...
分类:
其他好文 时间:
2021-05-03 11:58:33
阅读次数:
0
思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; int main() { int n, t, num = 0; string now; cin >> n >> t; getchar(); for (int i = 1; i ...
分类:
其他好文 时间:
2021-04-27 15:16:28
阅读次数:
0
思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; const int maxn = 1000 + 5; int ans[maxn]; int main() { int a, b, n; cin >> a >> b >> n; ...
分类:
其他好文 时间:
2021-04-27 15:09:43
阅读次数:
0