链接:http://acm.hdu.edu.cn/showproblem.php?pid=4781
题意:给你两个数,n代表顶点个数,m代表边数,要你建一个图,要求:
1. 有向图,且两个点之间最多只有一条边。
2. 边的权值大小为1~m,每个值只能用一次。
3. 任意一个点都可以到达其余各个顶点。
4. 任意一个环的边上权值之和是3的倍数。
5. 不存在自身环。
思路:先从...
分类:
其他好文 时间:
2014-08-04 17:45:57
阅读次数:
254
#include#include#include#includeusing namespace std;int pieces[10][10];int ans[16];int res[4][4];int Min=1000000;const int INF=1=0) res...
分类:
其他好文 时间:
2014-08-03 15:14:55
阅读次数:
228
Jimmy’s Assignment
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)
Total Submission(s): 896 Accepted Submission(s): 379
Problem Description
Jimmy is ...
分类:
其他好文 时间:
2014-08-01 23:16:42
阅读次数:
220
解题报告
题目传送门
题意:
B个猪圈,N头猪,每头猪对每个猪圈有一个满意值,要求安排这些猪使得最大满意和最小满意的猪差值最小
思路:
二分图的多重匹配问题;
猪圈和源点连边,容量为猪圈容量,猪与汇点连边,容量1;
猪圈和猪之间连线取决所取的满意值范围;
二分查找满意值最小差值的范围。
#include
#include
#include
#include
#define...
分类:
其他好文 时间:
2014-08-01 19:45:22
阅读次数:
317
题目地址:POJ 3189
我晕啊。。。飞快的把白天的任务完成又有什么用。。。节省下来的时间活生生的被我的手残给全浪费掉了。。。又调了一整天,问题居然是一个地方的n和m写反了!!!反思。。反思。。。面壁去。。。
这题就是二分区间,然后枚举区间位置。然后建图就行了。不多说。。
代码如下:
#include
#include
#include
#include
#include
#i...
分类:
其他好文 时间:
2014-08-01 00:02:00
阅读次数:
263
This assignment will help you practice and understand better the Binary Tree and Binary Search Tree data structures, their operations and implementati...
分类:
编程语言 时间:
2014-07-31 23:20:10
阅读次数:
270
Warning (15714): Some pins have incomplete I/O assignments. Refer to the I/O Assignment Warnings report for details解释:后续高级的芯片的 drive strength 和 slew r...
分类:
其他好文 时间:
2014-07-31 12:22:26
阅读次数:
320
Cutting Sticks
You have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (ACM), charges money according to the length of the stick being cut...
分类:
其他好文 时间:
2014-07-30 20:44:04
阅读次数:
263
Swift操作符可以自行定义, 只需要加上简单的标志符即可.
@infix 中置运算. 如+,-,*,/运算
@prefix 前置运算. 如-
@postfix 后置运算. a++, a--
@assignment 赋值运算. +=, -=, --a, ++a
//
// main.swift
// SwiftBasic
//
// Created by yao_yu on 14-...
分类:
移动开发 时间:
2014-07-27 23:39:19
阅读次数:
388
Home Assignment:- * Create a menu driven application where you will have 2 types of users to login in Admin and Student *写一个面板程序,要求用户可以Admin和Student两种...
分类:
其他好文 时间:
2014-07-26 14:23:51
阅读次数:
325