- 博客(18)
- 收藏
- 关注
原创 环上有序尽多购买 D. Berland Fair CodeForces - 1073D
D. Berland Fairtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputXXI Berland Annual Fair is coming really soon! Traditionally fair...
2018-10-30 21:23:04 272
原创 [后缀数组 + 二分] 求最长不重叠重复子串 POJ - 1743
Musical ThemeTime Limit: 1000MS Memory Limit: 30000K Total Submissions: 35051 Accepted: 11632 DescriptionA musical melody is represented as a sequence of N (1<=N<=20000)n...
2018-10-30 11:02:43 222
原创 [容斥 组合数学] 求序列不相邻恰好k种颜色着色 Gym - 100548F
逆元 适用 mod 为素数 C(n, m) 函数适用 n, m 在 1kw 以下时 n 过大时可暴力 均过大用 lucas定理 小于等于 k 种颜色 k * (k - 1) ^ (n - 1) 减去 (k - 1) * (k - 2) ^ (n - 1) * (不选的 k 种可能颜色) 有重复减去的部分 选 i 种颜色的情况数为 C(k, i)#incl...
2018-10-25 20:58:42 521
原创 [dijkstra] 带权边 查找权值最小的环 HDU6005
PandalandTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1387 Accepted Submission(s): 353 Problem DescriptionMr. Panda lives in Panda...
2018-10-16 22:01:40 687
原创 [贪心 优先队列] 两步骤完成多项工作总用时最短 HDU6000
WashTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 64000/64000 K (Java/Others)Total Submission(s): 2492 Accepted Submission(s): 672 Problem DescriptionMr.Panda is about to engage...
2018-10-16 19:40:56 146
原创 【二进制枚举】限定颜色种类数求不接触区间总长 Wannafly26C
链接:https://www.nowcoder.com/acm/contest/212/C来源:牛客网 七彩线段时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述听说彩虹有七种颜色?一维坐标轴上n条线段,每条线段左端点l,右端点r,颜色为c,从中选m种颜色的互不接触的线段,...
2018-10-15 22:51:10 168
原创 [贪心] 冥土追魂 Wannafly挑战赛26
链接:https://www.nowcoder.com/acm/contest/212/B来源:牛客网 冥土追魂时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 524288K,其他语言1048576K64bit IO Format: %lld题目描述有一天 Misaka 和 Kuroko 在玩一个关于冥土追魂的游戏....Misaka和Kuroko在一个 n...
2018-10-15 18:52:17 108
原创 [DFS] 小矩阵限定颜色数量不相邻填色 HDU5113
Black And WhiteTime Limit: 2000/2000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 6000 Accepted Submission(s): 1644Special Judge Problem DescriptionIn...
2018-10-15 16:29:54 472
原创 【BFS预处理】单个数字变化或同种数字变化使两串相同 UVALive 7263
Today is a rainy day. The temperature is apparently lower than yesterday. Winter is coming. It always leaves people feeling fatigued and tired.Lee hasn’t prepared for winter yet. As he wakes up this...
2018-10-15 00:02:31 228
原创 [二分] 左右差值最小时答案尽可能大 UVALive 7261
二分面积差最小答案暴力往右枚举判断面积差是否变化#include<bits/stdc++.h>#define ll long longusing namespace std;const int mn = 10010;struct node{ int l, r, w, h;} s[mn];int N;ll check(int mid){ ll sl...
2018-10-14 20:01:38 187
原创 [区间DP] 受左右相邻影响求最小和 HDU 5115
Dire WolfTime Limit: 5000/5000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 3973 Accepted Submission(s): 2355 Problem DescriptionDire wolves, also kno...
2018-10-13 18:16:45 133
原创 [DP] 取若干数异或>=m的方案数 HDU5119
Happy Matt FriendsTime Limit: 6000/6000 MS (Java/Others) Memory Limit: 510000/510000 K (Java/Others)Total Submission(s): 5399 Accepted Submission(s): 2065 Problem DescriptionMatt has N f...
2018-10-13 17:41:04 304
原创 [Dijkstra] 集合内点可达求最短路 HDU5521
MeetingTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 5524 Accepted Submission(s): 1751 Problem DescriptionBessie and her friend ...
2018-10-12 21:10:17 218
原创 [后缀数组] 求不同子串总数 SPOJ - DISUBSTR
DISUBSTR - Distinct Substrings#suffix-array-8 Given a string, we need to find the total number of its distinct substrings.InputT- number of test cases. T<=20;Each test case consists of o...
2018-10-11 21:08:02 236
原创 [AC自动机+DP] 求有上限不带特定子串的数字数量 BZOJ3530
3530: [Sdoi2014]数数Time Limit: 10 Sec Memory Limit: 512 MBSubmit: 1411 Solved: 723[Submit][Status][Discuss]Description我们称一个正整数N是幸运数,当且仅当它的十进制表示中不包含数字串集合S中任意一个元素作为其子串。例如当S=(22,333,0233)时,233是幸...
2018-10-11 21:04:07 198
原创 [AC自动机+DP] 限定长度不包含给定子串的可能字符串数量 BZOJ1030
1030: [JSOI2007]文本生成器Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 6242 Solved: 2656[Submit][Status][Discuss]Description JSOI交给队员ZYX一个任务,编制一个称之为“文本生成器”的电脑软件:该软件的使用者是一些低幼人群,他们现在使用的是GW文本生成器v...
2018-10-11 21:01:19 410
原创 [AC自动机+高斯消元] 求多个序列各自出现概率 HDU5955
Guessing the Dice RollTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1566 Accepted Submission(s): 457 Problem DescriptionThere are N...
2018-10-11 20:56:22 193
原创 [优化dfs] 小数据求固定大小的团数量 HDUCounting Cliques
A clique is a complete graph, in which there is an edge between every pair of the vertices. Given a graph with N vertices and M edges, your task is to count the number of cliques with a specific size ...
2018-10-11 18:19:39 108
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人