B. Biridian Forest Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/329/problem/B Description You're a mikemon breeder currently in the middle of your journey to become a mikemon master. Your current obstacle is go through t…
D. Biridian Forest time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You're a mikemon breeder currently in the middle of your journey to become a mikemon master. Your current obstacle is go…
C. Graph Reconstruction Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/329/problem/C Description I have an undirected graph consisting of n nodes, numbered 1 through n. Each node has at most two incident edges. For each pa…
A. Purification Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/329/problem/A Description You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies, you arrived at a square r…
B. Magic Forest time limit per test 1 second memory limit per test 256 megabytes Problem Description Imp is in a magic forest, where xorangles grow (wut?) A xorangle of order n is such a non-degenerate triangle, that lengths of its sides are integers…
题意: 要在N个城市之间修建道路,使得任意两个城市都可以到达,而且不超过两条路,还有,有些城市之间是不能修建道路的. 思路: 要将N个城市全部相连,刚开始以为是最小生成树的问题,其实就是一道简单的题目.  要求两个城市之间不超过两条道路,那么所有的城市应该是连在一个点上的,至于这个点就很好找了,只要找到一个没有和其他点有道路限制的即可. //cf 192 B #include <stdio.h> #include <string.h> char map[1005][1005]; i…
题意: 如果某一行没有草莓,就可以吃掉这一行,某一列没有也可以吃点这一列,求最多会被吃掉多少块蛋糕. //cf 192 div2 #include <stdio.h> #include <string.h> int vis[11][11]; char map[11][11]; int main() { int r, c; while (scanf("%d %d", &r, &c) != EOF) { for (int i = 1; i <=…
吐槽一下,这次的CF好简单啊. 可是我为什么这么粗心这么大意这么弱.把心沉下来,想想你到底想做什么! A 题意:O(-1) 思路:O(-1) #include <iostream> #include <cstdio> #include <cmath> #include <algorithm> #include <cstring> using namespace std; int main() { ]; ][]; int n, m; while(c…
#include <iostream> #include <vector> using namespace std; int main(){ int r,c; cin >>r>>c; vector<bool> row(r,false),col(c,false); char ch; ; i < r; i ++ ){ ; j < c; j ++){ cin >> ch; if(ch == 'S') row[i] = col[j…
#include <iostream> #include <vector> using namespace std; int main(){ int n,m; cin >> n >> m; vector< ,false); ; i < m ; i ++ ){ int a,b; cin >> a>>b; flag[a]=flag[b]=true; } ; ; i <= n ; i ++ ){ if(!flag[i]){…