![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
水题
青春斗
这个作者很懒,什么都没留下…
展开
-
HDU_1282回文数猜想
http://acm.hdu.edu.cn/showproblem.php?pid=1282解答此题关键在于回文数的判断,而判断一个数是否是回文数可采用将一个数各个位上的数字分开倒叙重新组合,然后与原数比较。#include #include using namespace std;int judge(int n){ int b[20]; int res=0,k=0原创 2012-06-17 06:22:47 · 1226 阅读 · 0 评论 -
HDU_1004 Let the Balloon Rise
http://acm.hdu.edu.cn/showproblem.php?pid=1004此题考察对map的使用 #include #include #include using namespace std;int main(){ int n; map balloon; string color; while(cin>>n&&n)原创 2012-06-20 23:12:22 · 289 阅读 · 0 评论 -
HDU_1008 Elevator
http://acm.hdu.edu.cn/showproblem.php?pid=1008 #include using namespace std;int main(){ int temp,ci,ceng,N,last; while(cin>>ci) { if(ci==0) break; N=ci; temp=0; l原创 2012-06-20 23:20:45 · 278 阅读 · 0 评论 -
HDU_1020Encoding
http://acm.hdu.edu.cn/showproblem.php?pid=1020#include #include #define MAX 10005int main(){ char c,str[MAX]; int n,i,k,len; scanf("%d",&n); while(n--) {原创 2012-08-02 11:22:34 · 244 阅读 · 0 评论 -
HDU_2072单词数
http://acm.hdu.edu.cn/showproblem.php?pid=2072此题只需将句子中的字符串分开然后进行比较即刻。#include #include char str[10005];char a[100][25];int main(){ int count,i,j,f; while(gets(str)&&strcmp(str,原创 2012-08-03 22:36:22 · 877 阅读 · 1 评论 -
HDU_2095find your present (2)
http://acm.hdu.edu.cn/showproblem.php?pid=2095本题如果知道位运算那么将十分简单,其中需要用到^(异或符)。真异或假的结果是真,假异或真的结果也是真,真异或真的结果是假,假异或假的结果是假。就是说两个值不相同,则异或结果为真。反之,为假。 不同为1,相同为0,如1001异或1010等于0011.(来自百度百科http://baike.baidu.原创 2012-08-04 14:44:42 · 342 阅读 · 0 评论