信息学奥赛一本通T1267-01背包问题(动态规划) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int w[31];int c[31];int dp[201] = {0};int main(…… 题解列表 2022年07月31日 0 点赞 0 评论 401 浏览 评分:0.0
编写题解 1073: 弟弟的作业 摘要:#include<iostream>using namespace std;int main(){ string st;int a=0,b=0,c=0;bool k=false,f=false;…… 题解列表 2022年07月31日 0 点赞 0 评论 409 浏览 评分:9.9
数的统计——python实现 摘要:# 数的统计——python实现 我们输入的实际是一个字符串,只要用`split()`方法就可以将他变成一个含有所有数字的列表,所以输入的第一行并没有用,直接用input()把它忽略就行。 ```…… 题解列表 2022年07月31日 0 点赞 0 评论 408 浏览 评分:9.9
不知道为什么用python有一组数据n=12不通过,求大佬教教 摘要:解题思路:注意事项:参考代码:n = int(input())t = 0for i in range(1, n + 1): t += 1 / iprint("%.6f"%t)…… 题解列表 2022年07月31日 0 点赞 2 评论 530 浏览 评分:0.0
十进制转八进制(递归解法) 摘要:解题思路:递归注意事项:参考代码:#include <stdio.h>void f(int n){ int r; r = n % 8; if(n >= 8) …… 题解列表 2022年07月31日 0 点赞 0 评论 415 浏览 评分:0.0
公约公倍(辗转相除法) 摘要:解题思路:最大公约数用辗转相除,最小公倍数为两数之积除以最小公倍数注意事项:参考代码:#include<stdio.h>int a(int m,int n){ return (m%n==0)?n…… 题解列表 2022年07月31日 0 点赞 0 评论 260 浏览 评分:0.0
信息学奥赛一本通T1422-活动安排(贪心算法) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct Node{ int x, y;}I[1005];int cmp(…… 题解列表 2022年07月31日 0 点赞 0 评论 789 浏览 评分:2.0
[编程入门]三个字符串的排序:不断strcpy 摘要:解题思路:类比a,b,c三个数比较大小注意事项:字符串内置函数的使用方法参考代码:#include<stdio.h>#include<string.h>int main(){ char a[100],…… 题解列表 2022年07月31日 0 点赞 0 评论 388 浏览 评分:0.0
题解 1125: C语言训练-委派任务* 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(void){ int i; int a[6]={0}; for(a[0]=0;a[0]<2;a[0]++) for(…… 题解列表 2022年07月31日 0 点赞 0 评论 322 浏览 评分:0.0
信息学奥赛一本通T1582-周年纪念晚会(树形DP) 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <vector>using namespace std; const int MAXN = 6010;int dp…… 题解列表 2022年07月31日 0 点赞 0 评论 377 浏览 评分:9.9