水题

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. JAVA-6-简单的模拟ATM使用

    public static void main(String[] args) { in = new Scanner(System.in); int count = 1; int pwd = 11111 ...

  2. 遍历std::list过程中删除元素后继续遍历过程

    std::list::erase Erase elements Removes from the list container either a single element (position) o ...

  3. 1.一个.java源文件中是否可以包括多个类?2...

    1.一个“.java”源文件中是否可以包括多个类(不是内部类)?有什么限制? 答:可以有多个类,但只能有一个public类,并且public的类名必须与文件名相一致. 2.java有没有goto? 答 ...

  4. spark 环境变量系列配置

    1. hadoop core-site.xml配置

  5. sqlserver常用全局变量

    @@SERVERNAME    : 返回运行SQL Server 2000本地服务器的名称. @@REMSERVER       : 返回登录记录中记载的远程SQL Server服务器的名称. @@C ...

  6. jQuery CSS3 照片墙

    <html> <head> <style type="text/css"> .picture-wall-container{ position: ...

  7. PHP常用字符串函数

    1:访问子字符串:strpos()2:提取子字符串:substr()3:逐字节处理字符串:strstr()4:计算字符串长度:strlen()5:替换子字符串:substr_replace()6:按字 ...

  8. 使用AlertDialog创建对话框的大致步骤

    1.创建AlertDialog.Builder对象,该对象是AlertDialog的创建器.2.调用AlertDialog.Builder的方法为对话框设置图标.标题.内容等.3.调用AlertDia ...

  9. android中对线程池的理解与使用

    前段时间有幸接到腾讯上海分公司的 Android开发面试,虽然最后一轮被毙了.但还是得总结一下自己在android开发中的一些盲点,最让我尴尬的是面试官问我几个android中线程池的使用与理解..哎 ...

  10. ACM2055_ctype.h_cctype

    #include<iostream> int main() { using namespace std; int y,count; char x; cin>>count; wh ...