ACM: 图论题 poj 1201 差分约束
来源:互联网 发布:java酒店管理系统程序 编辑:程序博客网 时间:2024/05/18 13:24
Write a program that:
reads the number of intervals, their end points and integers c1,..., cn from the standard input,
computes the minimal size of a set Z of integers which has at leastci common elements with interval [ai, bi], for eachi=1,2,...,n,
writes the answer to the standard output.
Input
Output
Sample Input
5
3 7 3
8 10 3
6 8 1
1 3 1
10 11 1
Sample Output
6
题意: 给出N个闭区间[ai, bi], 每个区间有一个ci表示集合Z在区间[ai, bi]内有ci个公共元素,
解题思路:
代码:
#include <cstdio>
#include <iostream>
#include <cstring>
#include <queue>
using namespace std;
#define MAX 50005
const int INF = (1<<28);
struct node
{
}edges[MAX*3];
int n, num;
int first[MAX];
int t_max, t_min;
inline void add(int u, int v, int w)
{
}
int spfa()
{
}
int main()
{
//
}
- ACM: 图论题 poj 1201 差分约束
- ACM: 差分约束 图论题 poj 2983 sp…
- ACM: 图论题 poj 1275 差分约束题
- ACM: spfa求解 图论题 (对差分约束…
- poj 1201 Intervals (差分约束)
- poj 1364 King 差分约束
- poj 1364 King (差分约束)
- ACM: 图论题 poj 2240 (floyd + ST…
- ACM: 图论题 poj 1135
- ACM: 图论题 poj 3…
- ACM: 图论题 poj 1…
- ACM: 图论题 poj 1…
- ACM: 二分法 数论题 poj 1905
- ACM: 匈牙利算法 图论题 poj 3041 …
- ACM: 有向欧拉图 图论题 poj 1386 …
- ACM: 图论题 poj 3177 同 3352
- poj 3169 Layout(差分约束)
- poj 2983 中等的差分约束
- ACM: 图论题 poj 3177 同 3352
- Android的自定义控件起步
- dos批处理中%~dp0%的说明
- ACM: 图论题 poj 3308 最大流问题
- ACM: 搜索题 poj 1020
- ACM: 图论题 poj 1201 差分约束
- ACM: 图论题 poj 1149 网络流问题
- ACM: 图论题 poj 1236 强连通
- ACM: 图论题 poj 1275 差分约束题
- 图论: 差分约束系统
- ACM: 图论题 poj 1…
- ACM: 图论题 poj 1466 最大独立团
- ACM: 图论题 poj 1…
- ACM: 动态规划题 sicily…