上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页
摘要: 一个十进制整数被叫做权势二进制,当他的十进制表示的时候只由0或1组成。例如0,1,101,110011都是权势二进制而2,12,900不是。 当给定一个n的时候,计算一下最少要多少个权势二进制相加才能得到n。 Input单组测试数据。 第一行给出一个整数n (1<=n<=1,000,000)Outp 阅读全文
posted @ 2017-11-23 14:10 晓风微微 阅读(149) 评论(0) 推荐(0) 编辑
摘要: After coding so many days,Mr Acmer wants to have a good rest.So travelling is the best choice!He has decided to visit n cities(he insists on seeing al 阅读全文
posted @ 2017-11-18 14:39 晓风微微 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 中位数定义为所有值从小到大排序后排在正中间的那个数,如果值有偶数个,通常取最中间的两个数值的平均数作为中位数。 现在有n个数,每个数都是独一无二的,求出每个数在多少个包含其的区间中是中位数。 Input多组测试数据 第一行一个数n(n≤8000)n(n≤8000) 第二行nn个数,0≤0≤每个数≤1 阅读全文
posted @ 2017-11-18 10:21 晓风微微 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 因为某场比赛某位同学打表没有打对,而且因为在上一场训练赛中被写进了题目里,他悲痛欲绝,不光在群里把昵称改成了 不会打表且没有去过九里校区的xxxxx,而且希望通过吃糖来缓解自己的压力。他非常挑食,从来不连续吃两颗相同的糖。他有N种糖可以选择,希望你帮他计算是否能一次性吃完所有的糖。如果可以请输出Ye 阅读全文
posted @ 2017-11-18 09:37 晓风微微 阅读(222) 评论(0) 推荐(0) 编辑
摘要: The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms each 阅读全文
posted @ 2017-11-15 17:02 晓风微微 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 题目: Professor Zhang has kinds of characters and the quantity of the ii-th character is aiai. Professor Zhang wants to use all the characters build sev 阅读全文
posted @ 2017-11-15 16:43 晓风微微 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Luke wants to upgrade his home computer network from 10mbs to 100mbs. His existing network uses 10base2 (coaxial) cables that allow you to connect any 阅读全文
posted @ 2017-11-11 10:36 晓风微微 阅读(263) 评论(0) 推荐(0) 编辑
摘要: Groundhogs are good at digging holes, their home is a hole, usually a group of groundhogs will find a more suitable area for their activities and buil 阅读全文
posted @ 2017-11-08 21:30 晓风微微 阅读(191) 评论(0) 推荐(0) 编辑
摘要: You've got an array a, consisting of n integers a1, a2, ..., an. You are allowed to perform two operations on this array: Expression means applying bi 阅读全文
posted @ 2017-11-07 21:59 晓风微微 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 喜欢钻研问题的JS同学,最近又迷上了对加密方法的思考。一天,他突然想出了一种他认为是终极的加密办法 :把需要加密的信息排成一圈,显然,它们有很多种不同的读法。例如下图,可以读作: 喜欢钻研问题的JS同学,最近又迷上了对加密方法的思考。一天,他突然想出了一种他认为是终极的加密办法 :把需要加密的信息排 阅读全文
posted @ 2017-10-25 21:40 晓风微微 阅读(201) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页