STL
文章平均质量分 58
Liqun_
~~
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UVa 1593 - Alignment of Code
题目: 输入若干行代码,使其各列单词左边界对齐,单词之间至少要空一格。 输入: 乱格式的若干行代码。 输出: 对齐后的代码。 主要是getline、stringstream以及二维vector的应用,用二维vector储存文本,再找出每一列的最长字符串的长度。#include #include #include #inclu原创 2015-09-04 17:23:06 · 439 阅读 · 0 评论 -
UVa1595-Symmetry
题目: 平面上有n个点,是否存在一条竖直的轴是所有点的对称轴。 输入: 点坐标。 输出: 存在输出YES,否则输出NO。 若存在对称轴,则对称轴横坐标为x = (x1 + x2 + ... + xn)/n。为了防止出现浮点数,可以将xn*2。 sum = x1 + x2 + ... + xn,则利用n*xn与sum*2-n*xn原创 2015-10-27 09:35:05 · 400 阅读 · 0 评论 -
UVa 1594 Ducci Sequence
A Ducci sequence is a sequence of n-tuples of integers. Given an n-tuple of integers (a 1 , a 2 , ... , a n ), the next n-tuple in the sequence is formed by taking the absolute differences of neighbo原创 2016-02-05 16:40:13 · 414 阅读 · 0 评论
分享