Igor In the Museum time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Igor is in the museum and he wants to see as many pictures as possible. Museum can be represented as a rectangular field…
D. Igor In the Museum Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/598/problem/D Description Igor is in the museum and he wants to see as many pictures as possible. Museum can be represented as a rectangular field of n ×…
Igor In the Museum Descriptions 给你一个n*m的方格图表示一个博物馆的分布图.每个方格上用'*'表示墙,用'.'表示空位.每一个空格和相邻的墙之间都有一幅画.(相邻指的是上下左右相邻).你可以从一个空格的位置走到相邻的空格位置.现在你给你若干个(xi,yi)形式的询问,表示你现在在(xi,yi)这个位置(保证为空位)出发,问你从这个点出发你能看到多少幅画. Input 第一行有3个整数n,m,k(3<=n,m<=1000,1<=k<=min(m*m,…
D. Igor In the Museum time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Igor is in the museum and he wants to see as many pictures as possible. Museum can be represented as a rectangular fiel…
D. Igor In the Museum time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Igor is in the museum and he wants to see as many pictures as possible. Museum can be represented as a rectangular fiel…
[链接] 我是链接,点我呀:) [题意] 题意 [题解] 同一个联通块里面答案都一样. 把每个联通块的答案都算出来 然后赋值就好 [代码] #include <bits/stdc++.h> using namespace std; const int N = 1000; int n,m,k; int dx[4] = {0,0,1,-1}; int dy[4] = {1,-1,0,0}; char s[N+10][N+10]; bool bo[N+10][N+10]; int ans[N+10]…
Valid BFS? CodeForces - 1037D The BFS algorithm is defined as follows. Consider an undirected graph with vertices numbered from 11 to nn. Initialize qqas a new queue containing only vertex 1, mark the vertex 1 as used. Extract a vertex vv from the he…
http://blog.csdn.net/snowy_smile/article/details/49924965 D. Igor In the Museum time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Igor is in the museum and he wants to see as many pictures as…
E. Two Labyrinths Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/problem/E Description A labyrinth is the rectangular grid, each of the cells of which is either free or wall, and it's possible to move only between free…
F. FloodTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100685/problem/F Description We all know that King Triton doesn't like us and therefore shipwrecks, hurricanes and tsunami do happen. But being bored with the same routine…
D. Phillip and Trains Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/586/problem/D Description The mobile application store has a new game called "Subway Roller". The protagonist of the game Philip is located in one en…
C. Ice Cave time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to…