题目链接:POJ 3130 Problem Description After counting so many stars in the sky in his childhood, Isaac, now an astronomer and a mathematician uses a big astronomical telescope and lets his image processing program count stars. The hardest part of the prog…
Description After counting so many stars in the sky in his childhood, Isaac, now an astronomer and a mathematician uses a big astronomical telescope and lets his image processing program count stars. The hardest part of the program is to judge if shi…
题意:求问多边形的核(能够看到所有点的点)是否存在. /* 对于这样的题目,我只能面向std编程了,然而还是不理解. 算法可参考:http://www.cnblogs.com/huangxf/p/4067763.html */ #include<cstdio> #include<iostream> #include<cmath> #define N 110 using namespace std; int m; double r; int cCnt,curCnt;///…
Area Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 16894 Accepted: 4698 Description You are going to compute the area of a special kind of polygon. One vertex of the polygon is the origin of the orthogonal coordinate system. From thi…
#include <iostream> ; int a[MAX]; int swap[MAX]; //临时数组 int n; //数组a的长度 __int64 result; //数组a中的逆序数 //归并两个已经有序的段:a[low]—a[mid]和a[mid+1]—a[high],使得a[low]—a[high]有序. void merge(int low, int mid, int high) { int i = low; ; ; while(i <= mid &&…
Rotating Scoreboard Description This year, ACM/ICPC World finals will be held in a hall in form of a simple polygon. The coaches and spectators are seated along the edges of the polygon. We want to place a rotating scoreboard somewhere in the hall su…
Matrix Power Series Description Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak. Input The input contains exactly one test case. The first line of input contains three positive integers n (n ≤ 30), k (k ≤ 109)…