信息学奥赛一本通T1270-混合背包 摘要:解题思路:转化为完全背包, 当数量不限时,数量为背包容量除以物品体积注意事项:滚动数组优化, j 从m 到 w[i]参考代码:#include<iostream> #include<algorith…… 题解列表 2024年04月19日 0 点赞 0 评论 587 浏览 评分:9.9
LETTEARS(走路径) ```cpp#includeusingnamespacestd;#defineendl'\n'#defineintlonglongconstintN=25;chara[N][N];intn,m,max_s=0;unordered_mapg;intX[]={0, 题解列表 2024年04月19日 0 点赞 0 评论 753 浏览 评分:9.9
BFS板子最最最基础题了 ```cpp#includeusingnamespacestd;#defineendl'\n'#defineintlonglongtypedefpairPII;constintN=45;chara[N][N];intv[N][N];intr, 题解列表 2024年04月19日 0 点赞 0 评论 901 浏览 评分:9.9
python--study||O.o 摘要:参考代码:# 设置四个边界,层层遍历 row, column = map(int, input().split()) arr = [list(map(int, input().split(…… 题解列表 2024年04月19日 0 点赞 0 评论 590 浏览 评分:9.9
三个数字的排序(三目运算符) 摘要:解题思路:三目运算符注意事项:中间值比较绕,多仔细思考,但最大最小值这个三目运算符易懂参考代码:#include<stdio.h>int main(){ int a,b,c; scanf(…… 题解列表 2024年04月20日 0 点赞 0 评论 605 浏览 评分:9.9
题解 2879: 错误探测 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a; int b[100][100]; int c=0; int d=0; …… 题解列表 2024年04月20日 1 点赞 0 评论 714 浏览 评分:9.9
python--study||O.o 摘要:参考代码:n = int(input()) arr = list(map(str, input().split())) #dp[i]是以i为数字结尾的最长接龙子序列的长度 dp = [0] * …… 题解列表 2024年04月21日 0 点赞 0 评论 697 浏览 评分:9.9
转化为数组 摘要:解题思路:强制类型转换求和注意事项:无参考代码:for i in range(100,1000): my_str = str(i) sum = int(my_str[0]) ** 3 + …… 题解列表 2024年04月21日 0 点赞 0 评论 855 浏览 评分:9.9
题解 2907: 不与最大数相同的数字之和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;const int N=1e5+5;typedef long long ll;in…… 题解列表 2024年04月21日 0 点赞 0 评论 567 浏览 评分:9.9
利用斐波那契数列求解 解题思路:观察发现,分母的值,从第三个分数开始,为前两个的和,分子也有类似的规律,如果纯在数列f(n)=f(n-1)+f(n-2),其中f(0)=1,f(1)=2.则sum=f(1)/f(0)+f(2)/f(1)+f(3)/f(2)......f(N)/f(N-1)斐波那契数列是一个经典的数学问题, 题解列表 2024年04月21日 0 点赞 0 评论 678 浏览 评分:9.9