HDU 2000
来源:互联网 发布:c语言ascii码转换字符 编辑:程序博客网 时间:2024/04/27 23:09
特别特别水题 纯属通过水题找自信 仅供娱乐 另外 附上 C++ 中point的使用方法 Mark 一下
ASCII码排序
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 74985 Accepted Submission(s): 30770
Problem Description
输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。
Input
输入数据有多组,每组占一行,有三个字符组成,之间无空格。
Output
对于每组输入数据,输出一行,字符中间用一个空格分开。
Sample Input
qweasdzxc
Sample Output
e q wa d sc x z
#include <cmath>#include <cstdio>int main(void){ double x[2], y[2]; while (scanf("%lf%lf%lf%lf", x, y, x+1, y+1) != EOF) printf("%.2f\n", sqrt((x[1]-x[0])*(x[1]-x[0]) + (y[1]-y[0])*(y[1]-y[0]))); return 0;}
下面是Point 的使用 需要在 定义一个Point 结构体 然后 没什么了
#include<iostream>#include<cstdio>using namespace std;typedef struct Point{ double x; double y;}Point;void PrintPoint(Point p){ printf("%.4f ",p.x); printf("%.4f", p.y);}int main(){ Point pt; pt.x = 3.1415; pt.y = 1.4725; PrintPoint(pt); return 0;}
- HDU 2000
- hdu 2000
- HDU 2000
- hdu 2000
- HDU 2000
- HDU-2000
- HDU 2000
- HDU 2000
- HDU-2000
- HDU-2000
- hdu 2000
- HDU 2000
- HDU 2000
- HDU 2000
- hdu oj 2000
- HDU 2000 - 2009
- HDU OJ 2000-2010
- HDU 2000-2004
- 浅谈 Oracle 监听器
- 新解全排列的递归实现
- SQL语言与数据库的关系
- 编译原理上机作业4——LR(0)分析的DFA生成
- 基于visual Studio2013解决C语言竞赛题之1047百马问题
- HDU 2000
- 字符串
- hdbdnjdfmnjfgmjcgfm
- How to show/hide a control in the Column's DataItemTemplate based on the value of another control
- MOOS Documentation Guide
- MySQL中with rollup的用法
- 黑马程序员-Java语言基础3
- 【第一章】证券市场概述
- 深入理解 Cocos2d-x 内存管理