- 博客(22)
- 资源 (1)
- 收藏
- 关注
原创 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 475
原创 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 465
原创 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 1015
原创 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 413
原创 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 492
原创 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 514
原创 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 571
原创 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 390
原创 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 784
原创 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 386
原创 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 548
原创 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 619
原创 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 458
原创 UVA - 639 Don't Get Rooked
Don't Get Rooked In chess, the rook is a piece that can move any number of squares vertically or horizontally. In this problem we will consider small chess boards (at most 44) that can
2014-10-18 13:18:16 432
原创 UVA - 10474 Where is the Marble?
#include #include #include #include #define N 10001using namespace std;int cmp(const void *x,const void *y) { return *(int *)x - *(int *)y;}int n,m,t;int a[N];int flag,cou = 0;int main
2014-10-17 21:27:29 344
原创 UVA - 216 Getting in Line
Getting in Line Computer networking requires that the computers in the network be linked.This problem considers a ``linear" network in which the computers are chained together so
2014-10-17 21:26:07 452
原创 HDU - 2553 N皇后问题
#includeint tot=0,row,line[10],n;void search(int row) //递归搜索可行解{ int i,j; if(row==n) tot++; //当row=n时,说明每一行的皇后都不冲突,即为可行解 else for(i=0;i<n;i++) { int ok=1;
2014-10-16 18:15:46 677
原创 HDU 1300 -Pearls
Problem DescriptionIn Pearlania everybody is fond of pearls. One company, called The Royal Pearl, produces a lot of jewelry with pearls in it. The Royal Pearl has its name because it delivers to the
2014-10-16 00:22:09 477
原创 UVA - 110 Meta-Loopless Sorts
Meta-Loopless Sorts Background Sorting holds an important place in computer science. Analyzing and implementing various sorting algorithms forms an important part of the education of
2014-10-15 01:37:57 440
原创 UVA - 729 The Hamming Distance Pro
The Hamming Distance Problem The Hamming distance between two strings of bits (binary integers) is the number of corresponding bit positions that differ. This can be found by using XOR o
2014-10-15 00:05:58 497
原创 UVA - 10098 Generating Fast
Problem CGenerating Fast, Sorted PermutationInput: Standard InputOutput: Standard Output Generating permutation has always been an important problem in computer science. In this problem yo
2014-10-14 23:38:26 5843
原创 UVA - 146 ID Codes
ID Codes It is 2084 and the year of Big Brother has finally arrived, albeit a century late. In order to exercise greater control over its citizens and thereby to counter a chronic breakd
2014-10-14 23:25:12 504
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人