
##ACM-ICPC编程题
文章平均质量分 79
GDRetop
数据研发专家,ETL工程师
展开
-
TOJ 4146 4147 4148 4149 4150 4151 4152 4153 4154
toj 4146 seq 难度系数(1-5):2 对于操作0:用add[v][x]表示对于i%b[v]=x的a[i]需要加上的add的累加和。 读取完所有操作后对于a[i], a[i]+=∑add[v][i%b[v]]\sum add[v][i\%b[v]] 对于操作1:我们知道 x*b[v] 到x*b[v]+b[b]-1的数字都要加上add,所以可以用一个数据结构维护对于一个区间的数字都原创 2016-05-29 17:22:04 · 1514 阅读 · 0 评论 -
线性求逆元
线性求逆元1−1≡1(modp)1^{-1}\equiv1(mod\ p)令p=k∗i+r,r<i,1<i<pp=k*i+r,r<i,1<i<pk∗i+r≡0(modp)k*i+r \equiv 0 (mod\ p)两边同事乘上i−1∗r−1i^{-1}*r^{-1}得到k∗r−1+i−1≡0(modp)k*r^{-1}+i^{-1}\equiv0 (mod\ p)i−1≡−k∗原创 2015-10-05 20:06:54 · 2237 阅读 · 0 评论 -
hdu 4349 Xiao Ming's Hope,lucas定理
Xiao Ming's HopeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1793 Accepted Submission(s): 1189Problem DescriptionXiao Ming原创 2015-09-01 18:54:13 · 558 阅读 · 0 评论 -
hdu 3944 DP? lucas定理
DP?Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 128000/128000 K (Java/Others)Total Submission(s): 2460 Accepted Submission(s): 769Problem DescriptionFigure 1 shows t原创 2015-09-01 18:42:48 · 514 阅读 · 0 评论 -
UVALive 6659 Dromicpalin Substrings 枚举判断
枚举每个位置为起点,然后判断有多少个为奇数的字母,为奇数的#include#include#include#includeusing namespace std;int num[200];char word[2000];int main(){ int n,tt=1; scanf("%d",&n); while(n--){ int原创 2015-08-25 19:40:35 · 511 阅读 · 0 评论 -
2017 Multi-University Training Contest - Team 4
1003#include#include#include#include#includeusing namespace std;vector pri;#define ll long long#define mod 998244353#define maxn 1000001ll res[maxn];vector head[maxn];int check[maxn];ll原创 2017-08-03 18:28:27 · 275 阅读 · 0 评论 -
2017 Multi-University Training Contest - Team 2
1001#include#include#include#includeusing namespace std;char a[1000000];char b[1000000];int count(int n,int s,int x,int y){ if(x + y > n + s) return 0; if(abs(x-y) > n-s)原创 2017-07-27 16:53:26 · 256 阅读 · 0 评论 -
hdu 5352 MZL's City 2015多校联合训练赛#5 费用流
MZL's CityTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 649 Accepted Submission(s): 225Problem DescriptionMZL is an active原创 2015-08-06 09:53:13 · 1889 阅读 · 0 评论 -
hdu 5361 2015多校联合训练赛#6 最短路
In TouchTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 67 Accepted Submission(s): 11Problem DescriptionThere are n soda li原创 2015-08-06 18:36:34 · 1999 阅读 · 10 评论 -
hdu 5291 Candy Distribution 2015 Multi-University Training Contest 1
Candy DistributionTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 37 Accepted Submission(s): 7Problem DescriptionWY has n kin原创 2015-07-22 09:33:59 · 1935 阅读 · 1 评论 -
hdu 5418 Victor and World 状态压缩dp,旅行商问题
Victor and WorldTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others)Total Submission(s): 385 Accepted Submission(s): 160Problem DescriptionAfter try原创 2015-08-23 13:09:21 · 1093 阅读 · 3 评论 -
hdu 5362 Just A String 2015多校联合训练赛#6 动态规划
Just A StringTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 221 Accepted Submission(s): 40Problem Descriptionsoda has a ra原创 2015-08-07 15:41:11 · 1410 阅读 · 3 评论 -
hdu 5299 Circles Game 2015 Multi-University Training Contest 1 计算几何+博弈SG函数 圆的扫描线
Circles GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 251 Accepted Submission(s): 51Problem DescriptionThere are n circ原创 2015-07-22 12:01:38 · 1145 阅读 · 3 评论 -
hdu 5307 He is Flying 2015 Multi-University Training Contest 2 快速傅里叶变换
He is FlyingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 91 Accepted Submission(s): 25Problem DescriptionJRY wants to dra原创 2015-07-24 20:50:26 · 1740 阅读 · 3 评论 -
2015多校联合训练赛 hdu 5308 I Wanna Become A 24-Point Master 2015 Multi-University Training Contest 2 构造题
I Wanna Become A 24-Point MasterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 60 Accepted Submission(s): 16Special JudgeProblem原创 2015-07-23 19:10:58 · 1145 阅读 · 2 评论 -
hdu 5411 CRB and Puzzle 2015 多校联合训练赛#10 快速矩阵幂
CRB and PuzzleTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 69 Accepted Submission(s): 35Problem DescriptionCRB is now play原创 2015-08-20 20:18:45 · 906 阅读 · 1 评论 -
HDU 5863 cjj's string game 快速幂 dp
#include#include#include#include#includeusing namespace std;#define mod 1000000007#define maxn 22#define ll long longstruct Matrix{ int mat[22][22]; void init(){ memset(mat,0,原创 2016-08-21 12:34:40 · 532 阅读 · 0 评论 -
cf 2016愚人节专场 函数指针 最短路
#include#includeusing namespace std;int map[1000][1000];int nn,n;void in(){ cin>>map[nn/n][nn%n]; nn++;}void out();void xun1();void xun2();void xun3();void xun4();int ans = 0;voi原创 2016-04-05 19:00:02 · 485 阅读 · 0 评论 -
JPA hibernate spring repository pgsql java 工程(三):数据表分区与自动创建:策略
参考文献:[1] JPA的查询语言—使用原生SQL[EB/OL].[2016-03-30].http://blog.youkuaiyun.com/chenallen1025/article/details/9169543 [2] PostgreSQL学习手册(表的继承和分区)[EB/OL].[2016-03-30].http://www.cnblogs.com/stephen-liu74/archiv原创 2016-03-30 21:45:14 · 2245 阅读 · 0 评论 -
hdu 5428 The Factor 找质因子
The FactorTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1827 Accepted Submission(s): 551Problem DescriptionThere is a seque原创 2015-10-06 18:04:35 · 562 阅读 · 0 评论 -
hdu 5487 Difference of Languages BFS
Difference of LanguagesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 526 Accepted Submission(s): 120Problem DescriptionA re原创 2015-10-06 16:23:31 · 697 阅读 · 0 评论 -
hdu 5498 Tree 动态规划+快速矩阵幂+生成树计数+高斯消元
TreeTime Limit: 16000/8000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 33 Accepted Submission(s): 13Problem Descriptionsoda has an undirected g原创 2015-10-06 13:51:07 · 1080 阅读 · 0 评论 -
hdu 5490 Simple Matrix 递推公式+逆元+组合数
Simple MatrixTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 244 Accepted Submission(s): 85Problem DescriptionAs we know, seq原创 2015-10-05 22:01:52 · 1199 阅读 · 0 评论 -
高斯消元
http://www.cppblog.com/menjitianya/archive/2014/06/08/207226.html高斯消元算法目的: 高斯消元,一般用于求解线性方程组AX = B(或 模线性方程组AX mod P = B),以四个未知数,四个方程为例,AX=B表示成4x4的矩 阵和4x1的矩阵相乘的形式:转载 2015-10-05 13:19:09 · 1671 阅读 · 0 评论 -
hdu 5497 Inversion 求逆序对 树状数组
InversionTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 246 Accepted Submission(s): 70Problem DescriptionYou have a sequence原创 2015-10-04 13:13:07 · 893 阅读 · 2 评论 -
hdu 5496 Beauty of Sequence 枚举
Beauty of SequenceTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 195 Accepted Submission(s): 79Problem DescriptionSequence i原创 2015-10-04 11:03:16 · 668 阅读 · 0 评论 -
hdu 5494 Card Game 排序
Card GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 94 Accepted Submission(s): 79Problem DescriptionSoda and Beta are go原创 2015-10-04 09:28:19 · 432 阅读 · 0 评论 -
hdu 5495 LCS 置换群
Card GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 94 Accepted Submission(s): 79Problem DescriptionSoda and Beta are go原创 2015-10-04 09:23:53 · 649 阅读 · 0 评论 -
hdu 5464 Clarke and problem 动态规划
Clarke and problemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 844 Accepted Submission(s): 340Problem DescriptionClarke is原创 2015-10-03 19:02:16 · 462 阅读 · 0 评论 -
hdu 5480 Conturbatio 区间和
ConturbatioTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 553 Accepted Submission(s): 257Problem DescriptionThere are many r原创 2015-10-03 18:38:16 · 659 阅读 · 0 评论 -
hdu 5441 Travel 排序 并查集
TravelTime Limit: 1500/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2149 Accepted Submission(s): 740Problem DescriptionJack likes to trav原创 2015-10-03 18:26:03 · 456 阅读 · 0 评论 -
hdu 5475 An easy problem 线段树
An easy problemTime Limit: 8000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 746 Accepted Submission(s): 427Problem DescriptionOne day, a u原创 2015-10-03 18:08:07 · 684 阅读 · 0 评论 -
hdu 5479 Scaena Felix 枚举
Scaena FelixTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 517 Accepted Submission(s): 223Problem DescriptionGiven a parenth原创 2015-10-03 16:50:15 · 494 阅读 · 0 评论 -
hdu 5427 A problem of sorting 排序
A problem of sortingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1044 Accepted Submission(s): 438Problem DescriptionThere原创 2015-10-03 16:39:17 · 499 阅读 · 0 评论 -
hdu 5489 Removed Interval 动态规划,最长上升子序列
Removed IntervalTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 849 Accepted Submission(s): 310Problem DescriptionGiven a seq原创 2015-10-03 16:22:25 · 917 阅读 · 0 评论 -
hdu 5492 Find a path 动态规划
Find a pathTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 925 Accepted Submission(s): 405Problem DescriptionFrog fell into a原创 2015-10-03 11:13:05 · 730 阅读 · 0 评论 -
Aizu 2450 Do use segment tree LCT
Do use segment treeTime Limit : 2 sec, Memory Limit : 256000 KBDo use segment treeGiven a tree with n (1≤n≤200,000) nodes and a list of q (1≤q≤100,000) queries, process the queri原创 2015-10-03 09:51:00 · 579 阅读 · 0 评论 -
hdu 5468 Puzzled Elena 预处理+深搜+容斥
Puzzled ElenaTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 641 Accepted Submission(s): 167Problem DescriptionSince both Stefa原创 2015-10-01 09:17:29 · 1279 阅读 · 0 评论 -
hdu 5478 Can you find it 测试
Can you find itTime Limit: 8000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 651 Accepted Submission(s): 306Problem DescriptionGiven a prime nu原创 2015-10-01 09:08:43 · 507 阅读 · 0 评论 -
hdu 541 The Next 位枚举
The NextTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 943 Accepted Submission(s): 389Problem DescriptionLet L denote the numb原创 2015-10-01 09:05:06 · 461 阅读 · 0 评论