题解列表
用指针保存,不需要数组
摘要:#include<stdio.h>
#include<string.h>
int main(){
int state = 0;
int i = 0;
……
这个数据给的奇葩,不能再一个循环中同时找最大最小值
摘要:注意事项: 最大值的下标不能提前设置为arr[0],要在找最大值是再定义.#include<stdio.h>
#include<string.h>
int main(){
……
针对多个字符串比较,而不仅仅是三个
摘要:#include<stdio.h>
#include<string.h>
int main(){
char arr[50][50] = { '\0' };
……
排列-java(潮汕人做法)
摘要:解题思路:1.老爷保号!2.解题的关键在于如何得到每个四位数并存放,题目中已经有限制:四位数字只能产生24个四位数,所以定义一个长度为24的数组num来存放四位数,再定义一个长度为4的数组s来存放四个……
优秀的拆分,方法都会,注意细节即可,考察递归思想
摘要:解题思路: 一般来说,一个正整数可以拆分成若干个正整数的和。例如,1 = 1,10 = 1 + 2 + 3 + 4 等。 对于正整数 n 的一种特定拆分,我们称它为“优秀的”,当且仅当……
迭代法求平方根C语言
摘要:#include<stdio.h>#include<math.h>int main(){long int n;int i=0;scanf("%ld",&n);double a[1000];a[0]=(……
蓝桥杯算法提高VIP-淘淘的名单 超简单
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ string s; int N; cin>>N; ……