题解列表
数组插入处理,从最后一个往前取值
摘要:解题思路:注意事项:参考代码:#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……
利用等比数列前n项和公式来解决问题
摘要:解题思路:利用等比数列前n项和公式注意事项:该等比数列的项数为n-1个项参考代码:#include <stdio.h>#include <math.h>int main(){ double ti……