网站首页 站内搜索

搜索结果

查询Tags标签: problem,共有 69条记录
  • Problem P30. [算法课分支限界法]组合

    分支树的思想遍历所有可能性,然后加上限制条件,剪枝掉不符合条件的分支,比如只能选出k个数进行组合,那么curk==k时结束这个分支,还有就是注意边界的问题,curn>n。#include<iostream> #include<bits/stdc++.h> #include<cstdio> #include<st…

    2022/9/17 1:18:30 人评论 次浏览
  • 结对编程队友代码分析

    一.简介 本博客是对伍淇铨同学的个人项目代码的评价与分析,此项目是为中小学生自动生成数学试卷,代码思路清晰,结构严谨,功能实现完整。 二.需求分析 1、命令行输入用户名和密码,两者之间用空格隔开(程序预设小学、初中和高中各三个账号,具体见附表),如果用户名…

    2022/9/15 1:17:33 人评论 次浏览
  • 结对编程代码互评

    一、介绍 本博客是对结对编程队友王同学编写的个人项目的分析评价,编写语言为java。 二、项目需求 用户:小学、初中、高中数学老师。 主要功能:输入用户名和密码登录,可以操作生成小初高数学卷子,题目不重复,保存在.TXT文件中。 题目要求:小学 初中 高中难度要求 +…

    2022/9/14 14:17:42 人评论 次浏览
  • Problem P12. [算法课动态规划]背包问题

    01背包问题,每件物品都有放和不放这两种选择。 使用动态规划思想:有n件物品情况下的总价值最大背包和有n-1件物品情况下的总价值最大背包有关。 我也讲不大明白,对背包问题有兴趣的可以去这看看:https://zhuanlan.zhihu.com/p/93857890#include<iostream> #incl…

    2022/9/10 1:24:52 人评论 次浏览
  • Problem P11. [算法课动态规划]爬楼梯

    动态规划当前状态和前一状态相关。到m阶楼梯的方法等于到m-1和m-2的方法相加#include<iostream> #include<bits/stdc++.h> #include<cstdio>using namespace std;int n; int cnt[25];int main() {scanf("%d", &n);cnt[0] = 1;cnt[1] = 1;…

    2022/9/8 14:22:57 人评论 次浏览
  • Problem P05. [算法课分治] 寻找第 k 个最大元素

    先sort进行排序,然后输出第k大的元素即可#include<iostream> #include<bits/stdc++.h> #include<cstdio>using namespace std;int n, k; int arr[10005];int main() {scanf("%d %d", &n, &k);for (int i = 0; i < n; i++){scanf(…

    2022/9/4 1:24:11 人评论 次浏览
  • Problem P04. [算法课分治] 找到 k 个最小数

    先sort排序,在输出最小的k个数。#include<iostream> #include<bits/stdc++.h> #include<cstdio>using namespace std;int n, k; int arr[10005];int main() {scanf("%d %d", &n, &k);for (int i = 0; i < n; i++){scanf("%d…

    2022/9/4 1:24:10 人评论 次浏览
  • MathProblem 24 Baby bottle problem

    You need to warm milk in a baby bottle from its initial temperature of 15 degrees centigrade to 25 degrees. You put the bottle in a pot of boiling water which stays at constant temperature of 100 degrees. The thickness and conductivity of the bottle a…

    2022/8/13 6:22:51 人评论 次浏览
  • CF464E The Classic Problem

    下面的讨论默认 \(n,m,x_i\) 同阶。 这个问题与常规 \(\tt dij\),仅仅差在高精度。而 \(\tt dij\) 所需的高精度如下:\(dis_u+w(u,v)\) 中的加法,应该有 \(m\) 次。 \(dis_u+w(u,v)\) 与 \(dis_v\) 的比较,应该有 \(m\log\) 次。考虑数据结构维护 \(dis\) 的二进制分解…

    2022/8/6 23:27:15 人评论 次浏览
  • ubuntu20.4更新时,突然断网Problem parsing dependency,Error occurred while processing,Problem with MergeList

    ubuntu更新时,突然断网。于是出现了这样的错误:E: Problem parsing dependency 21 of linux-modules-nvidia-418-server-5.11.0-1020-gcp:amd64=5.11.0-1020.22~20.04.1 E: Error occurred while processing linux-modules-nvidia-418-server-5.11.0-1020-gcp (NewVersi…

    2022/8/1 5:24:15 人评论 次浏览
  • SD2022 第二轮省队集训

    day 1 T1 https://www.luogu.com.cn/problem/P7163 \(f(u,0/1,0/1/2)\) 表示走完 \(u\) 的子树,\(u\) 的子树全都开启,\(u\) 是关闭/开启,\(u\) 内部有 \(0/1/2\) 个路径端点,的最小路径长度 然后转移的时候要加入 \(u\) 的一个儿子 \(v\) 端点的个数就是背包,然后考…

    2022/7/16 23:46:28 人评论 次浏览
  • 2702. problem b

    题目链接 2702. problem b 同215. 破译密码 对于给出的 \(n\) 个询问,每次求有多少个数对 \((x,y)\),满足 \(a≤x≤b,c≤y≤d\),且 \(\text{gcd}(x,y) = k\),\(\text{gcd}(x,y)\) 函数为 \(x\) 和 \(y\) 的最大公约数。 输入格式 第一行一个整数 \(n\)。 接下来 \(n\…

    2022/6/29 6:20:14 人评论 次浏览
  • Freebuds Connnect Problem in the Windows

    Problem when you connect to windows platform, the freebus cannot play music. This is because you connect your phone and windows together. Because the bad design at first and the update of windows and android. The music switch between windows and andro…

    2022/4/26 7:12:50 人评论 次浏览
  • Messager Problem(NOIOPJENGLISH20)

    Messager Problem https://acs.jxnu.edu.cn/problem/NOIOPJENGLISH201000ms 65536K 描述: There are N nodes in the graph. Given the length of edges between the nodes, find the shortest path of size N and the nodes in the path are all different. 图上有n个节…

    2022/2/8 6:14:01 人评论 次浏览
  • UVA201 正方形 Squares 题解

    输入输出格式 输入格式 输入包含了多个游戏棋盘。每个棋盘包含了 n^2 个点的正方形矩阵 (其中 2 ≤ n ≤ 9),以及一些起连接作用的横向或纵向的线段。棋盘的的 n^2 个点和 m 条连接线段,格式如下: 第 1 行:n,表示矩阵中单行或单列的点的数目 第 2 行:m,表示连接线段…

    2022/2/2 23:42:41 人评论 次浏览
共69记录«上一页12345下一页»
扫一扫关注最新编程教程