1286: 最大配对 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>#include<iomanip>#include<algorithm>using namespace …… 题解列表 2024年03月10日 1 点赞 0 评论 411 浏览 评分:9.9
蓝桥杯2013年第四届真题-错误票据 摘要:这道题需要掌握的是读入方式#include<sstream>如果两个id重号,则必然排序在一起,断号则说明a[i]和a[i-1]之间缺了一个数#include <iostream> #include…… 题解列表 2024年03月10日 0 点赞 0 评论 394 浏览 评分:9.9
编写题解 2346: 信息学奥赛一本通T1433-愤怒的牛-二分 摘要:解题思路:使用二分详见代码注意事项:无参考代码:#include <bits/stdc++.h> using namespace std; int a[1000100]; int n,m; b…… 题解列表 2024年03月10日 1 点赞 0 评论 790 浏览 评分:9.9
1011: [编程入门]最大公约数与最小公倍数 摘要:解题思路:根据最大公约数和最小公倍数之积为两数之积这里原理,可以先求两者其中一个即可,故本题可利用求最大公约数间接得最小公倍数。注意事项:文字部分用于代码唯美,可删除用于提交作业/参考代码:#incl…… 题解列表 2024年03月10日 0 点赞 0 评论 179 浏览 评分:9.9
c语言 冒泡排序解决 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,m; scanf("%d%d",&n,&m); int a=0; …… 题解列表 2024年03月10日 0 点赞 0 评论 188 浏览 评分:9.9
C++数组存储三角形简易动态规划版本 摘要:# 动态转移方程 ``` dfs[i][j] += max(dfs[i+1][j], dfs[i+1][j+1]); ``` # 参考图  { int max = a > b ? a : b; …… 题解列表 2024年03月11日 0 点赞 0 评论 495 浏览 评分:9.9
用python写个bfs 摘要:解题思路:注意事项:参考代码:#飞机降落,bfs枚举T = int(input())sj = [[(0,0,0)] for _ in range(T)]for i in range(T): n …… 题解列表 2024年03月11日 0 点赞 1 评论 461 浏览 评分:9.9
筛选n以内的完数 c语言 摘要:解题思路:用两个for循环来做,第一个for循环用来从一到n,第二个for循环用来判断是不是素数如果取余为零则说明是因子注意事项:参考代码:#include <stdio.h>int main(){ …… 题解列表 2024年03月11日 0 点赞 0 评论 249 浏览 评分:9.9
问题转换 只计算奇数个数 摘要:一、解题思路: 我的想法是计算数组中奇数的个数,如果奇数的个数为奇数个的话,无论如何都不可能凑出s1、s2均为偶数。反观奇数的个数为偶数的话,总{s1,s2}的个数=2的偶数个数次方*2的(奇数…… 题解列表 2024年03月11日 0 点赞 0 评论 344 浏览 评分:9.9