smartiphone
smartiphone
全部文章
分类
题解(6)
归档
标签
去牛客网
登录
/
注册
smartiphone的博客
全部文章
(共21篇)
题解 | 小sun的假期
最开始没看内存限制,写了朴素差分 #include<bits/stdc++.h> #define endl '\n' using namespace std; int main() { int n,m;cin >> n >> m; vector&...
2025-11-27
0
7
题解 | 小红杀怪
#include<bits/stdc++.h> using namespace std; int main() { cin.tie(nullptr)->sync_with_stdio(false); int a,b,x,y; cin >> a ...
2025-11-26
0
9
题解 | 圆与三角形
#include <cstdio> int main() { double r;scanf("%lf",&r); printf("%.2lf",r+1); return 0; } 题目太奇怪了,感觉像是硬凑出来的首先...
2025-11-25
0
7
题解 | #小红的踏前斩#
#include<bits/stdc++.h> #define endl '\n' #define int long long using namespace std; void solve(){ int n;cin>>n; vector<int> a(n+1...
C++
贪心
2025-11-24
0
9
题解 | #旅游#
本道题算是最小生成树的变种吧,写的不是非常熟练,特别是并查集,太少写了,所以犯下了很多低级错误 #include<bits/stdc++.h> #define endl '\n' using namespace std; using ll = long long; class unit...
2025-11-19
0
19
题解 | 奶牛排排站
#include<bits/stdc++.h> #define endl '\n' using namespace std; using ll = long long; class bit { int n; vector<int> tree; public...
2025-11-18
0
17
题解 | #收集纸片#
#include<bits/stdc++.h> #define INF 0x7fffffff #define endl '\n' using namespace std; using pii = pair<int,int>; const int maxn = 11; int ...
2025-11-17
0
17
题解 | #Capoo's Acronym Zero#
J-agKc的火山旅梦_“艾迪-东软杯”第六届武汉理工大学新生程序设计竞赛 题目传送门 看到本题的时候,第一时间想到了区间查询和区间修改的二维树状数组,很明显,这样下去要变成火箭猫猫虫了(*゚∀゚*) 最后,还是在agKc学长的指导下,AC了本题 #include<bit...
C++
2025-11-09
0
19
题解 | #Capoo's Acronym Zero#
https://ac.nowcoder.com/acm/contest/69408/L Dormitory Number 新生赛好难,水一篇题解 首先三角形有一个特性——三条边不共点,所以我们只要在所有边中选3条,再减去共点的情况就好了 #include<bits/stdc++.h> ...
C++
组合数学
2025-11-07
0
21
题解 | #Capoo's Acronym Zero#
https://ac.nowcoder.com/acm/contest/69408/C 萌萌的玫瑰 题目传送门 因为老登不写题解,所以25届小凳来补一篇 数据预处理 最开始,很容易发现,选择负数的美丽贡献度是没有意义的,因为这会使得结果一定小于0,不如选...
C++
贪心
线段树
2025-11-06
0
18
首页
上一页
1
2
3
下一页
末页