自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(37)
  • 资源 (1)
  • 收藏
  • 关注

原创 HDU-5734 Acperience(公式化简)

Deep neural networks (DNN) have shown significant improvements in several application domains including computer vision and speech recognition. In computer vision, a particular type of DNN, known as Convolutional Neural Networks (CNN), have demonstrated st

2017-08-31 17:27:10 473

原创 CodeForces-835E The penguin's game(思维+二进制乱搞+交互题)

Pay attention: this problem is interactive.Penguin Xoriy came up with a new game recently. He has n icicles numbered from 1 to n. Each icicle has a temperature — an integer from 1 to 109. Exactly two of these icicles are special: their temperature is y, w

2017-08-31 14:14:27 343

原创 QDU Julyc和CerberuX去吃饭后传(贪心、思维)

上次Julyc和CerberuX因为去吃饭打的不可开交,而一般人都不会想和CerberuX打架,Julyc也不例外。这次他们去了一条小吃街,小吃街里有n种小吃,Julyc和CerberuX口味不同,对于每一种小吃,每个人都有着各自的对这种小吃的喜爱值,虽然Julyc非常想独自行动,但是每次独自行动后CerberuX都会走丢(即使学校门口的小吃街),所以Julyc和CerberuX必须一起行动,也就是说他们要选择相同的小吃。先约定一个人“吃得好”是指他吃到的小吃的喜爱值(他对这种小吃的喜爱值)累加之和大于没吃

2017-08-29 04:35:34 327

原创 HDU-6178 Monkeys - 2017 Multi-University Training Contest - Team 10(树形DP)

There is a tree having N vertices. In the tree there are K monkeys (K <= N). A vertex can be occupied by at most one monkey. They want to remove some edges and leave minimum edges, but each monkey must be connected to at least one other monkey through the

2017-08-26 11:02:58 269

原创 HDU-6170 Two strings - 2017 Multi-University Training Contest - Team 9(DP)

Giving two strings and you should judge if they are matched. The first string contains lowercase letters and uppercase letters. The second string contains lowercase letters, uppercase letters, and special symbols: “.” and “*”. . can match any letter, an

2017-08-23 01:37:41 330

原创 HDU-6165 FFF at Valentine - 2017 Multi-University Training Contest - Team 9(强连通分量缩点+拓扑)

At Valentine's eve, Shylock and Lucar were enjoying their time as any other couples. Suddenly, LSH, Boss of FFF Group caught both of them, and locked them into two separate cells of the jail randomly. But as the saying goes: There is always a way out , the

2017-08-22 19:39:05 353

原创 HDU-6156 Palindrome Function(数位DP)

As we all know,a palindrome number is the number which reads the same backward as forward,such as 666 or 747.Some numbers are not the palindrome numbers in decimal form,but in other base,they may become the palindrome number.Like 288,it’s not a palindrome

2017-08-22 10:08:37 280

原创 CodeForces - 839E Mother of Dragons(无向图最大团)

There are n castles in the Lannister's Kingdom and some walls connect two castles, no two castles are connected by more than one wall, no wall connects a castle to itself.Sir Jaime Lannister has discovered that Daenerys Targaryen is going to attack his k

2017-08-21 20:35:33 407

原创 无向图的极大团、最大团(Bron-Kerbosch算法)

描述:团就是最大完全子图。(极大团)给定无向图G=(V,E)。如果U包含于V,且对任意u,v属于U且有(u,v)属于E,则称U是G的完全子图。G的完全子图U是G的团当且仅当U不包含在G的更大的完全子图中,即U就是最大完全子图。G的最大团是指G中所含顶点数最多的团。// 最大团: V中取K个顶点,两点间相互连接// 最大独立集: V中取K个顶点,两点间不连接// 最大...

2017-08-21 18:13:39 27873 8

原创 2017CCPC网络赛 Friend-Graph(暴力、拉姆齐(Ramsey)定理)

It is well known that small groups are not conducive of the development of a team. Therefore, there shouldn’t be any small groups in a good team. In a team with n members,if there are three or more members are not friends with each other or there are thre

2017-08-21 01:09:13 595

原创 HDU-6140 Killer Names - 2017 Multi-University Training Contest - Team 8(思维)

> Kyber crystals, also called the living crystal or simply the kyber, and known as kaiburr crystals in ancient times, were rare, Force-attuned crystals that grew in nature and were found on scattered planets across the galaxy. They were used by the Jedi an

2017-08-17 20:14:13 258

原创 CodeForces-839C Journey(DFS+概率)

There are n cities and n - 1 roads in the Seven Kingdoms, each road connects two cities and we can reach any city from any other by the roads.Theon and Yara Greyjoy are on a horse in the first city, they are starting traveling through the roads. But the w

2017-08-17 01:18:36 383

原创 CodeForces-839B Game of the Rows(思维、细节)

Daenerys Targaryen has an army consisting of k groups of soldiers, the i-th group contains ai soldiers. She wants to bring her army to the other side of the sea to get the Iron Throne. She has recently bought an airplane to carry her army through the sea.

2017-08-16 23:59:39 256

原创 HDU-6121 Build a tree - 2017 Multi-University Training Contest - Team 7(完全K叉树)

HazelFan wants to build a rooted tree. The tree has nn nodes labeled 00 to n−1n−1, and the father of the node labeled ii is the node labeled. HazelFan wonders the size of every subtree, and you just need to tell him the XOR value of these answ

2017-08-16 23:38:09 288

原创 HDU-6129 Just do it - 2017 Multi-University Training Contest - Team 7(规律、杨辉三角、组合数奇偶性)

There is a nonnegative integer sequence a1...na1...n of length nn. HazelFan wants to do a type of transformation called prefix-XOR, which means a1...na1...n changes into b1...nb1...n, where bibi equals to the XOR value of a1,...,aia1,...,ai. He will repeat

2017-08-16 21:01:39 369

原创 HDU 2448 Mining Station on the Sea(最小费用最大流, KM算法)

The ocean is a treasure house of resources and the development of human society comes to depend more and more on it. In order to develop and utilize marine resources, it is necessary to build mining stations on the sea. However, due to seabed mineral resou

2017-08-14 22:59:26 429

原创 2017 百度之星B轮初赛(Chess, 度度熊的交易计划, 小小粉丝度度熊)

HDU 6114 HDU 6115 HDU 6116 HDU 6117 HDU 6118 HDU 6119ChessAccepts: 1805Submissions: 573Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description車是中国象棋中的一种棋子,它能攻击同一行或同一列中没有其

2017-08-13 23:07:24 563

原创 CodeForces-731E Funny Game(DP+Games)

Once upon a time Petya and Gena gathered after another programming competition and decided to play some game. As they consider most modern games to be boring, they always try to invent their own games. They have only stickers and markers, but that won't st

2017-08-13 12:30:36 385

原创 2017 百度之星A轮初赛(小C的倍数问题, 今夕何夕, 度度熊的01世界)

HDU 6113 HDU 6112 HDU 6111 HDU 6110 HDU 6109 HDU 6108小C的倍数问题  Accepts: 1990  Submissions: 4931 Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 32768/32768 K (Java/Others)Problem Description根据小学数学的知识,我们知道一个正整数x是3的倍数的

2017-08-13 01:15:31 535

原创 HDU-6105 Gameia - 2017 Multi-University Training Contest - Team 6(思维之找规律或二分图最大匹配)

Alice and Bob are playing a game called 'Gameia ? Gameia !'. The game goes like this : 0. There is a tree with all node unpainted initial. 1. Because Bob is the VIP player, so Bob has K chances to make a small change on the tree any time during the game

2017-08-11 23:59:49 292

原创 HDU-6103 Kirinriki - 2017 Multi-University Training Contest - Team 6(尺取)

We define the distance of two strings A and B with same length n is disA,B=∑i=0n−1|Ai−Bn−1−i|disA,B=∑i=0n−1|Ai−Bn−1−i| The difference between the two characters is defined as the difference in ASCII. You should find the maximum length of two non-overlap

2017-08-11 20:20:43 247

原创 HDU-4109 Instrction Arrangement(差分约束系统+增加源点技巧)

Ali has taken the Computer Organization and Architecture course this term. He learned that there may be dependence between instructions, like WAR (write after read), WAW, RAW. If the distance between two instructions is less than the Safe Distance, it wil

2017-08-09 18:29:21 417

原创 HDU-5724 Chess(SG函数+状压)

Alice and Bob are playing a special chess game on an n × 20 chessboard. There are several chesses on the chessboard. They can move one chess in one turn. If there are no other chesses on the right adjacent block of the moved chess, move the chess to its ri

2017-08-09 15:21:24 356

原创 HDU-4315 Climbing the Hill(阶梯博弈变形)

题意:在山上有n个人,每个人编号是1~n,这些位置只能同时被一个人占据,但是山顶可以同时被多个人占据,距离山顶第k近的是King,现在Alice和Bob开始向上送人,条件是不能跨越前面最近的人,问在Alice先手,双方最优的条件下谁能把King送到山顶获胜。思路:一道阶梯博弈变形的题,POJ-1704是一道朴素的阶梯博弈题目,但是这题与之有区别:每个点都可以移动到山顶,如果没这个条件再

2017-08-09 11:52:05 602

原创 HDU-3666 THE MATRIX PROBLEM(差分约束系统判断存在与否+特殊剪枝)

You have been given a matrix C N*M, each element E of C N*M is positive and no more than 1000, The problem is that if there exist N numbers a1, a2, … an and M numbers b1, b2, …, bm, which satisfies that each elements in row-i multiplied with ai and each el

2017-08-07 15:27:06 447

原创 HDU-3440 House Man(差分约束系统)

In Fuzhou, there is a crazy super man. He can’t fly, but he could jump from housetop to housetop. Today he plans to use N houses to hone his house hopping skills. He will start at the shortest house and make N-1 jumps, with each jump taking him to a taller

2017-08-06 18:20:33 309

原创 UVALive-5013 Similarity(二分图最大权匹配)

When we were children, we were always asked to do the classification homework. For example, wewere given words {Tiger, Panda, Potato, Dog, Tomato, Pea, Apple, Pear, Orange, Mango} and wewere required to classify these words into three groups. As you know

2017-08-05 23:50:11 346

原创 POJ-3352 Road Construction(边双连通分量+缩点)

It's almost summer time, and that means that it's almost summer construction time! This year, the good people who are in charge of the roads on the tropical island paradise of Remote Island would like to repair and upgrade the various roads that lead betwe

2017-08-05 16:33:32 406

原创 HDU-6073 Matching In Multiplication - 2017 Multi-University Training Contest - Team 4(拓扑+连通块处理)

In the mathematical discipline of graph theory, a bipartite graph is a graph whose vertices can be divided into two disjoint sets UU and VV (that is, UU and VV are each independent sets) such that every edge connects a vertex in UU to one in VV. Vertex set

2017-08-04 19:32:28 456

原创 HDU-6069 Counting Divisors - 2017 Multi-University Training Contest - Team 4(分解质因子区间筛法)

In mathematics, the function d(n)d(n) denotes the number of divisors of positive integer nn. For example, d(12)=6d(12)=6 because 1,2,3,4,6,121,2,3,4,6,12are all 1212's divisors. In this problem, given l,rl,r and kk, your task is to calculate the following

2017-08-04 16:50:33 342

原创 POJ-2689 Prime Distance(区间素数筛--经典题)

The branch of mathematics called number theory is about properties of numbers. One of the areas that has captured the interest of number theoreticians for thousands of years is the question of primality. A prime number is a number that is has no proper fac

2017-08-04 16:31:55 804

原创 哈密顿图和欧拉图知识小结

哈密顿图的判定是世界级难题。设G是n阶无向简单图,若对于G中任意不相邻的顶点u、v,均有d(u)+d(v)>=n-1,则说明G中存在哈密顿通路。不过,这个条件只是充分条件,而不是必要条件。也就是说,满足该条件一定存在哈密顿通路,但不满足该条件不一定不存在哈密顿通路。如下图便不满足,但它存在哈密顿路。所以要判断哈密顿回路和哈密顿路径一般通过深搜回溯去判定,代码:#in

2017-08-02 20:56:46 12789

原创 POJ-1637 Sightseeing tour(通过网络流判定混合图的欧拉回路)

The city executive board in Lund wants to construct a sightseeing tour by bus in Lund, so that tourists can see every corner of the beautiful city. They want to construct the tour so that every street in the city is visited exactly once. The bus should als

2017-08-02 19:31:34 429

原创 POJ-3270 Cow Sorting(贪心+置换)

Farmer John's N (1 ≤ N ≤ 10,000) cows are lined up to be milked in the evening. Each cow has a unique "grumpiness" level in the range 1...100,000. Since grumpy cows are more likely to damage FJ's milking equipment, FJ would like to reorder the cows in line

2017-08-02 14:15:54 343

原创 HDU-6060 RXD and dividing - 2017 Multi-University Training Contest - Team 3(思维+最小斯坦纳树)

RXD has a tree TT, with the size of nn. Each edge has a cost. Define f(S)f(S) as the the cost of the minimal Steiner Treeof the set SS on tree TT. he wants todivide2,3,4,5,6,n2,3,4,5,6,…n into kk parts S1,S2,S3,…SkS1,S2,S3,…Sk, where ⋃Si={2,3,…,n}⋃Si={2,3,

2017-08-01 22:26:38 591

原创 HDU-6058 Kanade's sum - 2017 Multi-University Training Contest - Team 3(思维+模拟链表)

Give you an array A[1..n]A[1..n]of length nn. Let f(l,r,k)f(l,r,k) be the k-th largest element of A[l..r]A[l..r]. Specially , f(l,r,k)=0f(l,r,k)=0 if r−l+1<kr−l+1<k. Give you kk , you need to calculate ∑nl=1∑nr=lf(l,r,k)∑l=1n∑r=lnf(l,r,k) There are T test

2017-08-01 20:09:27 414

原创 Codeforces Round #427 (Div. 2)-C. Star sky(二维前缀和)

Codeforces Round #427 (Div. 2)-C. Star sky The Cartesian coordinate system is set in the sky. There you can see n stars, the i-th has coordinates (xi, yi), a maximum brightness c, equal for all stars, and an initial brightness si (0 ≤ si ≤ c).Over time t

2017-08-01 01:28:45 388

我的ACM个人模板模板

自己整理了很久的模板,继续加油~

2018-05-23

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除