#include<stdio.h> #include<string.h> #define N 300 #define inf 0x3fffffff int mark[N],link[N],n,m; int map[N][N]; int find(int u) { int i; for(i=1;i<=m;i++) { if(!mark[i]&&map[u][i]) { mark[i]=1; if(link[i]==-1||…
The Perfect Stall Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 24081 Accepted: 10695 Description Farmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to engineering p…
题目链接: http://poj.org/problem?id=3041 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 asteroids (1 <= K <= 10,000), which are conveniently…
TOYS Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13262 Accepted: 6412 Description Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - their child John never puts his toys away w…
poj——1274 The Perfect Stall Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 25709 Accepted: 11429 Description Farmer John completed his new barn just last week, complete with all the latest milking technology. Unfortunately, due to e…