暴力求解acm
文章平均质量分 78
Happy_Saint
前进!希望听到不同的声音~ Fighting!
展开
-
uvaoj10167
Uvaoj 10167 birthday cakeLucy and Lily are twins. Today is their birthday.Mother buys a birthday cake for them. Now we putthe cake onto a Descartes coordinate. Its center is at(0,0), and the原创 2016-01-27 18:10:29 · 488 阅读 · 0 评论 -
NYOJ99单词拼接
NYOJ99 思路 : 把 单词两端的字母看成点,单词本身看成一个权重一样,用来排序以谁为开头。 只需判断是否欧拉图 根据入度出度判断 判断是否连通 (原创 2017-05-02 10:27:29 · 348 阅读 · 0 评论 -
nyoj711最舒适的路线 (枚举 + 并查集 )
nyoj711 题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=711 并查集: 一般用于无向图中。 本题题意: 从s t 来回游动 , 求这条路上 存在的最大速度 与 最小速度 的比率 最小。 暴力枚举 ,速度从大向小排列 ,原创 2016-05-22 13:02:46 · 543 阅读 · 1 评论 -
nyoj1091 (wa 的快进来!!)
nyoj1091 思路: n=40 ,其他数据太大肯定不能递推,就枚举 分成 前n/2 和 后 n- n/2,后面枚举过程中找到与前面的合适的剩余重量,更新最大价值。 用到了 二进制的枚举 000 - 111 的过程就表示了 三个数的任意组合 001 ---1 010 ---- 2 011 ---- 1,2原创 2016-05-24 19:38:57 · 367 阅读 · 0 评论 -
nyoj543遥控器
NYOJ543 这题给跪了 。。。。。。。。。。 来几个测试数据: 1.测试你的 上下键问题 0 0 0 1 0 0 0 0 0 0 0 0 0 99 0 答案为 1 0 0 0 0原创 2016-05-10 16:12:24 · 766 阅读 · 0 评论 -
poj3070
poj3070 FibonacciTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12215 Accepted: 8670DescriptionIn the Fibonacci integer sequence,原创 2016-04-14 22:15:52 · 905 阅读 · 0 评论 -
uvaoj11218KTV
uvaoj11218 One song is extremely popular recently, so you and your friends decided to sing it in KTV. The song has 3 characters, so exactly 3 people should sing together each time (yes, there原创 2016-02-25 22:01:28 · 440 阅读 · 0 评论 -
uvaoj216Geting in line---思路+易错+代码
Geting in line题意本题思路容易犯的错误代码原创 2016-01-30 22:01:26 · 501 阅读 · 0 评论 -
uvaoj131 The Psychic Poker Player------醉人
uvaoj 131 131 - The Psychic Poker PlayerTime limit: 3.000 secondsIn 5-card draw poker, a player is dealt a hand of five cards (which may be looked at). The player原创 2016-01-29 10:58:41 · 476 阅读 · 0 评论 -
质因数个数(注意除零问题)
题目连接:质因数个数分解原理详情:质因数原理比较常规的方法就是一个一个出,但是要确定什么是质因数,即素数。思路: 1.打表(素数表)素数小于100000个; 2.注意在除的过程要考虑超过100000的数,经过前面所有的素数相除除不尽的即为自身。(防止除零(超过100000素数))#include<stdio.h>#include<math.h> int...原创 2018-03-05 18:33:06 · 422 阅读 · 0 评论