目录 题面 思路 思路 AC代码 题面 Square Ice Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 4526 Accepted: 1759 Description Square Ice is a two-dimensional arrangement of water molecules H2O, with oxygen at the vertices of a square lattice and one…
Square Ice Description Square Ice is a two-dimensional arrangement of water molecules H2O, with oxygen at the vertices of a square lattice and one hydrogen atom between each pair of adjacent oxygen atoms. The hydrogen atoms must stick out on the left…
http://poj.org/problem?id=1099 #include<stdio.h> #include<string.h> #include <iostream> using namespace std; #define N 60 int x,y,n; char mat[N][N]; struct node { int num,id; int hang,lie; } map[N][N]; void init() { int i,j; memset(mat,,…
Description Square Ice is a two-dimensional arrangement of water molecules H2O, with oxygen at the vertices of a square lattice and one hydrogen atom between each pair of adjacent oxygen atoms. The hydrogen atoms must stick out on the left and right…
Navigation Nightmare Description Farmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1..N. A series of M (1 <= M < 40,000) vertical and horizontal roads each of varying lengths (1 <= length <= 100…
任意门:http://poj.org/problem?id=1984 Navigation Nightmare Time Limit: 2000MS Memory Limit: 30000K Total Submissions: 7783 Accepted: 2801 Case Time Limit: 1000MS Description Farmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usuall…
Cube Stacking Description Farmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each containing a single cube. Farmer John asks Betsy to perform P (1<= P <= 100,000) op…
Description The left figure below shows a complete 3*3 grid made with 2*(3*4) (=24) matchsticks. The lengths of all matchsticks are one. You can find many squares of different sizes in the grid. The size of a square is the length of its side. In the…
hash一下然后用带权并查集做模2下的前缀和 #include<iostream> #include<cstdio> #include<map> #include<algorithm> using namespace std; const int N=100005; int n,m,f[N],s[N],ans,g[N],tot,has,x[N],y[N],z[N]; char o[10]; map<int,int>mp; int read() {…
Description "Hike on a Graph" is a game that is played on a board on which an undirected graph is drawn. The graph is complete and has all loops, i.e. for any two locations there is exactly one arrow between them. The arrows are coloured. There…