题解列表
1468: 蓝桥杯基础练习VIP-报时助手
摘要:解题思路:
定义数组存放单词需要时调用输出,详情见代码
具体代码:
```c
#include
void main()
{
int h, m;
scanf("%d%d……
python-数字三角形
摘要:解题思路:参考博客https://www.jianshu.com/p/99e379de3368动态规划。建立一个大小为(n+1)*(n+1)二维数组dp,其中dp[i][j]为从顶点走到到第i行第j列……
信息学奥赛一本通T1173-阶乘和
摘要:from math import factorial as f
n=int(input())
s=0
for i in range(1,n+1):
s+=f(i)
print(s)p……
不同单词个数统计(熟悉一下set函数的用法)
摘要:```cpp
#include
#include
#include
using namespace std;
string str;
int sum=0;
int main()
{
……
[编程入门]自定义函数之字符串连接,简单粗暴,通俗易懂。看一眼就懂
摘要:解题思路:前段时间看到大家对这题有争议,这次我来一无脑解法注意事项:注意把多于的0跳过参考代码:#include<stdio.h>#include<string.h>int main(){ cha……
1002: [编程入门]三个数最大值
摘要:解题思路:用max()函数求两数最大值,三个数最大值的话,使用两次max()就行了。注意事项:题目说要输入数组,但又指明三个数是a,b,c,感觉没表达清楚。参考代码:#include <iostrea……
信息学奥赛一本通T1317-组合的输出(格式错误的看过来!!!)
摘要:看important!!!
```cpp
#include
#include
using namespace std;
int* stack;
int top;
int n, r;
i……
[STL训练]美国大选
摘要:```cpp
#include
using namespace std;
#include
int main(){
int N;
while((cin>>N)&&N!=0){
i……
用c++中string可以避免数据过大
摘要:解题思路:将输入的数据存入字符串类型的对象中,利用该对象自带的数组可以一个一个依次求和,注意将字符型转换为整型,“1”-“0”=1;即减去“0”即可。注意事项:参考代码:#include<iostre……