﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-today</title><link>http://www.cppblog.com/today/</link><description>哈哈</description><language>zh-cn</language><lastBuildDate>Thu, 23 Apr 2026 10:16:10 GMT</lastBuildDate><pubDate>Thu, 23 Apr 2026 10:16:10 GMT</pubDate><ttl>60</ttl><item><title>poj1008 怎么过不了啊？？？？？？</title><link>http://www.cppblog.com/today/archive/2012/07/30/185628.html</link><dc:creator>梁子</dc:creator><author>梁子</author><pubDate>Mon, 30 Jul 2012 06:59:00 GMT</pubDate><guid>http://www.cppblog.com/today/archive/2012/07/30/185628.html</guid><wfw:comment>http://www.cppblog.com/today/comments/185628.html</wfw:comment><comments>http://www.cppblog.com/today/archive/2012/07/30/185628.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/today/comments/commentRss/185628.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/today/services/trackbacks/185628.html</trackback:ping><description><![CDATA[<div>#include&lt;stdio.h&gt;<br />#include&lt;string.h&gt;<br />int main()<br />{<br />&nbsp;&nbsp; &nbsp;char a[19][7]={"pop","no","zip","zotz","tzec","xul","yoxkin","mol","chen","yax","zac","ceh","mac","kankin","muan","pax","koyab","cumhu","uayet"};<br />&nbsp;&nbsp; &nbsp;char b[20][9]={"imix","ik","akbal","kan","chicchan","cimi", "manik","lamat","muluk","ok","chuen","eb","ben","ix","mem","cib","caban","eznab","canac","ahau"};<br />&nbsp;&nbsp; &nbsp;int n,i,j,year[20]={0},day1[20]={0};<br />&nbsp;&nbsp; &nbsp;long day[20]={0};<br />&nbsp;&nbsp; &nbsp;char m[30][7];<br />&nbsp;&nbsp; &nbsp;scanf("%d",&amp;n);<br />&nbsp;&nbsp; &nbsp;for(i=0;i&lt;n;i++)<br />&nbsp;&nbsp; &nbsp;{<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;scanf("%d. %s %d",&amp;day[i],m[i],&amp;year[i]);<br />&nbsp;&nbsp; &nbsp;}<br />&nbsp;&nbsp; &nbsp;printf("%d\n",n);<br />&nbsp;&nbsp; &nbsp;for(i=0;i&lt;n;i++)<br />&nbsp;&nbsp; &nbsp;{<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;for(j=0;j&lt;19;j++)<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(strcmp(m[i],a[j])==0)break;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; day[i]+=j*20+year[i]*365+1;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;year[i]=day[i]/260;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(day[i]%13==0)day1[i]=13;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;else day1[i]=day[i]%13;&nbsp;&nbsp; &nbsp;<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;if(day[i]%20!=0)<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;printf("%d %s %d\n",day1[i],b[day[i]%20-1],year[i]);<br />&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;else printf("%d ahau %d\n",day1[i],year[i]);<br />&nbsp;&nbsp; &nbsp;}<br />&nbsp;&nbsp; &nbsp;return 0;<br />}<br />望各位大神指教 running error？？？？<br /></div><img src ="http://www.cppblog.com/today/aggbug/185628.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/today/" target="_blank">梁子</a> 2012-07-30 14:59 <a href="http://www.cppblog.com/today/archive/2012/07/30/185628.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>poj1007</title><link>http://www.cppblog.com/today/archive/2012/07/30/185611.html</link><dc:creator>梁子</dc:creator><author>梁子</author><pubDate>Mon, 30 Jul 2012 02:51:00 GMT</pubDate><guid>http://www.cppblog.com/today/archive/2012/07/30/185611.html</guid><wfw:comment>http://www.cppblog.com/today/comments/185611.html</wfw:comment><comments>http://www.cppblog.com/today/archive/2012/07/30/185611.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/today/comments/commentRss/185611.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/today/services/trackbacks/185611.html</trackback:ping><description><![CDATA[<div>#include &lt;stdio.h&gt;<br />typedef struct<br />{<br />&nbsp;&nbsp;&nbsp; char s[55];<br />&nbsp;&nbsp;&nbsp; int value;<br />}DNA;<br />DNA list[200];//申请200个<br /><br />int main()<br />{<br />&nbsp;&nbsp;&nbsp; DNA tmp;<br />&nbsp;&nbsp;&nbsp; int i,j,k;<br />&nbsp;&nbsp; &nbsp;int len,n;<br />&nbsp;&nbsp;&nbsp; scanf("%ld%ld",&amp;len,&amp;n);<br />&nbsp;&nbsp;&nbsp; for(i=1;i&lt;=n;i++)<br />&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scanf("%s",list[i].s+1);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list[i].value=0;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(k=1;k&lt;=len;k++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(j=k;j&lt;=len;j++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(list[i].s[k]&gt;list[i].s[j])<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list[i].value++;//输入时计数<br />&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; for(i=1;i&lt;=n;i++)//排序<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for(j=i;j&lt;=n;j++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(list[i].value&gt;list[j].value)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tmp=list[i];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list[i]=list[j];<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; list[j]=tmp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />&nbsp;&nbsp;&nbsp; for(i=1;i&lt;=n;i++)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf("%s\n",list[i].s+1);<br />&nbsp;&nbsp;&nbsp; return 0;<br />} <br /><br />忙了我好长时间才改成这样，仔细一想不怎么难，只要静下心来想<br /><br /></div><img src ="http://www.cppblog.com/today/aggbug/185611.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/today/" target="_blank">梁子</a> 2012-07-30 10:51 <a href="http://www.cppblog.com/today/archive/2012/07/30/185611.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>