码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
[题解]CSP2020-S T4 Snakes
放个代码吧,开个坑 #include<bits/stdc++.h> #define rep(i,a,b) for (register int i=(a);i<=(b);i++) #define drep(i,a,b) for (register int i=(a);i>=(b);i--) typed ...
分类:其他好文   时间:2020-11-20 11:48:09    阅读次数:5
0x01 基本算法-位运算 a^b
题目链接:a^b 题目分析: 简单数论,快速幂模板题 代码如下: #include<bits/stdc++.h> using namespace std; #define mm(a,x) memset(a,x,sizeof a) #define mk make_pair #define ll lon ...
分类:编程语言   时间:2020-11-19 13:00:22    阅读次数:21
CF 1370D 二分 2e5
1 #include<bits/stdc++.h> 2 #define ll long long 3 #define INF 1e17 4 using namespace std; 5 const int N = 2e5 + 10; 6 ll n, k; 7 ll a[N]; 8 9 bool ch ...
分类:其他好文   时间:2020-11-17 12:50:15    阅读次数:11
escape
首先题目要求最后字典序最小的,而且只包含小写字母,因此显而易见像a,b这样的字符越在前面越好。 考虑贪心。 枚举这个字符串的每一个位置,然后再枚举小写字母a ~ z,能换则换,就是尽量将字典序最小的换到最前面,或者退而求其次。 code: 1 #include <bits/stdc++.h> 2 # ...
分类:其他好文   时间:2020-11-11 15:54:21    阅读次数:8
XJOI contest 1592
首先 热烈庆祝“CSP-S 2020全国开放赛前冲刺模拟训练题2”圆满结束!!! 感谢大毒瘤颗粒囊的题目。题目还是很不错的,部分分设置的不合理,各种神仙随便 AK ,蒟蒻只能爆零。 Problem A 不会,下一个。 暴搜代码如下: #include<bits/stdc++.h> using nam ...
分类:其他好文   时间:2020-11-06 02:32:55    阅读次数:20
Tarjan全家桶
强联通分量及缩点 #include<bits/stdc++.h> #define re register #define v e[i].to using namespace std; const int lzw=1e4+3; int n,m,head[lzw],tot,h[lzw],cnt,dfn[ ...
分类:其他好文   时间:2020-11-06 01:55:25    阅读次数:17
The Delivery Dilemma
链接 : http://codeforces.com/problemset/problem/1443/C 标签 : binary search greedy sorting *1400 二分答案 AC代码 #include <bits/stdc++.h> using namespace std; # ...
分类:其他好文   时间:2020-11-06 01:18:03    阅读次数:19
LeetCode #717. 1-bit and 2-bit Characters
###题目 717. 1-bit and 2-bit Characters ###解题方法 将指针设置在第0个位置,当数组长度>1时,如果当前位置是1,就把前两个数pop掉,否则是0的话就把前1个数pop掉,遍历结束看看bits还有没有元素,有的话return True,没有就return Fals ...
分类:其他好文   时间:2020-11-04 19:23:49    阅读次数:36
考前算法总结
最短路 SPFA #include <bits/stdc++.h> using namespace std; #define N 10001 #define M 500001 struct node{ int to,w,next; }edge[M]; int cut=0; int head[N]; ...
分类:编程语言   时间:2020-11-04 18:47:58    阅读次数:18
spfa与SLF和LLL(复习)
1 #include <bits/stdc++.h> 2 using namespace std; 3 const int mac=4e5+50; 4 int head[mac],vis[mac],dis[mac]; 5 int n,m,num,i,j,t; 6 struct edge{ 7 int ...
分类:其他好文   时间:2020-11-04 17:45:08    阅读次数:15
3873条   上一页 1 ... 18 19 20 21 22 ... 388 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!