题解列表

筛选

元素最大跨度值 用到了max min for循环

摘要:解题思路:注意事项:题目描述给定一个长度为n的非负整数序列,请计算序列的最大跨度值(最大跨度值 = 最大值减去最小值)。输入格式一共2行,第一行为序列的个数n(1 <= n <= 1000),第二行为……

用小学生思路解决此题

摘要:解题思路:枚举注意事项:参考代码:#include<stdio.h>int main(){ int a[10];int i=0,m=1;while(m){    scanf("%d",&a[i]); ……

2771: 大象喝水(简单)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define PI 3.14159int main(){    int r,h;    double sum=0,num=0;    ……

多种方法,不使用数组也行

摘要:有多种解法,可以先排序,然后直接首尾相减 ```c #include #include int cmp(const void *a,const void *b){ return ……

高精度加法

摘要:#include"bits/stdc++.h" using namespace std; int main(){     string a1,a2;     int b1[20000],b2[……

高精度减法

摘要:#include"bits/stdc++.h" using namespace std; int main(){     string s1,s2;     int a1[1000]={0},……

2858: 整理药名

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main() {    char a[100][100]; // 定义一个二维数组来存储……