题解列表

筛选

C++函数重载练习

摘要:# C++ 函数重载 > 重载`Compare`函数 ```c++ int Compare(int a, int b) { return a > b ? a : b; } int……

[STL训练]sort练习

摘要:# STL sort ## 头文件 ```c++ #include ``` # 完整代码 ```c++ #include #include #include int mai……

题目 1303: 统计数字题解

摘要:参考代码:#include<iostream> #include<algorithm> using namespace std; int a[500001],n,ans=1; int main……

规律的数列求和

摘要:解题思路:利用malloc函数动态分配内存将类似于斐波那契数列数列存储在两个动态数组内再利用一个动态数组来接收注意事项:使用malloc函数最后要free()参考代码:/*题目 1018: [编程入门……

最简单的思路

摘要:#include<stdio.h> int main(){ char c; int sum = 0; while(scanf("%c",&c)){    ……