uva
文章平均质量分 78
utoppia
这个作者很懒,什么都没留下…
展开
-
Uva 10294 Arif in Dhaka (First Love Part 2)
PRO题目大意: n 个珠子组成的 项链,t 种颜色去染, 问有多少本质不同的项链;经旋转,翻转一样的视为同一种项链。就是一个简单的polya组合计数的应用,算出每种置换的循环节个数,答案就是《组合数学》 P393 的公式;因为题目的量比较小,直接暴搞就可以了,答案保证不会超64位,所以就没有必要高精度了。秀一下。。。原创 2013-04-15 11:02:45 · 757 阅读 · 0 评论 -
Beijing 2004 (UVaLive 3137) - Square
Link To The ProblemSolution : 构造、点到线段的最短距离Code:// Beijing 2004 Square// Solution : 构造//#include#include#include#include#include#include#includeusing namespace std;#define原创 2013-10-22 11:50:31 · 612 阅读 · 0 评论 -
Shanghai 2004(UVaLive 3263) - That Nice Euler Circuit
Link To The ProblemSolution : 离散化,欧拉平面公式: V - E + F = 2// Shanghai 2004 That Nice Euler Circuit// Solution : #include#include#include#include#include#include#includeusing namespac原创 2013-10-22 01:09:37 · 806 阅读 · 0 评论 -
UVa 11265 The Sultan's Problem
Link To The ProblemSolution : 半平面交、多边形面积Code:// UVa 11265 The Sultan's Problem// HalfPlane Intersection//#include#include#include#include#include#include#include#includeus原创 2013-10-22 10:33:40 · 704 阅读 · 0 评论 -
UVa 10794 The Deadly Olympic Returns!!!
Link To The ProblemSolution : 数学,计算Code://UVa 10794// | a-b |^2 = |a|^2 + |b|^2 + 2*(a*b) #include#include#include#include#include#includeusing namespace std;#define dbg(x)原创 2013-10-22 08:39:35 · 757 阅读 · 0 评论 -
WF 2008 (UVaLive4127 ) - The Sky is the Limit
Link To The ProblemSolution : 离散,模拟Code :// WF 2007 The Sky is the limit// Solution : 离散#include#include#include#include#include#include#includeusing namespace std;#defin原创 2013-10-21 23:59:22 · 779 阅读 · 0 评论 -
Uva 10792 The Laurel-Hardy Story
Link To The ProblemSolution : Math Code:// UVa 10792 The Laurel Hardy Story// Math#include#include#include#include#include#include#includeusing namespace std;#define FOR(i原创 2013-10-21 19:30:59 · 708 阅读 · 0 评论 -
WF 2007 (UVaLive 2397) - Collecting Luggage
Link To The Problem知识点: 二分,最短路,线段和多边形判交Code:// WF 2007 (UValive 2397 Collecting Luggage// 知识点:二分,最短路,线段和多边形判交#include#include#include#include#include#include#includeusing na原创 2013-10-18 11:18:17 · 2850 阅读 · 0 评论 -
Shanghai 2004 ( UVALive 3259) Amphiphilic Carbon Molecules
Link To The Problem采用了枚举加扫描的方法,注意极角排序的方式。知识点 : 极角,叉积Code:// ShangHai 2004 (UValive 3529)// 知识点:极角排序,叉积#include#include#include#include#include#includeusing namespace原创 2013-10-17 15:20:31 · 620 阅读 · 0 评论 -
NEERC 2008 Aerodynamics
Link To The Problem转化成2维的凸包// 3D截面 + 2D凸包 #include#include#include#include#include#includeusing namespace std;#define nMax 110#define sf scanf#define pf printf#define rep原创 2013-10-17 12:20:59 · 753 阅读 · 0 评论 -
Uva 11802
题意就是给定n,k问n在b进制下最后k未都是0假设 b = p1^a1 .....那么 a1*k 我们记录每个质数的个数,然后就用f(k+1)-f(k)#include#include#includeusing namespace std;#define nMax 9000int p[nMax];long long k;long long原创 2013-08-23 21:47:50 · 812 阅读 · 0 评论 -
Uva 10617 Again Palindromes
CLICK ME问一个字符串的子序列是回文串的个数;dp#include#include#includeusing namespace std;char s[70];long long dp[70][70];int main() { int cas; //freopen("input.txt","r",stdin); scanf("%d",&cas原创 2013-08-23 21:12:09 · 603 阅读 · 0 评论 -
UvaLive 3964 - A Foldy but a Goody
每次折叠都是坐标的90度旋转。。。从后往前处理。#include#include#include#include#includeusing namespace std;#define nMax 40char s[nMax];int m;class P {public: int x,y; P() {}; P(int x,int y):x(x),y(y原创 2013-08-23 14:48:11 · 758 阅读 · 0 评论 -
Uva 10288 - Coupons
自己写的正数分数类,也作为红书第一题,留念。。。alpc 加油。#include#include#include#include#include#includeusing namespace std;#define FOR(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)#define nMax 1010#define inf 0x原创 2013-04-15 00:26:16 · 722 阅读 · 0 评论 -
Amritapuri 2009 (UValive 4676 ) - Geometry Problem
Link To The ProblemSolution : 由于x的范围是10e7,平方的话是10e14,double 的精度可能判不到小的eps。所以在做叉积或者点积做判断的时候注意取方向向量就好。。。否则。。。WA。。。Code :// Amritapuri 2009 Geometry Problem// Solution : 模拟//#include原创 2013-10-23 01:54:07 · 976 阅读 · 0 评论