http://poj.org/problem?id=1469 COURSES Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 19419 Accepted: 7642 Description Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is…
题意: P门课程,N个学生.给出每门课程的选课学生,求是否可以给每门课程选出一个课代表.课代表必须是选了该课的学生且每个学生只能当一门课程的. 题解: 匈牙利算法的入门题. #include <iostream> #include <cstring> #include <cstdio> #include <vector> using namespace std; ; int t; int k, s; int flag; int p, n; int vis[m…
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1083 Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Consider a group of N students and P courses. Each student visits zero, one or more than…
The Perfect Stall Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 20874 Accepted: 9421 Description Farmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering pr…
Machine Schedule Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 12976 Accepted: 5529 Description As we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduli…
COURSES Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 20478 Accepted: 8056 Description Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is poss…
Asteroids Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 23963 Accepted: 12989 Description Bessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The grid contains K a…
COURSES Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 18454 Accepted: 7275 Description Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is poss…