acm
文章平均质量分 78
Hanylch
菜鸟的起飞之路
Think and Practice
展开
-
poj Sudoku
DescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1原创 2016-10-25 19:33:18 · 253 阅读 · 0 评论 -
codeforces #386 div2 D. Green and Black Tea
D. Green and Black Teatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputInnokentiy likes tea very much and to原创 2016-12-19 22:02:46 · 319 阅读 · 0 评论 -
codeforces goodbye 2016 C. New Year and Rating
C. New Year and Ratingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputEvery Codeforces user has rating, de原创 2016-12-31 10:04:04 · 573 阅读 · 0 评论 -
codeforces 388 div2 749B - Parallelogram is Back
B. Parallelogram is Backtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLong time ago Alex created an inter原创 2016-12-20 13:16:12 · 256 阅读 · 0 评论 -
codeforces 362A C - Two Semiknights Meet
一直卡在测试用例七,可能是因为没有判断时间,两个骑士要在同一时刻到达某一点用bfs 搜出每个骑士的各个可能地点,标记时间如果某处不是'#',且两个骑士相差的时间%2 == 0 ,就说明存在C - Two Semiknights Meet CodeForces - 362A #include#include#include#includeusing原创 2017-02-28 21:57:30 · 214 阅读 · 0 评论 -
Caterpillars URAL - 2064
Young gardener didn’t visit his garden for a long time, and now it’s not very pleasant there: n caterpillars have appeared on the ground. Kirill decided to use this opportunity to have some fun and or原创 2017-03-24 21:38:10 · 349 阅读 · 0 评论 -
Promotions Gym - 101128A
#include<cstdio>#include<cstring>#include<cmath>#include<cstdlib>#include<vector>using namespace std;vector<int> mm[5005];vector<int> nn[5005];int a,b,e,p;int vis[5100];int num[5100];void dfs1(i原创 2017-04-02 19:44:55 · 379 阅读 · 0 评论 -
nyoj 华山论剑
#include<cstdio>#include<cstring>#include<cmath>#include<cstdlib>#define maxn 300100int n,m;int l,r,x;int a[maxn],tr[maxn * 4];void update(int l,int r,int id,int ll,int rr){ if(tr[id] == 1)原创 2017-04-02 19:47:17 · 321 阅读 · 0 评论 -
优先队列
优先队列:顾名思义,首先它是一个队列,但是它强调了“优先”二字,所以,已经不能算是一般意义上的队列了,它的“优先”意指取队首元素时,有一定的选择性,即根据元素的属性选择某一项值最优的出队~百度百科上这样描述的: 优先级队列 是不同于先进先出队列的另一种队列。每次从队列中取出的是具有最高优先权的元素 优先队列的类定义 优先队列是0个或多个元素的集合,每个元素都有一个优先权或转载 2016-07-22 19:47:32 · 161 阅读 · 0 评论 -
hdu 1175 连连看 dfs
连连看Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 31533 Accepted Submission(s): 7790Problem Description“连连看”相信很多人都玩过。没原创 2016-10-22 21:37:45 · 201 阅读 · 0 评论 -
HDU 2089 不要62
详解(转载)#include#includeint dp[10][10];int solve(int x){ int num[10]; int tmp=x; int len=0; while(x) { num[++len] = x%10; x/=10; } num[len+1]=0; int sum=0; int flag=0; for(int i=le转载 2016-12-21 19:05:13 · 234 阅读 · 0 评论 -
poj 2531 Network Saboteur
DescriptionA university network is composed of N computers. System administrators gathered information on the traffic between nodes, and carefully divided the network into two subnetworks in order原创 2016-11-06 20:55:44 · 288 阅读 · 0 评论 -
poj 2688
DescriptionHere, we want to solve path planning for a mobile robot cleaning a rectangular room floor with furniture. Consider the room floor paved with square tiles whose size fits the cleanin原创 2016-11-08 20:43:00 · 252 阅读 · 0 评论 -
poj 1014
DescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the marbles原创 2016-10-27 21:25:27 · 226 阅读 · 0 评论 -
codeforces 148c
C - Terse princess CodeForces - 148C //根据题意构造数组//因为有坑一直 wa//当 wow 的次数等于 0 的时候,如果 oh 的次数等于 n-1, 则无法构造该数组,因为第二个数会转化成为符合 b 的条件 //做的时候考虑不全,只考虑了 n=2 的情况 #includeint c[110];int main(){ int n,a原创 2016-12-11 13:43:28 · 260 阅读 · 0 评论 -
Silver Cow Party
One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M≤ 100,000) unidirectional (one-way r原创 2016-12-05 22:02:53 · 197 阅读 · 0 评论 -
codeforces #383 div 2 C. Arpa's loud Owf and Mehrdad's evil plan
C. Arpa's loud Owf and Mehrdad's evil plantime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you have notic原创 2016-12-07 16:58:05 · 204 阅读 · 0 评论 -
codeforce 676b Pyramid of Glasses
Mary has just graduated from one well-known University and is now attending celebration party. Students like to dream of a beautiful life, so they used champagne glasses to construct a small pyramid.原创 2016-12-07 17:05:33 · 275 阅读 · 0 评论 -
A Simple Problem with Integers
B - A Simple Problem with Integers //进一步熟悉了区间查询#includelong long a[100010];struct node{ long long v; int book;};node tree[ 400040 ];int k;void pushup( int rt ){ tree[ rt ].v = tr原创 2016-12-07 22:55:21 · 158 阅读 · 0 评论 -
can you find it (二分)
#include<cstdio>#include<cstring>#include<cmath>#include<cstdlib>#include<algorithm>using namespace std;int a[550],b[550],c[550];int p[250500];int main(){ int l,n,m; int s; int count原创 2017-04-02 19:48:27 · 383 阅读 · 0 评论