Interview Questions (1)

1. Pure virtual function, variable cannot be defined # Include using namespace STD; Class A {public: Virtual void F () = 0 ;}; int main () {A;. F (); Return 0 ;} 2. virtual functions can be implemented. # Include using namespace STD; Class A

Hdu_1010 tempter of the bone tangled DFS + pruning questions

It's hard to think about pruning... The parity of the number of grids between A and B is the same as that of the two most short circuits. Code... # Include Stdio. h > # Include Math. h > Int D [ 4 ] [ 2 ] = {{ 0

Node. js Learning

Sudo apt-Get install g ++ curl libssl-dev apache2-utilsSudo apt-Get install Git-core Git clone git: // github.com/ry/node.git (download the original code) Then ./ConfigureMakeSudo make install   Write the following small program named example.

Saving XML data in DOTNET in Max

-- Save the data to the XML format FN bipxml bippaths frames filepath = (if bippaths. count> 0 then (xmldocumentxdoc = dotnetobject "system. XML. xmldocument "dotnetpath = dotnetclass" system. io. path "dotnetdirectory = dotnetclass" system. io.

Proxy mode for design pattern Review

1. Java implementation Interface Network{Public abstract void browser ();}Class real implements network{@ OverridePublic void browser (){// Todo auto-generated method stubSystem. Out. println ("browsing information ");}}Public class

Implementation of a simple two-way linked list for Data Structure Review

1. When can I write it out silently? # Include Using namespace STD;Struct Node{Int data;Node * next;Node * Prior;};Class Link{Public:Link (){Head_ptr = NULL;Tail_ptr = NULL;}Void insertnode ();Void insertnode (node * PTR );Void insertnodeathead

And query the path compression method

When you use and query sets for search, if the number of queries is large, you must use the simple search method to time out. For example, if there are 1 million elements and each query starts from 100th, this operation is 10 ^ 6. If the program

Poj_1101 the game (BFS)

/* Reading this question from yesterday afternoon until now, I have done a similar continuous reading problem, which is similar to this question,I wrote it according to that idea. I found it step by step. I was dizzy and failed to write BFS into the

Hdu_3127 whugirls (DP)

I saw it in a simulation competition before the Dalian network competition. I started to want to do it with greed, but I didn't expect a good greedy strategy. Then I put it down. I have looked at this question again over the past few days. I have

Hdu_1736 visual text

A big question, it took a few weeks to complete, speechless .... #include #include int main(){char s[100000], tmp[3];while(gets(s) != NULL) {int i = 0, flag = 0; tmp[2] = 0;while(s[i]) { tmp[0] = s[i]; tmp[1] = s[i+1];if(

Assembly Language: enter two strings to determine whether the two strings are the same (Multiple Input groups)

data segmentstr1 db 100len1 db ?  db 100 dup(?)str2 db 100len2 db ?  db 100 dup(?)inf1 db 0ah, 0dh, 'Input string1:','$'inf2 db 0ah, 0dh, 'Input string2:','$'inf3 db 0ah, 0dh, 'string1 = string2 ? 'judg db 20h, 20h, 20h, '

Poj_3667 Hotel (line segment tree)

I started learning the line tree from the very beginning. It was not until today that I got rid of it. It has been around for nearly three months. Today, I flipped through this question again, but my thoughts were a bit messy. I checked the code of

Hdu_1846 brave game (simplified SG function Version)

  /* After finishing the process, I can see the patterns pushed by many people on the Internet, as well as the bash game. It indicates that you have not learned the Bashi game.This is a simplified version of SG functions. Finally, you only need to

Hdu_1176 free pie (DP)

/* The first transfer equation that comes to mind when getting this question is:DP [I] [J] = max (DP [I-1] [J-1], DP [I-1] [J], DP [I-1] [J + 1]) + dp [I] [J];However, if the score starts from time = 0, it will be very complicated. YesAdopt the

Hdu_1051 & poj_1065 wooden sticks (Greedy)

The typical greedy question has been done for a long time. Today I will review the greedy question and look back. By the way, I will make up the report. My idea is to make a flag variable and a calculated variable k (k = n). The flag is initially 0,

Ural_1613. for fans of statistics (fast + binary)

The idea is fast sorting + binary search. There are repeated numbers and a little more processing. My code: # Include # Include # Include # Include Using namespace STD;Const int n= 70005;Class node {Public:Int num;Int ord;} A [n];Bool CMP (node A,

Take a break and learn a few bash shortcuts

From:Http://roclinux.cn /? P = 864   There are two benefits to using shortcuts: 1. sense of accomplishment! 2 efficiency! Stop your work and learn the best skills in one second. You can do it in five minutes! "Brown bold" indicates "recommended

Ural_1306. Sequence median (HEAP)

Start direct violence and then stop it. T_t... later, someone in dicuss said that binary heap was used. Then I was thinking about how to use heap optimization. I thought about it for a long time. Then let's look at Daniel's ideas. Please fill it up !

Ural 1009. K-based numbers

/* This seems to be a rule.F1 = K-1;F2 = K * k-k;F3 = (F1 + F2) * (k-1 );// (K-1) indicates the number of first not 0, such as n = 3, the first may be 1, 2, 3, 4, 5, 6, 7, 8, 9.My code :*/# Include # Include Using namespace STD;Int main (){//

Poj_2828 buy ticket (line segment tree)

Like 2182, they are all empty. Insert data in reverse mode. Pos [I] indicates that there are POS [I] vacant places on the front side. Each time you fill in a vacant space, the vacant space is deleted. For example, (0 indicates a blank space ): 0 20 1

Total Pages: 64722 1 .... 55359 55360 55361 55362 55363 .... 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.