- 博客(43)
- 资源 (3)
- 收藏
- 关注
原创 C++中的类继承的问题
#include using namespace std;static int x;class A{public: A() {x = 1;} virtual ~A(){x = 2;} virtual void foo() {x = 3;}};class B :public A {public: B(){x = 4;} virtual ~B(){x = 5;}
2014-10-31 22:56:22 698
原创 UVa11926 - Multitasking(排序问题)
Calendars control our daily lives. For people like me, who are bad at multitasking, it is important to have at most one task planned for any minute of my life. Your job is to make sure that my calenda
2014-10-30 19:09:46 975
原创 UVa10246 - Asterix and Obelix(最短路径变形)
After winning a gruesome battleagainst the Romans in a far-away land, Asterix and his dearest friend Obelixare now returning home. However Obelix is not with Asterix now. He has leftAsterix in order t
2014-10-29 23:17:48 903
原创 UVa665 - False coin(枚举法)
In order to detect the false coin the bank employees numbered all coins by theintegers from 1 toN, thus assigning each coin a unique integer identifier.After that they began to weight various groups
2014-10-29 21:15:50 742
原创 UVa12024 - Hats(错排问题)
BackgroundJohn Hatman, the honest cloakroom attendant of the RoyalTheatre of London, would like to know the solution to the followingproblem.TheProblemWhenthe show finishes, all spectators i
2014-10-29 19:29:24 667
原创 UVa10816 - Travel in Desert(二分法+最短路径求法)
There is a group of adventurers who like to travel in the desert. Everyone knows travelling in desert can be very dangerous. That's why they plan their trip carefully every time. There are a lot of fa
2014-10-29 18:55:56 860
原创 网络编程学习笔记(readv和writev函数)
这两个函数与read和write相似,但readv和writev可以让我们在一个函数调用中读取多个缓冲区,这些
2014-10-26 23:29:09 2394
原创 UVa209 - Triangular Vertices(几何)
Consider the points on an infinite grid of equilateral triangles as shown below:Note that if we number the points from left to right and top to bottom, then groups of these points form the verti
2014-10-25 23:48:00 734
原创 UVa11581 - Grid Successors(模拟)
Consider a 3 x 3 grid of numbers g where each cell contains either a 0 or a 1.We define a functionf that transforms such a grid: each cell of thegrid f(g) is the sum (modulo 2) of its adjacent cells
2014-10-23 20:54:41 632
原创 UVa11683 - Laser Sculpture(很有技巧)
Since its invention, in 1958, the laser has been used in a huge variety of applications, like electronic equipment, cirurgical instruments, weapons, and much more.The image above shows a
2014-10-23 16:38:24 787
原创 UVa12114 - Bachelor Arithmetic(水题)
So what effect does a marriage ceremony has on an arbitrary bachelor (boy)? Well it depends on his thought process and context: he can be happy or sad. But in general what a marriage ceremony does is
2014-10-23 14:41:02 646
原创 UVa139 - Telephone Tangles(水题)
A large company wishes to monitor the cost of phone calls made by its personnel. To achieve this the PABX logs, for each call, the number called (a string of up to 15 digits) and the duration in minut
2014-10-23 11:23:27 743
原创 UVa379 - Hi-Q(模拟)
Hi-Q is a popular solitaire game that comes in a small box with aplaying board that has little holes in the shape of a cross and 32little pegs that fit into the holes. Starting with the centermost hol
2014-10-22 20:33:18 701
原创 UVa1185 - Big Number(求阶乘的位数)
In many applications very large integers numbers are required. Some of theseapplications are using keys for secure transmission of data, encryption, etc.In this problem you are given a number, you hav
2014-10-22 00:44:02 716
原创 UVa10356 - Rough Roads(Dijkstra)
After he bought the tri-cyclelast year, Shaon went to visit his grandfather's house in a remote part of Bangladesh.He wanted to ride the cycle in quiet, rush-free rural roads. But when hereached the g
2014-10-21 23:08:58 1879
原创 UVa10672 - Marbles on a tree(BFS)
n boxes are placed on the vertices of a rooted tree, which are numbered from 1 to n, 1 ≤ n ≤ 10000. Each box is either empty or contains a number of marbles; the total number of marbles is n.The t
2014-10-21 20:23:55 1819
原创 UVa12356 - Army Buddies(水题)
Nlogonia is fighting a ruthless war against the neighboring country of Cubiconia. The Chief General of Nlogonia's Army decided to attack the enemy with a linear formation of soldiers, that would advan
2014-10-20 19:27:32 930
原创 UVa1585 - Score(水题)
There is an objective test result such as ``OOXXOXXOOO". An `O' means a correct answer of a problem and an `X' means a wrong answer. The score of each problem of this test is calculated by itself an
2014-10-19 20:39:15 962
原创 UVa10138 - CDVII(排序)
Roman roads are famous for their longevity and sound engineering. Unfortunately, sound engineering does not come cheap, and a number of neo-Caesars have decided to recover the costs through automated
2014-10-19 19:51:30 747
原创 网络编程学习笔记(udp_server函数)
创建一个UDP口的服务端,其代码如下:#include #include #include #include #include #include #include #include #include #include #define MAXLINE 128int udp_server(const char *host, const char *serv, sockle
2014-10-12 15:40:09 1043
原创 UVa11730 - Number Transformation(欧拉筛选法、动态规划)
You are given an integer number S. Youcan transform any integer number A to another integer number B by adding x to A.This x is an integer number which is a prime factor of A (Please note that 1and A
2014-10-12 12:30:11 757
原创 网络编程学习笔记(getservbyname和getservbyport函数)
通过服务器的名字而不是服务器端口号来认知它,而且如果从主机到端口号的映射包含在一个文件中
2014-10-07 19:13:49 5621
原创 网络编程学习笔记(gethostbyaddr函数)
函数gethostbyaddr取一个二进制的IP地址并试图找到相应于此地址的主机名,与gethostbyname的行为
2014-10-05 15:01:23 7096 2
Ubuntu Linux实用学习教程.pdf
2009-09-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人