111qqz的小窝

老年咸鱼冲锋!

codeforces #413 B T-shirt buying (贪心)

题目链接 题意:有n个T恤,每个价格都不同,有三种颜色,分别用1,2,3表示,每件T恤给出前xiong和后背的颜色。现在有m个顾客排成一队,对

今日头条2017秋招笔试_1

头条校招(今日头条2017秋招真题) 题目描述 头条的2017校招开始了!为了这次校招,我们组织了一个规模宏大的出题团队。每个出题人都出了一些有

今日头条笔试题-最大映射(贪心)

有 n 个字符串,每个字符串都是由 A-J 的大写字符构成。现在你将每个字符映射为一个 0-9 的数字,不同字符映射为不同的数字。这样每个字符串就可以看做一个整

codeforces #375 D. Lakes in Berland (dfs)

题目链接 题意:nm个格子,有和.两种类型。定义一个湖为边相邻的只有.组成的最大点集合,且任何一个.不在边界上。现在给出一个nm的图保证至少有

codeforces #375 C. Polycarp at the Radio (贪心)

题目链接 题意:给出n,m,n个数,对其中的一些数进行修改,要求1..m中出现次数最少的数最大,输出这个最少的数最大是多少,以及修改的次数。 思

whust 2016 #1 D Zhenya moves from the dormitory (贪心,模拟)

题目链接 傻逼模拟。。读完题就ac了。。。 /* *********************************************** Author :111qqz Created Time :2016年08月07日 星期日 18时04分18秒 File Name :code/whust2016/#1/D.cpp ************************************************ */ #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <queue> #include <stack> #include

BZOJ 1640/1692 : [Usaco2007 Nov]Best Cow Line 队列变换 (贪心)

1640: [Usaco2007 Nov]Best Cow Line 队列变换 Time Limit: 5 Sec Memory Limit: 64 MB Submit: 710 Solved: 373 [Submit][Status][Discuss] Description FJ打算带着他可爱的N (1 ≤ N ≤ 2,000)头奶牛去参加”年度最佳老农”的比赛.在比赛中,每个农

BZOJ 1634: [Usaco2007 Jan]Protecting the Flowers 护花(贪心)

1634: [Usaco2007 Jan]Protecting the Flowers 护花 Time Limit: 5 Sec Memory Limit: 64 MB Submit: 605 Solved: 383 [Submit][Status][Discuss] Description Farmer John went to cut some wood and left N (2 <= N <= 100,000) cows eating the grass, as usual. When he returned, he found to his horror that the cows were in his garden eating his beautiful flowers. Wanting to minimize the subsequent damage, FJ decided to

BZOJ 1629: [Usaco2007 Demo]Cow Acrobats (贪心)

1629: [Usaco2007 Demo]Cow Acrobats Time Limit: 5 Sec Memory Limit: 64 MB Submit: 771 Solved: 398 [Submit][Status][Discuss] Description Farmer John’s N (1 <= N <= 50,000) cows (numbered 1..N) are planning to run away and join the circus. Their hoofed feet prevent them from tightrope walking and swinging from the trapeze (and their last attempt at firing a cow out of a cannon met with a dismal failure). Thus, they

BZOJ 1623: [Usaco2008 Open]Cow Cars 奶牛飞车 (贪心)

1623: [Usaco2008 Open]Cow Cars 奶牛飞车 Time Limit: 5 Sec Memory Limit: 64 MB Submit: 386 Solved: 266 [Submit][Status][Discuss] Description 编号为1到N的N只奶牛正各自驾着车打算在牛德比亚的高速公路上飞驰.高速公路有M(1≤M≤N)条车

BZOJ 1620: [Usaco2008 Nov]Time Management 时间管理 (贪心)

1620: [Usaco2008 Nov]Time Management 时间管理 Time Limit: 5 Sec Memory Limit: 64 MB Submit: 636 Solved: 387 [Submit][Status][Discuss] Description Ever the maturing businessman, Farmer John realizes that he must manage his time effectively. He has N jobs conveniently numbered 1..N (1 <= N <= 1,000) to accomplish (like milking the cows, cleaning the barn, mending the fences, and so on). To manage his time effectively, he has

codeforces 137 C. History (sorting,贪心)

题目链接 题意:给出n个时间的开始和截止时间,保证没有两个时间的开始或者截止时间相同,问有多少个时间被包含在其他事件中。即aj < ai and bi < bj. 思路

hdu 5646 ||bc #76 div 2 (贪心)

题目链接 题意:将正整数n(n<=1E9),拆分成k个(k<=1E9)个**互不相等的正整数,**并且使得k个正整数的乘积最大。如

codeforces croc 2016 B. Mischievous Mess Makers (贪心)

题目链接 题意:长度为n的初始为1,2,3…n的序列,最多进行k次两个数交换,变换后的序列中最懂能有多少逆序对。 思路:贪心得想。

codeforces #345 div2 A. Joysticks (贪心)

题目链接 题意:两个手柄? 初始的电量给出,只有一个充电器,每经过一秒,充着电的手柄电量增加1,没有充电的手柄电量减少2,允许电量充到0以上,当

nthu 10925 - Advanced Heap Sort

http://140.114.86.238/problem/10925/ Description 有兩個序列S1和S2,各有N個元素。當我們在S1,S2各取一個數字時,總共會有NN這麼多可能的”和”(sum)。請找出這NN這麼多和裡最

codeforces #339 div2 D

http://codeforces.com/contest/613/problem/B 题意:有n个技能,初始每个技能的level为a[i],每个技能最大level为A(不妨称为满级技能),设满级技能个数为maxnum,最小的

zoj 3693 Happy Great BG

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3693 题意: n+2个人取吃饭,每人w元,每k个人可以少付一个人的钱,问最后两个教练每人要付多少钱。 思路:贪心。坑点在读题。。选手n个人,不要忘记

codeforces 373 C. Counting Kangaroos is Fun

http://codeforces.com/contest/373/problem/C 题意:n个袋鼠,每个袋鼠的size为a[i],一只袋鼠的size至少是另一只两倍时才能将它装下,被装下的袋鼠不能再装别的袋鼠且不能被看见。

uva 10785 The Mad Numerologist

https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid;=8&page;=show_problem&problem;=1726 题意:给出26个大写字母的权值,要求构造一个长度为n(n不超过210)的字符串。并且满足奇数位置只能放元音字母,偶数位置只能放辅音字母,且