摘要: Halloween treatsTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 5574Accepted: 2082Special JudgeDescriptionEvery year there is the same problem at Halloween: Each neighbour is only willing to give a certain total number of sweets on that day, no matter how many children call on him, so it ma 阅读全文
posted @ 2013-08-06 20:20 hpuacm周宏伟 阅读(260) 评论(0) 推荐(0) 编辑
摘要: Find a multipleTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4987Accepted: 2158Special JudgeDescriptionThe input contains N natural (i.e. positive integer) numbers ( N #include#define N 10005int a[N],b[N]; //数组 a 存放原始数据。 数组b 当做抽屉存放余数。 int main(){ int n,m,i,j,k,t,f,s; while(scanf("%d& 阅读全文
posted @ 2013-08-06 20:02 hpuacm周宏伟 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 我排第几个时间限制:1000 ms | 内存限制:65535 KB难度:3描述 现在有"abcdefghijkl”12个字符,将其所有的排列中按字典序排列,给出任意一种排列,说出这个排列在所有的排列中是第几小的?输入第一行有一个整数n(0#includeint main(){ int a[12]; int n,i,j,k,b[12]; char c[15]; a[0]=1; j=1; for(i=1;ic[j]) b[i]++; // 比后面的字母大的有几个 } } k=0; for(i=0;i<12;i++) { k=k+b[i]*a[11-i]; // 康拓展开。 } pr 阅读全文
posted @ 2013-08-06 19:43 hpuacm周宏伟 阅读(259) 评论(0) 推荐(0) 编辑