多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

國內最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2
您當前位置:首頁 > 互聯網 > POJ 3680 Intervals

POJ 3680 Intervals

來源:程序員人生   發布時間:2014-10-09 00:38:43 閱讀次數:2591次

離散化+最大費用最大流...


源點---1 .. 2 ..3 .... n ---匯點 連流量為K,費用為0的邊

對于(a , b , w) 連從 a到b容量1費用w的邊


Intervals
Time Limit: 5000MS   Memory Limit: 65536K
Total Submissions: 6503   Accepted: 2691

Description

You are given N weighted open intervals. The ith interval covers (aibi) and weighs wi. Your task is to pick some of the intervals to maximize the total weights under the limit that no point in the real axis is covered more than k times.

Input

The first line of input is the number of test case.
The first line of each test case contains two integers, N and K (1 ≤ K ≤ N ≤ 200).
The next N line each contain three integers aibiwi(1 ≤ ai < bi ≤ 100,000, 1 ≤ wi ≤ 100,000) describing the intervals. 
There is a blank line before each test case.

Output

For each test case output the maximum total weights in a separate line.

Sample Input

4 3 1 1 2 2 2 3 4 3 4 8 3 1 1 3 2 2 3 4 3 4 8 3 1 1 100000 100000 1 2 3 100 200 300 3 2 1 100000 100000 1 150 301 100 200 300

Sample Output

14 12 100000 100301

Source

POJ Founder Monthly Contest
生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 在线观看中文字幕第一页 | 一区二区三区精品国产欧美 | 亚洲视频观看 | 国产福利资源在线 | a久久久久一级毛片护士免费 | 亚洲三级久久 | 亚洲视频黄 | 亚洲色妞| 日韩欧美亚洲综合 | 久久精品国产国语对白 | 欧美日韩不卡视频一区二区三区 | 欧美秋霞特色大片2020 | 自拍偷拍第6页 | 欧美日本韩国一区二区 | 免费一看一级毛片 | 国产一区二区免费福利片 | 欧美专区日韩专区 | 欧美综合网站 | 中文天堂 | 国产亚洲精品色一区 | 亚洲天堂网址 | www.淫| 亚洲国产一成人久久精品 | 欧美一级高清片在线 | 一级毛片特级毛片国产 | 一二三四视频在线观看免费高清 | 亚洲人xxx| 欧美一卡二卡3卡4卡无卡免费 | 国产乱辈通伦影片在线播放亚洲 | 中文字幕亚洲综合久久202 | 国产免费资源高清小视频在线观看 | 免费精品久久 | 久久一区二区三区不卡 | 中文字幕曰产乱码 | 老司机成人 | 在线免费福利 | 欧美另类videosbestse | 在线第一页| 九九久久99综合一区二区 | 能看毛片的网址 | 国产精品久久久久久久午夜片 |

          1. <noscript id="rscyq"></noscript>

            <track id="rscyq"></track>
            <sub id="rscyq"><tr id="rscyq"></tr></sub>