#include<bits/stdc++.h> using namespace std; const long long mod=1e9+7; const long long mod2 = 1e8+7; const long long N =1e6+10; void in(long long &x) ...
分类:
其他好文 时间:
2021-01-15 12:03:41
阅读次数:
0
#include<bits/stdc++.h> using namespace std; #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|1 #define rush! ios::sync_with_stdio(false);cin.tie(0); c ...
分类:
其他好文 时间:
2021-01-13 11:33:41
阅读次数:
0
A - Three-Point Shot 题目大意 两个球队现在分数分别给出,问少的一方投入三分球之后是否能翻盘. 代码 #include <bits/stdc++.h> using namespace std; typedef long long ll; #define forn(i,x,n) f ...
分类:
其他好文 时间:
2021-01-13 10:46:21
阅读次数:
0
###链接 调了好久。。。 我平常写平衡树时 \(push\) \(tag\) 的操作都习惯把 \(rev\) 数组清零,但在 \(LCT\) 中不行,因为 \(rev\) 储存了节点间的父子关系,直接清零会改变树的结构。 \(\frak{code}\) #include<bits/stdc++.h ...
分类:
其他好文 时间:
2021-01-12 11:26:50
阅读次数:
0
题目链接 题解 很普通的数位dp题呐,$state$表示$>0$的数位个数。 AC代码 #include<bits/stdc++.h> #define int long long using namespace std; int dp[20][5],a[20],cnt; int dfs(int po ...
分类:
其他好文 时间:
2021-01-12 11:02:11
阅读次数:
0
题意 对图片先水平翻转再反转图片 水平翻转:就是改为逆序,比如[1,0,0]->[0,0,1] 反转图片:0->1, 1->0 思路 完全按照题目中所说的进行模拟 对于水平翻转:可以用reverse() 对于反转图片,可用 1??^=1,因为一个数和自己异或是0,0和1异或刚好是1 2??=abs( ...
分类:
其他好文 时间:
2021-01-12 10:57:29
阅读次数:
0
冒泡排序 思想:每一趟排序,从左往右扫描数组,如果a[i]>a[i+1],就把她们交换 执行n次,数列就有序了。 正确性证明:第一次排序时,最大值将转到最右边, 第二次排序时,次大值将转到最右边......以此类推,n次之后n个数都到了指定位置 代码实现: `#include<bits/stdc++ ...
分类:
编程语言 时间:
2021-01-12 10:53:35
阅读次数:
0
父级 //改变盒子模型display:flex //排列方向左右row;上下column; flex-direction:row、column、row-reverse、column-reverse //是否换行显示默认:nowrap flex-warp:nowrap、wrap、wrap-revers ...
分类:
其他好文 时间:
2021-01-11 11:11:31
阅读次数:
0
#include <iostream> #include <vector> #include <string> using namespace std; struct Node { int data; Node * next; }; Node * reverseList(Node * head) { ...
分类:
其他好文 时间:
2021-01-11 11:11:15
阅读次数:
0
1 #define IO std::ios::sync_with_stdio(0) 2 #include <bits/stdc++.h> 3 using namespace std; 4 #define mk make_pair 5 #define pb push_back 6 const int ...
分类:
其他好文 时间:
2021-01-06 11:49:40
阅读次数:
0