摘要:
Description 小铭铭最近进入了某情报部门,该部门正在被如何建立安全的通道连接困扰。该部门有 n 个情报站,用 1 到 n 的整数编号。给出 m 对情报站 ui;vi 和费用 wi,表示情报站 ui 和 vi 之间可以花费 wi 单位资源建立通道。如果一个情报站经过若干个建立好的通道可以到达 阅读全文
摘要:
Description 有n个物品和m个包。物品有重量,且不可被分割;包也有各自的容量。要把所有物品装入包中,至少需要几个包? Input 第一行两个整数n,m(1 include include include include define inf 0x7f7f7f7f using namespa 阅读全文
摘要:
Description 为了庆祝 NOI 的成功开幕,主办方为大家准备了一场寿司晚宴。小 G 和小 W 作为参加 NOI 的选手,也被邀请参加了寿司晚宴。 在晚宴上,主办方为大家提供了 n−1 种不同的寿司,编号 1,2,3,…,n−1,其中第 i 种寿司的美味度为 i+1 (即寿司的美味度为从 2 阅读全文
摘要:
Description Farmer John is at the market to purchase supplies for his farm. He has in his pocket K coins (1 include include include include define inf 阅读全文
摘要:
Description Bessie is out at the movies. Being mischievous as always, she has decided to hide from Farmer John for L (1 include include include includ 阅读全文