uva 133

題目類型:迴圈鏈表題目:一個迴圈的圈,由兩個人從頭尾開始尋找,分別將第m,第n的人刪除,(兩人是同時進行的),即是數完了才刪除的,遇到相同的只輸出一個,否則都輸出,然後重新開始數,直至全部輸完解題曆程:看題目看了很久,也許之前不仔細有陰影,這次還是看了但依然有點不是很清楚地,總而言之,有點。。。。把題目看懂,手工類比一遍,寫演算法(可惜有漏洞。。。就是沒考慮刪除一次後將指標重設時可能出現指標的下一位可能會被刪除。。。。,要同時出現最後只有兩個人的情況)心得:考慮一定要全面,

UVa Problem Solution: 10194 – Football (aka Soccer)

Nothing worthy to mention.Code:/************************************************************************* * Copyright (C) 2008 by liukaipeng                                      * * liukaipeng at gmail dot com                                         

UVa Problem Solution: 10127 – Ones

We can solve this problem by simulating the calculating process of multiply two numbers on the paper, yet we've already known the product. We guess the least significant digit of one number, multiply it with the other number to get a 1 of the least

UVa Problem Solution: 10035 – Primary Arithmatic

Simple problem. Just count it.Code:/************************************************************************* * Copyright (C) 2008 by liukaipeng                                      * * liukaipeng at gmail dot com                                     

UVa Problem Solution: 10026 – Shoemaker’s Problem

Simply sort will do the job. Given to jobs, j1 and j2. which should be done first? Do j1 first will cause a total fine to j2 of j1.time * j2.fine and do j2 first will cause a total fine to j1 of j2.time * j1.fine.Code:/*******************************

UVa Problem Solution: 10033 – Interpreter

Straight forward simulating.Code:/************************************************************************* * Copyright (C) 2008 by liukaipeng                                      * * liukaipeng at gmail dot com                                       

uva 127

題目類型:棧類比解題經曆:崩潰。。。。題目:(摘自星星之火的百度空間)你的任務是類比一種叫「Accordian」的紙牌遊戲,他的遊戲規則如下:

UVa Problem Solution: 10152 – ShellSort

Let the required stack to be the sorted sequence, and the original stack to be the sequence to sort. A turtle is numbered by its position in the required stack: the top is 0, the second is 1, and so on. A turtle is said in reverse order if its

UVa Problem Solution: 10142 – Australian Voting

I just simulate the electing process. The RT is very slow.Code:/************************************************************************* * Copyright (C) 2008 by liukaipeng                                      * * liukaipeng at gmail dot com         

uva 116

問題描述:找出最短路徑,加權的解法:典型的dp中#include<cstdio>#include<cstdlib>#include<cmath>#include<string>#include<vector>using namespace std;const int MAXHASHSIZE=10000003;const int MAXN=13;const int MAXS=30005;long long f[MAXS];const

[轉載]—[觀點]成為編程巨星的唯一秘訣

 http://sd.csdn.net/a/20110808/302760.html導讀:本文是從《The Singular Secret of the Rockstar

qemu-kvm 建立ubuntu 虛擬機器

qemu 和 kvm 的關係KVM 是指基於 Linux 核心的虛擬機器(Kernel-based Virtual Machine)。 2006 年 10 月,由以色列的 Qumranet 組織開發的一種新的“虛擬機器”實現方案。 2007 年 2 月發布的 Linux 2.6.20 核心第一次包含了 KVM 。增加 KVM 到 Linux 核心是 Linux 發展的一個重要裡程碑,這也是第一個整合到 Linux

uva 107

題目類型:數學解題思路:本題可轉化為:求N^i=num,(N+1)^i=H;然後求等比數列的和,注意:等比因子q等於1時要分開討論。。。。本人就是卡在這裡,還有當輸入為(2*k+1),1時輸出結果應為:0,H;(也是本人卡題原因),解題心得:      1 注意邊界考慮。。。。      2 浮點數比較:     fabs(a,b)<eps      3

uva 674

問題描述:給出5種硬幣,面值分別為{1,5,10,25,50},然後給出金額,要求能用這五種硬幣湊出金額的種類數類型:經典dp,做法:首先,d(i,s)表示用V(i),V(i+1),...V(5)這幾種硬幣湊成S的方法有多少種,那麼d(i,S)=d(i+1,S-V[i]*j)   (0<=j

UVa Problem Solution: 10018 – Reverse and Add

Do what you are told to do.Code:/************************************************************************* * Copyright (C) 2008 by liukaipeng                                      * * liukaipeng at gmail dot com                                        

uva 101

題目類型:類比題考查:資料結構題目經曆:1TLE,2Y解題思路:用鏈棧進行解答,類比全操作,即可。。。代碼:#include<stdio.h>#include<string.h>#include<malloc.h>int num;typedef struct node{ int data; struct node *next;}node,*stacklist;//鏈棧stacklist s[25];int create(stacklist

貝葉斯文本分類實驗

這個其實是我資料採礦 的大作業 :實驗原理主要是利用樸素貝葉斯對文本進行分類,用TF-IDF 權重進行最佳化。實驗流程:1 首先下載搜狗語料庫採用其中的五個類別,分別是,1 – 汽車2 –財經3 — 教育 IT4 — 健康5 — 體育 。其中每個分類的訓練文檔為1000篇,測試文檔為131篇。2中文分詞利用中科院的分詞軟體,對所有的文檔進行分詞。比如 第一個類別下的 10.txt 分詞後的結果儲存在1_re_10.txt 中 。 分詞結果(只列出部分):/x /x 本報/rz 記者/n

UVa Problem Solution: 701 – The Archaeologist’s Dilemma

Let P denotes the prefix, T denotes the # of lost digits. We are searching for N, that the prefix of 2^N is P. We have an inequlity of    P*10^T <= 2^N < (P+1)*10^Tthus    log2(P*10^T) <= log2(2^N) < log2((P+1)*10^T),which is   

uva 147

#include<cstdio>#include<cstdlib>#include<cmath>#include<string>#include<vector>using namespace std;const int MAXHASHSIZE=10000003;const int MAXN=13;const int MAXS=30005;long long f[MAXS];const int v[12]={0,5,10,20,50,10

ubuntu QQ 替代用戶端

之前用EMpathy 不能連上QQ ,所以一直改用webqq 作為解決方案,最近我的web qq 老是 出問題,所以又在尋求新的解決方案。安裝這個 pidgin$ sudo apt-get install pidgin但是這個不支援QQ 2010 的協議所以下面安裝 QQ 2010 的協議http://code.google.com/p/libqq-pidgin/wiki/UbuntuUsers此 PPA 還包括了最新的 pidgin , 值得試試 下面是 PPA 的安裝方法 sudo add-

總頁數: 61357 1 .... 21750 21751 21752 21753 21754 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.