Sha 138: street numbers

For the simple number topic, note that the long type is used. It is best to directly type the table, because only 10 rows are output. My SolutionsCodeAs follows: // # Include # include /* # include # include # include # include # include

Quickly remove redundant elements

TheseCodeIt is reprinted, but I wrote the text. If you are using C ++ class cplus and creating a container list or vector , you can use STLAlgorithmDelete redundant data quickly. /* Create data */ Vector A (/* cplus data */); /* Sorting is

Binary non-recursive central order traversal (recursive creation)

The storage structure of the binary linked list, creates a binary tree, and uses stacks to implement non-recursive sequential traversal.     # Include # include # include # define maxsize 100 typedef struct binode { int data; binode *

Deep Search for HDU 1501 Basic Search

# Include # Include Char S1 [300], S2 [300], s [500];Int len1, len2, len3, flag, used [1, 300] [2, 300];Void DFS (int A, int B, int c ){If (FLAG)Return;If (C = len3 ){Flag = 1;Return;}If (used [a] [B])Return;Used [a] [B] = 1;If (S1 [a] = s [c])DFS

Ultraviolet A 621: secret research

Simple question, not explained. My code is as follows: # Include # include # include # include # include # include # include using namespace STD; char s [1000]; int main () {int t; CIN> T; while (t --) {CIN> S; int Len = strlen (s ); if

Va 10397: connect the campus

This is a variant of the minimal spanning tree (MST) problem. Add a vis Array Based on the template of my minimal spanning tree prim algorithm (you need the template to click the http://blog.csdn.net/rising_fallmoon/article/details/9819187) to

Ultraviolet A 10025:? 1? 2? ... ? N = K Problem

After careful consideration of this question, we can get a quick solution. Just find the solution that satisfies N * (n + 1)/2> = | K |, and N * (n + 1) /2-K is an even number of N. Note that special judgment is required when n = 0. My

Ultraviolet A 1394: And then there was one

You can recursively solve this problem by setting an array winner to record the remainder of the classic Joseph problem. Note: Joseph's problem: the number is 0 ~ N people of N-1, starting from 0: 1, 2, 3 ...... report to K for killing, and

Va 674: coin change

Dynamic Planning questions. For coins ranging from 1, 5, 10, 25, and 50, the number is 0 ~ 4. Save it to the cent array. The iway [k] [I] element of the array iway indicates that only 0 ~ is used ~ The number of coins used by I to generate K cents,

Ultraviolet A 11748: rigging elections

The attached questions are as follows: Elections in your country are saved med in a one-on-one elimination style. each week, two people are chosen from a pool of candidates and the country votes on which one they prefer. the loser is eliminated

HDU (2831) Plants Vs Zombies

This is a greedy question. The key is to think about how to sort the question; Here we can use a maximum of times to sort data, that is, s [I]. x = s [I]. V-s [I]. D-T; Here, we need to understand the following points: Each line needs t time to

HDU (1232) Graph Theory

# Include Int pre [2000];Int fun (int x) ------------------------------------- // find the root node of X (important function ))){Int r = X;While (pre [R]! = R) (if they are not equal, the query ends until they are equal, that is, the manager is

HDU (1198) Farm Irrigation

This query set is novel: First, the structure is relatively simple. Each group of array P indicates whether the four directions are connected (upper, lower, and left) Then, you can check whether the connection is in the horizontal and vertical

Primary School Students play ACM-and query the set

I started playing and querying the set two days ago. I didn't know it at the time, but now I only know this. I have been asking du Niang for a long time. At most, I was told to write two functions, I think there should be many people who want to

Configure NFS and TFTP connection omapl-138 Development Board in Ubuntu

Various online practices are confusing. Generally, there are two ways:1. Deploy servers and clients on the host, virtual machine, and Development Board, and use the mount command to directly load existingFile System;2. Only the NFS server is

Create and traverse Binary Trees (recursive creation and traversal)

Create and traverse Binary Trees (recursive creation and traversal)   The Code is as follows:   # Include # include # include # define maxsize 100 typedef struct binode { int data; struct binode * lchild, * rchild; }binode, * bitree; int

3.1 base-level ratio of neighboring numbers: Determine the base

Problem definition: 6*9 = 42 is incorrect for decimal, but it is correct for the 13 hexadecimal notation. That is, 6 (13) * 9 (13) = 42 (13), while42 (13) = 4*131 + 2*130 = 54 (10 ). Your task is to write a program to read three integers p, q, and R,

2.5 case packing

Problem descriptionThe shape of products manufactured by a factory is cuboid. The height is h, and the length and width are equal. There are six products in total.Models. Their lengths and widths are 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. these products

NYOJ-542 test products [dictionary tree]

Question link: http://acm.nyist.net/JudgeOnline/problem.php? PID = 1, 542 Solution: It was stuck here during the provincial competition and could not be made. I thought about it again, and then I quickly typed out the code .... String processing is

NYOJ-448 find Max

Question link: http://acm.nyist.net/JudgeOnline/problem.php? PID = 1, 448 Solution: Similar to greedy algorithms. Search for this string. Find the maximum value each time and find len-m times. However, when searching, you need to consider the

Total Pages: 64722 1 .... 56544 56545 56546 56547 56548 .... 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.