自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

三水的鱼塘♂

极悲 极乐 平和

  • 博客(31)
  • 收藏
  • 关注

原创 hdu 1535 Invitation Cards

http://acm.hdu.edu.cn/showproblem.php?pid=1535#includeusing namespace std;int u[11111111];int v[11111111];int w[11111111];int first[11111111];int ne

2017-09-30 11:59:27 220

原创 小知♂识 乘法逆元打表

long long int MOD=9999999999;long long int ny[1111111111];ny[1]=1;for(i=2;i;i++)ny[i]=(MOD-MOD/I)*ny[MOD%I]%MOD;

2017-09-30 11:14:51 472

原创 hdu 5976 Detachment

http://acm.hdu.edu.cn/showproblem.php?pid=5976#include#includeusing namespace std;long long int MOD=7+1e9;int qzh[55555];long long int qzj[55555];int ny[55555]

2017-09-30 11:13:13 240

原创 hdu 5971 Wrestling Match

http://acm.hdu.edu.cn/showproblem.php?pid=5971#include#include#include#include#include#include #include#includeusing namespace std;int n,m,x,y;vectorma[1111];in

2017-09-29 21:52:54 212

原创 hdu 5974 A Simple Math Problem

http://acm.hdu.edu.cn/showproblem.php?pid=5974#include#include#include#include#include#includeusing namespace std;int gcd(int a,int b){ return b?gcd(b,a%b):a;}

2017-09-29 21:51:58 255

原创 hdu 5978 To begin or not to begin

http://acm.hdu.edu.cn/showproblem.php?pid=5978#include#include#include#include#include#includeusing namespace std;const double pi=acos(-1.0);int main(){ int n; while(scanf("%d

2017-09-29 21:51:10 237

原创 hdu 5979 Convex

http://acm.hdu.edu.cn/showproblem.php?pid=5979#include#include#include#include#includeusing namespace std;const double pi=acos(-1.0);int main(){ double n,s,x; w

2017-09-29 21:50:18 220

原创 hdu 5980 Find Small A

http://acm.hdu.edu.cn/showproblem.php?pid=5980#include#include#include#includeusing namespace std;int main(){ int n; long long int x; int res[55]; int s[11]={1,

2017-09-29 21:49:09 229

原创 codeforces 864D - Make a Permutation!

http://codeforces.com/problemset/problem/864/D#includeusing namespace std;int num[222222];int vis[222222];int vs[222222];int ans[222222];int main(){ int n; whil

2017-09-29 21:47:07 343

原创 codeforces 864C - Bus

http://codeforces.com/problemset/problem/864/C#includeusing namespace std;int main(){ long long int a,b,f,k; while(cin>>a>>b>>f>>k) { bool dir=0; int bb=

2017-09-29 21:46:33 268

原创 codeforces 864B - Polycarp and Letters

http://codeforces.com/problemset/problem/864/B#includeusing namespace std;int main(){ int n; char a[1111]; while(cin>>n) { cin>>a; int za=0; int lette

2017-09-29 21:45:36 322

原创 codeforces 864A - Fair Game

http://codeforces.com/problemset/problem/864/A#includeusing namespace std;int main(){ int n; while(cin>>n) { int a[1111]; int i; for(i=1;i<=n;i++) ci

2017-09-29 21:43:57 320

原创 codeforces 855A - Tom Riddle's Diary

http://codeforces.com/problemset/problem/855/A#includeusing namespace std;int main(){ int n; while(cin>>n) { int a[1111]; int i; for(i=1;i<=n;i++) cin>>a

2017-09-29 21:41:48 611

原创 poj 3280 Cheapest Palindrome

2017-09-29 21:37:47 154

原创 2017icpc 北京网络赛 A Visiting Peking University

Visiting Peking University时间限制:1000ms单点时限:1000ms内存限制:256MB描述Ming is going to travel for n days and the date of these days can be represented by n integers: 0, 1, 2, …, n-

2017-09-23 20:22:30 224

原创 codeforces 863C 1-2-3

http://codeforces.com/problemset/problem/863/C#include#includeusing namespace std;long long int an1=0,an2=0;void did(long long int x,long long int y){ if(x==1) { if(

2017-09-23 13:41:14 557

原创 codeforces 863A Quasi-palindrome

http://codeforces.com/problemset/problem/863/A#include#include#include#includeusing namespace std;int main(){ char a[111]; while(cin>>a) { int l=strlen(a); in

2017-09-22 21:32:19 291

原创 codeforces 863B Kayaking

http://codeforces.com/problemset/problem/863/B#include#include#include#includeusing namespace std;int main(){ int a; while(cin>>a) { int i,j; int b[1111]; for(i=0;i<2*a

2017-09-22 21:30:59 938

原创 codeforces 861A k-rounding

http://codeforces.com/problemset/problem/858/A#include #include #include #include #include using namespace std;int main(){ long long int n,k; while(cin>>

2017-09-20 18:01:12 367

原创 codeforces 847G University Classes

http://codeforces.com/problemset/problem/847/G#include#include#includeusing namespace std;int main(){ char a[1111][8]; int n; while(scanf("%d",&n)!=EOF) { memset(a,0,si

2017-09-20 17:59:34 358

原创 codeforces 847M Weather Tomorrow

http://codeforces.com/problemset/problem/847/M#include#include#includeusing namespace std;int main(){ int a[1111]; int n; while(scanf("%d",&n)!=EOF) { int i,j; for(i=

2017-09-20 17:57:51 810

原创 codeforces 862A Mahmoud and Ehab and the MEX

http://codeforces.com/problemset/problem/862/A#include#includeusing namespace std;int main(){ int n,k; while(cin>>n>>k){ int a[1111]; int i,j; for(i=0;i<n;i++) cin>>

2017-09-20 17:56:08 228

原创 hdu 6216 A Cubic number and A Cubic Number

http://acm.hdu.edu.cn/showproblem.php?pid=6216#include #include #include #include using namespace std;long long int dp[611111];int main(){ long long int i; for(i=2;i<=

2017-09-20 17:53:40 152

原创 2017 ACM/ICPC Asia Regional Shenyang Online 1008 transaction transaction transaction

http://acm.hdu.edu.cn/showproblem.php?pid=6201任然是一道有向图求最长路的题目,只不过需要在输入的时候处理一下边的权值,几乎和"2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 H skiing "这道题没有区别。

2017-09-19 21:33:44 342

原创 2017 ACM/ICPC Asia Regional Shenyang Online 1005 number number number

http://acm.hdu.edu.cn/showproblem.php?pid=6198给出一个数字k,求在斐波那契数列中任意取k个数并且可以重复拿,将这些数相加,求最小的一个数,满足该数不等于k个斐波那契数相加的和。规律题,fx为斐波那契数列,那么ans=f(4+(k-1)*2)-1;

2017-09-19 21:33:05 273

原创 2017 ACM/ICPC Asia Regional Shenyang Online 1004 array array array

http://acm.hdu.edu.cn/showproblem.php?pid=6197给出一串数列,再给一个k,问是否可以在这个数列里去掉k个数,使得该串数列变成非递减或者非递增数列这道题关键在于,一个本身就是非递减或非递增的数列,去掉任意个数字,任然属性没变,那么只要求出该串数列的最长上升或者最长下降子序列的长度l,数列总数减去l如果小于等于k则满足

2017-09-19 21:32:28 269

原创 2017 ACM/ICPC Asia Regional Shenyang Online 1002 cable cable cable

http://acm.hdu.edu.cn/showproblem.php?pid=6195给出n个不同颜色的信号源,再给出m个屏幕,m>=n,用电缆来连接,问最少需要多少电缆,使得满足任意选n个屏幕,这n个屏幕里的颜色都可以不同从1 1 打表到5 5 ,就可以发现规律ans=(m-n+1)*n

2017-09-19 21:31:41 291

原创 求DAG最长路 板子

#include #include #include #include #include #include using namespace std; const int INF=0x7fffffff/2; const int SIZEN=10010; int N,M; vector > c[SIZEN]; void SPFA(vector > c[SIZ

2017-09-19 21:29:55 348

原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 A banana

每个猴子都会喜欢若干种香蕉,每种香蕉都有自己的产地,输出每个猴子能从哪些产地获取自己喜欢的香蕉数据范围很小,所以可以暴力标记每个产地数字出现的情况,按升序输出即可。#include #include #include #include #include #include using namespace std;struct node{ int

2017-09-19 21:28:18 798

原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 C coconut

很简单的线性模拟,循环模拟,遇到不满足的情况就退出。#include#include#include#include#includeusing namespace std;int main(){ int t; scanf("%d",&t); while(t--) { int city[1111]; int day[1111]; i

2017-09-19 21:27:01 354

原创 2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 F island

给出一个有向图,问至少加上多少条边,可以使该图变成一个强联通图用tarjan算法缩点后,在所有点里面的出度和入度里面取最大。F #include #include #include #include #include using namespace std; #define N 33333 #define M 111111 in

2017-09-19 21:24:58 330

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除