蓝桥杯算法提高VIP-冒泡排序计数-题解(C++代码)——必看!!!!! ##没事也就超时百分之九十一#嘻嘻嘻```cpp#include#includeusingnamespacestd;intt,n,k;inta[1000010];intb[1000010];intans;voidbuttle(intm){for(inti=1;i 题解列表 2020年04月07日 0 点赞 0 评论 3296 浏览 评分:4.6
C语言训练-角谷猜想-题解(C++代码) 解题思路:输入n,然后while循环当n不为1时判断n的奇偶,分别执行对应的操作,阅读理解题目即可注意事项:输出每句后要对n的值进行更新,输出句和更新句两两要写在一个域内参考代码:/**/#include#include#includeusin 题解列表 2020年08月25日 0 点赞 0 评论 1247 浏览 评分:4.6
错误票据(c++,三种方法实现) 摘要:解题思路:这个输入需要一些技巧,首先,他给的N表示输入多少行,然后每一行到底输入多少个数字我们不知道,这就需要我们去判断输入的结尾是不是换行号,这里提供了一个C++的判断方法:cin.get()==&…… 题解列表 2021年04月15日 0 点赞 1 评论 1482 浏览 评分:4.6
括号序列20202020 #include#include#includeusingnamespacestd;usingLL=longlong;constintN=5005;intf[N][N];constintmod=1e9+7;strings;intn;LLget(){memset(f, 题解列表 2022年02月15日 0 点赞 1 评论 2828 浏览 评分:4.6
这是当时比赛的写的 摘要:解题思路:循环就完了注意事项:参考代码:n=1189m=841a=input()k=int(a[1])while k!=0: l=n//2 n=m m=l k-=1print(…… 题解列表 2022年04月29日 0 点赞 0 评论 1238 浏览 评分:4.6
C语言程序设计教程(第三版)课后习题4.9 (C语言代码) 摘要:#include<stdio.h>int main(){float c,f;printf("华氏温度:");scanf("%f",&f);c=5*(f-32)/9;printf("摄氏温度:%.2f"…… 题解列表 2017年06月28日 20 点赞 18 评论 4703 浏览 评分:4.7
用筛法求之N内的素数。 (C语言代码) 摘要:解题思路:明确一个条件,任何合数都能表示成一系列素数的积。然后利用了每个合数必有一个最小素因子,每个合数仅被它的最小素因子筛去正好一次。所以为线性时间参考代码:#include<stdio.h> i…… 题解列表 2017年08月12日 21 点赞 5 评论 3309 浏览 评分:4.7
2003年秋浙江省计算机等级考试二级C 编程题(1) (C++代码) 解题思路:输入的十个数,用数组来存储。然后定义一个count计数器,作为大于平均数的计数使用。在for循环中每次输入之后都可以将值加和起来,最后求平均值。注意事项:这种程序用C++会让代码更加简洁。参考代码:#includeusingnamespacestd;intmain(){i 题解列表 2017年07月10日 2 点赞 0 评论 2079 浏览 评分:4.7
校门外的树 (C++代码) 摘要:使用数组的时候,数组要大一些才行,定义在主函数外,防止栈溢出 #include<iostream> #include<cstdio> using namespace std; int …… 题解列表 2017年07月27日 1 点赞 0 评论 2299 浏览 评分:4.7
A+B for Input-Output Practice (I) (C++代码) 摘要:解题思路:直接点提交就好了hhhhhhhh注意事项:这还要注意点什么,,大哥,你就别自己改了好吧。。参考代码:#include<iostream> using namespace std; int…… 题解列表 2017年07月28日 3 点赞 5 评论 2432 浏览 评分:4.7