poj 3660Cow Contest】的更多相关文章

题目链接:http://poj.org/problem?id=3660 有n头奶牛还有m种关系a,b表示a牛逼b彩笔,所以a排名比b高 最后问你给出的关系最多能确定多少头奶牛的排名,而且给出的数据不会有矛盾 其实就是给出了一个无环的有向图,只要有一点他能跟所有点有联系那么这个点的排名就知道了. 可以用一下floyd的思想还是能简单实现的. 其实这题简单来说就是能走完所有点的路都经过哪些点,最容易想到的就是floyd求多源点的最短路 然后稍微改一下就好了. #include <iostream>…
//本题大意是对于一个r*c的矩阵,每一列有两个是白色的 //如今选c个位置,要求每一行至少有一个白色的方格被选上 //每一列仅仅能选一个 //用二分匹配求出最大匹配,假设最大匹配等于r,则满足 //每一行至少有一个白色的格子被选上 //注意c>r的情况 #include<iostream> #include<cstdio> #include<cstring> using namespace std; const int maxn = 1010; int line…
Ikki's Story I - Road Reconstruction Time Limit: 2000MS   Memory Limit: 131072K Total Submissions: 7659   Accepted: 2215 Description Ikki is the king of a small country – Phoenix, Phoenix is so small that there is only one city that is responsible fo…
分段的概率DP+矩阵快速幂                        Scout YYF I Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4180   Accepted: 1076 Description YYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy's base. Af…
The merchant Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 4556   Accepted: 1576 Description There are N cities in a country, and there is one and only one simple path between each pair of cities. A merchant has chosen some paths and w…
传送门 Time Limit: 3000MS Memory Limit: 65536K Description There are N cities in a country, and there is one and only one simple path between each pair of cities. A merchant has chosen some paths and wants to earn as much money as possible in each path.…
Scout YYF I Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5565   Accepted: 1553 Description YYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy's base. After overcoming a series difficulties,…
Description YYF -p. Here is the task, given the place of each mine, please calculate the probality that YYF can go through the "mine road" safely. Input The input contains many test cases ended with EOF. Each test case contains two lines. The Fi…
Blocks Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3997   Accepted: 1775 Description Panda has received an assignment of painting a line of blocks. Since Panda is such an intelligent boy, he starts to think of a math problem of paint…
Description There are N cities in a country, and there is one and only one simple path between each pair of cities. A merchant has chosen some paths and wants to earn as much money as possible in each path. When he move along a path, he can choose on…
Training little cats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 9613   Accepted: 2296 Description Facer's pet cat just gave birth to a brood of little cats. Having considered the health of those lovely cats, Facer decides to make th…
显然这是一道dfs简单题 或许匹配也能做 然而用了dancing links 显然这也是一道模板题 好的吧 调了一上午 终于弄好了模板 Easy Finding Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 19052   Accepted: 5273 Description Given a M×N matrix A. Aij ∈ {0, 1} (0 ≤ i < M, 0 ≤ j < N), could you fin…
Easy Finding Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 15668   Accepted: 4163 Description Given a M×N matrix A. Aij ∈ {0, 1} (0 ≤ i < M, 0 ≤ j < N), could you find some rows that let every cloumn contains and only contains one 1.…
Training little cats Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 13488   Accepted: 3335 Description Facer's pet cat just gave birth to a brood of little cats. Having considered the health of those lovely cats, Facer decides to make t…
Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 16202   Accepted: 4349 Description Given a M×N matrix A. Aij ∈ {0, 1} (0 ≤ i < M, 0 ≤ j < N), could you find some rows that let every cloumn contains and only contains one 1. Input There a…
Easy Finding Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 16178   Accepted: 4343 Description Given a M×N matrix A. Aij ∈ {0, 1} (0 ≤ i < M, 0 ≤ j < N), could you find some rows that let every cloumn contains and only contains one 1.…
Ikki's Story I - Road Reconstruction Time Limit: 2000MS   Memory Limit: 131072K Total Submissions: 7491   Accepted: 2172 Description Ikki is the king of a small country – Phoenix, Phoenix is so small that there is only one city that is responsible fo…
The merchant Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 5055   Accepted: 1740 Description There are N cities in a country, and there is one and only one simple path between each pair of cities. A merchant has chosen some paths and w…
http://poj.org/problem?id=3728 Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 5068   Accepted: 1744 Description There are N cities in a country, and there is one and only one simple path between each pair of cities. A merchant has chose…
The merchant Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 6864   Accepted: 2375 Description There are N cities in a country, and there is one and only one simple path between each pair of cities. A merchant has chosen some paths and w…
Scout YYF I Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6757   Accepted: 1960 Description YYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy's base. After overcoming a series difficulties,…
楼教主回忆录: 利用假期空闲之时,将这几年 GCJ , ACM , TopCoder 参加的一些重要比赛作个回顾.首先是 GCJ2006 的回忆. Google Code Jam 2006 一波三折: Google Code Jam 2006 是我第一次到美国参加现场的程序设计比赛. Google Code Jam 2006 的比赛地点设在了纽约,这次纽约之行之前的签证出了不小的问题,这里非常感谢大家对我们的关心,特别感谢吴总( wyy )和鲁小石的帮助,使我最终踏上纽约之旅. 从北京到纽约的飞…
Scout YYF I Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4100   Accepted: 1051 Description YYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy's base. After overcoming a series difficulties,…
楼主个人博客:小杰博客 利用假期空暇之时,将这几年GCJ,ACM,TopCoder 參加的一些重要比赛作个 回顾.昨天是GCJ2006 的回顾,今天时间上更早一些吧,我如今还清晰记得3 年 前,我刚刚參加ACM 时參加北京赛区2005 和杭州赛区2005 的情况. 2005 年ACM-ICPC--酸甜苦辣 我进入清华大学開始本科学习的时间是2004 年8 月,在进入清华大学的第一 年里,因为基础课学习比較紧张,再加上计算机系不同意大一学生自带电脑,我没 有參加2004 年的ACM 比赛.只是在大…
Conscription Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 12393   Accepted: 4350 Description Windy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect them to b…
Ikki's Story I - Road Reconstruction Time Limit: 2000MS   Memory Limit: 131072K Total Submissions: 7971   Accepted: 2294 Description Ikki is the king of a small country – Phoenix, Phoenix is so small that there is only one city that is responsible fo…
UmBasketella http://poj.org/problem?id=3737 Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 9489   Accepted: 3674 Description In recent days, people always design new things with multifunction. For instance, you can not only use cell pho…
Scout YYF I Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8598   Accepted: 2521 Description YYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy's base. After overcoming a series difficulties,…
Blocks Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6578   Accepted: 3171 Description Panda has received an assignment of painting a line of blocks. Since Panda is such an intelligent boy, he starts to think of a math problem of paint…
Scout YYF I Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10214   Accepted: 2980 Description YYF is a couragous scout. Now he is on a dangerous mission which is to penetrate into the enemy's base. After overcoming a series difficulties…