uva 140 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 maxim...
分类:
其他好文 时间:
2015-01-28 09:51:07
阅读次数:
137
A题。。暴力枚举在每个位置添加字符,然后检查一下是不是回文串 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 #define LL long ...
分类:
其他好文 时间:
2015-01-28 00:42:26
阅读次数:
261
uva 216 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...
分类:
其他好文 时间:
2015-01-27 13:19:04
阅读次数:
168
uva 11210 Chinese Mahjong
Mahjong () is a game of Chinese origin usually played by four persons with tiles resembling dominoes and bearing various designs, which are drawn and discarded until o...
分类:
其他好文 时间:
2015-01-27 09:30:43
阅读次数:
273
uva 725 Division
Write a program that finds and displays all pairs of 5-digit numbers that between them use the digits
0 through 9 once each, such that the first number divided by the second ...
分类:
其他好文 时间:
2015-01-24 14:32:11
阅读次数:
143
uva 131 The Psychic Poker Player
The Psychic Poker Player
In 5-card draw poker, a player is dealt a hand of five cards (which may be looked at). The player may then dis...
分类:
其他好文 时间:
2015-01-24 10:15:34
阅读次数:
165
思路:从0~99暴力枚举下,符合条件的存入ans中,输出的时候注意格式。...
分类:
其他好文 时间:
2015-01-23 21:40:19
阅读次数:
234
uva 10167 Birthday Cake
Background
Lucy and Lily are twins. Today is their birthday. Mother buys a birthday cake for them.Now we put the cake onto a Descartes coordinate. Its center is at (0...
分类:
其他好文 时间:
2015-01-23 16:27:45
阅读次数:
189
Sum of Consecutive Prime NumbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 19895Accepted: 10906DescriptionSome positive integers can be ...
分类:
其他好文 时间:
2015-01-22 17:16:21
阅读次数:
177
题意 给你不超过1000个点的坐标 判断这些点是否是关于一条竖线对称的
没想到暴力枚举可以过 如果存在对称轴的话那么对称轴的横坐标一定是最左边的点和最右边的点的中点 为了避免中点是小数 可以将横坐标都乘上2 然后在判断所有点是否有对称点就行了
#include
using namespace std;
const int N = 1005;
int x[N], y[N], n...
分类:
其他好文 时间:
2015-01-22 11:15:23
阅读次数:
203