POJ 1469 COURSES (二分圖最大匹配 匈牙利演算法),poj1469COURSESTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 18892 Accepted: 7455DescriptionConsider a group of N students and P courses. Each student visits zero, one or more than one courses.
POJ 1325 Machine Schedule (二分圖最小點集覆蓋 匈牙利演算法),poj1325Machine ScheduleTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12621 Accepted: 5399DescriptionAs we all know, machine scheduling is a very classical problem in computer
Codeforces Round #306 (Div. 2) (ABCE題解),比賽連結:http://codeforces.com/contest/550A. Two Substringstime limit per test2 secondsmemory limit per test256 megabytesYou are given string s. Your task is to determine if the given strings contains two
Codeforces 549G. Happy Line 貪心,codeforces549g很有意思的貪心:Let's reformulate the condition in terms of a certain height the towers, which will be on the stairs. Then an appropriate amount of money of a person in the queue is equal to the height of the
C++勝者樹,勝者樹 #include <iostream>#define MAX_VALUE 0x7fffffffusing namespace std;//在這裡我先反思一下,不知道怎麼搞的,這個演算法耗費我3個小時,慘不忍睹。void DealWhat(int b[],int n,int flags)//每一次在n位置調整該位置的與子樹的大小關係。{ int left = 2 * n + 1; int right = 2 * n + 2; if
PAT Rational Arithmetic (20),rationalarithmetic題目描述For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.輸入描述:Each input file contains one test case, which gives