摘要:
Toy Storage 题型与2318 TOYS一样,注意要对线段排序,现在模板又更新了~~ #include<iostream> #include<cstdio> #include<cstring> #include<string.h> #include<algorithm> #include<m 阅读全文
posted @ 2016-01-21 23:15
hxer
阅读(237)
评论(0)
推荐(0)
摘要:
TOYS 题意:给定一个如上的长方形箱子,中间有n条线段,将其分为n+1个区域,给定m个玩具的坐标,统计每个区域中的玩具个数。 思路:这道题很水,只是要知道会使用叉乘来表示点在线的上面还是下面; 当a.Xmult(b,c) < 0时,表示在线的上面。之后就是二分的时候,不能直接使用mid来ans[m 阅读全文
posted @ 2016-01-21 21:56
hxer
阅读(141)
评论(0)
推荐(0)
摘要:
E. Square Root of Permutation A permutation of length n is an array containing each integer from 1 to n exactly once. For example, q = [4, 5, 1, 2, 3] 阅读全文
posted @ 2016-01-21 17:07
hxer
阅读(446)
评论(0)
推荐(0)
摘要:
616E Sum of RemaindersCalculate the value of the sum: n mod 1 + n mod 2 + n mod 3 + … + n mod m. As the result can be very large, you should ... 阅读全文
posted @ 2016-01-21 10:47
hxer
阅读(228)
评论(0)
推荐(0)

浙公网安备 33010602011771号