05 2018 档案

摘要:A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the... 阅读全文
posted @ 2018-05-29 19:53 Assassin_poi君 阅读(120) 评论(0) 推荐(0) 编辑
摘要:现在有n堆果子,第i堆有ai个果子。现在要把这些果子合并成一堆,每次合并的代价是两堆果子的总果子数。求合并所有果子的最小代价。Input第一行包含一个整数T(T#include using namespace std;struct cmp{ bool operato... 阅读全文
posted @ 2018-05-29 17:14 Assassin_poi君 阅读(134) 评论(0) 推荐(0) 编辑
摘要:Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flowers, she will try to 阅读全文
posted @ 2018-05-29 16:44 Assassin_poi君 阅读(153) 评论(0) 推荐(0) 编辑
摘要:Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flowers,... 阅读全文
posted @ 2018-05-29 16:41 Assassin_poi君 阅读(97) 评论(0) 推荐(0) 编辑
摘要:头文件:#include <iostream> 参数:和sort一样。两个参数——开始地址和结束地址(左闭右开)。 返回值:去重之后的尾地址!!! 作用:unique的作用是“去掉”容器中相邻元素的重复元素。 解析:unique实质上是一个伪去除,它并不是真正把重复的元素删除,而是用不重复的元素把重 阅读全文
posted @ 2018-05-28 19:13 Assassin_poi君 阅读(1741) 评论(0) 推荐(2) 编辑
摘要:The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral p... 阅读全文
posted @ 2018-05-28 18:54 Assassin_poi君 阅读(98) 评论(0) 推荐(0) 编辑
摘要:头文件:#include 参数:和sort一样。两个参数——开始地址和结束地址(左闭右开)。返回值:去重之后的尾地址!!!作用:unique的作用是“去掉”容器中相邻元素的重复元素。解析:unique实质上是一个伪去除,它并不是真正把重复的元素删除,而是用不重复的元素... 阅读全文
posted @ 2018-05-28 15:30 Assassin_poi君 阅读(179) 评论(0) 推荐(0) 编辑
摘要:Jam like to solve the problem which on the 3D-axis,given N(1=xj,yi>=yj,zi>=zj,the bigger one level add 1.Ask for the each level of the... 阅读全文
posted @ 2018-05-23 18:56 Assassin_poi君 阅读(153) 评论(0) 推荐(0) 编辑
摘要:放在头文件前面#pragma comment(linker,"/STACK:1024000000,1024000000") 阅读全文
posted @ 2018-05-23 17:01 Assassin_poi君 阅读(646) 评论(0) 推荐(0) 编辑
摘要:Give a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The min distance between ... 阅读全文
posted @ 2018-05-22 21:10 Assassin_poi君 阅读(137) 评论(0) 推荐(0) 编辑
摘要:点分治的时间复杂度为O(NlogN)。由于每次都是找重心,所以处理完一个大小为N的树后,每个子树的大小最大都为N/2,所以最多分治NlogN层,每层都是N所以是O(NlogN)。【具体流程】1,选取一个点,将无根树变成有根树 为了使每次的处理最优,我们通常要选取树的... 阅读全文
posted @ 2018-05-22 19:09 Assassin_poi君 阅读(207) 评论(0) 推荐(0) 编辑
摘要:Polycarpus has a sequence, consisting of n non-negative integers: a1, a2, ..., an.Let's define function f(l, r) (l, r are integer, 1 ≤... 阅读全文
posted @ 2018-05-21 10:58 Assassin_poi君 阅读(240) 评论(0) 推荐(0) 编辑
摘要:求:3^0 + 3^1 +...+ 3^(N) mod 1000000007Input输入一个数N(0 #include #include #include using namespace std;#define mod 1000000007long long myP... 阅读全文
posted @ 2018-05-18 21:58 Assassin_poi君 阅读(183) 评论(0) 推荐(0) 编辑
摘要:转载自:海克斯科技门1.首先,需要的头文件:import java.math.*; // 包含大数类的包 import java.util.*; // 包含输入头的包2.然后一个java程序的主体应该是这样:public class Main{ pu... 阅读全文
posted @ 2018-05-18 21:24 Assassin_poi君 阅读(266) 评论(0) 推荐(0) 编辑
摘要:I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of the... 阅读全文
posted @ 2018-05-18 20:56 Assassin_poi君 阅读(284) 评论(0) 推荐(0) 编辑
摘要:#define MAX_VEX 10//最大顶点数typedef int InfoType;typedef char VexType;//顶点的类型typedef int WeightType;//权值的类型 图的种类(有向图、无向图、加权有向图、加权无向图),采用枚... 阅读全文
posted @ 2018-05-18 19:17 Assassin_poi君 阅读(192) 评论(0) 推荐(0) 编辑
摘要:杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不吉利的数字为所有含有4或62的号码。例如... 阅读全文
posted @ 2018-05-17 19:10 Assassin_poi君 阅读(131) 评论(0) 推荐(0) 编辑
摘要:Painting some colored segments on a line, some previously painted segments may be covered by some the subsequent ones. Your ta... 阅读全文
posted @ 2018-05-17 15:01 Assassin_poi君 阅读(129) 评论(0) 推荐(0) 编辑
摘要:typedef long long ll; int a[20]; ll dp[20][state];//不同题目状态不同 ll dfs(int pos,/*state变量*/,bool lead/*前导零*/,bool limit... 阅读全文
posted @ 2018-05-17 11:13 Assassin_poi君 阅读(122) 评论(0) 推荐(0) 编辑
摘要:During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. General... 阅读全文
posted @ 2018-05-17 11:05 Assassin_poi君 阅读(139) 评论(0) 推荐(0) 编辑
摘要:Time limit3000 msMemory limit32768 kBThere are a bunch of stones on the beach; Stone color is white or black. Little Sheep has a magic... 阅读全文
posted @ 2018-05-16 18:57 Assassin_poi君 阅读(192) 评论(0) 推荐(2) 编辑
摘要:方法一:int tmp = 0; tmp = b; b = a; a = tmp; 方法二:a = a+b;b = a-b;a = a-b;方法三:a ^= b ^= a^= b;方法四:a = a+b-(b=a); 阅读全文
posted @ 2018-05-16 16:43 Assassin_poi君 阅读(574) 评论(0) 推荐(0) 编辑
摘要:Time limit5000 msCase time limit2000 msMemory limit65536 kBFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up... 阅读全文
posted @ 2018-05-15 21:46 Assassin_poi君 阅读(180) 评论(0) 推荐(0) 编辑
摘要:In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several cons... 阅读全文
posted @ 2018-05-15 20:36 Assassin_poi君 阅读(119) 评论(0) 推荐(0) 编辑
摘要:Time limit5000 msCase time limit2000 msMemory limit131072 kBYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of ... 阅读全文
posted @ 2018-05-15 20:13 Assassin_poi君 阅读(114) 评论(0) 推荐(0) 编辑
摘要:Time limit1000 msMemory limit100000 kBCorrupt governors always find ways to get dirty money. Paint something, then sell the worthless ... 阅读全文
posted @ 2018-05-14 21:03 Assassin_poi君 阅读(115) 评论(0) 推荐(0) 编辑
摘要:首先是建树:const int MAXN = 1005;//定义 MAXM 为线段最大长度int Tree[4*MAXN];// Data数组为 main 函数中读入的内容,Tree数组为需要查询的数的信息(如和、最值等),树的空间大小为线段最大长度的四倍!四倍!四倍... 阅读全文
posted @ 2018-05-14 19:33 Assassin_poi君 阅读(128) 评论(0) 推荐(0) 编辑
摘要:You are given a string s consisting of lowercase Latin letters. Character c is called k-dominant iff each substring of s with length a... 阅读全文
posted @ 2018-05-14 16:40 Assassin_poi君 阅读(160) 评论(0) 推荐(0) 编辑
摘要:Time limit2000 msMemory limit262144 kBHarry came to know from Dumbledore that Salazar Slytherin's locket is a horcrux. This locket was... 阅读全文
posted @ 2018-05-14 16:04 Assassin_poi君 阅读(221) 评论(0) 推荐(0) 编辑
摘要:Time limit1000 msMemory limit65536 kBFor a number,if the length of continuous odd digits is even and the length of continuous even dig... 阅读全文
posted @ 2018-05-14 14:24 Assassin_poi君 阅读(177) 评论(0) 推荐(0) 编辑
摘要:There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical struct... 阅读全文
posted @ 2018-05-13 15:24 Assassin_poi君 阅读(166) 评论(0) 推荐(0) 编辑
摘要:// _ooOoo_// o8888888o// 88" . "88// ... 阅读全文
posted @ 2018-05-12 21:40 Assassin_poi君 阅读(219) 评论(0) 推荐(0) 编辑
摘要:前几天做题遇到求LIS的题,照常用dp去做结果超时了。之后就去网上找了O(nlogn)的方法。因为看了好几个博客我才看懂,所以这里我进行下总结。首先第一种写法:假设存在一个序列d[1..9] = 2 1 5 3 6 4 8 9 7,可以看出来它的LIS长度为5。下面一... 阅读全文
posted @ 2018-05-07 20:26 Assassin_poi君 阅读(233) 评论(0) 推荐(0) 编辑
摘要:There is a sequence X (i.e. x[1], x[2], ..., x[n]). We define increasing subsequence of X as x[i1], x[i2],...,x[ik], which satisfies f... 阅读全文
posted @ 2018-05-07 20:04 Assassin_poi君 阅读(138) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示