题解列表

筛选

淘淘摘苹果

摘要:解题思路:注意事项:参考代码:apple=list(map(int,input().split()))high=eval(input())high_all=high+30n=0for i in ran……

C语言训练-求素数问题:线性筛

摘要:解题思路: 欧拉筛注意事项:数组范围要大于数据范围参考代码:#include<iostream> #include<cmath> using namespace std; const int N……

C语言训练-自守数问题

摘要:解题思路:字符串注意事项:数位与空格参考代码:#include<iostream> #include<cmath> #include<string> using namespace std; ……

明明的随机数C++,使用vector函数

摘要:解题思路:利用vector容器设置数组先去重在排序,使用选择排序参考代码:#include<iostream>#include<vector>using namespace std;//选择排序voi……

python语言训练-求PI*

摘要:解题思路:    注意绝对值小于10^-6是某一项的,但是就是正负符号参考代码:pi = 1.0 i = 3.0 c = 1 while True:     if 1 / i < 0.0000……

编写题解 1103: 开心的金明

摘要:解题思路:背包问题、vector、动态规划dp注意事项:参考代码:#include<iostream>#include<vector>#include<algorithm>using namespac……

十分简单,一看就会

摘要:参考代码:#include<stdio.h>int main(){ int n,k=0; int num,a[100]; scanf("%d",&n); for(int i=1;i<n;i++){ ……