题解列表
C语言思路简单,易懂!!! 理解万岁
摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main (){ int n,t; int a[100]; while (……
等差数列前n项和用数组求
摘要:解题思路:数列的概念与数组十分相似,所以可用数组写注意事项:参考代码:#include<stdio.h>int main(){ int n, i; scanf("%d", &n); ……
报数问题(数组解法)
摘要:解题思路:将数组的元素值赋值为0(即没有被淘汰),被淘汰赋值为1.然后while循环一直循环,打印输出了数据。while里面再来个for循环,一直遍历整个数组通过创建三个变量来记录和修改淘汰的数组元素……
直方图(Java含注释)
摘要:解题思路:注意事项:参考代码:import java.util.Arrays;import java.util.Scanner;public class Test2909 { public st……
STL list实现合并 ,排序;insert实现合并
摘要:```cpp
#include
#include
using namespace std;
struct node{ //定义结构体,用来存储数据
int id;
int score;……
校门外的树(设一数组,长度为L,数组元素值全为1,表示树在,为0时树被移走了,统计元素值为1的元素数,就为剩下的树)
摘要:解题思路:把数组元0素序看作数轴,变化其上的元素,判断树是否在注意事项:参考代码:#include<stdio.h>
int main()
{
int l,m;
scanf("%d%d",……
设置三个变量即可无需数组
摘要:```java
import java.util.Scanner;
public class Main {
public static void main(String[] args)……