3009: 判断闰年 摘要:解题思路:闰年两种判定方法:要么能被4整除且不能被100整除,或者能被400整除可得参考代码:#include<iostream> using namespace std; int main() …… 题解列表 2024年03月03日 0 点赞 0 评论 395 浏览 评分:0.0
快速排序(C++) 摘要:#include<iostream> using namespace std; int arr[100000]; int getpivot(int left, int right) { i…… 题解列表 2024年03月03日 0 点赞 0 评论 461 浏览 评分:9.9
复习排序(本题用最后一种方法,前几个也可以) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin >> n; int a[n],i=-1…… 题解列表 2024年03月03日 0 点赞 0 评论 249 浏览 评分:0.0
归并排序(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; const int N = 1e5 + 10; int arr[N],tmp[N],…… 题解列表 2024年03月03日 0 点赞 0 评论 525 浏览 评分:6.0
信息学奥赛一本通T1260-拦截导弹-动态规划 摘要:```cpp #include #include using namespace std; int a[1005],b[1005],dp1[1005],dp2[1005],n; void L…… 题解列表 2024年03月03日 0 点赞 0 评论 278 浏览 评分:0.0
累了,休息会 摘要:解题思路:注意事项:参考代码: #include<bits/stdc++.h> using nam…… 题解列表 2024年03月03日 0 点赞 0 评论 342 浏览 评分:9.9
愤怒的牛,二分解法 摘要:# 题目 2346: 信息学奥赛一本通T1433-愤怒的牛 **农夫 John 建造了一座很长的畜栏,它包括N(2≤N≤100,000)个隔间,这些小隔间依次编号为x1,...,xN(0≤xi≤…… 题解列表 2024年03月03日 0 点赞 0 评论 710 浏览 评分:9.5
三国游戏-简单易看懂 摘要:解题思路:将胜国每个事件发生时相对于其他两国的兵力增量记录并排序,只要他的事件增量大于0,那么这个事件就可以发生,最后从三个国家获胜情况中找到最大的事件数即可注意事项:参考代码:#include<bi…… 题解列表 2024年03月03日 2 点赞 0 评论 957 浏览 评分:9.3
绝对值排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool cmp(int a,int b){ return abs(a)>ab…… 题解列表 2024年03月03日 0 点赞 0 评论 266 浏览 评分:0.0
飞机降落-详细注释易看懂(暴力枚举) 摘要:解题思路:n限制小,选择暴力枚举,找到降落顺序,详细注释注意事项:参考代码:#include using namespace std; const int N = 10+20; struct pl…… 题解列表 2024年03月03日 0 点赞 2 评论 1207 浏览 评分:8.5