2901: 查找特定的值 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>typedef long long ll;const int N=1e7;ll a[N];using namespace s…… 题解列表 2024年04月20日 0 点赞 0 评论 204 浏览 评分:2.0
代码没有按照我预想的运行,却通过了所有测试用例 摘要: 预想的思路:先用差分把所有区间加上1,然后再用前缀和得到原数组,同时记录一个1的出现数量的前缀和数组preOne和0的出现次数的前缀和数组preZero,最后0的总数+不选择的区间的1的个数(因为…… 题解列表 2024年04月24日 0 点赞 0 评论 548 浏览 评分:2.0
2821: 开关灯 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>typedef long long ll;const int N=1e7;using namespace std;int …… 题解列表 2024年04月27日 1 点赞 0 评论 258 浏览 评分:2.0
1099: 校门外的树 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>typedef long long ll;const int N=1e7;using namespace std;int …… 题解列表 2024年04月27日 0 点赞 0 评论 209 浏览 评分:2.0
1071阶乘公式求值(一个for循环解决) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); double m=1; double sum=0; for(int…… 题解列表 2024年05月25日 0 点赞 0 评论 391 浏览 评分:2.0
无聊的星期六 摘要:n=list(map(int,input().split())) tmp=n[n.index(max(n))] n[n.index(max(n))]=n[9] n[9]=tmp tmp=n[n…… 题解列表 2024年05月25日 1 点赞 0 评论 424 浏览 评分:2.0
找规律,凑组合 摘要:解题思路: 找规律注意事项: 假后面只能更假假或真真,真后面只能更真假或假真可能的组合有「假,假,假」「真,真,假」「真,假,真」「假,真,真」参考代码:#include<stdio.h> lo…… 题解列表 2024年05月30日 1 点赞 0 评论 400 浏览 评分:2.0
2799 奥运奖牌计数 摘要:解题思路: #include <bits/stdc++.h> using namespace std; int main() { int n,sum1=0, sum…… 题解列表 2024年06月16日 0 点赞 0 评论 280 浏览 评分:2.0
傻瓜式解决方法 摘要:倒序输出的思路可以从数字类比/图形输出类比就是要将一个过程拆成正反过程 这里类比就是改变循环条件,将循环倒过来 #include #include int main() { i…… 题解列表 2024年06月18日 0 点赞 0 评论 415 浏览 评分:2.0
球弹跳高度 摘要:解题思路:累加高度注意事项:参考代码:h=int(input())m=hfor i in range(10): m=m+h h=h/2print('%g'%m)print(…… 题解列表 2024年07月09日 0 点赞 0 评论 283 浏览 评分:2.0