码迷,mamicode.com
首页 >  
搜索关键字:reverse bits    ( 8842个结果
GPLT L3-028.森森旅游
建两个图,正图和反图。 正图里的边权是现金,反图里的边权是旅游金。 然后分别以1为起点在正图上跑最短路,以n为起点在反图上跑最短路。 这样计算出每个点的答案,取最小,不带修改的情况就做完了。 带修改的情况放线段树上维护一下就好了。 注意巨大坑点:不保证图连通。 #include<bits/stdc+ ...
分类:其他好文   时间:2021-05-04 16:28:17    阅读次数:0
C - Arrangement for Contests
题目链接 维护一个区间最小值同时维护一个区间最小值的减法 #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
noip模拟测试17
由于玄学错误以及各种挂分,这场考试连100都没上…… A.序列 玄学思路可以蹭过去,但是log函数在long long的情况下异常玄学,下面这段代码在Windows下运行结果为2,Linux下正确 #include<bits/stdc++.h> using namespace std; #defin ...
分类:其他好文   时间:2021-05-04 15:41:20    阅读次数:0
题解 CF169A 【Chores】
题目 显然,彼佳所做的 \(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
题解 CF420A 【Start Up】
题目 注意 符合题意的字符串,除了要是一个回文字符串,还必须由全部由 轴对称字母 组成。 思路 判断是否含有非轴对称字母 判断是否为回文字符串 以下是所有的轴对称字母: AHIMOTUVWXY 这里介绍一个string类型操作,可以快速反转字符串。 string str; reverse(str.b ...
分类:其他好文   时间:2021-05-03 12:20:32    阅读次数:0
CSP202104-2领域均值
思路清晰就好,不是很难只是有点复杂。 #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
字符串反转的几种方法
def reverse_str(s): from functools import reduce res = s[::-1] # 切片 res = "".join(list(reversed(s))) # 反转函数 res = reduce(lambda x,y:y+x, s) # reduce p ...
分类:其他好文   时间:2021-04-28 12:06:36    阅读次数:0
2021团体程序设计天梯赛 L1-6 吉老师的回归
思路: 水题,略过 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
2021团体程序设计天梯赛 L1-8 乘法口诀数列
思路: 水题,略过 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
2021团体程序设计天梯赛 L2-1 包装机
思路: 水题,略过 Tip: 无 #include <bits/stdc++.h> using namespace std; const int maxn = 1000 + 5; queue<char> que[maxn]; stack<char> s; int main() { int n, m, ...
分类:其他好文   时间:2021-04-27 15:08:37    阅读次数:0
8842条   上一页 1 ... 5 6 7 8 9 ... 885 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!