编写题解 2796: 求整数的和与均值 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std;int main(){ long long n,sum=0;cin>>n; for…… 题解列表 2024年12月22日 1 点赞 0 评论 662 浏览 评分:0.0
编写题解 2798: 整数序列的元素最大跨度值 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long n,maxx=-1e18,minn…… 题解列表 2024年12月22日 0 点赞 0 评论 673 浏览 评分:0.0
树型dp #2484: 信息学奥赛一本通T1579-皇宫看守(c++) 不是很详细.. ```#include#include#includeusingnamespacestd;constintN=1510;intn;inth[N],w[N],e[N],ne[N],idx;intf[N][3];boolst[N];voidadd(inta, 题解列表 2024年12月22日 0 点赞 0 评论 575 浏览 评分:0.0
2798: 整数序列的元素最大跨度值题解 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,maxx= -1e18 ,minn=1e…… 题解列表 2024年12月22日 3 点赞 0 评论 505 浏览 评分:10.0
编写题解 2799: 奥运奖牌计数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std;int main(){ long long n,a=0,b=0,c=0;int j…… 题解列表 2024年12月22日 1 点赞 0 评论 532 浏览 评分:0.0
编写题解 2787: 有一门课不及格的学生 摘要:解题思路:两个恰好有一个,联想到异或门,当两变量不同时为一,相同时为零注意事项:参考代码:a,b=map(int,input().strip().split())if (a>=60)^(b>=60)=…… 题解列表 2024年12月22日 0 点赞 0 评论 515 浏览 评分:0.0
1019运用递归的思想,简直easy。 摘要:解题思路:运用递归的思想,简直easy。注意事项:参考代码:#include<stdio.h>double luodi(double m ,double n){ if(n==1) return…… 题解列表 2024年12月22日 4 点赞 0 评论 1091 浏览 评分:0.0
山峰和山谷 dfs ```cpp#includeusingnamespacestd;//定义一个pair类型的别名PII,方便表示二维坐标等成对的数据typedefpairPII;//定义宏,方便后续直接通过x来访问pair类型对象的第一个成员#definexfirst//定义宏, 题解列表 2024年12月22日 1 点赞 0 评论 554 浏览 评分:10.0
2911: 连续出现的字符 解题思路:用itertools.groupby来查找字符串中连续出现的字符就好啦注意事项:参考代码:fromitertoolsimportgroupbyk=int(input())s=input()forchr,groupingroupby(s):count=len(list(group))ifcou 题解列表 2024年12月22日 1 点赞 0 评论 638 浏览 评分:10.0
我的野心很大 所以我没资格停止 摘要:解题思路: 树状DP 啊啊啊 好难注意事项:参考代码:#include"bits/stdc++.h" using namespace std;…… 题解列表 2024年12月23日 0 点赞 0 评论 399 浏览 评分:0.0