题解列表
因数平方和(数论分块+数学式子推导)
摘要:~~~
#include
using namespace std;
const int mod=1e9+7;
typedef long long ll;
int n;
ll qmin(ll……
自定义函数之数字分离(这样也行)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char arr[5]; gets(arr); int n = strlen……
自定义函数之字符串反转(除了hellow word 外简单的代码)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[100]; gets(str); int n = strl……
2805: 乘方计算 快速幂方法
摘要:解题思路: 快速幂注意事项:参考代码:#include <iostream>
// #include <sstream>
#include <cstdio>
// #include <algor……
2808: 买房子 (中关村怎么可能有这么便宜的房子)
摘要:解题思路:注意事项:参考代码:#include <iostream>
// #include <sstream>
#include <cstdio>
// #include <algorithm……
C语言训练-"水仙花数"问题1 简单解法
摘要:解题思路: 一 if else嵌套使用 二 明确求输入数字的各个位数上的数字的方法: 1.结合整形数据类型与除法求特定位数上的数字 ……
2128: 信息学奥赛一本通T1264-合唱队形
摘要:解题思路:运用动态规划解此题!!!注意事项:参考代码:#include<bits/stdc++.h>
using namespace std;
int a[1005],b[1005],c[1005……
1334: [NOIP2004]合唱队形
摘要:解题思路:这道题其实就是从前和从后来求两个不下降序列。
b[i]:从第i个数开始的最长不下降序列
c[i]:从第i个数结束的最长不下降序列
类似与登山。注意事项:注意>号和<号!参考代码:#in……
编写题解 1025: [编程入门]数组插入处理 -- 冒泡排序原理
摘要:解题思路:运用冒泡排序的原理,将插入的数据,与排好顺序的数组,依次比大小。
```c
#include
int main(void)
{
int a[10]; //插入数据后的数组长度。……