10167-birthday cake // Enumeration

/* Simple enumeration */# include # include using namespace STD; int A [4] [2]; int main () {int N; while (scanf ("% d", & N) {for (INT I = 0; I 0) num2 ++; else tag = 1 ;} if (num1 = num2 &&! Tag) {printf ("% d \ n", I, j); flag = 1;} If (FLAG)

Poj 1423 big number // mathematics, factorial

Go directlyCode, Click here for more information. # Include # include # define PI 3.141582626535 # define e 2.718281828459 using namespace STD; int main () {int n, m; CIN >>> N; while (n --) {CIN> m; int ans; ans = int (M * log10 (M/E) + log10 (2

10004-bicoloring // BFS

Analysis:Because this question only gives two colors, we can use BFS as an opportunistic method to determine that the level of two knots in wood is the same. But it seems like this is the case.Four color map theorem,Therefore, four colors can be

Poj 2677 tour // DP

/* Poj 2677 tourdp dual-tuned Euclidean Traveling Salesman Problem transfer equation: When J = I-1: d [I] [I-1] = min {d [I-1] [k] + P [I] [k]} (1 # include # include # define min (, b) (a

Ultraviolet A 572-oil deposits // deep search, figure

The question is very simple, the data is not big, and you can directly search for it. # Include # include # define maxn 105int map [maxn] [maxn]; int n, m; void DFS (int I, Int J) {If (! Map [I] [J]) return; Map [I] [J] = 0; DFS (I + 1, J);

10305-ordering tasks // topological sorting

/* A little bit of information, data is a bit problematic. The question ends with n = 0 and m = 0. However, the test data should be n = 0, M! = 0 ends, orz, WA multiple times */# include # include using namespace STD; const int maxn = 105; int G

10596-morning walk // Euler's loop

/* The describe is not clear */# include # include using namespace STD; const int maxn = 205; int degree [maxn]; int f [maxn]; int N, R; int find (int x) {If (X! = F [x]) {f [x] = find (F [x]);} return f [X];} int main () {While (scanf ("% d", & N,

Search for poj 1562

Oil Deposits Time Limit:1000 MS   Memory Limit:10000 K Total Submissions:11077   Accepted:5991 DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. geoSurvComp

10034-Freckles \ MST

Template question. You can use kruskal or the shortest path. # Include # include # include # include using namespace std; const int maxn = 5555; int u [maxn], v [maxn], p [maxn]; double map [105] [2]; struct node {int id; double w;} r [maxn];

Poj 2585 & zoj 2193

Window Pains Time Limit: 2 Seconds Memory Limit: 65536 KB Boudreaux likes to multitask, especially when it comes to using his computer. Never satisfied with just running one application at a time, he usually runs nine applications, each in

10397-Connect the Campus

Problem EConnect the CampusInput:Standard inputOutput:Standard outputTime Limit:2 seconds Creating new buildings are under construction on the campus of the University of Waterloo. The university has hired bricklayers, electricians, plumbers, and a

Poj 2186-Popular Cows // kosaraju

Popular Cows Time Limit:2000 MS   Memory Limit:65536 K Total Submissions:19089   Accepted:7678 DescriptionEvery cow's dream is to become the most popular cow

Ultraviolet A 11538-Chess Queen // count

For a given m * n Board, there are three ways to place the black and white queen. Rows, columns, and diagonal lines. Row:Select a queen to place one queen in m * n mode, and then place another queen in (n-1) mode.N * m *

Ultraviolet 101-The Blocks Problem // simple Simulation

Analysis: This question is very interesting. Although it is very simple, you can use it as a trainer to train your own code capabilities. Note: When a and B are equal, it is determined that the input is invalid and no operation is

10557-xy.pdf // search

Question:Your initial blood volume is 100. The blood volume in each room may be negative and may be positive. If your blood volume is not greater than 0 or you cannot run to the last room, you will lose. Otherwise, you will win. Analysis:Each room

Ultraviolet A 297-Quadtrees // tree, recursion

It is to first build two trees and then traverse these two trees. I would like to call this type of tree a quad-tree. What makes it difficult for me is to build a recursive structure, and then to get more ideas during traversal. For more information,

532-Dungeon Master // bfs

The question is a three-dimensional image, so open a three-dimensional array, and then use bfs to OK! The following code is used: #include#include#includeusing namespace std;#define MAXN 31struct node{ int l; int r; int c; int t;

10054-The neck.pdf // Euler's loop

/* Determine whether there is an Euler loop or the old one: first judge whether the graph is connected. This question is an undirected graph, and then judge the degree of each vertex, last printed */# include # include using namespace std; const

CF 131 div2 B

B. Hometasktime limit per test 2 secondsMemory limit per test 256 megabytesInput Standard inputOutput Standard output Furik loves math lessons very much, so he doesn't attend them, unlike Rubik. but now Furik wants to get a good mark for math. for

Ultraviolet A 10382

/* A lawn with a length of l and w can be installed in n positions on its horizontal center, the coverage range of the sprinkler in each position is the circle with their own radius ri. Find the minimum number of sprinkler devices required. Map it

Total Pages: 64722 1 .... 56337 56338 56339 56340 56341 .... 64722 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.