I wrote this afternoon. It's really time-consuming. It's not easy to write programs by myself. It's not good enough!

Source: Internet
Author: User

/*
# Include <iostream>
// # Include <fstream>
// # Include <time. h>

// # Include <cstdio>
Using namespace STD;
Int A [5010], B [5010], C [5000];
Int main ()
{
// Ifstream CIN ("AA. In ");
Int J = 0, K = 0;
Int N;
Cin> N;
Int I, Maxi = 0;
Int sum = 0; // ± í» ý ë °í
For (I = 0; I <n; I ++)
{
Cin> A [I];
}

B [J] = A [0];
For (I = 0; I <n; I ++)
{
If (B [J] <A [I])
{
J ++;
B [J] = A [I];
Maxi = I;
}
}
// Cout <Maxi <Endl;
// Cout <A [Maxi] <Endl;
// ========================================
For (I = 0; I <= J; I ++)
{
Cout <B [I] <"";
}
Cout <Endl;
// ========================================
// Çóç° ° ë ¶ µ µä» ý ë
// Cout <Endl;
J = 0;
K = 0;
While (j <Maxi)
{
If (B [k]> = A [J])
{
Int TMP = B [k]-A [J];
Sum + = TMP;
J ++;
}
Else
{
K ++;
}
}
// Cout <"S" <sum <Endl;
C [0] = A [n-1];
K = 0;
For (I = n-1; I> = J; I --)
{
If (C [k] <A [I])
{
K ++;
C [k] = A [I];
}
}

For (I = 0; I <= K; I ++)
{
Cout <C [I] <"";
}

J = n-1;
K = 0;
While (j> Maxi)
{
If (C [k]> = A [J])
{
Int TMP = C [k]-A [J];
Sum + = TMP;
J --;
}
Else
{
K ++;
}
}
Cout <sum <Endl;

Return 0;
}
*/

/*
# Include <iostream>
# Include <fstream>
# Include <string. h>
# Include <time. h>
# Define n 1010
# Define M 110
Using namespace STD;

Typedef struct
{
Int data [N];
Char C [N];
} Col_cost;
Int stable (string S, int N)
{
For (INT)
}
Int hospool (string a, string B)
{

}
Int main ()
{
Ifstream CIN ("AA. In ");
Int N;
Cin> N;
Col_cost S;

For (INT I = 0; I <n; I ++)
{
Cin> S. Data [I];
}
For (INT I = 0; I <n; I ++)
{
Cin> S. C [I];
}
Char CS [m];
Int m;
Cin> m;
Int flag = 0;
For (INT I = 0; I <m; I ++)
{
Cin> CS [I];
}
Int res;
For (RES = n-1; Res> = 0; res --)
{
Int J;
For (j = m-1; j> = 0; j --)
{
If (S. C [res] = cs [J])
{
Res --;
}
Else break;
}
If (j <0) {flag = 1; break ;}
}
If (! Flag) Return-1;
Else
{
Int sum = 0;
Res + = m;
For (INT I = 0; I <m; I ++)
{
Sum + = S. Data [res];
Res --;
}
Cout <sum <Endl;
Cout. Precision (8 );
Cout <fixed <(double) Clock ()/clocks_per_sec <Endl;
Return 0;
}

}
*/

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.