C语言-新手-写的太复杂了 摘要:参考代码:#include<stdio.h>#include<string.h>#include<math.h>int Pn(int num){ int k=1; for(int i=1;…… 题解列表 2024年03月04日 0 点赞 0 评论 321 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-飞机降落(dfs) 摘要:``` #include using namespace std; const int N=20; //进行dfs,把每一种可能发生的情况都列出 int n; bool f[N]={0}…… 题解列表 2024年03月04日 0 点赞 0 评论 396 浏览 评分:6.0
C语言新手-写的有点乱 摘要:参考代码:#include<stdio.h>int fun(int a[],int N,int sum){ int b[N],c[N],flag = 1; for(int z=0;z<N;…… 题解列表 2024年03月04日 0 点赞 0 评论 252 浏览 评分:0.0
自定义函数之数字分离 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main() { int n = 0; int qian = 1000; int hou = 1000; scanf_s("%d…… 题解列表 2024年03月04日 0 点赞 0 评论 167 浏览 评分:0.0
高效素数判断方法以及取模公式 摘要:解题思路:本体采用的取模公式为a*b%c=((a%c)*(b%c))%c,求前n个质数的积对于50000的模,就相当于每一次与质数相乘后对于50000取模,然后再与下一个质数相乘,再取模,相乘取模的步…… 题解列表 2024年03月04日 0 点赞 0 评论 383 浏览 评分:9.9
一元多项式加法: C++ 面向对象(基于stringstream流的输入、运算符重载) 摘要: [原题链接](https://www.dotcpp.com/oj/problem1679.html "原题链接") ###### 一、输入 采用stringstream流解决输入死循环问题…… 题解列表 2024年03月04日 0 点赞 0 评论 271 浏览 评分:9.9
蓝桥杯算法训练VIP-传球游戏-题解(c++代码)(dfs + 剪枝) 摘要:解题思路:由于每次传递都只能向左右传递一个单位,所以我们可以根据此特性画出下图所示二叉树(从0开始传递,一共3人传递3次)。接下来我们可以用dfs找出值为0的叶子结点数(即为球传递回0的次数),最后再…… 题解列表 2024年03月03日 0 点赞 0 评论 320 浏览 评分:9.9
去掉余数为2的数即可 摘要:关键在于,如何判断某个数是不是平方差 ```c++ #include using namespace std; bool function(int x) { bool res =…… 题解列表 2024年03月03日 0 点赞 0 评论 263 浏览 评分:0.0
找规律找规律 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,m; cin >> n >> m; int a[…… 题解列表 2024年03月03日 0 点赞 0 评论 237 浏览 评分:0.0
3009: 判断闰年 摘要:解题思路:闰年两种判定方法:要么能被4整除且不能被100整除,或者能被400整除可得参考代码:#include<iostream> using namespace std; int main()…… 题解列表 2024年03月03日 0 点赞 0 评论 293 浏览 评分:0.0