自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

七夜

十载梦心倾纸诉,上元七夜醉归途

  • 博客(165)
  • 资源 (1)
  • 收藏
  • 关注

原创 【索引】AOAPC I: Beginning Algorithm Contests (Rujia Liu)

AOAPC I: Beginning Algorithm Contests (Rujia Liu)Volume 0. Getting StartedVolume 1. Elementary Problem SolvingVolume 2. Data StructuresVolume 3. Brute ForceVolume 4. Algorithm DesignVolume 5. Dy

2014-08-21 22:23:06 525

原创 UVA - 103 Stacking Boxes

题目: Stacking Boxes BackgroundSome concepts in Mathematics and Computer Science are simple in one or two dimensions but become more complex when extended to arbitr

2014-11-27 21:37:48 498

原创 UVA - 111 History Grading

History Grading BackgroundMany problems in Computer Science involve maximizing some measure according to constraints.Consider a history exam in which students are asked to put severa

2014-11-27 21:33:05 464

原创 有向图的打印

#include #include #include #include #define N 100using namespace std;struct EdgeNode{ // 表节点 里面有邻接区域 adjvex(存放vi 和 vj 相连的序号) 和 链区域next(将所以表的节点链 放在一起) int adjvex; char data; EdgeNode *next; /

2014-11-25 00:33:12 589

原创 UVA - 10487 Closest Sums

Problem DClosest SumsInput: standard inputOutput: standard outputTime Limit: 3 seconds Given is a set of integers and then a sequence of queries. A query gives you a number and asks to fin

2014-11-24 00:06:10 449

原创 FZU 2111 Min Number

J - Min NumberTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice FZU 2111DescriptionNow you are given one non-negative integer n in

2014-11-23 23:03:37 474

原创 FZU 2104 C - Floor problem

DescriptionIn this problem, we have f(n,x)=Floor[n/x]. Here Floor[x] is the biggest integer such that no larger than x. For example, Floor[1.1]=Floor[1.9]=1, Floor[2.0]=2.You are given 3 posit

2014-11-23 21:13:35 438

原创 FZU 2102 Solve equation

You are given two positive integers A and B in Base C. For the equation:A=k*B+dWe know there always existing many non-negative pairs (k, d) that satisfy the equation above. Now in this problem

2014-11-23 21:05:01 396

原创 FZU - 2110 Star

DescriptionOverpower often go to the playground with classmates. They play and chat on the playground. One day, there are a lot of stars in the sky. Suddenly, one of Overpower’s classmates ask him

2014-11-23 20:24:29 439

原创 UVA - 10706 Number Sequence

Problem BNumber SequenceInput: standard inputOutput: standard outputTime Limit: 1 secondA single positive integer iis given. Write a program to find the digit located in the position iin

2014-11-22 20:12:59 350

原创 UVA - 10057 A mid-summer night's dream.

Problem CA mid-summer night’s dreamInput: standard inputOutput: standard output This is year 2200AD. Science has progressed a lot in two hundred years. Two hundred years is mentioned here

2014-11-21 20:57:26 494

原创 UVA - 10341 Solve It

题意:给出的方程式,求出太

2014-11-21 19:13:29 382

原创 计算表达式(前辍表达式变为后辍表达式之后,利用栈来做)

#include#include#include#include#include using namespace std;char a[1010];char b[1010];stack s1;stack s2;int i,j,n,m,t;float x,y,z;int fun(char x){ switch(x) { case '+' : case

2014-11-21 18:31:40 638 1

原创 查找数字的三种算法的时间

#include #include typedef struct Node { int data; Node *left,*right; Node *parent;}BinTreeNode, *BinTree;void insert(BinTree *root,int key) { BinTree p = (BinTree)malloc(sizeof(BinTreeNode));

2014-11-21 18:18:47 758

原创 UVA - 270 Lining Up

Lining Up ``How am I ever going to solve this problem?" said the pilot.Indeed, the pilot was not facing an easy task. She had to drop packages at specific points scattered in a dangero

2014-11-20 23:56:09 565

原创 UVA - 10132 File Fragmentation

Question 2: File FragmentationThe ProblemYour friend, a biochemistry major, tripped while carrying a tray of computer files through the lab. All of the files fell to the ground and broke. Your f

2014-11-19 23:49:34 426

原创 UVA - 10763 Foreign Exchange

Problem EForeign ExchangeInput: standard inputOutput: standard outputTime Limit: 1 secondYour non-profit organization (iCORE - international Confederation of Revolver Enthusiasts) coordi

2014-11-18 23:18:30 355

原创 UVA - 10905 Children's Game

4thIIUCInter-University Programming Contest, 2005AChildren’s GameInput: standard inputOutput: standard outputProblemsetter: Md. KamruzzamanThere

2014-11-18 22:12:04 368

原创 UVA - 10591 Happy Number

题目:#include #include #include #include #define ll long long int using namespace std;int vis[100000000];ll bit(int u) { ll sum = 0; while (u) { int v = u %10; sum += v * v; u = u / 1

2014-11-08 20:08:08 427

原创 UVA - 141 The Spot Game

The Spot Game The game of Spot is played on an NxN board as shown below for N = 4. During the game, alternate players may either place a black counter (spot) in an empty square or remove

2014-11-07 19:56:25 644

原创 UVA - 10887 Concatenation of Languages

Problem AConcatenation of LanguagesInput File: Standard InputOutput: Standard Output A language is a set of strings. And the concatenation of two languages is the set of all strings that are

2014-11-07 16:21:55 371

原创 UVA - 10125 Sumsets

#include #include #include #include #include #include using namespace std; const int MAXN = 10000003; const int MAXSIZE = 1030; int n; int rear; struct node {

2014-11-06 22:40:12 374

原创 树的建立以及遍历

#include #include #include #include #include #include #define MAX 100using namespace std;typedef struct BinTreeNode { char data; BinTreeNode *left, *right;}BinTreeNode,*BinTree;BinTree C

2014-11-04 01:15:41 619

原创 UVA - 10391 Compound Words

Problem E: Compound WordsYou are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is the concatenation of exactly two other words in

2014-11-04 00:04:08 386

原创 UVA - 10282 Babelfish

Problem C: BabelfishYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you underst

2014-11-03 23:11:06 429

原创 uva 10603 Fill

FILL There are three jugs with a volume of a, b and c liters. (a, b, and c are positive integers not greater than 200). The first and the second jug are initially empty, while the third

2014-11-03 00:17:06 355

原创 FZU 2037

解题方法:推公式  第一个答案公式f(n) = (n-1)!+f(n-1)+(n-1)*f(n-1);       第二个答案公式 f(n) = f(n-1)+1/n;

2014-11-02 22:52:36 402

原创 UVA - 188 Perfect Hash

aaaa#include#include#includeusing namespace std;int c,k;int x[15];int f(){ int i,j; for(i=0;i<k;i++) for(j=i+1;j<k;j++) if((c/x[i]%k)==(c/x[j]%k)){ c=min((c/x[i]+1)*x[i],(c/x[j]+1)*x[

2014-10-31 22:19:52 455

原创 UVA - 208 Firetruck

Firetruck The Center City fire department collaborates with the transportation department to maintain maps of the city which reflects the current status of the city streets. On any given

2014-10-30 23:19:48 431

原创 UVA - 193 Graph Coloring

Graph Coloring You are to write a program that tries to find an optimal coloring for a given graph. Colors are applied to the nodes of the graph and the only available colors are black a

2014-10-29 17:56:09 976

原创 UVA - 140 Bandwidth

Bandwidth Given a graph (V,E) where V is a set of nodes and E is a set of arcs in VxV, and an ordering on the elements in V, then the bandwidth of a node v is defined as the maximum dist

2014-10-29 11:31:55 394

原创 UVA - 167 The Sultan's Successors

The Sultan's Successors The Sultan of Nubia has no children, so she has decided that the country will be split into up to k separate parts on her death and each part will be inherited by

2014-10-28 23:54:33 464

原创 FZU - 2148 Moon Game

DescriptionFat brother and Maze are playing a kind of special (hentai) game in the clearly blue sky which we can just consider as a kind of two-dimensional plane. Then Fat brother starts to draw N

2014-10-26 23:17:28 461

原创 uva 10012 - How Big Is It?

Ian's going to California, and he has to pack his things, including his collection of circles. Given a set of circles, your program must find the smallest rectangular box in which they fit. All circ

2014-10-24 21:34:06 536

原创 UVA 331

Mapping the SwapsSorting an array can be done by swapping certain pairs of adjacent entries in the array. This is the fundamental technique used in the well-known bubble sort. If we list the ident

2014-10-23 16:45:59 366

原创 UVA - 10344 23 out of 5

Problem I23 Out of 5Input: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MBYour task is to write a program that can decide whether you can find an arithmetic ex

2014-10-23 00:00:30 764

原创 UVA - 301 Transportation

Transportation Ruratania is just entering capitalism and is establishing new enterprising activities in many fields including transport. The transportation company TransRuratania is star

2014-10-22 23:56:49 360

原创 CodeForces - 363B Fence

There is a fence in front of Polycarpus's home. The fence consists of n planks of the same width which go one after another from left to right. The height of the i-th plank is hi meters, distinct pl

2014-10-21 00:32:09 503

原创 Codeforces 363A Soroban(算盘模拟)

#include #include using namespace std;void print(int t) { if (t / 5 == 0) { printf("o-|"); for (int i = 0; i < t; i++) printf("o"); printf("-"); for (int i = t+1; i < 5;i++) pri

2014-10-20 16:39:37 587

原创 UVA - 539 The Settlers of Catan

The Settlers of Catan Within Settlers of Catan, the 1995 German game of the year, players attempt to dominate an island by building roads, settlements and cities across its uncharted wil

2014-10-20 15:08:10 423

上传文件的JS

JS 文件上传, 从书本上拷贝下来的,仅供参考呀

2015-11-22

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除