模拟
文章平均质量分 75
wJs9528-1
这个作者很懒,什么都没留下…
展开
-
hdu 5319 Painter (此题纪念不仔细读题而逝去的WA)
PainterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0Problem DescriptionMr. Hdu is an painter,原创 2015-07-28 16:31:33 · 477 阅读 · 0 评论 -
hdu 5336 XYZ and Drops
XYZ and DropsTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1126 Accepted Submission(s): 333Problem DescriptionXYZ is play原创 2015-08-02 09:28:36 · 279 阅读 · 0 评论 -
Spreadsheets (26进制转换)
SpreadsheetsTime Limit:10000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uDescriptionIn the popular spreadsheets systems (for example, in Excel) the following numeration of co原创 2016-03-21 17:20:53 · 479 阅读 · 0 评论 -
codeforces 652 A. Gabriel and Caterpillar
A. Gabriel and CaterpillarThe 9-th grade student Gabriel noticed a caterpillar on a tree when walking around in a forest after the classes. The caterpillar was on the heighth1 cm from the原创 2016-03-26 10:36:55 · 632 阅读 · 0 评论 -
ZOJ 1101 Gamblers (A=B+C+D)
题意:给出n个数字(包含负数),从中找到一个最大A的数满足 A=B+C+D A,B,C,D均为在这n个数中且不同分析:n最大为1000,如果n^3去解决会很呛,我们不防先将式子变形 A-B=C+D,这样先n*n预处理出C+D的所有值,然后枚举A,B,这样就能在n*n*log(n*n)的复杂度内解决问题了,要注意的是由于有负数,所以每次枚举都要遍历整个数组。#include原创 2016-05-24 21:05:21 · 700 阅读 · 0 评论 -
POJ 2420 A Star not a Tree? (模拟退火)
题意:给出平面坐标内的一些点,要求你在坐标平面内找到一点使所有点到该点的距离和最小,输出这个距离分析:模拟退火,在误差范围内找到近似答案#include#include#include#include#include#include#include#include#include#include//#pragma comment(linker, "/STACK:原创 2016-06-19 14:16:03 · 612 阅读 · 0 评论 -
POJ 2069 Super Star(模拟退火)
题意:给出三维空间的一些点,要求你找到三维空间的一个点使这个点形成的球包含所有的点并且半径最小,输出这个半径分析:每次找到距离半径到最小的点进行退火操作#include#include#include#include#include#include#include#include#include#include//#pragma comment(linker,原创 2016-06-19 21:02:11 · 739 阅读 · 0 评论 -
Hdu 2899 Strange fuction(二分三分可做,模拟退火解法)
题意:计算F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 分析:求导发现0~100内为凹函数,那么可以直接二分导数或者三分原函数,这里写一下模拟退火的做法,每次左右找到较低函数值并转移x,控制一下精度,和二分三分差不多,只是写法不一样。#include#include#include#include#include#include原创 2016-06-19 21:35:17 · 903 阅读 · 0 评论 -
codeforces 719 C. Efim and Strange Grade(模拟)
题意:给一个小数,要求在t步内对小数点后进行四舍五入,变成尽量大的数,每次操作可以选择某一位四舍五入分析:模拟四舍五入的过程,从前往后找到第一个大于5的地方,向前推进,需要注意一下小数点前的数字的处理#include<cstring>#include<string>#include<iostream>#include<queue>#include<cstdio>#include<algor原创 2016-09-25 12:38:24 · 611 阅读 · 0 评论