
枚举
Seeyouer
这个作者很懒,什么都没留下…
展开
-
UVA-725 Division
暴力枚举: i从10000开始找(因为N最小为2,所以i一定大于i/N,一定是五位数),到98765,如果是N的倍数就开始判断i和i/N是否为不重复数,是->输出,不是->继续找;注意: ① 0的位置及个数,如果i/N是四位数,那么0要添加在分母前面; ②输出格式格式格式,我就卡这了,输入0之后不输出空行;代码:#include<iostream>#include<stdio.h>#inc原创 2017-10-15 12:26:02 · 263 阅读 · 0 评论 -
UVA-11059 Maximum Product
看清楚题意,连续的子序列,不能从小到大排序再乘。#include<iostream>#include<stdio.h>#include<string.h>#include<string>#include<math.h>#include<algorithm>using namespace std;int main(){ long long max,max1;//注意范围原创 2017-10-15 12:55:04 · 233 阅读 · 0 评论 -
uva583 Prime Factors
Sample Input -190 -191 -192 -193 -194 195 196 197 198 199 200 0 Sample Output -190 = -1 x 2 x 5 x 19 -191 = -1 x 191 -192 = -1 x 2 x 2 x 2 x 2 x 2 x 2 x原创 2017-11-03 16:18:36 · 319 阅读 · 0 评论 -
UVA 11809 Floating-point numbers
Floating-point numbers are represented differently in computers than integers. That is why a 32-bit floating-point number can represent values in the magnitude of 1038 while a 32-bit integer can原创 2017-11-03 16:34:41 · 316 阅读 · 0 评论 -
UPC 6347 Out of Sorts II
题目描述Keeping an eye on long term career possibilities beyond the farm, Bessie the cow has started learning algorithms from various on-line coding websites. Her favorite algorithm thus far is “bubble...原创 2018-07-31 10:23:37 · 273 阅读 · 0 评论