A:正着DFS一次处理出每个节点有多少个优先级比他低的(包括自己)作为值v[i] 求A B 再反着DFS求优先级比自己高的求C #include <bits/stdc++.h> #include <cstring> #include <iostream> #include <algorithm> # ...
分类:
其他好文 时间:
2017-08-08 23:09:53
阅读次数:
225
A - 最大报销额(01背包) 现有一笔经费可以报销一定额度的发票。允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项物品的价值不得超过600元。现请你编写程序,在给出的一堆发票中找出可以报销的、不超过给定额度的最大报销额。 In ...
分类:
其他好文 时间:
2017-08-08 23:02:57
阅读次数:
355
1 in the past year, however, software companies have developed tools that allow companies to "push" informationdirectly out to consumers, transmitting ...
分类:
其他好文 时间:
2017-08-07 10:21:42
阅读次数:
148
Hansel and Grethel Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 2199 Accepted: 1004 Description On a warm summer afternoon, Hansel and G ...
分类:
其他好文 时间:
2017-08-07 00:25:48
阅读次数:
175
A - The Trip, 2007 小包可以放在打包里,求最少的数量。 做法就是求出现相同数字最多的。 B - Partitioning by Palindromes 传送 C - Seek the Name, Seek the Fame The little cat is so famous, ...
分类:
其他好文 时间:
2017-08-03 18:09:44
阅读次数:
130
第二场 1001 Is Derek lying? Problem Description Derek and Alfia are good friends.Derek is Chinese,and Alfia is Austrian.This summer holiday,they both par ...
分类:
其他好文 时间:
2017-08-03 09:51:36
阅读次数:
152
A:水 B:求两个三角形之间的位置关系:相交 相离 内含 ①用三个点是否在三角形内外判断 计算MA*MB、MB*MC、MC*MA的大小 若这三个值同号,那么在三角形的内部,异号在外部 #include<stdio.h> #include<math.h> #include<string.h> #inc ...
分类:
其他好文 时间:
2017-08-02 10:02:15
阅读次数:
183
Prime Distance Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18731 Accepted: 5006 Description The branch of mathematics called number the ...
分类:
其他好文 时间:
2017-08-02 00:41:49
阅读次数:
160
Communication System Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 29218 Accepted: 10408 Description We have received an order from Pizoo ...
分类:
其他好文 时间:
2017-08-02 00:31:12
阅读次数:
203
A - Fence Repair Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needs N (1 ≤ N ≤ ...
分类:
其他好文 时间:
2017-08-01 17:08:31
阅读次数:
259