#include void print_cards(int num); int main(void) { int repeat_times,i,j; scanf("%d",&repeat_times); getchar(); int original[54],loc[54],result[54]; ... ...
分类:
系统相关 时间:
2019-03-31 09:31:25
阅读次数:
175
大意: n个红黑卡, 每天可以选择领取一块红币一块黑币, 或者买一张卡, 第$i$张卡的花费红币数$max(r_i-A,0)$, 花费黑币数$max(b_i-B,0)$, A为当前红卡数, B为当前黑卡数, 求买完所有卡最少天数. 这题挺巧妙的, 刚开始看花费的范围太大一直在想怎么贪心... 实际上 ...
分类:
其他好文 时间:
2019-03-29 20:50:13
阅读次数:
114
layout: post title: Codeforces Round 269 (Div. 2) author: "luowentaoaa" catalog: true tags: mathjax: true codeforces 传送门 "C MUH and House of Cards" (数 ...
分类:
其他好文 时间:
2019-03-28 09:22:29
阅读次数:
177
题目链接 题目 题目描述 有两个人S和M,他们每人有一段长度为N的数字,两个人在每一轮游戏中都可以按顺序拿出一个数字,谁的数字小谁就接受一次惩罚。若相等两者都没有惩罚。另外,M珂以重新安排自己数字的顺序,问 M的最少被惩罚次数 和 S的最多被惩罚次数 是多少。 输入输出格式 输入格式 输入的第一行包 ...
分类:
其他好文 时间:
2019-03-09 23:34:38
阅读次数:
233
George and Cards 我们找到每个要被删的数字左边和右边第一个比它小的没被删的数字的位置。然后从小到大枚举要被删的数, 求答案。 ...
分类:
其他好文 时间:
2019-03-09 01:23:05
阅读次数:
138
Hongcow Buys a Deck of Cards 啊啊啊, 为什么我连这种垃圾dp都写不出来。。 不是应该10分钟就该秒掉的题吗。。 从dp想到暴力然后gg, 没有想到把省下的红色开成一维。 ...
分类:
其他好文 时间:
2019-03-07 16:14:48
阅读次数:
163
1042 Shuffling Machine (20 分) Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as we ...
分类:
系统相关 时间:
2019-02-23 19:28:38
阅读次数:
248
Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is performed as long as t ...
Invitation Cards 题目链接:http://poj.org/problem?id=1511 Description: In the age of television, not many people attend theater performances. Antique Comed ...
分类:
其他好文 时间:
2019-02-04 19:33:26
阅读次数:
107
Play Game HDU - 4597 Alice and Bob are playing a game. There are two piles of cards. There are N cards in each pile, and each card has a score. They t ...
分类:
其他好文 时间:
2019-01-28 23:53:09
阅读次数:
224