随笔分类 -  dfs

摘要:【链接】 "我是链接,点我呀:)" 【题意】 在这里输入题意 【题解】 dfs.. 【代码】 cpp include using namespace std; const int N = 100; const int dx[8] = { 1, 1, 1,0,0,1,1,1}; const int d 阅读全文
posted @ 2017-10-21 19:39 AWCXV 阅读(176) 评论(0) 推荐(0)
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Ari the monster is not an ordinary m... 阅读全文
posted @ 2017-10-06 19:22 AWCXV 阅读(359) 评论(0) 推荐(0)
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output A group of n cities is connected by ... 阅读全文
posted @ 2017-10-06 19:22 AWCXV 阅读(173) 评论(0) 推荐(0)
摘要:time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Sasha lives in a big happy family. At... 阅读全文
posted @ 2017-10-06 19:22 AWCXV 阅读(142) 评论(0) 推荐(0)
摘要:time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard outputAfter the piece of a devilish mir... 阅读全文
posted @ 2017-10-06 19:22 AWCXV 阅读(126) 评论(0) 推荐(0)
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Roman planted a tree consisting of n... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(146) 评论(0) 推荐(0)
摘要:【题目链接】:http://www.lydsy.com/JudgeOnline/problem.php?id=1023【题意】 【题解】 如果不考虑有环的情况; 那么有一个经典的求树的直径的方法; 首先; 树的直径的两端的端点必然都在树的叶子上(或在根节点,考虑一条链的情况); 则... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(170) 评论(0) 推荐(0)
摘要:Time Limit: 1 second Memory Limit: 50 MB【问题描述】明明同学最近迷上了侦探漫画《柯南》并沉醉于推理游戏之中,于是他召集了一群同学玩推理游戏。游戏的内容是这样的,明明的同学们先商量好由其中的一个人充当罪犯(在明明不知情的情况下),明明的任务就是找... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(279) 评论(0) 推荐(0)
摘要:神经网络(NOIP2003第1题)Time Limit: 1 second Memory Limit: 50 MB【问题背景】 人工神经网络(Artificial Neural Network)是一种新兴的具有自我学习能力的计算系统,在模式识别、函数逼近及贷款风险评估等诸多领... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(150) 评论(0) 推荐(0)
摘要:Time Limit: 1 second Memory Limit: 32 MB【问题描述】邮局需要你来帮助他们为某个邮递员设计出一条能够穿过那遥远乡村的所有村子和小路至少一次的邮路(输入数据将会保证这么一条路是一定存在的)。但是,每条路线都是有一个花费的。各个村子里的村民希望邮递员... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(180) 评论(0) 推荐(0)
摘要:Time Limit: 1 second Memory Limit: 128 MB【问题描述】DIABLO魔王和Mini都有三种属性,体力点,攻击点,以及集气点。 两人的攻击方式是这样的:采用回合制。 DIABLO先攻,DIABLO只会攻击,每次攻击可以伤害Mini W点体力点,且D... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(226) 评论(0) 推荐(0)
摘要:Time Limit: 1 second Memory Limit: 128 MB【问题描述】刷完牙洗完脸,黄黄同学就要上课去了。可是黄黄同学每次去上课时总喜欢把校园里面的每条路都走一遍,当然,黄黄同学想每条路也只走一遍。我们一般人很可能对一些地图是办不到每条路走一遍且仅走一遍的,但... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(165) 评论(0) 推荐(0)
摘要:Time Limit: 1 second Memory Limit: 1 MB【问题描述】Matrix67发现身高接近的人似乎更合得来。Matrix67举办的派对共有N(1const int MAXN = 10+5;int n,k,ans=0;int a[MAXN],sta[MAXN... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(208) 评论(0) 推荐(0)
摘要:Time Limit: 1 second Memory Limit: 128 MB【问题描述】新牛到部队,CG要求它们每天早上搞晨跑,从A农场跑到B农场。从A农场到B农场中有n-2个路口,分别标上号,A农场为1号,B农场 为n号,路口分别为2…n-1号,从A 农场到B农场有很多条路径... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(301) 评论(0) 推荐(0)
摘要:time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Nothing is eternal in the world, Kost... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(213) 评论(0) 推荐(0)
摘要:Time Limit: 1 second Memory Limit: 32 MB【问题描述】给定n个大小不等的圆c1,c2,...., cn,现要将这n个圆排列进一个矩形框中,且要求各圆与矩形框的底边相切。圆排列问题要求从n个圆的所有排列中找出有最小长度的圆排列。例如:当n=3时,且... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(366) 评论(0) 推荐(0)
摘要:Time Limit: 1 second Memory Limit: 128 MB【问题描述】一个N×M的由非负整数构成的数字矩阵,你需要在其中取出若干个数字,使得取出的任意两个数字不相邻(若一个数字在另外一个数字相邻8个格子中的一个即认为这两个数字相邻),求取出数字和最大是多少。【... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(131) 评论(0) 推荐(0)
摘要:Submissions:445Solved:150DESCRIPTION In a city capture game, Mr. Van owns a Empire with a capital city ( marked 1 ). Initially, Mr. Van’s Empi... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(114) 评论(0) 推荐(0)
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Alyona has a tree with n vertices. T... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(106) 评论(0) 推荐(0)
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Generous sponsors of the olympiad in... 阅读全文
posted @ 2017-10-04 18:45 AWCXV 阅读(111) 评论(0) 推荐(0)