题目链接:https://vjudge.net/contest/355760 password:123
HDU--2000:
#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
const int MAX=1e5+10;
int a[MAX],n;
int main(){
char ch[3];
while(scanf("%s",ch)!=EOF){
for(int i=0;i<3;i++)
ch[i]=ch[i]-'0';
sort(ch,ch+3);
printf("%c %c %c\n",ch[0]+'0',ch[1]+'0',ch[2]+'0');
}
return 0;
}
/*Sample Input
qwe
asd
zxc
Sample Output
e q w
a d s
c x z*/
HDU--2001:
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
const int MAX=1e5+10;
int a[MAX],n;
int main(){
float x1,x2,y1,y2;
while(scanf("%f%f%f%f",&x1,&y1,&x2,&y2)!=EOF){
printf("%.2f\n",sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)));
}
}
/*Sample Input
0 0 0 1
0 1 1 0
Sample Output
1.00
1.41*/
HDU--2002:
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
const int MAX=1e5+10;
#define PI 3.1415927
int a[MAX],n;
int main(){
double c;
while(scanf("%lf",&c)!=EOF){
printf("%.3lf\n",4/3.0*PI*c*c*c);
}
return 0;
}/*Sample Input
1
1.5
Sample Output
4.189
14.137*/
HDU--2003:
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
const int MAX=1e5+10;
#define PI acos(-1)
int a[MAX],n;
int main(){
double b;
while(scanf("%lf",&b)!=EOF){
if(b<=0)
b=-b;
printf("%.2lf\n",b);
}
return 0;
}
/*Sample Input
123
-234.00
Sample Output
123.00
234.00*/
HDU--2004:
#include<iostream>
#include<cstring>
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
const int MAX=1e5+10;
#define PI acos(-1)
int a[MAX],n;
int main(){
double c;
while(scanf("%lf",&c)!=EOF){
if(c>=90&&c<=100)
printf("A\n");
else if(c>=80&&c<90)
printf("B\n");
else if(c<80&&c>=70)
printf("C\n");
else if(c<70&&c>=60)
printf("D\n");
else if(c>=0&&c<60)
printf("E\n");
else printf("Score is error!\n");
}
return 0;
}
/*Sample Input
56
67
100
123
Sample Output
E
D
A
Score is error!*/
假期实在是太无聊了....