自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 收藏
  • 关注

原创 Gym - 101190E

https://vjudge.net/problem/Gym-101190E题意:你知道在每个时刻需要用车和还车的人数,问当初始有bi辆车的时候,所有人的等待时间(时刻数小于1e5,询问数小于1e5)我们考虑转化一下计算方式,假设初始没车,先列出每个时刻剩余车的数量对于样例:5 4- 1 1- 2 2+ 4 1- 6 1+ 7 20 3 1 2我们得...

2018-10-18 20:06:39 279

原创 UVA - 11426 欧拉函数

https://vjudge.net/problem/UVA-11426O(n)求欧拉函数前缀和,O(sqrt(n))求每一个样例的结果 #include <bits/stdc++.h>using namespace std;#define ll long longint n;const int maxn = 4000000;int phi[maxn+5];...

2018-10-14 22:23:30 159

原创 牛客网多校10 E - Rikka with Equation

https://www.nowcoder.com/acm/contest/148/E想了很久才想出来其实也不算很难,关键是给定A数组,怎么去求解的个数答案如下:就是如果a和m互素,那么a一定存在关于m的逆元,这样n-1个数随便取,最后一个数有唯一的取法。如果gcd>1,那么n-1个数随便取,最后一个数有gcd种取法。有n个数,2^n-1个非空子集,我们假设gcd全...

2018-08-20 01:45:15 519

原创 HDU - 6397 (2018 Multi-University Training Contest 8)

https://vjudge.net/problem/HDU-6397比赛的时推了半天不知道为什么没有推导出来,很难受,只想到了O((k/n)^2)的算法,相当的难受啊看了dls的讲解,顺便学习了一波推生成函数的方法题意很简单,就是将k分成n个数,每个数的范围是[0,n-1],问一共有多少中方法 我们先不看k,只看n和m当n=2时      0  1   2   ...

2018-08-16 02:08:08 891 4

原创 2018多校联合训练7

http://acm.hdu.edu.cn/contests/contest_show.php?cid=808只过了4题 1005:莫比乌斯反演/容斥原理,一开始TLE了两发,把求逆元long long改成int就过了,卡常solved by lyy#include <bits/stdc++.h>using namespace std;#define ll l...

2018-08-13 21:00:40 188

原创 2018多校联合训练6

http://acm.hdu.edu.cn/contests/contest_show.php?cid=807凉了啊,就过了3题最近比较忙,经常通宵到早晨,好几天没写博客了,现在终于缓过来了 1012:数学推导solved by wyq#include<stdio.h>#include<math.h>int main(){ int T...

2018-08-10 00:49:13 198

原创 2018牛客网多校训练6

https://www.nowcoder.com/acm/contest/144#question凉了啊,四题最后一名 D:水题solved by lyy#include <bits/stdc++.h>using namespace std;#define ll long longint t,n,m,k;int v[100005]; int main(...

2018-08-06 01:01:49 211

原创 2010 ACM-ICPC NEERC

http://codeforces.com/gym/101309/attachments过了6题,I题是紫书上原题都没有写出来,队友写炸了,比赛结束5分钟后改出来了(疯狂甩锅)感觉NEERC的题目都不错,感觉都是可写的题 A:solved by sdn/* ID: oodt PROG: LANG:C++*/#include<iostream>...

2018-08-04 02:43:24 217

原创 2018牛客网多校训练5

https://www.nowcoder.com/acm/contest/143#question不知不觉已经打完了一半的多校,水平还是很菜啊过了5题,rank96 J:枚举+简单逻辑solved by sdn and wyq#include<stdio.h>#include<stdlib.h>#include<algorithm>...

2018-08-03 01:19:03 149

原创 2018多校联合训练4

http://acm.hdu.edu.cn/userloginex.php?cid=805过了6题,第一次进入前100名 1012:直接从1走到nsolved by wyq#include<stdio.h>#include<math.h>int a[100005];int reabs(int x){ if(x<0)return -...

2018-08-01 20:41:33 735 2

原创 2018多校联合训练3

http://acm.hdu.edu.cn/contests/contest_show.php?cid=804这次比赛有一个队友又鸽了,我们只过了4题,没有进前200名 1004:水题,只有2,3,4,6不可以 solved by lyy#include <bits/stdc++.h>using namespace std;#define ll long long...

2018-07-30 21:36:03 661

原创 2018牛客网多校训练4

https://www.nowcoder.com/acm/contest/142#question比赛就过了3题 F:暴力 solved by lyy#include <bits/stdc++.h>using namespace std;#define ll long longint t;int n,m;char s[2005][2005];int dp[...

2018-07-29 14:02:44 188

原创 Gym 101464C - 计算几何+二分

https://vjudge.net/problem/Gym-101464C We are given N line segments on the 2D plane. We want to find the maximum radius of an empty circle whose center coordinates (xc, yc) are constrained as foll...

2018-07-28 04:24:57 263

原创 2010 ACM-ICPC SEERC

http://codeforces.com/gym/101464/过了5题 J: solved by ?/* ID: oodt PROG: LANG:C++*/#include<iostream>#include<algorithm>#include<cstdio>#include<cmath>#includ...

2018-07-28 00:06:35 224

原创 2018牛客网多校训练3

https://www.nowcoder.com/acm/contest/141#question过了4题,rank109 H:水题,枚举gcd(i,j)即可, solved by wyq and lyy#include <bits/stdc++.h>using namespace std;#define ll long long#define maxn 100...

2018-07-27 23:53:04 177

原创 2018多校联合训练2

http://acm.hdu.edu.cn/contests/contest_show.php?cid=803打的惨不忍睹,就过了3题 1004:水题,直接输出Yes就过了, solved by lyy#include <bits/stdc++.h>using namespace std;#define ll long longint n;int main(...

2018-07-26 00:11:25 594

原创 2018多校联合训练1

http://acm.hdu.edu.cn/contests/contest_show.php?cid=802三人三台电脑比赛,然而有个队友鸽了,只有两人打,一共过了5题1001:水题,只需判断3和4的倍数即可,solved by lyy#include <bits/stdc++.h>using namespace std;#define ll long longi...

2018-07-25 23:56:11 650

原创 2009 ACM-ICPC CERC

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=360只过了3题:C,D,I C题:#include <bits/stdc++.h>using namespace std;#define ll long longint p...

2018-07-19 00:38:09 339

原创 Gym 101308C

https://vjudge.net/problem/Gym-101308C一道很有意思的交互题题意:是给你一个1-n的排列,告诉你n(3<=n<=200),然后你可以进行若干次(不超过2000次)询问,询问的格式是{P1,P2,P3}(三个数两两不相等),  意思是问排列中位置为P1,P2,P3的三个数大小在中间的那个数是多少,系统返回给你中间的那个数的值,最后你要确定最...

2018-07-17 23:25:24 251

原创 2009 ACM-ICPC NEERC

http://codeforces.com/gym/101308过了5题:B,C,D,H,I B题:#include <bits/stdc++.h>using namespace std;#define ll long longint main(){ freopen("business.in","r",stdin); freopen("business....

2018-07-17 22:26:45 192

原创 2009 ACM-ICPC SEERC

http://codeforces.com/gym/101463过了5题:A,B,C,D,KA题:直接暴力搜索即可,为了方便用Python写的def sqrt(x): left=1 right=x while (left<=right): mid=(left+right)//2; if mid*mid<x: ...

2018-07-14 23:44:25 228

原创 2008 ACM-ICPC SWERC

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=328还是一如既往的菜,过了4题:A,C,D,IA题:在两点之间找一条路,是的最长的边最短,那么所有的边一定在最小生成树上#include<cstdio>#include<cmath>...

2018-07-14 02:30:07 272

原创 2008 ACM-ICPC CERC

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=324比赛就过了4题:A,B,C,G,这场比赛的难度比之前的好像要大很多,发挥的也不好。A题:找规律,当3k+7为质数时取值为1,其余取值为0#include <bits/stdc++.h>usin...

2018-07-12 23:07:23 195

原创 2008 ACM-ICPC NEERC

http://codeforces.com/gym/100286这场比赛就过了5题,发挥的也不是很好,感觉自己越来越菜了B题,一道交互题,很水,直接dfs就可以了#include <bits/stdc++.h>using namespace std;#define ll long longstring way[4]={"NORTH","WEST","SOUTH","EAST"};...

2018-07-12 01:42:37 249

原创 2008 ACM-ICPC SEERC

http://codeforces.com/gym/101462 因为某些原因,这场比赛只进行了4小时,我队只过了6题:A,B,E,F,H,IA题水题,最长上升子序列#include <bits/stdc++.h>using namespace std;#define ll long longint n;int a[100005];int b[100005];int se...

2018-07-09 23:00:28 286

空空如也

空空如也

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

TA关注的人

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