数学
欧莎
啦啦啦,啦啦啦,让我们一起洗刷刷
展开
-
hdu 5832 A water problem(大数取模)
题目链接思路:大数取模,73*137=10001,所以对10001取模代码#include<stdio.h>#include<iostream>#include<algorithm>#include<string.h>#include<map>#include<queue>#define LL long longusing namespace std;const int N=100原创 2016-08-15 17:28:45 · 244 阅读 · 0 评论 -
组合数(神搜)和全排列(递归)
1 组合数 小白书53页上写的组合数中间会乘法溢出,作者举个反例告诉我们:即使你认为题目在“暗示”你使用某种语言特性,也应该深入分析,不能贸然行事。 正确的组合数写法,#include<stdio.h>#include<iostream>using namespace std;int a[12];int m,n;void dfs(int m,int n){ for(int原创 2016-08-16 09:46:16 · 631 阅读 · 0 评论 -
poj 1186 方程的解数 (hash+双向dfs)
Description已知一个n元高次方程: 其中:x1, x2,...,xn是未知数,k1,k2,...,kn是系数,p1,p2,...pn是指数。且方程中的所有数均为整数。 假设未知数1 1 方程的整数解的个数小于231。 ★本题中,指数Pi(i=1,2,...,n)均为正整数。 Input第1行包含一个整数n。第2行包含一个整数M。第3行到第n原创 2017-02-23 15:48:10 · 397 阅读 · 0 评论 -
hdu 5128 The E-pang Palace(几何暴力)
Problem Description E-pang Palace was built in Qin dynasty by Emperor Qin Shihuang in Xianyang, Shanxi Province. It was the largest palace ever built by human. It was so large and so magnificent that原创 2017-04-28 15:46:44 · 295 阅读 · 0 评论 -
Bicycle Race(几何)
Bicycle RaceMaria participates in a bicycle race.The speedway takes place on the shores of Lake Lucerne, just repeating its contour. As you know, the lake shore consists only of straight sections...原创 2016-05-26 09:35:50 · 327 阅读 · 0 评论 -
自适应辛普森(近似求积分模板)
1261: 地狱飞龙 时间限制: 1 秒 内存限制: 64 MB 提交: 255 解决: 54 提交 状态 题目描述 最近clover迷上了皇室战争,他抽到了一种地狱飞龙,很开心。假设地域飞龙会对距离为d的敌人每秒造成k/d2伤害。假设地域飞龙位于坐标轴原点,以每秒v1的速度向y轴正方向移动,敌人在(x,0)的位置,以每秒v2的速度向x轴负方向移动。问,敌人至少有多少血量永远才不会被原创 2017-04-26 13:58:28 · 737 阅读 · 0 评论 -
hud 1724 求椭圆的面积(自适应辛普森)
Problem Description Math is important!! Many students failed in 2+2’s mathematical test, so let’s AC this problem to mourn for our lost youth.. Look this sample picture:A ellipses in the plane and ce原创 2017-04-26 10:45:16 · 412 阅读 · 0 评论 -
hud 5826 physics(积分)
题目链接题意:给出几个初速度,初位置,以及小球运动的方向,速度和加速度一直在改变,但是速度和加速度的方向是同向,且一直满足C=V*a,问第k小速度是多少 思路:在比赛的时候就一直在想这个问题,速度和加速度一直都在改变,刚开始推出个公式,没有用微积分,结果错了,然后又想了想,用积分但是不知道怎么下手,直到比赛结束题解:速度和加速度都在改变所以,我们来用微元法:考虑一段极小的时间间隔:dt. 速度增量原创 2016-08-16 09:28:02 · 288 阅读 · 0 评论