1099校门外的树(数组解决) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int m;//马路长度 int n;//组数 cin >> m >>…… 题解列表 2024年05月31日 0 点赞 0 评论 711 浏览 评分:0.0
1098陶陶摘苹果(for循环遍历解决) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[15];//存苹果高度 int b;//存陶陶的高度 in…… 题解列表 2024年05月31日 0 点赞 0 评论 658 浏览 评分:0.0
1096扫雷(构建两个数组,for循环遍历实现) 解题思路:注意事项:参考代码:#include#includeusingnamespacestd;intmain(){intm,n;intk=1;//后面输出第几组数据用的while((cin>>m>>n)){if(m==0&&n==0)//跳出循环break;chars[100][100];//存地 题解列表 2024年05月31日 0 点赞 0 评论 532 浏览 评分:0.0
全网最简单思路,简单代码+排序相除即可 解题思路:首先求等比数列最大比例,题目会给出一个等比数列的子序列。1、先从大到小排序,然后计算每一项与后一项的比例,取最小的比例就是题目要求的了。证明很简单,任意项之间的比值都为q^x,只要找到都能满足的公比即可。注意事项:需要去重,奖金可能会重复参考代码:#include 题解列表 2024年05月31日 0 点赞 0 评论 627 浏览 评分:6.0 为何正确率如此低? ```cpp#includeusingnamespacestd;constintN=1e6+10;inta[N];intk,n;voiddfs(intx){if(a[x-2]&&a[x-1]){a[x]=(2*a[x-1]+a[x-2])%32767;return;}dfs(x-1);a[x]=(2* 题解列表 2024年05月30日 0 点赞 0 评论 673 浏览 评分:0.0 编写题解 1022: [编程入门]筛选N以内的素数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool qsh(int n) { for(int i=2;i<n;i++) {…… 题解列表 2024年05月30日 0 点赞 0 评论 721 浏览 评分:0.0 编写题解 2832: 第n小的质数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool zs(int n){ for(int i=2;i<n/2+1;i++) {…… 题解列表 2024年05月30日 0 点赞 0 评论 502 浏览 评分:0.0 BFS模版题(很模版) ```cpp#includeusingnamespacestd;typedefpairPII;constintN=1000;intn,end_day;charroom[N][N];queueq1;queueq2;intans;intX[]={0, 题解列表 2024年05月30日 0 点赞 0 评论 637 浏览 评分:0.0 BFS最短路+超简单思路+清晰代码 摘要:解题思路:求最优路径一般考虑bfs,直接使用队列。队列中元素使用pair,因为还需要记录步数。就是简单入队出队的遍历。注意事项:参考代码:#include <bits/stdc++.h> using…… 题解列表 2024年05月28日 1 点赞 0 评论 629 浏览 评分:9.9 编写题解 2817: 级数求和 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){int k,i=1;double s=0;cin>>k;whi…… 题解列表 2024年05月27日 1 点赞 0 评论 526 浏览 评分:8.0 « 12...190191192193194195196...16501651 »
为何正确率如此低? ```cpp#includeusingnamespacestd;constintN=1e6+10;inta[N];intk,n;voiddfs(intx){if(a[x-2]&&a[x-1]){a[x]=(2*a[x-1]+a[x-2])%32767;return;}dfs(x-1);a[x]=(2* 题解列表 2024年05月30日 0 点赞 0 评论 673 浏览 评分:0.0
编写题解 1022: [编程入门]筛选N以内的素数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool qsh(int n) { for(int i=2;i<n;i++) {…… 题解列表 2024年05月30日 0 点赞 0 评论 721 浏览 评分:0.0
编写题解 2832: 第n小的质数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool zs(int n){ for(int i=2;i<n/2+1;i++) {…… 题解列表 2024年05月30日 0 点赞 0 评论 502 浏览 评分:0.0
BFS模版题(很模版) ```cpp#includeusingnamespacestd;typedefpairPII;constintN=1000;intn,end_day;charroom[N][N];queueq1;queueq2;intans;intX[]={0, 题解列表 2024年05月30日 0 点赞 0 评论 637 浏览 评分:0.0
BFS最短路+超简单思路+清晰代码 摘要:解题思路:求最优路径一般考虑bfs,直接使用队列。队列中元素使用pair,因为还需要记录步数。就是简单入队出队的遍历。注意事项:参考代码:#include <bits/stdc++.h> using…… 题解列表 2024年05月28日 1 点赞 0 评论 629 浏览 评分:9.9
编写题解 2817: 级数求和 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){int k,i=1;double s=0;cin>>k;whi…… 题解列表 2024年05月27日 1 点赞 0 评论 526 浏览 评分:8.0