C. Bear and Square Grid time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You have a grid with n rows and n columns. Each cell is either empty (denoted by '.') or blocked (denoted by 'X'). T…
Bear and Square Grid 枚举k * k 的位置, 然后接上它周围白色连通块的数量, 再统计完全在k * k范围里的连通块, 这个只要某个连通块全部的方格 在k * k里面就好, 并且k * k是一行一行移的, 所以可以优化到n ^ 3. #include<bits/stdc++.h> #define LL long long #define fi first #define se second #define mk make_pair #define PLL pair<…
E. Bear and Square Grid 题目连接: http://www.codeforces.com/contest/680/problem/E Description You have a grid with n rows and n columns. Each cell is either empty (denoted by '.') or blocked (denoted by 'X'). Two empty cells are directly connected if the…
A. Bear and Five Cards time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A little bear Limak plays a game. He has five cards. There is one number written on each card. Each number is a posit…
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2515 11520 - Fill the Square Time limit: 1.000 seconds In this problem, you have to draw a square using uppercase English Alphabets. To be more prec…
题目链接:http://abc042.contest.atcoder.jp/tasks/arc058_b Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement We have a large square grid with H rows and W columns. Iroha is now standing in the top-left cell. She will repeat goin…
P2867 [USACO06NOV]大广场Big Square 题目描述 Farmer John's cows have entered into a competition with Farmer Bob's cows. They have drawn lines on the field so it is a square grid with N × N points (2 ≤ N ≤ 100), and each cow of the two herds has positioned he…