Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17258 Accepted: 9386 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…
Asteroids POJ - 3041 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 located at the lattice po…
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 located at the lattice points of the grid. Fortun…
这道题让我认识到了c++cin,cout确实会使其超时,还是我用的c printf吧 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<climits> using namespace std; #define MAX 5005 int p,n; int V1,V2; ][]; ]; ]; int m; //最大匹配数 bool d…
Shooting Contest Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 4097 Accepted: 1499 Special Judge Description Welcome to the Annual Byteland Shooting Contest. Each competitor will shoot to a target which is a rectangular grid. The t…
POJ 3041 Asteroids / UESTC 253 Asteroids(二分图最大匹配,最小点匹配) 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), whic…
###题目链接### 题目大意: 给你 N 和 K ,在一个 N * N 个图上有 K 个 小行星.有一个可以横着切或竖着切的武器,问最少切多少次,所有行星都会被毁灭. 分析: 将 1~n 行数加入左集合,将 1~n 列数加入右集合.然后将所给的所有点当成无向边,在二分图上连接. 1.对于每条边,只要有其中一个端点被选取,则该条边所代表的行星就可以被摧毁.同样,如果选取了这个端点,则所有与这个端点连接的所有行星都会被一次摧毁. 2.对于样例,假设我选取了 1(左集合)--- 1(右集合) 这条边…
Asteroids Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 24789 Accepted: 13439 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…
poj 3041——Asteroids Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22604 Accepted: 12247 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 g…
Asteroids Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20686 Accepted: 11239 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…