- 博客(59)
- 资源 (10)
- 收藏
- 关注
原创 [ACM] ZOJ 3329 One Person Game (概率DP,有环,巧妙转化)
One Person GameTime Limit: 1 Second Memory Limit: 32768 KB Special JudgeThere is a very simple and interesting one-person game. You have 3 dice, namely Die1, Die2 and Die3. Die1 ha
2014-07-31 19:33:16 2288
原创 [ACM] POJ 2151 Check the difficulty of problems (概率+DP)
Check the difficulty of problemsTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 4748 Accepted: 2078DescriptionOrganizing a programming contest is not
2014-07-31 15:59:45 1526
原创 [ACM] hdu 3853 LOOPS (概率DP,递推)
LOOPSProblem DescriptionAkemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl).Homura wants to help her friend Madoka save the world. But because of the plot of the Boss Incubator,
2014-07-31 10:21:14 1593
原创 [ACM] hdu 4405 Aeroplane chess (概率DP)
Aeroplane chessProblem DescriptionHzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws a dice(a dice hav
2014-07-31 09:36:37 1379
原创 [ACM] POJ 2154 Color (Polya计数优化,欧拉函数)
ColorTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 7630 Accepted: 2507DescriptionBeads of N colors are connected together into a circular necklace of
2014-07-30 20:46:25 1902
原创 [ACM] 几道母函数题目 hdu 1028 1398 1085
Ignatius and the Princess IIITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12608 Accepted SubmisProblem Description"Well, i
2014-07-30 19:01:02 1268
原创 [ACM] hdu 4248 A Famous Stone Collector (DP+组合)
A Famous Stone CollectorProblem DescriptionMr. B loves to play with colorful stones. There are n colors of stones in his collection. Two stones with the same color are indistinguishable. M
2014-07-30 15:15:56 1826
原创 [ACM] hdu 2049 不容易系列之(4)——考新郎 (组合+错排)
国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做"考新郎",具体的操作是这样的:首先,给每位新娘打扮得几乎一模一样,并盖上大大的红盖头随机坐成一排;然后,让各位新郎寻找自己的新娘.每人只准找一个,并且不允许多人找一个.最后,揭开盖头,如果找错了对象就要当众跪搓衣板...看来做新郎也不是容易的事情...
2014-07-30 10:01:04 1783
原创 [ACM] POJ 1664 放苹果(n个相同小球放入m个相同盒子)
放苹果Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 25952 Accepted: 16509Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。
2014-07-30 09:35:56 6166
原创 [ACM] FZU 1570 集合划分问题( 不同小球放入相同盒子,第二类Stirling数)
Problem Descriptionn个元素的集合{1,2,...,n}可以划分若干个非空子集。例如,当n=4时,集合{1,2,3,4}可以划分为15个不同的非空子集如下: {{1},{2},{3},{4}},{{1,2},{3},{4}},{{1,3},{2},{4}},{{1,4},{2},{3}},{{2,3},{1},{4}},{{2,4},{1},{3}},{
2014-07-30 09:21:40 2471
原创 [ACM] POJ 2947 Widget Factory (高斯消元)
Widget FactoryTime Limit: 7000MS Memory Limit: 65536KTotal Submissions: 4436 Accepted: 1502DescriptionThe widget factory produces several different kinds of widge
2014-07-29 19:22:13 2398
原创 [ACM] POJ 3318 Matrix Multiplication (随机化算法)
Matrix MultiplicationTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16118 Accepted: 3485DescriptionYou are given three n × n matrices A, B and C. Doe
2014-07-28 21:20:46 3650
原创 [ACM] POJ 1061青蛙的约会(扩展欧几里得求模线性方程)
青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 89206 Accepted: 15926Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到
2014-07-28 16:26:04 1136
原创 [ACM] POJ 3440 Coin Toss (几何概率)
Coin TossTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 3019 Accepted: 817DescriptionIn a popular carnival game, a coin is tossed onto a table with a
2014-07-28 13:26:30 2941 1
原创 [ACM] POJ 3071 Football (概率DP)
FootballTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2875 Accepted: 1462DescriptionConsider a single-elimination football tournament involving 2n
2014-07-28 09:25:15 2163
原创 [ACM] POJ 1026 Cipher (组合数学,置换)
CipherTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 19228 Accepted: 5148DescriptionBob and Alice started to use a brand-new encoding scheme. Surpris
2014-07-27 11:32:45 1845 1
原创 [ACM] POJ 3270 Cow Sorting (置换,贪心)
Cow SortingTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 5946 Accepted: 2263DescriptionFarmer John's N (1 ≤ N ≤ 10,000) cows are lined up to be milk
2014-07-27 07:45:36 1904
原创 [ACM] hdu 3923 Invoker (Poyla计数,快速幂运算,扩展欧几里得或费马小定理)
InvokerProblem DescriptionOn of Vance's favourite hero is Invoker, Kael. As many people knows Kael can control the elements and combine them to invoke a powerful skill. Vance like Kael v
2014-07-25 19:35:07 2347
原创 [ACM] ZOJ 3725 Painting Storages (DP计数+组合)
Painting StoragesTime Limit: 2 Seconds Memory Limit: 65536 KBThere is a straight highway with N storages alongside it labeled by 1,2,3,...,N. Bob asks you to paint all storages with two
2014-07-25 14:01:52 1980
原创 [ACM] POJ 1286 Necklace of Beads (Polya计数,直接套公式)
Necklace of BeadsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 6547 Accepted: 2734DescriptionBeads of red, blue or green colors are connected togeth
2014-07-25 10:07:46 1979
原创 [ACM] POJ 2409 Let it Bead (Polya计数)
Let it BeadTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4434 Accepted: 2916Description"Let it Bead" company is located upstairs at 700 Cannery Row
2014-07-25 09:55:43 3514 1
转载 C++中lower_bound函数和upper_bound函数 以及 sort(参数)
STL中关于二分查找的函数有三个lower_bound 、upper_bound 、binary_search 。这三个函数都运用于有序区间(当然这也是运用二分查找的前提),下面记录一下这两个函数。ForwardIter lower_bound(ForwardIter first, ForwardIter last,const _Tp& val)算法返回一个非递减序列[first, l
2014-07-24 09:59:04 3980
原创 [ACM] POJ 3061 Subsequence (尺取法)
SubsequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8403 Accepted: 3264DescriptionA sequence of N positive integers (10 < N < 100 000), each of
2014-07-24 09:50:35 2331
原创 [ACM] POJ 3096 Surprising Strings (map的使用)
Surprising StringsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5783 Accepted: 3792DescriptionThe D-pairs of a string of letters are the ordered pai
2014-07-23 20:02:19 1538
原创 [ACM] POJ 3258 River Hopscotch (二分,最大化最小值)
River HopscotchTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6697 Accepted: 2893DescriptionEvery year the cows hold an event featuring a peculiar ve
2014-07-23 17:51:10 2036
原创 [ACM] POJ 3273 Monthly Expense (二分解决最小化最大值)
Monthly ExpenseTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 14158 Accepted: 5697DescriptionFarmer John is an astounding accounting wizard and has r
2014-07-23 16:05:24 4669 1
原创 [ACM] POJ 1942 Paths on a Grid (组合)
解题思路:简单题,求解 C(n+m, m) .代码:#include #include using namespace std;long long c(long long n,long long m){ long long ans=1; for(int i=1;i<=m;i++) ans=ans*(n--)/i; return ans;
2014-07-23 10:09:30 1620
原创 [ACM] POJ 3252 Round Numbers (一个区间内二进制中0的个数大于等于1的个数有多少个,组合)
Round NumbersTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 8590 Accepted: 3003DescriptionThe cows, as you know, have no fingers or thumbs and thus a
2014-07-22 09:45:59 3037
原创 [ACM] POJ 1845 Sumdiv(求A的B次方的所有因子的和,一大堆数学公式...,可做模板)
解题思路:题意是求A的B次方的所有因子的和。学到了一堆数学公式。。下面知识点和思路转载于:http://blog.csdn.net/lyy289065406/article/details/6648539应用定理主要有三个:要求有较强 数学思维 的题应用定理主要有三个:(1) 整数的唯一分解定理: 任意正整数都有且只有一种方式写出其
2014-07-21 16:21:59 2810
原创 [ACM] POJ 2796 Feel Good (求序列中子序列的和与子序列中的最小数最大乘积)
Feel GoodTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 9186 Accepted: 2509Case Time Limit: 1000MS Special JudgeDescriptionBill is developi
2014-07-21 11:08:01 2848
原创 [ACM] POJ 3485 Highway (区间选点问题)
HighwayTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 871 Accepted: 402DescriptionBob is a skilled engineer. He must design a highway that crosses a
2014-07-21 08:37:25 2213
原创 [ACM] POJ 2635 The Embarrassed Cryptographer (同余定理,素数打表)
The Embarrassed CryptographerTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 11978 Accepted: 3194DescriptionThe young and very promising cryptographer
2014-07-20 14:28:57 2146
原创 [ACM] POJ 2418 Hardwood Species (Trie树或者map)
Hardwood SpeciesTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 17986 Accepted: 7138DescriptionHardwoods are the botanical group of trees that have b
2014-07-19 17:35:01 2834
原创 [ACM] hdu 1251 统计难题 (字典树)
统计难题Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 17416 Accepted Submission(s): 7528Problem DescriptionIgnatius最近遇到一个难题,老师
2014-07-18 17:19:42 1584
原创 [ACM] POJ 2513 Colored Sticks (Trie树,欧拉通路,并查集)
Colored SticksTime Limit: 5000MS Memory Limit: 128000KTotal Submissions: 29736 Accepted: 7843DescriptionYou are given a bunch of wooden sticks. Each endpoint of
2014-07-18 16:54:24 2728 1
原创 [ACM] POJ 3253 Fence Repair (Huffman树思想,优先队列)
Fence RepairTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 25274 Accepted: 8131DescriptionFarmer John wants to repair a small length of the fence aro
2014-07-18 08:19:23 1956
原创 [ACM] POJ 2442 Sequence (堆的性质)
解题思路: 有m行,每行n个数,从每行中取出一个数相加一起求出sum,这样的sum有n的m次方个。要求的前n个最小的sum值。第一次使用STL里面的堆,一开始对pop_heap()有点不太理解,后来明白了,比如对数组heap[n],最大下标为n-1建堆,默认的是建立大顶堆,heap[0]是数组中最大的数,写一条pop_heap()语句,就是把heap[0]和 heap[n
2014-07-17 20:18:59 2166 1
原创 [ACM] POJ 1936 All in All (查找,一个串是否在另一个串中)
All in AllTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 27521 Accepted: 11266DescriptionYou have devised a new encryption technique which encodes a me
2014-07-17 16:26:27 3014
listView异步加载(多线程和AsyncTask)以及缓存的使用
2016-04-13
AsyncTask加载网络图片并模拟进度条更新
2016-04-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人