码迷,mamicode.com
首页 >  
搜索关键字:can you dfs    ( 55632个结果
POJ-1011-Sticks
题目链接:http://poj.org/problem?id=1011 这道题用到了深搜+剪枝。 #include #include #include using namespace std; int a[65]; int vis[65]; int n; int cmp(int x,int y) { return x>y; } int dfs(int len,int need,int ...
分类:其他好文   时间:2014-05-05 13:28:57    阅读次数:290
【LeetCode】Remove Element
题目: Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn't matter what you leave beyond the new len...
分类:其他好文   时间:2014-05-05 12:58:57    阅读次数:294
笨方法学python(5)加分题
这篇对应的是习题16,读写文件 # -*- coding: utf-8 -*- #对文件更多操作复制A文件的内容到B文件 #from sys import argv from os.path import exists prompt = "> " from_file = raw_input("please input the filename where you want to copy...
分类:编程语言   时间:2014-05-05 12:54:02    阅读次数:402
codeforces#244(div.2) C
动漫节一游回来之后一直处于一种意识模糊的状态看到大家都陆陆续续地过了C心里还是有点着急(自己没思路啊囧)其实当时就在想该如何找到DFS中的一个环,然后再找到环路上最小的一个值把所有环路上最小的值加起来就是结果,后来看到有人在群里说是tarjan求强连通分量,我就愉(bei)快(shang)地去睡觉了...
分类:其他好文   时间:2014-05-03 23:32:57    阅读次数:495
YouTrack Changing Database Location for EXE Distribution(windows service)
If you have installed YouTrack from EXE Distribution, then the best way to change the database location is by specifying it via JVM property.Stop curr...
分类:数据库   时间:2014-05-03 23:30:08    阅读次数:505
[数学+dfs] ZOJ 3753 Simple Equation
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5176 Simple Equation Time Limit: 2 Seconds      Memory Limit: 65536 KB There are many Equations. Some are difficu...
分类:其他好文   时间:2014-05-03 17:47:01    阅读次数:343
193 - Graph Coloring(DFS)
题目:193 - Graph Coloring 题目大意:给出一个图,图里面有点和边,要求相邻的点不可以都是黑色的,问怎样上色黑色的点最多的,给出字典序最大的那种组合情况。#include #include const int N = 105; int n, m, s[N][N], ans[N], cas, count, vis[N]; bool judge (int x, in...
分类:其他好文   时间:2014-05-03 17:22:31    阅读次数:282
Struts2实现文件上传报错(四)
1、具体错误如下 2014-5-2 21:38:29 com.opensymphony.xwork2.util.logging.jdk.JdkLogger error 严重: Exception occurred during processing request: null java.lang.NullPointerException at com.you.file.upload.actio...
分类:其他好文   时间:2014-05-03 16:08:37    阅读次数:353
codechef Holes in the text 题解
Chef wrote some text on a piece of paper and now he wants to know how many holes are in the text. What is a hole? If you think of the paper as the plane and a letter as a curve on the plane, then each...
分类:其他好文   时间:2014-05-03 15:49:18    阅读次数:412
UVA之11549 - Calculator Conundrum
【题目】 Problem C CALCULATOR CONUNDRUM Alice got a hold of an old calculator that can display n digits. She was bored enough to come up with the following time waster. She enters a number k t...
分类:其他好文   时间:2014-05-03 15:37:03    阅读次数:308
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!