2.11英文题面翻译

描述

Bessie is playing a card game with her N-1 (2 <= N <= 100) cow friends using a deck with K (N <= K <= 100,000; K is a multiple of N) cards. The deck contains M = K/N "good" cards and K-M "bad" cards. Bessie is the dealer and, naturally, wants to deal herself all of the "good" cards. She loves winning.

Her friends suspect that she will cheat, though, so they devise a dealing system in an attempt to prevent Bessie from cheating. They tell her to deal as follows:

Bessie, desperate to win, asks you to help her figure out where she should put the "good" cards so that she gets all of them. Notationally, the top card is card #1, next card is #2, and so on.

输入

* Line 1: Three space-separated integers: N, K, and P

输出

* Lines 1..M: Positions from top in ascending order in which Bessie should place "good" cards, such that when dealt, Bessie will obtain all good cards.

OpenJudge - 2406:Card Stacking

翻译

描述

贝西正在和她的N-1 (2 <= N <= 100)奶牛朋友玩纸牌游戏,使用K (N <= K <= 100,000;K是N的倍数)。牌组包含M = K/N“好”牌和K-M“坏”牌。贝西是发牌人,自然想把所有的“好”牌都发给自己。她喜欢赢。

她的朋友们怀疑她会作弊,所以他们设计了一个交易系统,试图阻止贝茜作弊。他们告诉她如下处理:

贝茜非常想赢,她让你帮她想清楚她应该把“好”牌放在哪里,这样她就能得到所有的牌。上面的牌是#1,下一张是#2,依此类推。

输入

一行:三个用空格分隔的整数:N,K,P

输出

第1到M行:从上到下的位置,贝西应该放置“好”牌,这样当贝西发牌时,将得到所有的好牌。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值