- 博客(7)
- 收藏
- 关注
原创 Topcoder 2016 TCO Algorithm Algo Semifinal 1 Hard
链接:https://community.topcoder.com/stat?c=problem_statement&pm=14447&rd=16839题意:给一个DAG图,记边是从a[i]到b[i],边权c[i],要从0走到n,求最短路。保证a[i] 每个点有一个颜色,每种颜色在路径上要么不经过,要么全部经过题解:网络流认真观察可以发现这些边对应的区间构成了树的形式我
2017-05-18 21:36:17 556
原创 Topcoder 2016 TCO Algorithm Algo Semifinal 2 Hard
链接:https://community.topcoder.com/stat?c=problem_statement&pm=14436&rd=16841题意:对于一个大小为k的线性基,可以构造出2 ^ k种不同的异或,其中第rank[i]小的为value[i],求有多少个线性基满足要求。题解:注意分析线性基的性质1、显然rank和value是可以直接消的,先把rank消成主对角
2017-05-18 21:27:15 683
原创 CodeForces 794D. Labelling Cities
Oleg the bank client lives in Bankopolia. There are n cities in Bankopolia and some pair of cities are connected directly by bi-directional roads. The cities are numbered from 1 to n. There are a
2017-05-15 22:12:26 697
原创 CodeForces 794G. Replace All
Igor the analyst is at work. He learned about a feature in his text editor called "Replace All". Igor is too bored at work and thus he came up with the following problem:Given two strings x and y
2017-05-15 22:07:30 1158
原创 CodeForces 773D. Perishable Roads
In the country of Never, there are n cities and a well-developed road system. There is exactly one bidirectional road between every pair of cities, thus, there are as many as roads! No two roads
2017-05-09 20:23:45 933
原创 Atcoder Grand Contest 014F - Strange Sorting
Problem StatementTakahashi loves sorting.He has a permutation (p1,p2,…,pN) of the integers from 1 through N. Now, he will repeat the following operation until the permutation becomes (1,2,…,N)
2017-05-07 00:01:11 1006 3
原创 CodeForces 804E. The same permutation
Seyyed and MoJaK are friends of Sajjad. Sajjad likes a permutation. Seyyed wants to change the permutation in a way that Sajjad won't like it. Seyyed thinks more swaps yield more probability to do tha
2017-05-05 21:30:38 498
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人