07 2018 档案

The 2018 ACM-ICPC China JiangSu Provincial Programming Contest J. Set
摘要:Let's consider some math problems. JSZKC has a set A=A={1,2,...,N}. He defines a subset of A as 'Meo set' if there doesn't exist two integers in this 阅读全文

posted @ 2018-07-31 21:10 cltt 阅读(157) 评论(0) 推荐(0) 编辑

The 2018 ACM-ICPC China JiangSu Provincial Programming Contest I. T-shirt
摘要:JSZKC is going to spend his vacation! His vacation has N days. Each day, he can choose a T-shirt to wear. Obviously, he doesn't want to wear a singer 阅读全文

posted @ 2018-07-31 20:31 cltt 阅读(273) 评论(0) 推荐(0) 编辑

ACM-ICPC 2017 Asia Urumqi A. Coins
摘要:Alice and Bob are playing a simple game. They line up a row of n identical coins, all with the heads facing down onto the table and the tails upward. 阅读全文

posted @ 2018-07-31 18:45 cltt 阅读(293) 评论(0) 推荐(0) 编辑

Nordic Collegiate Programming Contest 2015​ B. Bell Ringing
摘要:Method ringing is used to ring bells in churches, particularly in England. Suppose there are 6 bells that have 6 different pitches. We assign the numb 阅读全文

posted @ 2018-07-31 00:24 cltt 阅读(213) 评论(0) 推荐(0) 编辑

变量
摘要:1 局部数组:没有默认值,如果声明的时候不定义,则会出现随机数(undefined);如果声明的长度与赋值长度不相等,则有,声明的长度>赋值长度,后面用0补足,声明的长度>赋值长度,发生编译错误; 2 3 4 5 全局数组:声明时不赋值,默认值为0 6 在所有函数(包括主函数)之外定义的变量称为“全局变量”。 阅读全文

posted @ 2018-07-30 10:24 cltt 阅读(128) 评论(0) 推荐(0) 编辑

hiho 1050 树的直径
摘要:#1050 : 树中的最长路 #1050 : 树中的最长路 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 上回说到,小Ho得到了一棵二叉树玩具,这个玩具是由小球和木棍连接起来的,而在拆拼它的过程中,小Ho发现他不仅仅可以拼凑成一棵二叉树!还可以拼凑成一棵多叉树——好吧 阅读全文

posted @ 2018-07-30 00:19 cltt 阅读(166) 评论(0) 推荐(0) 编辑

ACM-ICPC 2017 Asia Urumqi G. The Mountain
摘要:All as we know, a mountain is a large landform that stretches above the surrounding land in a limited area. If we as the tourists take a picture of a 阅读全文

posted @ 2018-07-29 20:49 cltt 阅读(394) 评论(0) 推荐(0) 编辑

组合数的几种写法
摘要:1 //数据量较小,1000 2 void C() 3 { 4 c[0][0]=1; 5 for(int i=1;in) return 0; 77 ll ans=1ll; 78 for(ll i=1;i a)return 0; 5 return fac[a] * inv[b] % mod * inv[a - b] % mod;... 阅读全文

posted @ 2018-07-29 19:54 cltt 阅读(2047) 评论(0) 推荐(0) 编辑

hdu 2036
摘要:改革春风吹满地 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 29045 Accepted Submission(s): 14894 Prob 阅读全文

posted @ 2018-07-29 13:55 cltt 阅读(127) 评论(0) 推荐(0) 编辑

Nordic Collegiate Programming Contest 2015​ G. Goblin Garden Guards
摘要:In an unprecedented turn of events, goblins recently launched an invasion against the Nedewsian city of Mlohkcots. Goblins—small, green critters—love 阅读全文

posted @ 2018-07-29 10:27 cltt 阅读(179) 评论(0) 推荐(0) 编辑

牛客练习赛23 托米的咒语
摘要:托米没有完成上一个任务,准备施展黑魔法推倒 1317 黑魔法咒语被描述为一个 长为 n 的,仅包含小写英文字母 'a'...'i' 的字符串,在托米所在的星球,魔法造成的每次有效伤害都是来自他的一个子序列,对于每一个 'a'... 'i' 的排列(共 9! 种),若作为咒语的子序列出现, 就会造成 阅读全文

posted @ 2018-07-29 00:46 cltt 阅读(254) 评论(0) 推荐(0) 编辑

Nordic Collegiate Programming Contest 2015​ E. Entertainment Box
摘要:Ada, Bertrand and Charles often argue over which TV shows to watch, and to avoid some of their fights they have finally decided to buy a video tape re 阅读全文

posted @ 2018-07-28 17:51 cltt 阅读(177) 评论(0) 推荐(0) 编辑

子串!=子序列
摘要:1 例如:一个字符串 awbcdewgh 2 3 他的子串: awbc、awbcd、awbcde ...很多个子串 ,但是都是连续在一起 。//substring 4 5 他的子序列:(subsequence ) abc 、abcd、 abcde ... 很多个子序列 ,但是子序列中的字符在字符串中不一定是连在一起的,而是删除其中若干个, 但是子序列一定是单调的(即字符之间ASC... 阅读全文

posted @ 2018-07-28 11:54 cltt 阅读(218) 评论(0) 推荐(0) 编辑

memcpy
摘要:1 #include 2 3 int main(void) 4 { 5 int a[5] = {1, 2, 3, 4, 5}, b[5]; 6 /*第一个参数是要保存的位置的起始地址,所以我们直接放b 7 *第二个参数是源数据的起始地址,所以我们把a放上去 8 *第三个参数是要复制的内存块的长度,为a的长度sizeof(a)*/ 9 ... 阅读全文

posted @ 2018-07-28 11:50 cltt 阅读(178) 评论(0) 推荐(0) 编辑

Nordic Collegiate Programming Contest 2015​ D. Disastrous Downtime
摘要:You're investigating what happened when one of your computer systems recently broke down. So far you've concluded that the system was overloaded; it l 阅读全文

posted @ 2018-07-27 14:51 cltt 阅读(300) 评论(0) 推荐(0) 编辑

最近公共祖先
摘要:1062 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 1062 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Ho最近发现了一个神奇的网站!虽然还不够像58同城那样神奇,但这个网站仍然让小Ho乐在其中,但这是为什么呢? “为什么呢?”小H 阅读全文

posted @ 2018-07-26 16:30 cltt 阅读(150) 评论(0) 推荐(0) 编辑

hdu 6318
摘要:Long long ago, there was an integer sequence a.Tonyfang think this sequence is messy, so he will count the number of inversions in this sequence. Beca 阅读全文

posted @ 2018-07-26 10:37 cltt 阅读(195) 评论(0) 推荐(0) 编辑

hdu 6312
摘要:Problem Description Alice and Bob are playing a game.The game is played on a set of positive integers from 1 to n.In one step, the player can choose a 阅读全文

posted @ 2018-07-25 23:39 cltt 阅读(179) 评论(0) 推荐(0) 编辑

二进制
摘要:1 https://www.cnblogs.com/nysanier/archive/2011/04/19/2020778.html 2 3 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 using namespace ... 阅读全文

posted @ 2018-07-25 17:23 cltt 阅读(165) 评论(0) 推荐(0) 编辑

归并排序
摘要:1 https://blog.csdn.net/yuehailin/article/details/68961304 1 #include <iostream> 2 #include <cstdio> 3 #include <algorithm> 4 #include <cstring> 5 #in 阅读全文

posted @ 2018-07-25 14:42 cltt 阅读(120) 评论(0) 推荐(0) 编辑

hdu 6301
摘要:Distinct Values Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3105 Accepted Submission(s): 1000 阅读全文

posted @ 2018-07-25 00:09 cltt 阅读(116) 评论(0) 推荐(0) 编辑

hdu 6298
摘要:Maximum Multiple Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1500 Accepted Submission(s): 650 阅读全文

posted @ 2018-07-24 23:59 cltt 阅读(162) 评论(0) 推荐(0) 编辑

SET
摘要:65536K Let's consider some math problems. JSZKC has a set A=\{1,2,...,N\}A={1,2,...,N}. He defines a subset of AA as 'Meo set' if there doesn't exist 阅读全文

posted @ 2018-07-24 23:47 cltt 阅读(258) 评论(0) 推荐(0) 编辑

E. Massage
摘要: 阅读全文

posted @ 2018-07-24 23:43 cltt 阅读(596) 评论(0) 推荐(0) 编辑

Persona5
摘要:65536K Persona5 is a famous video game. In the game, you are going to build relationship with your friends. You have NN friends and each friends have 阅读全文

posted @ 2018-07-24 23:35 cltt 阅读(542) 评论(0) 推荐(0) 编辑

B Array
摘要:65536K 动态归化+滚动数组 JSZKC is the captain of the lala team. There are NN girls in the lala team. And their height is [1,N][1,N] and distinct. So it means 阅读全文

posted @ 2018-07-24 23:32 cltt 阅读(235) 评论(0) 推荐(0) 编辑

1233
摘要:JSZKC is the captain of the lala team. There are NN girls in the lala team. And their height is [1,N][1,N] and distinct. So it means there are no two 阅读全文

posted @ 2018-07-24 23:28 cltt 阅读(480) 评论(0) 推荐(0) 编辑

逆元
摘要:1 https://www.cnblogs.com/linyujun/p/5194184.html a和p互质,a才有关于p的逆元 typedef long long LL;void ex_gcd(LL a, LL b, LL &x, LL &y, LL &d){ if (!b) {d = a, x 阅读全文

posted @ 2018-07-24 15:27 cltt 阅读(183) 评论(0) 推荐(0) 编辑

有点贪心
摘要:You are given nn strings str1,str2,…,strnstr1,str2,…,strn, each consisting of ( and ). The objective is to determine whether it is possible to permute 阅读全文

posted @ 2018-07-22 15:12 cltt 阅读(181) 评论(0) 推荐(0) 编辑

线段树
摘要:YJJ's Salesman hdu 6447 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1212 Accepted Submission( 阅读全文

posted @ 2018-07-20 22:16 cltt 阅读(178) 评论(0) 推荐(0) 编辑

%%%%%%%%
摘要:1 1 //强制类型转换 2 2 // https://blog.csdn.net/chaipp0607/article/details/54834954 3 4 double x; 5 int y1,y2; 6 scanf("%lf",&x); 7 y1=int(x); 8 y2=int(round(x)); 9 pri... 阅读全文

posted @ 2018-07-20 15:02 cltt 阅读(1281) 评论(0) 推荐(0) 编辑

公式/定理
摘要:1 // 2018年全国多校算法寒假训练营练习比赛(第三场) 2 // 不凡的夫夫 3 #include <iostream> 4 #include <cstdio> 5 #include <cstring> 6 #include <string> 7 #include <utility> 8 #i 阅读全文

posted @ 2018-07-20 11:38 cltt 阅读(273) 评论(0) 推荐(0) 编辑

German Collegiate Programming Contest 2018​
摘要:1 // Coolest Ski Route 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 typedef long l... 阅读全文

posted @ 2018-07-19 19:56 cltt 阅读(324) 评论(0) 推荐(0) 编辑

German Collegiate Programming Contest 2018​ B. Battle Royale
摘要:Battle Royale games are the current trend in video games and Gamers Concealed Punching Circles (GCPC) is the most popular game of them all. The game t 阅读全文

posted @ 2018-07-19 19:39 cltt 阅读(276) 评论(0) 推荐(0) 编辑

Down the Pyramid
摘要:Do you like number pyramids? Given a number sequence that represents the base, you are usually supposed to build the rest of the "pyramid" bottom-up: 阅读全文

posted @ 2018-07-19 19:21 cltt 阅读(647) 评论(0) 推荐(0) 编辑

huu 1251
摘要: 阅读全文

posted @ 2018-07-19 17:14 cltt 阅读(322) 评论(0) 推荐(0) 编辑

The 2018 ACM-ICPC Chinese Collegiate Programming Contest Moving On
摘要:Firdaws and Fatinah are living in a country with nn cities, numbered from 11 to nn.Each city has a risk of kidnapping or robbery. Firdaws's home locat 阅读全文

posted @ 2018-07-19 10:55 cltt 阅读(615) 评论(0) 推荐(0) 编辑

计蒜客 The 2018 ACM-ICPC Chinese Collegiate Programming Contest Rolling The Polygon
摘要:1 include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 typedef long long ll; 14 #define lowbit(x... 阅读全文

posted @ 2018-07-18 20:10 cltt 阅读(164) 评论(0) 推荐(0) 编辑

The 2018 ACM-ICPC Chinese Collegiate Programming Contest Take Your Seat
摘要:/* 证明过程如下 :第一种情况:按1到n的顺序上飞机,1会随意选一个,剩下的上去时若与自己序号相同的座位空就坐下去,若被占了就也会随意选一个。求最后一个人坐在应坐位置的概率 */ 阅读全文

posted @ 2018-07-18 11:18 cltt 阅读(185) 评论(0) 推荐(0) 编辑

The 2018 ACM-ICPC Chinese Collegiate Programming Contest Fight Against Monsters
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 typedef long long ll; 13 #define lowbit(x) (x&(-x)) 1... 阅读全文

posted @ 2018-07-18 10:00 cltt 阅读(137) 评论(0) 推荐(0) 编辑

The 2018 ACM-ICPC Chinese Collegiate Programming Contest Caesar Cipher
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 typedef long long ll; 13 #define lowbit(x) (x&(-x)) 1... 阅读全文

posted @ 2018-07-18 09:53 cltt 阅读(123) 评论(0) 推荐(0) 编辑

The 2018 ACM-ICPC Chinese Collegiate Programming Contest Maximum Element In A Stack
摘要:1 //利用二维数组模拟 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 typedef long long ll; 14 #define lowbit... 阅读全文

posted @ 2018-07-18 09:26 cltt 阅读(113) 评论(0) 推荐(0) 编辑

cf 1006E
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 typedef long long ll; 15 #d... 阅读全文

posted @ 2018-07-18 09:14 cltt 阅读(128) 评论(0) 推荐(0) 编辑

1
摘要:1 // 题目链接 http://codeforces.com/contest/1006/problem/C 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include ... 阅读全文

posted @ 2018-07-18 09:06 cltt 阅读(127) 评论(0) 推荐(0) 编辑

最大字段和
摘要:/ Joy OI / 题目列表 / 最大子序和 / Joy OI / 题目列表 / 最大子序和 / Joy OI / 题目列表 / 最大子序和 / Joy OI / 题目列表 / 最大子序和 / Joy OI / 题目列表 / 最大子序和 题目限制 时间限制 内存限制 评测方式 题目来源 1000m 阅读全文

posted @ 2018-07-16 15:37 cltt 阅读(151) 评论(0) 推荐(0) 编辑

牛客练习赛22 C 简单瞎搞题
摘要:128536K E. AC Challenge Dlsj is competing in a contest with n (0 < n \le 20)n(0<n≤20) problems. And he knows the answer of all of these problems. Howe 阅读全文

posted @ 2018-07-16 09:26 cltt 阅读(219) 评论(0) 推荐(0) 编辑

German Collegiate Programming Contest 2015 计蒜课
摘要:// Change of Scenery 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 typedef long long ll; 10 typedef pairP; 11 int n,m,k; 12 con... 阅读全文

posted @ 2018-07-15 20:24 cltt 阅读(135) 评论(0) 推荐(0) 编辑

hdu 3836 tarjain 求强连通分量个数
摘要:1 // 给你一个有向图,问你最少加几条边能使得该图强连通 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 using namespace std; 12 #define max... 阅读全文

posted @ 2018-07-15 16:56 cltt 阅读(140) 评论(0) 推荐(0) 编辑

团体程序设计天梯赛-练习集
摘要:1 L2-001 紧急救援(25 分) 2 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace std; 11 typedef pairP; 12 int n,m,s,d; 13 const int N=550; 14 c... 阅读全文

posted @ 2018-07-15 14:23 cltt 阅读(293) 评论(0) 推荐(0) 编辑

简单的二分匹配
摘要:*/ 1 // German Collegiate Programming Contest 2015 DAG的最小路径覆盖是指找最小数目的互相不相交的有向路径,满足DAG的所有顶点都被覆盖. 首先给出公式:DAG的最小路径覆盖数=DAG图中的节点数-相应二分图中的最大匹配数. DAG的最小路径覆盖是 阅读全文

posted @ 2018-07-14 18:49 cltt 阅读(128) 评论(0) 推荐(0) 编辑

German Collegiate Programming Contest 2015
摘要:1 // Legacy Code 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 typedef long long ll; ... 阅读全文

posted @ 2018-07-14 16:06 cltt 阅读(142) 评论(0) 推荐(0) 编辑

x mod a=r(N对a,r)
摘要:1 //模数不一定互质,互质才可以用孙子定理。 2 /* 3 https://blog.csdn.net/zmh964685331/article/details/50527894 4 uu遇到了一个小问题,可是他不想答。你能替他解决这个问题吗? 5 问题:给你k对a和r是否存在一个正整数x使每队a和r都满足:x mod a=r,求最小正解x或无解。 6 */ 7 8 #in... 阅读全文

posted @ 2018-07-14 13:05 cltt 阅读(246) 评论(0) 推荐(0) 编辑

ax=1(%b) 求最小逆元
摘要:1 定理一:如果d = gcd(a, b),则必能找到正的或负的整数x和y,使 d = a*x+ b*y。 2 3 定理二:若gcd(a, b) = 1,则方程ax ≡ c (mod b)在[0, b-1]上有唯一解。 4 5 定理三:若gcd(a, b) = d,则方程ax ≡ c (mod b)在[0, b/d - 1]上有唯一解。 6 7 对于a... 阅读全文

posted @ 2018-07-14 13:02 cltt 阅读(270) 评论(0) 推荐(0) 编辑

筛选素数
摘要:1 const int M=10000; 2 int m=(int)sqrt(M+0.5); 3 bool vis[M]; 4 int pre[M],t; 5 void init() 6 { 7 t=0; 8 memset(vis,0,sizeof(vis)); 9 for(int i=2;i<=m;i++) 10 { 11 if(... 阅读全文

posted @ 2018-07-14 12:56 cltt 阅读(135) 评论(0) 推荐(0) 编辑

大数的因子个数
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 #include 15... 阅读全文

posted @ 2018-07-14 12:53 cltt 阅读(190) 评论(0) 推荐(0) 编辑

大数 是素数吗
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 #include 15... 阅读全文

posted @ 2018-07-14 12:39 cltt 阅读(169) 评论(0) 推荐(0) 编辑

CF 497 div 2 B
摘要:B. Turn the Rectangles time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Turn the Recta 阅读全文

posted @ 2018-07-14 10:18 cltt 阅读(136) 评论(0) 推荐(0) 编辑

区间dp
摘要:1 //hdu 1087 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace std; 11 #define max(a,b) a>b?a:b 12 typedef long long ll; 13 c... 阅读全文

posted @ 2018-07-13 15:15 cltt 阅读(149) 评论(0) 推荐(0) 编辑

SHIWEITI
摘要:1 //Wannafly挑战赛19(牛客网) 2 //A 队列Q 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 int n,m; 10 const int N=1e5+4; 11 int id[N],a[N]; 12 char s[10]; 13 boo... 阅读全文

posted @ 2018-07-12 19:52 cltt 阅读(199) 评论(0) 推荐(0) 编辑

。。。。。。。。。
摘要:1 //hdu 1232 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace std; 11 typedef long long ll; 12 const int inf=0... 阅读全文

posted @ 2018-07-12 18:19 cltt 阅读(545) 评论(0) 推荐(0) 编辑

Codeforces Round #496 (Div. 3) ABCDE1
摘要:2^(n-1) x 2^n 2^(n+1) 因为x<2^n,所以2*x<2^(n+1),那么x+y(0<x<y)一定位于 2^(n-1)和2^(n+1)之间。若x+y为2的指数幂,那么必定是2^n. 阅读全文

posted @ 2018-07-12 00:14 cltt 阅读(239) 评论(0) 推荐(0) 编辑

Benelux Algorithm Programming Contest 2014 Final
摘要:// Button Bashing (bfs) 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using na... 阅读全文

posted @ 2018-07-10 21:41 cltt 阅读(253) 评论(0) 推荐(0) 编辑

BAPC 2014 Preliminary
摘要:// 题目链接: https://nanti.jisuanke.com/t/282041 //动态规划,重复利用子问题的最优,来求解当前最优问题 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std; 10 typed... 阅读全文

posted @ 2018-07-08 13:24 cltt 阅读(399) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示