水题

AC代码:

#include <iostream>
using namespace std;
int main()
{
char a[100],*p;
int max,i;
while(cin>>a)
{
max=int(a[0]);
p=a;
for(i=0;a[i]!='\0';i++)
if(int(a[i])>max)
{
max=int(a[i]);
p=&a[i];
}
for(i=0;a[i]!='\0';i++)
{
//if(int(a[i])==max)
if(a[i]==*p)
cout<<a[i]<<"(max)";
else
cout<<a[i];
}
cout<<endl;
}
return 0;
}

hdu 2025的更多相关文章

  1. HDU 2025 查找最大元素

    查找最大元素 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submis ...

  2. HDU 2025 查找最大元�

    个人感觉本题是个垃圾题 比方输入: ZZZZZZa 输出应该是: ZZZZZZa(max) 否则错. 判题系统有问题 查找最大元素 Time Limit: 2000/1000 MS (Java/Oth ...

  3. hdu 2025:查找最大元素(水题,顺序查找)

    查找最大元素 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Subm ...

  4. 致初学者(二): HDU 2014~ 2032题解

    下面继续给出HDU 2014~2032的AC程序,供大家参考.2014~2032这19道题就被归结为“C语言程序设计练习(三) ”~“C语言程序设计练习(五) ”. HDU 2014:青年歌手大奖赛_ ...

  5. HDU 查找最大元素 2025

    #include<cstdio> #include<cstring> #include<algorithm> using namespace std; #defin ...

  6. HDU——PKU题目分类

    HDU 模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 ...

  7. [转] HDU 题目分类

    转载来自:http://www.cppblog.com/acronix/archive/2010/09/24/127536.aspx 分类一: 基础题:1000.1001.1004.1005.1008 ...

  8. HDU ACM 题目分类

    模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 104 ...

  9. HDU 5643 King's Game 打表

    King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember hi ...

随机推荐

  1. IO流(File类

    File类 三个构造方法 File(String filename)//模式和应用程序一个目录下 File(String directoryPath,String filename)//文件的绝对路径 ...

  2. c++中 cin、cin.get()、cin.getline()、cin.getchar()的区别

    ①cin>>:无法接收空格.Tap键且以空格.Tap键.回车符为分隔符: ②cin.get( ):可以接收空格.Tap键且以回车符为结束符: 一:可输入单个字符 格式: char ch; ...

  3. 逆天的IE7中,绝对定位元素之间的遮盖问题

    个人比较支持IE9以上的版本,认为他们的样式和效果都是比较人性化的,不过很多时候还是不得不考虑其他版本浏览器的感受,这里IE6就不用考虑他了,这货简直就是IT史上的奇葩,这里要说一个IE7的绝对定位和 ...

  4. swfupload上传

    swfupload多文件异步上传 多文件选择异步上传的原理 传统上:多个文件逐一选.PHP开始处理,循环上 PHP+Flash上:JS调用flash控,Flash批量选取并保持选取所有文件列 swfu ...

  5. ImageView加ImageSwitch制作图片浏览器

    Main /** 图片浏览器*/public class MainActivity extends Activity implements ViewFactory{private Gallery ga ...

  6. favicon支持的图片格式

    为网站设置favicon有两种方式: 1.网站根目录下放置名为favicon.ico的图片,浏览器就会自动获取: 2.在页面中通过<link rel="shortcut icon&qu ...

  7. 测试Beetle.Redis+Web Api

    在Web Api里用Beetle.Redis调用Redis服务端的TIME命令返回一个json格式,然后客户端是用的HttpTest4Net做的测试: CPU:I7-3770 内存:4G+4G 硬盘: ...

  8. SignalR Troubleshooting

    This document contains the following sections. Calling methods between the client and server silentl ...

  9. alias, bg, bind, break, builtin, caller, cd, command,

    bash,  :,  .,  [, alias, bg, bind, break, builtin, caller, cd, command,       compgen, complete, com ...

  10. U8800安装软件显示无效的URI问题

    看到很多人遇到这个问题,其中包括我自己,最后找到可行的解决办法,现整理出来一个新帖,有同样问题的U友可以参考下. 手机先连接电脑,进入USB存储状态,然后在计算机上找到SD卡目录下的.android_ ...