2015年5月13日

摘要: Description设有n 个顾客同时等待一项服务。顾客i需要的服务时间为ti,1≤i≤n。共有s处可以提供此项服务。应如何安排n 个顾客的服务次序才能使平均等待时间达到最小?平均等待时间是n 个顾客等待服务时间的总和除以n。对于给定的n 个顾客需要的服务时间和s的值,计算最优服务次序。Input... 阅读全文

posted @ 2015-05-13 23:06 alexanderone 阅读(1795) 评论(0) 推荐(0) 编辑


2014年8月22日

摘要: #include#includeint main(){ int a,A,m,n,M,i,t,r; char x[5006];char y[106];char c[100];char b[100]; char z[5006];char d[100];char e[100]; scanf("%d"... 阅读全文

posted @ 2014-08-22 16:13 alexanderone 阅读(109) 评论(0) 推荐(0) 编辑


2014年8月21日

摘要: here are aLCD (Liquid Crystal Display)onEzreal's arm. TheLCDis composed ofliquid crystal, and theLCDis16lines and48rows.How did it work?TheCPUwill sen... 阅读全文

posted @ 2014-08-21 16:57 alexanderone 阅读(250) 评论(0) 推荐(0) 编辑


2014年8月20日

摘要: h Jesus! The Minecraft Server of XadillaX's came across a bug!There's one way to solve this bug in game. That is to get a bucket of water and a bucket... 阅读全文

posted @ 2014-08-20 17:08 alexanderone 阅读(122) 评论(0) 推荐(0) 编辑


2014年8月1日

摘要: 做贪心的时候遇到排序,小小的补习一下:如果每次都自己写个冒泡之类的O(n^2)排序,不但程序容易超时,而且浪费宝贵的比赛时间,还很有可能写错。STL里面有个sort函数,可以直接对数组排序,复杂度为n*log2(n)。使用这个函数,需要包含头文件。这个函数可以传两个参数或三个参数。第一个参数是要排序... 阅读全文

posted @ 2014-08-01 10:44 alexanderone 阅读(218) 评论(0) 推荐(0) 编辑


2014年7月31日

摘要: 过了两次用了两种不同方法,其实也差不多,如果真的暴力去求得话铁定超时,(好像优化减去一些不可能的情况也能过,但是我没尝试)所以找一下规律咯,没学过算法的渣只能靠思维做题了。。。#includeint a[10009];int main(){ int n,m,t,i,j; long lon... 阅读全文

posted @ 2014-07-31 16:24 alexanderone 阅读(328) 评论(0) 推荐(0) 编辑


2014年7月26日

摘要: Game PredictionSuppose there are M people, including you, playing a special card game. At the beginning, each player r... 阅读全文

posted @ 2014-07-26 17:03 alexanderone 阅读(245) 评论(0) 推荐(0) 编辑

摘要: Moving TablesThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building who... 阅读全文

posted @ 2014-07-26 11:10 alexanderone 阅读(109) 评论(0) 推荐(0) 编辑

摘要: 就是练个手,白皮书的小东西。原题是要写N!/(M!*(N-M)!)他是先写F(n)的N!然后F(N)/(F(M)*F(N-M))但是这样会溢出。改一下,主要是习惯MAIN()外写函数然后调用#includeint f(int n,int m){int i,sum=1;for(i=n-m;i>0;i+... 阅读全文

posted @ 2014-07-26 09:12 alexanderone 阅读(110) 评论(0) 推荐(0) 编辑


2014年7月22日

摘要: #includemain(){int n,i,sum;int x[10];while(scanf("%d %d %d %d %d %d",&x[1],&x[2],&x[3],&x[4],&x[5],&x[6])!=EOF){if(x[1]==0&&x[2]==0&&x[3]==0&&x[4]==0&... 阅读全文

posted @ 2014-07-22 09:28 alexanderone 阅读(174) 评论(1) 推荐(0) 编辑


Copyright © 2024 alexanderone
Powered by .NET 8.0 on Kubernetes