原创 1237: Periodic Strings

Result TIME Limit MEMORY Limit Run Times AC Times JUDGE 3s 8192K 1256 350 Standard A character string is said to

原创 1182: Lotto 快排

Result TIME Limit MEMORY Limit Run Times AC Times JUDGE 1s 8192K 751 355 Standard In a Lotto I have ever played, o

原创 套接字編程基本的數據結構struct sockaddr_in, struct sockaddr,struct in_addr

一、結構體 struct sockaddr_in,  struct sockaddr,  struct in_addr struct sockaddr_in,  struct sockaddr,struct in_addr,這是網絡編程

原创 寬度優先搜索1185: Knight Moves

Result TIME Limit MEMORY Limit Run Times AC Times JUDGE 1s 8192K 622 290 Standard A friend of you is doing research o

原创 1424: Coin Change dp

  Result TIME Limit MEMORY Limit Run Times AC Times JUDGE 3s 8192K 579 188 Standard Suppose there are 5 types of co

原创 tyvj P1014 懲罰遊戲 區間動態規劃

  乘法遊戲是在一行牌上進行的。每一張牌包括了一個正整數。在每一個移動中,玩家拿出一張牌,得分是用它的數字乘以它左邊和右邊的數,所以不允許拿第1張和最後1張牌。最後一次移動後,這裏只剩下兩張牌。   你的目標是使得分的和最小。   例如,

原创 1198: Risk

Result TIME Limit MEMORY Limit Run Times AC Times JUDGE 3s 8192K 469 248 Standard Risk is a board game in which se

原创 堆排序

#include <stdio.h> int v[100]; int n; void build (int i,int e) {     int j=i;     while(2*j<=e)         //防止越界,考慮單支情況  

原创 1600: Big Mod mod運算的性質, a^n合同與a模m的積

Result TIME Limit MEMORY Limit Run Times AC Times JUDGE 3s 8192K 1707 322 Standard Calculate     for large valu

原创 歸併排序求逆序數

#include <iostream> #include <cstdio> #include <cstring> using namespace s

原创 liveCD安裝ubuntu開機引導grub

啓動Ubuntu光盤,選擇LiveCD模式,進入之後選擇進入終端,先在終端輸入如下命令: sudo fdisk -l (注意是小寫的L,不是數字的1,此步用於確定電腦中安裝 Ubuntu 10.04的所在分區的位置,輸入以後會輸出類似

原创 centos將用戶添加到sudo用戶的方法

sudo的作用就是使當前非root用戶在使用沒有權限的命令 時,直接在命令前加入sudo,在輸入自己當前用戶的密碼就可以完成root用戶的功能,而不必在每次使用su -來回切換用戶了。sudo的配置文件位於/etc/sudoers,需要r

原创 01揹包問題中恰好爲重量T

重量恰好爲T: #include <iostream> #include <cstring> #include <cstdlib> #include <cstdio> using namespace std; int T,M; int t

原创 P1081最近距離

  描述 Description       在一塊地上,有着n(1<=n<=2000) 頭牛,輸入n,再分別輸入這n頭牛的座標(x,y) (1<=x<=100000,1<=y<=100000),如果第i頭牛與第j頭牛間的距離最近,那麼

原创 1167: How Many Eggs Do I Have? 秦九韶定理

Result TIME Limit MEMORY Limit Run Times AC Times JUDGE 3s 8192K 2050 454 Standard 1st Jilin University ACM Interna