题解列表

筛选

趣味儿童与人格不好

摘要:解题思路:无注意事项:无参考代码:b=input()b=int(b)e=0for i in range(2,b):    if b%i==0:        e=1        breakif e=……

1171蟠桃记(两个while循环)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; while (cin >> n) { int m = ……

1170能量项链(dp动态规划)

摘要:解题思路:看到最大值,就想到最优解,想到最优解就想到动态规划。将大问题分成一个个小问题来看。先求两个球能得到的能量,再求三个球时,四个球时,第一步,要得到两个球的能量,我们就需要三个数,这是第一层循环……

用VS来写链表求和

摘要:解题思路:注意事项:参考代码:#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <malloc.h>typedef struct _n……

1177三角形(经典的树塔问题)

摘要:解题思路:从下往上寻找最大值,可以说是递推的入门题注意事项:参考代码:#include<iostream>using namespace std;int main(){ int T; cin >> T……

1178三进制小数

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int fenzi; int fenmu; double sum; w……

2950: 素数回文数的个数

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;ll prime (ll x){    ……