夜语声烦-
夜语声烦-
全部文章
分类
题解(33)
归档
标签
去牛客网
登录
/
注册
夜语声烦-的博客
全部文章
(共35篇)
题解 | #区间和#
区间和 结构体 #include <iostream> using namespace std; const int N = 1e6 + 10; typedef long long LL; struct Node { int l, r; LL sum; }tr[N ...
C++
2022-08-07
0
420
题解 | #[ZJOI2007]矩阵游戏#
[ZJOI2007]矩阵游戏 #include <iostream> #include <cstring> using namespace std; const int N = 210; int n; bool g[N][N], st[N]; int match[N];...
C++
2022-08-01
0
364
题解 | #数据结构#
题目数据太水了也,pushdown写错也能过,pushdown按理来说应该先乘后加的,没想到先加后乘居然也能过,贴一组样例 他人提交里面的代码慎用,有些连我这组样例都过不去,不要拿过来就用 5 6 1 2 3 4 5 1 1 5 2 1 5 3 1 5 2 4 1 5 2 1 1 4 2 2 3 ...
C++
2022-07-15
4
416
题解 | #「木」迷雾森林#
迷雾森林 #include <iostream> #include <cstring> using namespace std; const int N = 3010, mod = 2333; int n, m; int a[N][N], f[N][N]; templ...
C++
2022-06-12
1
342
题解 | #B-旅行#
旅行 思路: 每次选一个点作为中间点,然后跑一边单源最短路,记录距离最远的两个点的距离和,答案就是最大的和,注意多组测试数据的初始化,直接套模板 #include <iostream> #include <cstring> #include <queue> #in...
C++
2022-06-12
2
466
题解 | #吐泡泡#
吐泡泡 #include <iostream> #include <algorithm> #include <cstring> #include <stack> using namespace std; char a[110]; stack<...
C++
2022-06-11
2
428
题解 | #Prime Ring Problem#
Prime Ring Problem #include <iostream> #include <cstring> using namespace std; int n, a[20]; bool st[20]; int cnt; bool isprime(int x) ...
2022-06-06
1
308
题解 | #Division#
Division 直接暴力枚举然后判断是否符合题目要求 #include <iostream> #include <cstring> using namespace std; bool st[10]; bool check(int x, int y) { //两...
C++
2022-06-05
0
349
题解 | #[SDOI2008]仪仗队#
[SDOI2008]仪仗队 #include <iostream> using namespace std; const int N = 40010; int primes[N], phi[N], cnt; int n; bool st[N]; int get_eulers(in...
C++
2022-05-15
1
348
题解 | #四舍五入#
四舍五入 思路及注意点: 只需要找到小数点后第一个>=5的数,从他开始进位就是。例如1.56789 ,直接从5开始进位变成1.6就行了,后面不管有多少>=5的数,全都变成0了,没法也没必要再进位了,而且还能满足四舍五入完是最大数的要求 会有直接是整数的情况 只能在小数点后四舍五入,不能...
C++
2022-05-14
15
890
首页
上一页
1
2
3
4
下一页
末页