链接:http://poj.org/problem?id=3090
题意:在坐标系中,从横纵坐标 0 ≤ x, y ≤
N中的点中选择点,并且这些点与(0,0)的连点不经过其他的点。
思路:显而易见,x与y只有互质的情况下才会发生(0,0)与(x,y)交点不经过其他的点的情况,对于x,y等于N时,可以选择的点均为小于等于N并且与N互质的数,共Euler(N)个,并且不重叠。所以可以得到递推...
分类:
其他好文 时间:
2014-07-31 00:02:15
阅读次数:
240
Detecting and Matching Interest Points
分类:
其他好文 时间:
2014-07-29 17:11:22
阅读次数:
470
LeetCode: Max Points on a LineGiven n points on a 2D plane, find the maximum number of points that lie on the same straight line.地址:https://oj.leetcod...
分类:
其他好文 时间:
2014-07-27 23:22:59
阅读次数:
289
题目链接Brownie Points IITime Limit: 20000/10000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 207Accepted Submission(s): ...
分类:
其他好文 时间:
2014-07-27 23:00:19
阅读次数:
350
$order_object=Mage::getModel('sales/order')->load("order_id");注:order_id 是订单号后面的数字;$res['points_spend']=Mage::helper('rewards')->getPointsString($orde...
分类:
其他好文 时间:
2014-07-26 00:31:26
阅读次数:
195
#include #include using namespace std;//点(x,y)可见当且仅当x,y互质,那么我仅仅只要知道int euler(int x){// 就是公式 int i, res=x,tmp; tmp= (int)sqrt(x * 1.0) + 1; fo...
分类:
其他好文 时间:
2014-07-23 16:26:41
阅读次数:
218
地址:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3799
Two star-crossed lovers want to meet. The two lovers are standing at distinct points in t...
分类:
其他好文 时间:
2014-07-23 13:29:04
阅读次数:
242
The first solution I figured out is O(n^3). I thought it must be O(n^2) to get max points on a line for a given point.. but after checking several art...
分类:
其他好文 时间:
2014-07-22 22:47:15
阅读次数:
226
Description
The multiplication puzzle is played with a row of cards, each containing a single positive integer. During the move player takes one card out of the row and scores the number of points ...
分类:
其他好文 时间:
2014-07-21 22:11:18
阅读次数:
289
完全背包,转化为0/1背包 dp[i, j] = max(dp[i-1, j], dp[i, j - minutes[i]] + points[i])
/*
ID:kevin_s1
PROG:inflate
LANG:C++
*/
#include
#include
#include
#include
#include
#include
#include
#include
#i...
分类:
其他好文 时间:
2014-07-20 23:17:56
阅读次数:
353