孙悟空要寻找七龙珠,这回是七龙珠的增强版了,因为这些龙珠会衍生,最后不止七颗龙珠了。
悟空带着布玛的龙珠雷达探测器出发了,却发现布玛的龙珠雷达探测器的程序太垃圾了,所以找到我们这些ACM高手为龙珠雷达探测器写个程序,要求可以显示某颗龙珠所在的城市的位置,该龙珠所在的城市共有多少颗龙珠,龙珠移动过的次数。
布玛是个有钱人啊,写个程序我要价5百万,不算过分吧。因为本程序需要用到Union Find...
分类:
其他好文 时间:
2014-07-28 16:34:33
阅读次数:
350
第一道Kruskal算法题#include #include #include using namespace std;#define max 505int f[max],maxw;struct edge{ int st,en,w;}ed[max*max/2];int find(int k){ if...
分类:
其他好文 时间:
2014-07-28 15:39:43
阅读次数:
181
Your task is to write a program that can decide whether you can find an arithmetic expression consisting of five given numbers (1 {1,2,3,4,5} is a bij...
分类:
其他好文 时间:
2014-07-28 15:33:03
阅读次数:
230
使用mkisofs遇到错误:genisoimage: Uh oh, I cant find the boot catalog directory 'beini/boot/isolinux'!使用的命令是sudo mkisofs -o boot.iso -r -J --no-emul-boot --b...
分类:
其他好文 时间:
2014-07-28 15:18:33
阅读次数:
318
1、子类化QDialog第一个例子是完全使用C++编写的Find对话框。finddialog.h: 1 #ifndef FINDDIALOG_H 2 #define FINDDIALOG_H 3 4 #include 5 6 class QCheckBox; 7 class QLabel; 8...
分类:
其他好文 时间:
2014-07-28 15:00:13
阅读次数:
419
有一个数组(非递减),旋转了不知道多少个位,在该数组中找一个数的下标。写出代码(用C/C++或者java)并分析时间空间复杂度,考虑效率(很重要)。eg:数组 [6,7,1,2,3,4,4] 找3,返回4;函数原型C/C++:int find(int * a,int n,int count) cou...
分类:
移动开发 时间:
2014-07-28 14:57:53
阅读次数:
229
题目:Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S = "ADOBE....
分类:
编程语言 时间:
2014-07-28 14:42:23
阅读次数:
264
题目:You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a conca....
分类:
编程语言 时间:
2014-07-28 14:39:03
阅读次数:
1117
在做uva11300时,遇到了n 10 #include 11 #include 12 #include 13 #include 14 #include 15 #include 16 #include 17 18 using namespace std;19 20 21 int find_mid(i...
分类:
其他好文 时间:
2014-07-28 14:30:33
阅读次数:
186
题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letter....
分类:
编程语言 时间:
2014-07-28 11:34:30
阅读次数:
265