模板
abns
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
欧拉定理 A - Relatives (模板)
Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z > 0 such that...原创 2018-08-06 16:09:29 · 234 阅读 · 0 评论 -
多边形面积(1654)
#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>using namespace std;struct Point{ int x,y; Point(){} Point(int x,int y):x(x),y(y){}};typ...原创 2019-05-16 16:45:08 · 226 阅读 · 0 评论 -
模拟退火(最小球覆盖,最小圆覆盖)
#include <iostream>#include <string.h>#include <stdio.h>#include <math.h> #define N 150#define eps 1e-8#define T 100#define delta 0.98#define INF 1e99 using namespa...原创 2019-05-16 16:01:34 · 807 阅读 · 0 评论 -
2017江西icpc邀请赛 快速幂板子
#include<bits/stdc++.h>using namespace std;typedef long long ll;const int MD=1000000007;int p[5]= {0,1,5,11,36};struct Matrix { ll a[4][4]; Matrix() { memset(a,0,sizeof(a)); } Matrix...原创 2019-05-04 12:57:26 · 173 阅读 · 0 评论 -
51nod 1186 大数素数(java 模板)
1186 质数检测 V2 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注给出1个正整数N,检测N是否为质数。如果是,输出"Yes",否则输出"No"。Input输入一个数N(2 <= N <= 10^30)Output如果N为质数,输出"Yes",否则输出"No"。Input示例17Out...原创 2018-08-17 09:11:06 · 234 阅读 · 0 评论 -
POJ 1287 Networking (Kruskal)
Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get b...原创 2018-08-19 10:40:46 · 237 阅读 · 0 评论 -
POJ 2387 Til the Cows Come Home(dijkstra)
Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get b...原创 2018-08-19 10:37:26 · 142 阅读 · 0 评论 -
POj 3070 Fibonacci (模板)
https://vjudge.net/contest/244788#problem/DIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, ...原创 2018-08-08 15:31:29 · 131 阅读 · 0 评论 -
快速读入的板子
void read(int &x){ int f=1;x=0;char s=getchar(); while(s<'0'||s>'9'){if(s=='-')f=-1;s=getchar();} while(s>='0'&&s<='9'){x=x*10+s-'0';s=getchar();} x*=f;}关闭...原创 2018-08-15 14:03:33 · 271 阅读 · 0 评论 -
多边形面积 以及统计在边上的点和多边形内部的点(1265)Pick 定理
area=I+E/2-1(I为内部格数,E为边上的点数) 边上格点数 = gcd(abs(x),abs(y))-1;#include<iostream>#include<cstdio>#include<algorithm>#include<cstring>#include<cmath>#define N 1003usin...原创 2019-05-16 17:09:06 · 1030 阅读 · 0 评论
分享