导航

2013年8月10日

摘要: 点击打开链接找球号(一)时间限制:3000ms | 内存限制:65535KB难度:3描述在某一国度里流行着一种游戏。游戏规则为:在一堆球中,每个球上都有一个整数编号i(0#include#includeusing namespace std;int main(){ set set_num; int n , m; int num; cin >> n; cin >> m; while(n--) { cin >> num; set_num.insert (num); } while(m--) { cin>>num; if(set_num.count ( 阅读全文

posted @ 2013-08-10 11:40 勇敢的炮灰 阅读(174) 评论(0) 推荐(0)

摘要: 点击打开链接有趣的数时间限制:3000ms | 内存限制:65535KB难度:2描述把分数按下面的办法排成一个数表。1/1 1/2 1/3 1/4.....2/1 2/2 2/3....3/1 3/2 ....4/1..............我们以z字型方法给上表的每项编号。特定方法:第一项是1/1,然后是1/2、2/1、3/1、2/2、1/3、1/4、2/3……。编程输入项号N(1#includeint main(){ int line , n , num , m; scanf("%d" , &num); while(num--) { scanf("% 阅读全文

posted @ 2013-08-10 11:25 勇敢的炮灰 阅读(198) 评论(0) 推荐(0)