编程及软件开发解决方案库

2000万优秀解决方案库,覆盖所有编程及软件开发类,极速查询

今日已更新 876 篇代码解决方案

  • 1:修理牧场 (哈夫曼)

                         修理牧场 农夫要修理牧场的一段栅栏,他测量了栅栏,发现需要N块木头,每块木头长度为整数L?i??个长度单位,于是他购买了一条很长的、能锯成N块的木头,即该

    https://www.u72.net/daima/6b9e.html - 2024-09-08 02:02:49 - 代码库
  • 2:HDU 3473 Minimum Sum 划分

                        题目大意:给定一个序列,每次询问给出一个区间,我们需要选择一个数,这个数到区间内所有数的距离之和最小,求最小和由绝对值不等式可得 当我们选择的这

    https://www.u72.net/daima/6fv0.html - 2024-07-24 04:20:04 - 代码库
  • 3:二叉遍历

                          # include <stdio.h># include <stdlib.h># include <conio.h># define STACK_MAX_SIZE 20# define NULL 0struct BTreeNode{char data;str

    https://www.u72.net/daima/4dmx.html - 2024-09-04 09:48:17 - 代码库
  • 4:(线段)

                         In the ancient pirate ages, the Pirate Land was divided into two teams ofpirates, namely, the Buccaneer and the Barbary pirates.Each pirate

    https://www.u72.net/daima/4rh2.html - 2024-07-22 04:17:35 - 代码库
  • 5:三、二叉

                        一、递归思想:递归的基本思想是把规模大的问题转化为规模小的相似的子问题来解决。在函数实现时,因为解决大问题的方法和解决小问题的方法往往是同一个方

    https://www.u72.net/daima/655r.html - 2024-09-08 23:14:13 - 代码库
  • 6:uva 1479 - Graph and Queries(伸展)

                        题目链接:uva 1479 - Graph and Queries题目大意:有一张m条边的无向图,每个节点都有一个权值,现在有若干个操作,D x:删除ID为x的节点Q x k:计算与节点x

    https://www.u72.net/daima/4ezf.html - 2024-07-22 18:59:13 - 代码库
  • 7:(线段)hdoj 3308-LCIS

                        Given n integers. You have two operations: U A B: replace the Ath number by B. (index counting from 0) Q A B: output the length of the lo

    https://www.u72.net/daima/49r1.html - 2024-09-05 18:20:54 - 代码库
  • 8:算法:二叉

                         1. Maximum Depth of Binary Tree: https://leetcode.com/problems/maximum-depth-of-binary-tree/最大深度:解法1:<Recursive>1 public class S

    https://www.u72.net/daima/7hm4.html - 2024-09-09 14:27:09 - 代码库
  • 9:HDU 4362 Dragon Ball 线段

                        #include <cstdio>#include <cstring>#include <cmath>#include <queue>#include <map>#include <set>#include <stack>#include <vector>#inc

    https://www.u72.net/daima/6mns.html - 2024-07-24 21:56:25 - 代码库
  • 10:hdu 1166 敌兵布阵 (线段

                        敌兵布阵Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 45437    Accepted Submissio

    https://www.u72.net/daima/6mun.html - 2024-07-24 22:18:24 - 代码库
  • 11:uva 1385 - Billing Tables(字典)

                        题目链接:uva 1385 - Billing Tables题目大意:给定n个电话前缀,每个前缀是一个区域的前缀,现在要生成一个新的电话单,即对于每个电话号码,从旧的电话单上从前

    https://www.u72.net/daima/300c.html - 2024-07-21 09:14:56 - 代码库
  • 12:HDU 2665 Kth number 划分

                        题目大意:给定一个序列,求区间第k小注意是第k小!!别被题目描述骗到了!!这题求的是第k小!!不是第k大!!!这题和POJ2104一样,都是求区间第k小,不同的是这题的序列是有重

    https://www.u72.net/daima/6zks.html - 2024-07-23 23:34:47 - 代码库
  • 13:hdu 1671 Phone List (字典)

                        # include <cstdio># include <algorithm># include <cstring># include <iostream># include <map># define MAX 15using namespace std;typed

    https://www.u72.net/daima/3mv0.html - 2024-07-21 19:27:35 - 代码库
  • 14:[最小生成] 畅通工程

                        题目描述省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得

    https://www.u72.net/daima/5z70.html - 2024-09-06 02:46:04 - 代码库
  • 15:非递归实现的遍历

                        【代码】#include <iostream>#include <stack>using namespace std;typedef struct Node{        char key;        struct Node *lchild, *rchild;}*Tree, TN

    https://www.u72.net/daima/8nbf.html - 2024-07-26 00:44:09 - 代码库
  • 16:poj 1741(的点分治)

                                                                                                                         TreeGive a tree with n vertices,each ed

    https://www.u72.net/daima/79sx.html - 2024-09-10 21:25:10 - 代码库
  • 17:hdu 1264 线段+扫描线

                        说实话  真是水题   题目给的数据太小  都不用离散化      之前用离散化处理一个类似的题         这道题是给你几个矩形    让你求覆盖面积

    https://www.u72.net/daima/77fm.html - 2024-07-25 19:18:15 - 代码库
  • 18:hdu 3016 Man Down(线段)

                        题目链接:hdu 3016 Man Down题目大意:有N个板,每个板有高度,以及l,r,d,l和r表示所在区间,d表示跳到该板上后将获得的能量(可能为负),保证没有两个板的高度相同。人

    https://www.u72.net/daima/82h2.html - 2024-07-26 15:25:33 - 代码库
  • 19:poj 3368 Frequent values(线段

                        Frequent valuesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 13516 Accepted: 4971DescriptionYou are given a sequence of n intege

    https://www.u72.net/daima/97av.html - 2024-07-27 21:16:38 - 代码库
  • 20:ZOJ 3511 Cake Robbery(线段)

                        ZOJ 3511 Cake Robbery题目链接题意:给定一个n边形,切m刀,问切了之后最大边数的子块边数是多少,保证切的边不会交叉思路:由于有保证切的边不交叉这个条件,所

    https://www.u72.net/daima/9260.html - 2024-07-27 17:29:17 - 代码库