搜索
绝尘花遗落
一骑红尘妃子笑,无人知是荔枝来
展开
-
Instantaneous Transference--POJ3592Tarjan缩点+搜索
Instantaneous Transference Time Limit: 5000MS Memory Limit: 65536KDescriptionIt was long ago when we played the game Red Alert. There is a magic function for the game objects which is called instan原创 2016-01-26 16:16:51 · 643 阅读 · 0 评论 -
Codeforces 359 Div2
Codeforces 359 Div2A. Free Ice Cream time limit per test2 seconds memory limit per test256 megabytesAfter their adventure with the magic mirror Kay and Gerda have returned home and sometimes give f原创 2016-06-27 18:50:35 · 979 阅读 · 0 评论 -
Codeforces 360Div2
A. Opponents time limit per test 1 second memory limit per test 256 megabytesArya has n opponents in the school. Each day he will fight with all opponents who are present this day. His opponents ha原创 2016-07-03 10:33:44 · 865 阅读 · 0 评论 -
POJ【1691】——Painting A Board
Painting A Board Time Limit: 1000MS Memory Limit: 10000KDescriptionThe CE digital company has built an Automatic Painting Machine (APM) to paint a flat board fully covered by adjacent non-overlappi原创 2016-07-25 16:06:29 · 584 阅读 · 0 评论 -
POJ【3026】- Borg Maze
Time Limit: 1000MS Memory Limit: 65536KDescriptionThe Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collective is the term used to descri原创 2016-07-18 21:04:17 · 572 阅读 · 0 评论 -
Coderforces 354Div2
A. Nicholas and Permutation time limit per test:1 second memory limit per test:256 megabytesNicholas has an array a that contains n distinct integers from 1 to n. In other words, Nicholas has a per原创 2016-06-23 13:25:25 · 637 阅读 · 0 评论 -
莫队算法专题
BZOJ【2038】—— [2009国家集训队]小Z的袜子(hose)Codeforces 86D. Powerful arrayBzoj【 3289】—— Mato的文件管理HDU【5381】——The sum of gcdBzoj【4540】—— [Hnoi2016]序列Codeforces 617E. XOR and Favorite NumberBzoj【1086】—— [SCOI2005]王室联原创 2016-08-08 16:56:11 · 4158 阅读 · 0 评论 -
Codeforces Round #375 (Div. 2)
Codeforces Round #375 (Div. 2)A. The New Year: Meeting FriendsB. Text Document AnalysisC. Polycarp at the RadioD. Lakes in Berland原创 2016-10-04 08:37:40 · 578 阅读 · 0 评论 -
【Bzoj4568: [Scoi2016]】幸运数字——LCA+线性基
Time Limit: 60 Sec Memory Limit: 256 MBDescriptionA 国共有 n 座城市,这些城市由 n-1 条道路相连,使得任意两座城市可以互达,且路径唯一。每座城市都有一个 幸运数字,以纪念碑的形式矗立在这座城市的正中心,作为城市的象征。一些旅行者希望游览 A 国。旅行者计划 乘飞机降落在 x 号城市,沿着 x 号城市到 y 号城市之间那条唯一的路径游览,原创 2016-11-20 01:22:52 · 687 阅读 · 0 评论 -
第七届ACM山东省赛-E The Binding of Isaac
Time Limit: 2000MS Memory limit: 65536K题目描述 Ok, now I will introduce this game to you… Isaac is trapped in a maze which has many common rooms…Like this…There are 9 common rooms on the map. And t原创 2016-06-10 08:40:08 · 979 阅读 · 0 评论 -
第七届ACM山东省赛-B Fibonacci
Time Limit: 2000MS Memory limit: 131072K题目描述Fibonacci numbers are well-known as follow: Now given an integer N, please find out whether N can be represented as the sum of several Fibonacci numbers i原创 2016-06-09 21:58:03 · 1399 阅读 · 0 评论 -
Knights of the Round Table-POJ2942(双连通分量+交叉染色)
Knights of the Round TableDescriptionBeing a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, and drinking with the other knights are fun things原创 2016-01-10 17:22:20 · 486 阅读 · 0 评论 -
Bag Problem
Bag Problem Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/131072 K (Java/Others) Total Submission(s): 1449 Accepted Submission(s): 405Problem Description 0/1 bag problem should s原创 2015-08-18 19:19:29 · 436 阅读 · 0 评论 -
Manthan, Codefest 16 -C. Spy Syndrome 2
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard outputAfter observing the results of Spy Syndrome, Yash realised the errors of his w原创 2016-03-03 15:42:16 · 705 阅读 · 0 评论 -
Topcoder SRM 636 Div2 B
题意:定义一种数叫做”sortedness”,对于数组中下标i<j的数,其中a[i]<a[j]的对数数组中下标i<j的数,其中a[i]<a[j]的对数,给你一个长度为数组,数组中的数的大小为0∼n0\sim n,数组中0表示对应得位置没有数,求在在没有数的地方将缺失的数填上使得数组的sortedness 的大小等于给定的sortedness的方案数。同时保证在一个数组中0的个数不会超过5个。思路:由原创 2016-06-02 21:23:22 · 475 阅读 · 0 评论 -
TopCoder SRM 637 Div2 C
题意:给你一个矩阵,每一个小格子中有一个字母,相邻的相同字母的为一个区域,相邻是指一个格子的八个方向。每一次都可以将一个区域涂成红色,问最少涂多少个格子使得从上到下没有路径,即涂上颜色的格子不能走,是不是使得不存在一条路径连接第一行和最后一行的需要涂的最少的格子的数量。思路:刚看到这道题的时候一脸懵逼,后来看到其他人的博客,才发现自己好弱。首先我们将不同的区域找出来,那么相邻的区域之间可以相互的连接原创 2016-06-07 19:23:03 · 432 阅读 · 0 评论 -
TopCoder SRM 637 Div2 B
题意:给你一个2*n的矩阵,每个小格子是’.’或者’#’,’.’表示是白的格子,’#’表示黑色格子,问最多可以将白的格子涂黑是的还存在一条从左到右只有白色的格子组成的路径(可以上下移动)。思路:共有两个起点,从每一个起点开始,BFS到第n列的最少经过白色格子的数量。表明这条路径是不可以涂的,那么将其他的白色的格子的数量就是答案。#include <bits/stdc++.h>using namesp原创 2016-06-07 19:35:14 · 410 阅读 · 0 评论 -
【POJ1699】-Best Sequence 搜索剪枝
Time Limit: 1000MS Memory Limit: 10000KDescriptionThe twenty-first century is a biology-technology developing century. One of the most attractive and challenging tasks is on the gene project, espec原创 2016-06-24 14:26:38 · 751 阅读 · 0 评论 -
【POJ3411】-Paid Roads 搜索剪枝
Time Limit: 1000MS Memory Limit: 65536KDescriptionA network of m roads connects N cities (numbered from 1 to N). There may be more than one road connecting one city with another. Some of the roads原创 2016-06-24 14:36:25 · 453 阅读 · 0 评论 -
HourRrank17
HackerrankHourRank17原创 2017-02-09 10:35:09 · 881 阅读 · 0 评论