1 public ListNode detectCycle(ListNode head) { 2 ListNode s=head; 3 ListNode f=head; 4 while(f!=null&&f.next!=null){ 5 ...
分类:
其他好文 时间:
2014-07-31 16:01:36
阅读次数:
167
在Eclipse里调试c程序, 出现: "Error while launching command: gdb -version"。需要让Eclipse知道Eclipse具体在什么地方,配置方法是: "Debug configuration"-->"Debugger"-->"GDB debugger"里的"gdb"改成gdb的绝...
分类:
数据库 时间:
2014-07-31 13:48:16
阅读次数:
3416
英文词组强制换行word-wrap:break-word超宽图居中自适应.header{height:425px;width:100%;margin-left:50%;}.top1{height:65px;margin:0 auto;background:url(../img/header.jpg)...
分类:
其他好文 时间:
2014-07-31 13:11:16
阅读次数:
220
B -TourTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uDescriptionJohn Doe, a skilled pilot, enjoys traveling. While on vacation, he...
分类:
其他好文 时间:
2014-07-31 13:05:16
阅读次数:
287
1、冒泡法排序class Program{//冒泡法排序public static void sort(int[] list){int i, j, temp;j = 1;while (j list[i + 1]){temp = list[i];list[i] = list[i + 1];list[....
分类:
其他好文 时间:
2014-07-31 13:00:46
阅读次数:
152
#include #include int main(){char c,str[1000][1000],flag = 0,count; int x,y,i,j;while(1) { x = 0; y = 0;while((c = getchar() )!= '\n'){if (c == '#'){f...
分类:
其他好文 时间:
2014-07-31 12:41:36
阅读次数:
246
基础语句 #region switch case // int Number=char.Parse(Console.ReadLine()); // switch (Number) //{ // case 1: // Console.WriteLine("1"); // break; /...
分类:
其他好文 时间:
2014-07-31 09:48:06
阅读次数:
305
这里的思路是 在每一次的找父亲节点的时候我们把每一个孩子的父亲的改成他的祖先。因为有可能一个孩子的关系很复杂可能就是一条链,这样查找就没浪费时间。//这是简单的递归实现find (int x){ while(x!=father[x]) father[x] = find(father[x]) ; r....
分类:
其他好文 时间:
2014-07-31 09:38:15
阅读次数:
205
这里我自己说一下我自己学的感受吧 。 int findset(int a) //不带路劲压缩 { while(pa[a] != a) { a = pa[a]; } ...
分类:
其他好文 时间:
2014-07-31 09:35:55
阅读次数:
205
#include #include using namespace std; int main(){ long a,b,c; int i,flag; bool is_positive; char result[9]; while(cin>...
分类:
其他好文 时间:
2014-07-31 02:38:15
阅读次数:
215