18 _2 learning assistance Software

[Cpp]/** Copyright (c) 2012, School of Computer Science, Yantai University * All rights reserved. * file name: 18_2 learning aid software. cpp * Author: Ji Zilong * Completion Date: July 15, January 18, 2012 * version: v1.0 ** input Description:

POJ 2251 Dungeon Master

Dungeon MasterTime Limit: 1000 MS Memory Limit: 65536 KTotal Submissions: 12655 Accepted: 4912 Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled

Ultraviolet A 400-Unix ls (typographical)

This question mainly uses the integer division truncation technique. For example, when calculating the number of rows and the output, determine whether it is the last column. [Cpp] # include # include # include int cmp (const void * _ a, const

Write digital snapshot value to PI

You can use floating point numbers to write long pt = 177; int rs; double v_d = 0; rs = pisn_putsnapshotx (pt, & v_d, NULL, NULL ); 0.0 ~ The number between 1.0, as 1; 1.0 ~ The number between 2.0 and 2. Similarly, you can use the integer number to

POJ 2201 Cartesian Tree

Construct a Cartesian tree. I am using the sort + left-hand method. This method is not the best construction method. I will write it out first and then I will not be able to do it today. I am learning other algorithms in the next day. Sorting + left-

Network Programming-network pair time

[Cpp] // /// // NetTime. cpp file # include ".. /common/InitSock. h "# include CInitSock initSock; void SetTimeFromTP (ULONG ulTime) // set the system time according to the time returned by the time Protocol {// Windows file time is a 64-bit value,

POJ 2533 Longest Ordered Subsequence

Longest Ordered SubsequenceTime Limit: 2000 MS Memory Limit: 65536 KTotal Submissions: 25229 Accepted: 10957 Description A numeric sequence of ai is ordered if a1 # include # include int a [1100], n; int main () {int find (); int I, j, m, s, t,

C ++ multithreading. Part of iterater is replaced by auto and mutex is used.

[Cpp] # include # include # include # include # include # include using namespace std; map g_pages; mutex g_pages_mutex; void save_page (const string & url) {// simulate a long page fetch this_thread: sleep_for (chrono :: seconds (1); string

Quick Sort)

QuickSort is also a Sort Algorithm for input arrays containing n arrays. The worst run time is O (n ^ 2 ). Although the Run Time in the worst case is relatively poor, fast sorting is usually the best practical choice for sorting, because its average

Find the missing numbers

Question: Design and implement an algorithm (C ++ function) that, given an array of integers 0 to 2n-1 with two values missing, determines (and displays) the two misintegers. for example, if n is 3, the given integers might be {0, 1, 4, 5, 7}, so

Bubble Sort (Bubble Sort C ++)

"Bubble Sort" is a simple way to sort elements. this sort employs a "bubbling strategy" to get the largetest element to the right. in a bubbling pass, pairs of adjacent elements are compared, the elements are swapped in case the one on the left is

Thoughts on a common problem in interface inheritance

Thinking about a common problem in interface inheritance when designing the DirectUI interface library (this interface library is now open-source and can be downloaded here) architecture, I encountered an interface inheritance problem, at that time,

9 degree tutorial 76th questions

C language source code: [cpp] # include # include # include # define maxsize 110 int s [maxsize] [maxsize]; int main () {int n, m, I, j, k, time; scanf ("% d", & n, & m); while (n! = 0 | m! = 0) {for (I = 0; I

9 degree tutorial 97th questions

C language source code: [cpp] # include int max1 [101], max2 [101]; int main () {int I, j, n, num, a [101]; while (scanf ("% d", & n )! = EOF) {for (I = 1; I max1 [I]) max1 [I] = max1 [j] + 1 ;}} max2 [n] = 1; for (I = n-1; I> = 1; I --) {max2 [I]

9 degree tutorial 101st questions

Provide group data: input: 105 1012 1116 1624 157 929 2432 255 343 3231 411 7 output: 112C source code: [cpp] # include int dp [101] [1001]; typedef struct grass {int time; int worth;} grass; grass g [101]; int max (int a, int B) {return a> B? A: B;

HOJ 2686 Magic-Box

[Cpp] # include # include const int maxn = 202; int c [maxn] [maxn] [maxn]; inline int lowbit (int x) {return x & (-x);} void update (int x, int y, int z, int p) {for (int I = x; I 0; I-= lowbit (I) for (int j = y; j> 0; j-= lowbit (j) for (int k =

HDU2111: Saving HDU

Problem Description said that the Haidong group is facing internal and diplomatic difficulties, and the company's elders only have the XHD couple. Obviously, as a businessman who has been fighting for many years, XHD won't sit down. One day, when he

Pat1016 Phone Bills

The question is not difficult, but the input and output data is large and the format is large. You need to think about it and pay attention to it. It took a lot of time, but it was a bit rewarding. First, the string type can only use cin, but not

9-degree OJ tutorial 87 breadth-first search for "very Cola"

[Cpp] // 9 degrees OJ tutorial 87 breadth-first search of "very Cola" // http://ac.jobdu.com/problem.php? Cid = 1040 & pid = 86 # include # define MAXS 110 # include # include using namespace std; typedef struct E {int a, B, c, t;} E; int mark

Dm_io_async_bvec () function analysis

[Cpp] int evaluate (unsigned int num_regions, # if LINUX_VERSION_CODE> = KERNEL_VERSION (, 26) struct dm_io_region * where, # else struct io_region * where, # endif int rw, struct bio_vec * bvec, io_policy_fn fn, void * context) {struct

Total Pages: 5902 1 .... 5504 5505 5506 5507 5508 .... 5902 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.