- 博客(157)
- 收藏
- 关注
原创 JAVA
import java.util.*;import java.sql.SQLException;public class Main { public static void main(String[] args) throws ClassNotFoundException, SQLException { // TODO Auto-generated method s...
2019-02-22 20:49:02 260
原创 sdut 2728 最佳拟合直线
Problem Description 在很多情况下,天文观测得到的数据是一组包含很大数量的序列点图象,每一点用x值和y值定义。这就可能需要画一条通过这些点的最佳拟合曲线。为了避免只对个别数据分析,需要进行最佳曲线拟合。考虑N个数据点,它们的坐标是(X1,Y1),(X2,Y2)…,(XN,YN)。假设这些值中的X是严格的精确值,Y的值是测量值(含有一些误差)。对于一个给定的X,如X1,对...
2018-03-09 20:26:38 358
原创 sdut 2499 数字
Problem Description 定义f(x) = {比x小,不可以被x整除并且不和x互质的数的个数}(x为正整数)。 当f(x) 是奇数的时候我们称x为“奇真数”。 给出两个数x,y求区间[x,y]内的“奇真数”的个数。Input 第一行输入一个数N代表测试数据个数(N<=20)。接下来N行每行两个正整数x , y ( 0 < x <= y < 2^3...
2018-03-09 19:39:17 483
转载 计算几何之旋转卡壳算法
一、目录一些历史:1978年, M.I. Shamos’s Ph.D. 的论文”Computational Geometry”标志着计算机科学的这一领域的诞生。 当时他发表成果的是一个寻找凸多边形直径的一个非常简单的算法, 即根据多边形的一对点距离的最大值来确定。 后来直径演化为由一对对踵点对来确定。 Shamos提出了一个简单的 O(n) 时间的算法来确定一个凸 n 角形的对踵点对。 因为他们
2018-01-26 11:19:08 558
原创 SDUT 趣味循环赛第一场 签到题题解
题解因为五个人中只有一个人猜了ldq,所以ldq一定是对的,之后再根据ldq判断其他人标程#include <stdio.h>#include <stdlib.h>int main(){ printf("fish\nRansln\nxuanhuang\nHerman67\naxuhongbo\n"); return 0;}
2017-12-25 16:47:15 395
原创 SDUT 趣味循环赛第二场 玄黄的三角形题解
题解以为五个人当中只有一个人猜ldq所以,ldq一定是对的,之后再根据ldq去确定其他的人标程#include <stdio.h>#include <stdlib.h>int main(){ printf("fish\nRansln\nxuanhuang\nHerman67\naxuhongbo\n"); return 0;}
2017-12-25 16:36:04 292
原创 sdutoj-4078 女装大佬买地题解
一句话:相同周长,圆形面积最大。 计算出走过的周长,在算出相应周长的圆的面积即可。标程:#include <stdio.h>#include <math.h>#define PI 3.1415927int main(){ int v,t; while(~scanf("%d %d",&v,&t)){ double d=(v*1.0)*(t*1.0);
2017-11-21 09:14:26 425
原创 Throwing Balls into the Baskets LightOJ - 1317
You probably have played the game “Throwing Balls into the Basket”. It is a simple game. You have to throw a ball into a basket from a certain distance. One day we (the AIUB ACMMER) were playing the ga
2017-10-09 19:31:21 371
原创 Island of Survival LightOJ - 1265
You are in a reality show, and the show is way too real that they threw into an island. Only two kinds of animals are in the island, the tigers and the deer. Though unfortunate but the truth is that, e
2017-10-09 16:44:57 283
原创 Dice (III) LightOJ - 1248
Given a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its faces at least once. Assume that the dice is fair, that means when you throw the dice
2017-10-09 15:54:53 379
原创 Birthday Paradox LightOJ - 1104
Sometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a party where there are 23 people including you. What is the probability
2017-10-09 15:07:19 252
原创 Just another Robbery LightOJ - 1079
As Harry Potter series is over, Harry has no job. Since he wants to make quick money, (he wants everything quick!) so he decided to rob banks. He wants to make a calculated risk, and grab as much money
2017-10-09 14:30:45 241
原创 A Dangerous Maze LightOJ - 1027
You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for all doors.If you choose the ith door, it can either ta
2017-09-27 20:11:33 235
原创 Uyuw's Concert POJ - 2451
题目链接:https://cn.vjudge.net/problem/POJ-2451朱泽圆06年论文–半平面交#include<iostream>#include<algorithm>#include<cmath>using namespace std;const int maxn=20010;const int bound=10000;const double esp= 1e-10;
2017-09-27 20:10:13 328
原创 Triathlon POJ - 1755
Triathlon is an athletic contest consisting of three consecutive sections that should be completed as fast as possible as a whole. The first section is swimming, the second section is riding bicycle an
2017-09-27 20:07:29 311
原创 Feng Shui POJ - 3384
题目链接:https://cn.vjudge.net/problem/POJ-3384#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>#include <iostream>#define eps 1e-10using namespace std;struct point{ double x,y;
2017-09-27 20:06:17 278
原创 Most Distant Point from the Sea POJ - 3525
The main land of Japan called Honshu is an island surrounded by the sea. In such an island, it is natural to ask a question: “Where is the most distant point from the sea?” The answer to this question
2017-09-27 20:04:15 304
原创 Art Gallery POJ - 1279
The art galleries of the new and very futuristic building of the Center for Balkan Cooperation have the form of polygons (not necessarily convex). When a big exhibition is organized, watching over all
2017-09-27 20:02:35 261
原创 Video Surveillance POJ - 1474
A friend of yours has taken the job of security officer at the Star-Buy Company, a famous depart- ment store. One of his tasks is to install a video surveillance system to guarantee the security of the
2017-09-27 20:01:21 325
原创 How I Mathematician Wonder What You Are! POJ - 3130
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 p
2017-09-27 20:00:00 252
原创 Rotating Scoreboard POJ - 3335
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 somewhe
2017-09-27 19:57:49 223
原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 Out-out-control cars
2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 Out-out-control cars使一个三角形不动,移动另外一个三角形,判断能否相交#include<stdio.h>#include<math.h>#include<algorithm>using namespace std;struct node{ double x1, y1; double x2, y2;
2017-09-16 20:06:52 249
原创 2017 ACM-ICPC 亚洲区(西安赛区)网络赛 Trig Function
2017 ACM-ICPC 亚洲区(西安赛区)网络赛 Trig Functionf(cos(x))=cos(n∗x) holds for all xxx.Given two integers nnn and mmm, you need to calculate the coefficient of xmx^mxm in f(x)f(x)f(x), modulo 998244353998244
2017-09-16 19:58:41 489
原创 G - Snooker Gym - 101078G
G - Snooker Gym - 101078G题目链接:https://cn.vjudge.net/problem/Gym-101078G#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>using namespace std;int main(){ int t; int
2017-08-02 13:44:11 274
原创 Clocks Gym - 101078E
E Clocks题目链接:https://cn.vjudge.net/problem/Gym-101078E Problem During the past few years Tim E. has been collecting circle-shaped clocks and he exposed them on a big wall in his living room. He want
2017-08-01 21:02:58 335
原创 Interesting Calculator UVA - 12664
Interesting Calculator UVA - 12664题目链接:https://cn.vjudge.net/problem/UVA-12664#include <cstdio>#include <cstring>#include <iostream>#include <vector>#include <queue>#define ms(s, x) memset(s, x, s
2017-07-28 10:40:00 233
原创 Good Teacher UVA - 12662
Good Teacher UVA - 12662题目链接:https://cn.vjudge.net/problem/UVA-12662#include <cstdio>#include <cstring>#include <algorithm>#include <iostream>#include <vector>using namespace std;struct Node {
2017-07-28 09:58:34 264
原创 Funny Car Racing UVA - 12661
Funny Car Racing UVA - 12661 题目链接:https://cn.vjudge.net/problem/UVA-12661#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>#include <vector>#include <queue>#define INF 0x3
2017-07-28 09:57:22 805
原创 Almost Palindrome UVA - 12656
Almost Palindrome UVA - 12656题目链接:https://cn.vjudge.net/problem/UVA-12656#include <cstdio>#include <cstring>#include <algorithm>#include <iostream>#include <cctype>using namespace std;const int max
2017-07-28 09:56:26 286
原创 A very hard mathematic problem HDU - 4282
A very hard mathematic problem HDU - 4282Haoren is very good at solving mathematic problems. Today he is working a problem like this: Find three positive integers X, Y and Z (X < Y, Z > 1) that hol
2017-07-28 09:40:32 208
原创 Number HDU - 4279
Number HDU - 4279 Here are two numbers A and B (0 < A <= B). If B cannot be divisible by A, and A and B are not co-prime numbers, we define A as a special number of B. For each x, f(x) equals to t
2017-07-28 09:39:04 233
原创 Faulty Odometer HDU - 4278
Faulty Odometer HDU - 4278 You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from the digit 2 to the digit 4 and from the di
2017-07-28 09:36:44 273
原创 Tiling UVALive - 6046
Tiling UVALive - 6046题目链接:https://cn.vjudge.net/problem/UVALive-6046#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>#include <math.h>using namespace std;struct node{
2017-07-28 09:32:00 304
原创 Let's Go Green UVALive - 6039
Let’s Go Green UVALive - 6039 题目链接:https://cn.vjudge.net/problem/UVALive-6039#include <cstdio>#include <cstring>#include <algorithm>#include <iostream>#include <vector>using namespace std;vector<
2017-07-28 09:30:58 325
原创 Grandpa's Walk UVALive - 6038
Priyanka and Toys HackerRank - priyanka-and-toys Little Priyanka visited a kids’ shop. There are toys and their weight is represented by an array . Each toy costs 1 unit, and if she buys a toy with we
2017-07-28 09:29:52 191
原创 CodeForces - 255C
CodeForces - 255Cwwl loves sequences of numbers. Recently, he has discovered a new type of sequences which he called an almost arithmetical progression. A sequence is an almost arithmetical progression
2017-07-26 10:54:32 271
原创 CodeForces - 255B
CodeForces - 255BLittle wwl loves different algorithms. Today he has invented a new algorithm just for you. wwl’s algorithm works with string s, consisting of characters “x” and “y”, and uses two follo
2017-07-26 10:53:58 294
原创 CodeForces - 255A
CodeForces - 255Awwl is a beginner bodybuilder. Today the gym coach gave him the training plan. All it had was n integers a1, a2, …, an. These numbers mean that wwl needs to do exactly n exercises toda
2017-07-26 10:53:20 207
原创 CodeForces - 214B
yxc loves math lessons very much, so he doesn’t attend them, unlike wwl. But now yxc wants to get a good mark for math. For that Ms. lxh, his ACM teacher, gave him a new task. yxc solved the task immed
2017-07-26 10:52:45 213
原创 CodeForces 214A
yxc loves math lessons very much, so he doesn’t attend them, unlike wwl. But now yxc wants to get a good mark for math. For that Ms. lxh, his ACM teacher, gave him a new task. yxc solved the task immed
2017-07-26 10:52:08 244
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人