上一页 1 2 3 4 5 6 ··· 53 下一页
摘要: 题目链接: B. Clique Problem time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output time limit per t 阅读全文
posted @ 2017-05-14 21:56 LittlePointer 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 题目链接: F. Coprime Subsequences time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output time limit 阅读全文
posted @ 2017-05-14 17:18 LittlePointer 阅读(373) 评论(0) 推荐(0) 编辑
摘要: 题目链接: Fluorescent Time Limit: 3000/3000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others) Problem Description Matt, a famous adventurer who 阅读全文
posted @ 2017-04-29 23:56 LittlePointer 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 题目链接: Heap Partition A sequence S = {s1, s2, ..., sn} is called heapable if there exists a binary tree T with n nodes such that every node is labelled 阅读全文
posted @ 2017-04-22 21:53 LittlePointer 阅读(775) 评论(0) 推荐(0) 编辑
摘要: 题目链接: 物品价值 小Hi现在有n个物品,每个物品都有一个价值。并且这n个物品总共有m个不同的属性,每个物品都具有其中若干属性。 小Ho要从中选出若干物品,满足每个属性都正好有奇数个物品拥有,且被选出的物品价值总和最大。你能帮助小Ho完成任务么? Input 第一行一个数T(<=10),表示数据组 阅读全文
posted @ 2017-04-08 11:20 LittlePointer 阅读(304) 评论(0) 推荐(0) 编辑
摘要: 题目链接: 区间价值 给定n个数A1...An,小Ho想了解AL..AR中有多少对元素值相同。小Ho把这个数目定义为区间[L,R]的价值,用v[L,R]表示。 例如1 1 1 2 2这五个数所组成的区间的价值为4。 现在小Ho想知道在所有的的v[L,R](1 <= L <= R <= n)中,第k小 阅读全文
posted @ 2017-04-07 23:58 LittlePointer 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 题目链接: Problem: Query on the tree Time limit: 1s Mem limit: 64 MB Problem Description There is a tree with n node, labeled from 1 to n, and the root of 阅读全文
posted @ 2017-03-20 13:08 LittlePointer 阅读(182) 评论(0) 推荐(0) 编辑
摘要: A: Anton and Polyhedrons(水题) B: Anton and Classes(水题) C: Anton and Fairy Tale(二分) 思路:m>=n时 ans=n;m<n时 前m天都能补满,第m+1天时就要开始减少了,n-m-(x+1)*x/2是m天后第x天的剩余,二分 阅读全文
posted @ 2017-03-16 19:00 LittlePointer 阅读(100) 评论(0) 推荐(0) 编辑
摘要: A: Andryusha and Socks(模拟) B: The Meeting Place Cannot Be Changed(三分) 思路:时间关于位置是一个凹函数,直接三分求极值就行; C: Andryusha and Colored Balloons(dfs) 思路:k是最大的度数+1,然 阅读全文
posted @ 2017-03-06 12:00 LittlePointer 阅读(221) 评论(0) 推荐(0) 编辑
摘要: A: B: C: Molly's Chemicals(前缀和+map) 题意:在这个数组里面取连续的一段,问有多少种取法使得这段的和为k的自然数幂次; 思路:不能直接暴力,连续的自然联想到前缀和,假设要求和为x的数目,k的不同的幂次就是多个不同的x的计数和了;sum[i]-sum[j]=x,sum[ 阅读全文
posted @ 2017-02-25 21:35 LittlePointer 阅读(159) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 53 下一页