摘要: 你有n种牌,第i种牌的数目为ci。另外有一种特殊的牌:joker,它的数目是m。你可以用每种牌各一张来组成一套牌,也可以用一张joker和除了某一种牌以外的其他牌各一张组成1套牌。比如,当n=3时,一共有4种合法的套牌:{1,2,3}, {J,2,3}, {1,J,3}, {1,2,J}。 给出n, 阅读全文
posted @ 2020-04-06 23:35 璃灵 阅读(124) 评论(0) 推荐(0)
摘要: A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. 阅读全文
posted @ 2020-04-06 12:50 璃灵 阅读(133) 评论(0) 推荐(0)
摘要: E - 免费馅饼 都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以 阅读全文
posted @ 2020-04-06 11:36 璃灵 阅读(116) 评论(0) 推荐(0)
摘要: I - Paths on a Grid Imagine you are attending your math lesson at school. Once again, you are bored because your teacher tells things that you already 阅读全文
posted @ 2020-04-06 11:16 璃灵 阅读(118) 评论(0) 推荐(0)