1575: 蓝桥杯算法提高VIP-递归倒置字符数组 摘要:解题思路:注意事项:参考代码:#include <stdio.h> void digui(char *str, int m, int n) { if(n <= m) {…… 题解列表 2022年04月18日 0 点赞 0 评论 413 浏览 评分:0.0
编写题解 1265: 青年歌手大奖赛_评委会打分 摘要:解题思路:利用STL中deque容器,(双端数组)。方便头删尾删。注意事项:记得每一次输出完清空容器。参考代码:#include<iostream>using namespace std;#inclu…… 题解列表 2022年04月18日 0 点赞 0 评论 709 浏览 评分:9.9
因式分解,数学是算法的基石,学好数理化,走遍天下都不怕 摘要:解题思路:用初中所学知识因式分解来做,如果按正常for循环暴力累乘的话肯定会超时注意事项:数据范围给的是20万,注意不要开小了参考代码:#include <iostream> using names…… 题解列表 2022年04月18日 0 点赞 2 评论 2072 浏览 评分:9.9
只会暴力,在cmd窗口输入calc调出计算器一个一个算 摘要:#include <iostream> using namespace std; int main() { string s; cin>>s; if(s[1]==&…… 题解列表 2022年04月18日 0 点赞 0 评论 930 浏览 评分:8.0
编写题解 1477: 字符串输入输出函数 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<string>void printnum(){ cout<<"plea…… 题解列表 2022年04月18日 0 点赞 0 评论 489 浏览 评分:0.0
编写题解 1402: 简单的字符串 摘要:解题思路:字符数组用来作比较,数组用来计数。记得加判断注意事项:参考代码:#include<iostream>using namespace std;#include<string>int main(…… 题解列表 2022年04月18日 0 点赞 0 评论 582 浏览 评分:0.0
同因查找-while循环(C语言代码) 摘要:解题思路:while循环,从10开始到1000,依次输出符合值。注意事项:范围大小(10-1000)参考代码:#include<stdio.h>int main(){ int n=10; scanf(…… 题解列表 2022年04月18日 0 点赞 0 评论 978 浏览 评分:9.9
优质题解 C语言训练-委派任务* 数学解法,只写一层for循环 摘要:## 解题思路 0代表不去,1代表去,2代表未知,读题可知,这是逻辑题。虽然用6层循环可以暴力破解,但是不够炫酷。(这如何体现数学之美呢)。用不等式表示为 ``` a + b >= 1 a +…… 题解列表 2022年04月18日 1 点赞 1 评论 1234 浏览 评分:8.0
自定义函数处理素数 摘要:解题思路:素数是只能被1和自身整除的数注意事项:i要小于a参考代码:#include<stdio.h>void prime(int a) { int count = 0; if (a < …… 题解列表 2022年04月17日 0 点赞 0 评论 560 浏览 评分:0.0
编写题解 1023: [编程入门]选择排序-利用STL内置的算法 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<vector>#include<algorithm>void print(v…… 题解列表 2022年04月17日 0 点赞 0 评论 524 浏览 评分:0.0