north_h
north_h
全部文章
分类
Acwing(4)
codeforces(9)
SMU-XCPC(21)
数据结构(3)
杂项(1)
牛客OJ(3)
题解(2)
归档
标签
去牛客网
登录
/
注册
north_h的博客
菜鸡上路!
全部文章
(共46篇)
高精度
1.加法 string add(string a,string b) { if (a.size() < b.size())swap(a, b); vector<int> A, B, C; for (int i = a.size() - 1; i >= ...
2023-07-16
0
607
Acwing109场周赛
传送门 A 函数 注意开long long #pragma GCC optimize(2) #pragma GCC optimize(3) #include<bits/stdc++.h> #define IOS ios::sync_with_stdio(false),cin.tie(n...
2023-06-24
0
257
牛客小白月赛74
传送门 A 简单的整除 #pragma GCC optimize(2) #pragma GCC optimize(3) #include<bits/stdc++.h> #define IOS ios::sync_with_stdio(false),cin.tie(nullptr), c...
2023-06-10
0
381
ST表
通俗易懂的博客 ST表是能够在o(nlgn)的预处理情况下,在o(1)的复杂度情况下来求一段区间的最小值和最大值,可以用来求重复贡献对问题答案没有影响的问题 为了减少时间复杂度,可以先预处理出lg2的数组,就不要每次都去用log函数 lg2[0] = -1 //方便求lg2循环数组 for(int ...
2023-06-09
0
288
Educational Codeforces Round 148 (Rated for Div. 2)
传送门 A New Palindrome 就判断回文串中出现的字母种类是不是大于1 #include<bits/stdc++.h> //#define int long long #define fi first #define se second using namespace s...
2023-05-14
0
523
快速幂和快速幂求逆元
快速幂 利用倍增的思想,将o(n)的时间复杂度优化成o(lgn) int ksm(int x,int y,int p) { int res = 1; while (y) { if (y & 1)res = (res * x) % p; x = ...
2023-05-14
0
311
SMU Spring 2023 Contest Round 2
传送门 C Darkness I 这个题就是找出一种放最少几个黑块能全部变黑,我么可以沿着对角线放,先以最小的那一边的正方形用对角线的方法放完,然后再两隔一列放一个,但是要注意向上取整。 #include<bits/stdc++.h> #define int long long #de...
2023-05-14
1
681
SMU Spring 2023 Contest Round 3
传送门 A. 签到啦 排个序每次选最大的 #include<bits/stdc++.h> #define int long long #define endl '\n' #define fi first #define se second using namespace std; ...
2023-05-14
0
232
Codeforces Round 820 (Div. 3)(VP)
传送门 A Two Elevators 注意读题,读懂题目即可,比较两部电梯到达1楼所需要的时间。 #include<bits/stdc++.h> #define int long long using namespace std; const int N = 200010; i...
2023-05-05
0
270
Codeforces Round 826 (Div. 3)(VP)
传送门 A Compare T-Shirt Sizes 简单模拟,分情况讨论即可。 #include<bits/stdc++.h> #define int long long using namespace std; const int N = 100010; void solv...
2023-05-05
0
290
首页
上一页
1
2
3
4
5
下一页
末页