#include #include //array Learning Int main () { //integer array/* int array[5]; int i; for ( i=0;i>array[i]; } for ( i=0;i>buffer;//std::coutC + + Basic Learning 4
enum enum type #includevoid enumtest (); void Main () {enumtest ();//Enumeration Type example printf ("\ n permutation problem, 5 ball to three ball, not heavy color \ n"); Enum Color{red,yellow,blue,white,black};int i,j,k,pri;//Note is an int type
#include intArrayaverage (intA[],intcount);intArrayMax (intA[],intcount);intArraymin (intA[],intcount);intMain () {//1> prompts for 5 students ' scores, calculates the average score, the highest score, the lowest score, and then outputs
Most operators can be overloaded, but there are 5 operators that are not overloaded with the C + + language provisions.1.. (dot operator), usually used to go to a member of an object, but (arrow operator), which can be overloaded2.::(domain operator)
MyQuene.h#pragma oncetypedef int type;class myqueue{type* m_pdata;int m_ncount;int m_nhead,m_ntail;public:myqueue (int nCount = 4) {M_ncount = Ncount;m_pdata = new type[ncount];//Note This is not a parenthesis, the small expansion number is the call
To be honest, read the Zhu Guangming C # video tutorial, feel a bit messy, but the general design of things are still there. I've integrated what I've been involved with in my own understanding.Zi Yue: "Learning and time learning, the joy?" "It's
Introduction:A small example, hope can help the vast number of Chevalier to understand delegate.Example of a function pointer in C:1#include 2 3 //Subtraction Operations4 intMinus (intAintb) {5 returnAb;6 }7 8 //
This is a function pointer and pointer function.This is the invocation of the pointer:Code: #include #include using namespace Std typedef unsigned char unit8_t; extern void Swapdata (unit8_t dat_x, unit8_t dat_y); Int main () { unit8_t x,
Ultraviolet A 12186 Another Crisis (tree DP)
A couple of years ago, a new world wide crisis started, leaving has people with economy problems. Some workers of a particle company are trying to ask for an increase in their salaries.
The company has a
Week 3 hands-on practice project 3-playing pointer on OJ (3)
Problem and code
/** Copyright (c) 2014, School of Computer Science, Yantai University * All rights reserved. * file name: test. cpp * Author: Xin Bin * Completion Date: July 15,
Codeforces Round #281 (Div. 2) Issue Report A. B .C.D.
A-Vasya and Football
Pure simulation .. It is difficult to find a place that does not conform to common football knowledge ..
The Code is as follows:
#include
#include
#include
Sha 11021-Tribles (probability + recurrence)
Question link: Click the open link
Q: k. Only poll will die every day, but some poll may be generated the next day. Specifically, the probability of producing I poll is pi, calculate the probability that
Dijkstra algorithm-side-based relaxation
Algorithm idea: Find the vertex closest to the Source Vertex, and then expand it in the center to obtain the shortest path from the Source Vertex to all other vertices. the time complexity is O (N ^ 2
Hdu 5067 network competition status compression or dfs
The question is to give you a maximum of 10 grids in the n * m square, and ask you how many steps you can take to move all the numbers to the upper left corner to infinitely store numbers.
Here
LeetCode [Array]: Find Peak Element
A peak element is an element that is greater than its neighbors.Given an input array where num [I] =num [I + 1], find a peak element and return its index.You may imagine that num [-1] = num [n] =-∞.For example,
Week 3 hands-on practice project 3-playing pointer on OJ (1)
Problem and code
/** Copyright (c) 2014, School of Computer Science, Yantai University * All rights reserved. * file name: test. cpp * Author: Xin Bin * Completion Date: July 15,
(001) C ++ Implementation of sequential Stack(001) the C ++ Implementation of the ordered stack is 2014/12/4 jxlijunhao. Here we use the C ++ template class to implement an ordered Stack: 1) initialization 2) inbound stack 3) outbound stack 4) top
Poj 2406 Power StringsPower Strings
Time Limit:3000 MS
Memory Limit:65536 K
Total Submissions:33636
Accepted:13973
DescriptionGiven two strings a and B we define a * B to be their concatenation. for example,
SDUT 2241-calculate the number of combinations C (n, m) (recursive)
Question link: Click the open link
Linear O (n) calculates the number of combinations and the progressive method.
#include #include
#include
#include
#include
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