摘要: Problem GDoves and BombsInput: Standard InputOutput: Standard OutputTime Limit: 2 SecondsIt is the year 95 ACM (After the Crash of Microsoft). After many years of peace, a war has broken out. Your nation, the island of Evergreen Macros And Confusing Shortcuts (EMACS), is defending itself against the 阅读全文
posted @ 2013-10-20 01:38 Ramanujan 阅读(276) 评论(0) 推荐(0) 编辑
摘要: Problem GPlace the GuardsInput: Standard InputOutput: Standard OutputIn the country of Ajabdesh there are some streets and junctions. Each streetconnects 2 junctions. The king of Ajabdesh wants toplace some guards in some junctions so that all the junctions and streets canbe guarded by them. A guard 阅读全文
posted @ 2013-10-20 01:36 Ramanujan 阅读(207) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define LL long long#define UINT unsigned int#define MAX_INT 0x7fffffff#define cint const int#define MAXN 333vector g[MAXN];int n, col[MAXN];bool dfs(int u, int color){ col[u] = color; f... 阅读全文
posted @ 2013-10-20 01:31 Ramanujan 阅读(256) 评论(0) 推荐(0) 编辑