[acm]HDOJ 2673 shǎ崽 OrOrOrOrz】的更多相关文章

题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2673 拍两次序,交替输出 #include<iostream> #include<algorithm> #include<cstdio> using namespace std; #define MAX_NUMBER 10000 bool myfunction1 (int i,int j) { return (i<j); } bool myfunction2 (in…
#include <cstdio> #include <algorithm> using namespace std; int main() { int n; while (scanf("%d",&n)!=EOF) { ]; ; i<n; i++) scanf("%d",&a[i]); sort(a,a+n); ,end=n-,flag=; printf(]); while (begin<=end) { if (f…
Problem Description Acmer in HDU-ACM team are ambitious, especially shǎ崽, he can spend time in Internet bar doing problems overnight. So many girls want to meet and Orz him. But Orz him is not that easy.You must solve this problem first. The problem…
简单的排序,注意输出即可 #include <iostream> #include <algorithm> using namespace std; int main() { ]; int n,i; //int t = 0; while(cin>>n) { //if(t)cout<<endl; //t++; ; i<n; i++) { cin>>a[i]; } sort(a,a+n); ==) { ; i<=(n-)/; i++) c…
题意:排序后按题目要求输出 思路:排序 #include<iostream> #include<stdio.h> #include<algorithm> using namespace std; int main(){ ],n,i,j; while(~scanf("%d",&n)){ ;i<n;++i) scanf("%d",&a[i]); sort(a,a+n); i=; j=n-; while(i<…
题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2059 起点和终点,共n+2个点,n+2个状态,简单DP即可. //11512698 2014-08-21 17:11:55 Accepted 2059 //62MS 368K 969 B G++ 空信高手 //起点和终点,共n+2个点,n+2个状态,简单DP即可 #include<iostream> #include<cstdio> using namespace std; ; co…
题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=1200 简单字符串处理,找规律 /* 11509672 2014-08-21 11:32:55 Accepted 1200 0MS 380K 442 B G++ 空信高手 */ #include<iostream> #include<string> #include<cstdio> using namespace std; int main() { //freopen(&q…
题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2064 汉诺塔变种,只能从中间专业,递归关系为:f(n)=3*f(n-1)+2. //汉诺塔变种,只能从中间转移 //11485816 2014-08-19 08:44:47 Accepted 2064 0MS 368K 307 B G++ 空信高手 #include<iostream> #include<cstdio> using namespace std; #define LL…
题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=3082 字符串处理+并联电阻公式 //11481261 2014-08-18 16:52:47 Accepted 3082 0MS 384K 733 B G++ 空信高手 #include<string> #include<iostream> #include<cstdio> #include<cstdlib> using namespace std; int…
注意输出格式 #include <iostream> #include <algorithm> using namespace std; +]; int main() { int n; while (cin>>n) { ; i<n; i++) cin>>arr[i]; sort(arr, arr+n); cout<<arr[n-]; ; i*<n-; i++) { == i){ cout<<" "<…