C++暴力破解,无废话 摘要:解题思路:按照要求编写即可注意事项:字符串与数字的转化参考代码:#include<bits/stdc++.h>using namespace std;bool fun(int n,int m){ st…… 题解列表 2022年04月06日 0 点赞 0 评论 1157 浏览 评分:5.7
蓝桥杯算法提高VIP-夺宝奇兵(C语言,动态规划) 思路,动态规划#includeinta[101][101]={0},b[105]={0};intswap(inta,intb){returna>b?a:b;}intmain(){intn,i,j;scanf("%d",&n);for(i=0;i 题解列表 2022年04月06日 1 点赞 0 评论 606 浏览 评分:0.0
题目化解+操作数函数+赋初值与输入输出解释 摘要:题目简化:1.对于n ,如果n是偶数,则除以2 ;如果n是奇数,乘以3再加1 。这会产生 从n到1的 操作次数。(如n=1时,操作次数为1 ,即 有1个数) 2.对于 每一对输入的整数i和j , 要…… 题解列表 2022年04月06日 0 点赞 0 评论 643 浏览 评分:9.9
超简短代码 摘要:解题思路:注意事项:参考代码:while True: a,b=map(int,input().split()) print(a+b) print()…… 题解列表 2022年04月06日 0 点赞 0 评论 600 浏览 评分:0.0
模拟双指针 (代码简洁) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<algorithm>int main(){ int a=0,b=9;/…… 题解列表 2022年04月06日 0 点赞 0 评论 520 浏览 评分:0.0
带限制条件的分组背包 ```C++#include#include/*思路:首先尝试将问题简化,如果去掉等级这一限制,那么所有的装饰孔可以合并成一个体积为V的背包,对于下面m组t个物品,我们只选择每组中的一个,求最大价值。很明显,一旦去掉等级的制约后,这是一个经典的分组背包问题, 题解列表 2022年04月06日 0 点赞 0 评论 881 浏览 评分:5.1
while循环的持续输入 解题思路:注意事项:参考代码:whileTrue:a,b=map(int,input().split())print(a+b) 题解列表 2022年04月06日 0 点赞 0 评论 595 浏览 评分:9.9
注意换行和列表清空 摘要:解题思路:注意事项:参考代码:while True: a=list(map(int,input().split())) a=a[1:] b=sorted(a,reverse=True…… 题解列表 2022年04月06日 0 点赞 0 评论 651 浏览 评分:0.0
列表的循环输入,利用列表切片和求和 摘要:解题思路:注意事项:参考代码:while True: a=list(map(int,input().split())) a=a[1:] for i in a: xx=a…… 题解列表 2022年04月06日 0 点赞 0 评论 707 浏览 评分:0.0
字符串的循环输出以及注意换行 摘要:解题思路:注意事项:参考代码:while True: a=int(input()) b=' ' c='*' for i in range(1,a…… 题解列表 2022年04月06日 0 点赞 0 评论 662 浏览 评分:0.0