HDU 2719 The Seven Percent Solution
#include <cstdio>
#include <cstring>
int main()
{
char s[];
while(gets(s),s[]!='#')
{
int i=;
while (i<strlen(s))
{
if (s[i]==' ') printf("%s","%20");
else if (s[i]=='!') printf("%s","%21");
else if (s[i]=='$') printf("%s","%24");
else if (s[i]=='%') printf("%s","%25");
else if (s[i]=='(') printf("%s","%28");
else if (s[i]==')') printf("%s","%29");
else if (s[i]=='*') printf("%s","%2a");
else printf("%c",s[i]);
i++;
}
printf("\n");
}
return ;
}
HDU 2719 The Seven Percent Solution的更多相关文章
- HDU 2719 The Seven Percent Solution (水题。。。)
题意:把字符串中的一些特殊符号用给定的字符串代替. 析:没的说. 代码如下: #include <iostream> #include <cstdio> #include &l ...
- HDUOJ-------2719The Seven Percent Solution
The Seven Percent Solution Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Ja ...
- zoj 2932 The Seven Percent Solution
The Seven Percent Solution Time Limit: 2 Seconds Memory Limit: 65536 KB Uniform Resource Identi ...
- POJ 3650:The Seven Percent Solution
The Seven Percent Solution Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7684 Accep ...
- The Seven Percent Solution
Problem Description Uniform Resource Identifiers (or URIs) are strings like http://icpc.baylor.edu/i ...
- HDU题解索引
HDU 1000 A + B Problem I/O HDU 1001 Sum Problem 数学 HDU 1002 A + B Problem II 高精度加法 HDU 1003 Maxsu ...
- Solution -「HDU 6875」Yajilin
\(\mathcal{Description}\) Link.(HDU 裂开了先放个私链 awa.) 在一个 \(n\times n\) 的方格图中,格子 \((i,j)\) 有权值 \(w_ ...
- Solution -「HDU 5498」Tree
\(\mathcal{Description}\) link. 给定一个 \(n\) 个结点 \(m\) 条边的无向图,\(q\) 次操作每次随机选出一条边.问 \(q\) 条边去重后构成生成 ...
- Solution -「HDU 6643」Ridiculous Netizens
\(\mathcal{Description}\) Link. 给定一棵含有 \(n\) 个结点的树,点 \(u\) 有点权 \(w_u\),求树上非空连通块的数量,使得连通块内点权积 \(\ ...
随机推荐
- c++实现单例
单例宏: //单件定义宏 //------------------------------------- // 在头文件中申明 // DECLARE_SINGLEOBJ( CSampleClass ) ...
- BZOJ 1951: [Sdoi2010]古代猪文( 数论 )
显然答案是G^∑C(d,N)(d|N).O(N^0.5)枚举N的约数.取模的数999911659是质数, 考虑欧拉定理a^phi(p)=1(mod p)(a与p互质), 那么a^t mod p = a ...
- C++学习之使用new的注意事项
C++学习之使用new的注意事项 在构造函数中使用new来初始化对象的指针成员成员时必须特别小心,具体的说,应该如下这样做: 一.如果在构造函数中使用new来初始化指针成员,则应该在析构函 ...
- 《Pointers On C》读书笔记(第三章 数据)
1.在C语言中,仅有4种基本数据类型:整型.浮点型.指针和聚合类型(如数组和结构等). 整型家族包括字符.短整型.整型和长整型,它们都分为有符号和无符号两种. 标准规定整型值相互之间大小的规则:长整型 ...
- 个人收集资料整理-WebForm
[2016-03-23 20:35:53] C#实现局域网文件传输 win7系统中桌面图标显示不正常问题
- liunx使用技巧
1.挂载与卸载U盘 新建一个目录:mkdir /mnt/usb; Fdisk –l |less 查看添加之后的设备名,设备文件系统格式 加载U盘设备: mount –t vfat /mnt/usb ...
- Pro/E 5.0安装图解教程(也适用于Creo Elements/Pro 5.0)
安装前必读:☆ 本教程适用于 32 位 proe 5.0 M010,M020,M030,M040,M050,M060 过程完全一样:☆ 本教程用于 64 位 proe 5.0 M010,M020,M0 ...
- Html 小插件10 即时新闻
效果图 <!--即时新闻--><iframe name="alimamaifrm" frameborder="0" marginheight= ...
- POJ 1226 Substrings(后缀数组+二分答案)
[题目链接] http://poj.org/problem?id=1226 [题目大意] 求在每个给出字符串中出现的最长子串的长度,字符串在出现的时候可以是倒置的. [题解] 我们将每个字符串倒置,用 ...
- Yet Another Multiple Problem(bfs好题)
Yet Another Multiple Problem Time Limit : 40000/20000ms (Java/Other) Memory Limit : 65536/65536K ( ...