Corresponding HDU topic: Click to open linkPing PongTime limit:MS Memory Limit:0KB 64bit IO Format:%lld & %llu SubmitStatusDescriptionN(3N20000)Ping Pong players live along a West-east street (consider the street as a line segment). Each player has
#include
Macro defines the size of an array
#define N 6
Main function int main (void)
{
Define array int Arr[n] = {1,53,7,2,9,8};int i,j=n-1;
Print the original array for (i = 0;i {printf ("%d\t", Arr[i]);}Putchar (' \ n ');Flip the data,
Http://poj.org/problem? Id = 2299
I was not sure when I first made the discretization, but I found it right after writing it. This is a habit of thinking when I learned the suffix array.
1. initialize as [I] = I; indirectly sort the AS array by the
# Include int main () { int A [5] = {0, 1, 2, 3, 4}; int * P = & A [4]; for (INT I =-4; I { STD: cout } system ("pause"); return 0; }
In C ++, the subscript can be negative. When the array subscript is negative, it is addressing forward
Description
There are n integers, so that the last m number is changed to the first m number, and the other numbers are shifted to the following m (m
Input
The input data has two rows. The first number of the first row is n, followed by n
I'm bored with it ..
In fact, the key to this question is not the method of reverse order, because it is also possible to use brute force.
To give a sequence with the length of n (n
I use array a [0 ~ N-1] to store raw data. You only need to find
Syntax
Public static
Void reverse (
Array
) Parameters
Array
Type: system. Array
The one-dimensional array to be reversed.
Example
The following code example shows how to reverse the sorting of values in array.
using
# Include /*** array Reverse Order ***/# define n 100int main () {int I, j, N, T; int A [n]; printf ("Please input the array length:"); scanf ("% d", & N); If (n> N) {printf ("the length you put has overflowed! \ N "); exit (0);} printf (" Please
Today, let's discuss arrays and sorting in C. First of all, I would like to thank you for your discussion and attention. This is undoubtedly my greatest support. We can find and solve the problem only after discussing it, in this way, we can
For Web programming, the most important thing is to access and read and write data. There may be many ways to store them, such as strings, arrays, files, and so on. arrays, which can be said to be a more important way of using PHP data. PHP's Array
The preceding statement (January 1, March 19, 2006 ):
When I got on the machine three times, I had multiple rounds in the data center. Because no one asked a question, I took the initiative to observe how many students wrote the program, some of
1. CPU
3 dnow! (3D no waiting, no need to wait for 3D processing)
AAM (AMD analyst meeting, amd analyst conference)
ABP (advanced branch prediction, advanced branch prediction)
ACG (aggressive clock gating, active clock selection)
AIS (alternate
arrays, which can be said to be a more important way of using PHP data. PHP's Array function is numerous, below is my study summary, takes this to remember, facilitates later to learn.
1. Array definition
The definition of an array is defined using
/**
* Rewind the array's internal pointer back to a
* @param array & $arr
* @return Mixed returns the value of the previous cell and returns FALSE when there are no more units
* If the array contains an empty cell, or if the value of the cell is 0,
PHP's Array function is numerous, below is my study summary, takes this to remember, facilitates later ...
one, array definition:The definition of an array is defined using the array () method, and an empty array can be defined:
. Foreach Traversal:
This paper illustrates the common operation of JS array and the method of mutual transformation between array and string. Share to everyone for your reference, specific as follows:
The transformation of array and string
Common
Array ("Key" => "value");
Display array
Print_r ($array);
Use the compact () function to create a new array and make the argument a cell of the new array;
$newArray = Compact ("Red", "green", "yellow", "Blue", "array");
Use the Extract ()
With the recent TWaver. NET official release, many of the Java that has used TWaver, Web or Flex old customers can also try to use TWaver in the project. NET, although TWaver. NET has TWaver. wpf. dll has TWaver again. silverlight. the two dll
Arabic numerals are converted into Chinese characters (big and lowercase)
Convert numbers into Chinese charactersWrite
Function number2Chinese ($ num, $ m = 1 ){
Switch ($ m ){
Case 0:
$ CNum = array (
Array ('0
01: // 02: // use the value in the byte array to initiate a new instance of zipinteger Structure03: // Note: This constructor will destroy the value of the passed bits parameter.04: // 05: // an array of byte values in the order of big-endian 06:
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.