题解列表
编写一函数,由实参传来一个字符串,统计此字符串中字母、数字、空格和其它字符的个数,在主函数中输入字符串以及输出上述结果。 只要结果,别输出什么提示信息。
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void x(char a[], int b[]) { int i, t = 0,j = 0,k =……
数组插入处理,从最后一个往前取值
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[10]; int b,i,k; for(i=0;i<9;i++){ ……
while循环的简单使用
摘要:解题思路:注意事项:参考代码:#include <stdio.h>int x(int n) { int sum = 0; if (n < 2) return 0; while (n……
3060: 合并石子 区间DP
摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h"
using namespace std;
// 定义全局变量n和数组a、dp
int n, a[110], dp[1……