Formatting output of printf ()

The complete format of printf format control:%-0 M. n l or H charactersThe following describes the composition formats:① %: Indicates the starting symbol of the format description, which is indispensable.②-: "Yes" indicates the left-aligned output.

Poj 3299 humidex (simple formula recursion)

// Purely recursive formula. Pay attention to the question requirements, if you want to know 2, evaluate 1 // do not apply recursive errors. # include # include # include using namespace STD; const double exp = 2.718281828; char a, B;

Poj 1273 drainage ditches (network stream-maximum Stream)

// Network stream -- maximum stream // The condition for termination is that the path cannot be added to the residual network. // you need to consider multiple sides. # include # include # include # define INF 2000000000 using namespace

Sicily 1021 couples (Data Structure-stack)

// Data Structure -- stack // open a number first and mark the number as the couple number // start from 1 ~ 2n is pushed into the stack one by one, and the couple array is called to check whether it can be merged with the top element of the stack

Poj 1087 a plug for Unix (network stream-maximum stream (maximum binary matching ))

// Network stream-use the largest stream in the diagram for big match // connect the device to the source point // socket (plug) connect to the sink // The adapter is connected to the socket, and the weight is INF // converts the largest

Poj 3278 catch that cow (BFS breadth-first search)

// BFS breadth-first search, combined with data structure queues # include # include using namespace STD; int arr [200000]; int vis [200000]; // accessed array queue q1, Q2; // use a Data Structure queue to save search space int deep;

Poj 2260 error correction (simulation)

// Simple question. You can use # include using namespace STD; bool check (int n, bool arr [100] [100]) { int sum; for (INT I = 0; I { sum = 0; for (Int J = 0; j { sum + = arr [I] [J]; } If (sum % 2! = 0) return false; } for (INT I = 0; I {

Poj 3561 pseudo graphical recognizer (Search)

// Simple search question // train of thought: when reading the image, open a flag to mark the one-size-fits-all symbols and coordinates of the image, and record the number of these symbols. // If two different symbols are found, an error is

HDU 1061 rightmost digit

  Problem descriptionGiven a positive integer N, you should output the most right digit of N ^ n.   InputThe input contains several test cases. The first line of the input is a single integer T which is the number of test cases. t test cases follow.

Poj 2039 to and fro (simulation)

# Include using namespace STD; char STR [10000]; char map [1000] [21]; int main () { int N; while (CIN> N) { If (n = 0) break; CIN> STR; int r = strlen (STR) /n; int p = 0; for (INT I = 1; I { if (I % 2! = 0) { for (Int J = 1; j map [I]

HDU 1049 climbing Worm

Question 1 ~   Problem descriptionAn inch worm is at the bottom of a well n inches deep. it has enough energy to climb u inches every minute, but then has to rest a minute before climbing again. during the rest, it slips down d inches. the process

Poj 1007 DNA sorting (counting Reverse Order logarithm + merge sort)

// Calculate the reverse logarithm, and use the merge sort to calculate the O (nlgn) should be faster than the enumeration, but it should not be reflected in this question, but it is a waste of space, sort by training and merging # include #

Sicily 1024 Magic Island (DFS deep-first search)

// Search for the longest path of a tree in depth first # include # include # include using namespace STD; int _ max; int N, K, U, V, D; struct edge { int U, V, D; edge (INT Uu, int VV, int dd) {u = Uu; V = vv; D = dd ;}}; vector E [10

Network Engineer requirements

1. Planning and Design:(1) Independent {Tagshow (Event)} "> Plan and design the network structure and formulate performance optimization policies;(2) design the network topology, including {Tagshow (Event)} "> Vro, network {Tagshow (Event)} ">

Poj 2528 mayor's posters (discretization + line segment tree)

// Question of the color type of the Line Segment tree // This question can be easily implemented by modifying the line segment tree in reverse order, this is a clever practice // You can also maintain the line segment tree by recording the Left

Poj 3667 Hotel (line segment tree)

// Line segment tree // records the left continuous number and the right continuous number for each interval, and maximum continuity // The maximum continuity is used to determine whether a qualified range exists. // The left and right continuity

Poj 1502 MPI maelstrom (single-source shortest path | Dijkstra implementation)

// Single-source shortest path. The final answer should be the maximum value from the starting point to the shortest path of other nodes. # include # include using namespace STD; const int INF = 50000000; int G [105] [105]; bool flag [105];

Sicily 1323 switch text (string processing)

// String processing // a strange question, the key is to judge the end and check empty rows. // STL can save a lot of trouble. # include # include # include using namespace STD; string S1, S2; bool checkempty (string Str) // check

Sicily 1135 flying over the wilderness (BFS width first search)

// BFS width-first search // G [x] [y] [k] indicates that the path is (x, y) then, the optimal value of K-step flight is supported. # include # include # include # include using namespace STD; const int max = 102; const int dir [4] [2] =

Poj 2761 feed the dogs (treap calculates the K decimal number)

// Treap calculates the K decimal number // thanks to the guidance of jsh Daniel. // The reason why this question can be done with treap is that there is a condition in the meaning of the question, the query interval does not contain any

Total Pages: 64722 1 .... 27943 27944 27945 27946 27947 .... 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.