10 2019 档案
摘要:c语言中反转字符串的函数strrev(),reverse() #include<string.h>的 strrev()用来反转字符数组 #include<algorithm>的reverse() 用来反转容器中的内容 矩阵相乘 https://www.cnblogs.com/ljy-endl/p/1
阅读全文
摘要:AC自动机:https://www.cnblogs.com/cjyyb/p/7196308.html cpu的乱序执行 : https://blog.csdn.net/qq_36623327/article/details/107622833 https://www.zhihu.com/questi
阅读全文
摘要:暑假wa的题了,,,看见vj的attempt痕迹打算挨个补了,简单kmp题,判断bob的串是不是全为0或者是alice的字串就好了
阅读全文
摘要:给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等 Input输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S两组case之间由空行隔开(该空行不用处理)字符串
阅读全文
摘要:It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-emp
阅读全文
摘要:一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。
阅读全文
摘要:It's time for music! A lot of popular musicians are invited to join us in the music festival. Each of them will play one of their representative songs
阅读全文
摘要:Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一
阅读全文
摘要:Immediate Decodability An encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for anoth
阅读全文
摘要:没有优先队列的dijkstra不算真的dijkstra 所以我又回来补常识了 <1>priority_queue::emplace <7>priority_queue::top <2>priority_queue::empty <3>priority_queue::pop <4>priority_q
阅读全文
摘要:HDU - 1711 A - Number Sequence Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1
阅读全文
摘要:P3370 【模板】字符串哈希 题目描述 如题,给定N个字符串(第i个字符串长度为Mi,字符串内包含数字、大小写字母,大小写敏感),请求出N个字符串中共有多少个不同的字符串。 #友情提醒:如果真的想好好练习哈希的话,请自觉,否则请右转PJ试炼场:) 如题,给定N个字符串(第i个字符串长度为Mi,字符
阅读全文
摘要:题目描述 有NN级的台阶,你一开始在底部,每次可以向上迈最多KK级台阶(最少11级),问到达第NN级台阶有多少种不同方式。 有NN级的台阶,你一开始在底部,每次可以向上迈最多KK级台阶(最少11级),问到达第NN级台阶有多少种不同方式。 输入格式 两个正整数N,K。 两个正整数N,K。 输出格式 一
阅读全文
摘要:There are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say t
阅读全文
摘要:You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible
阅读全文
摘要:#include<iostream> #include<algorithm> using namespace std; int ans=0,tot=0; const int N = 1e5; int f[200]; struct ac{ int v,u,w; }edge[N]; bool cmp(a
阅读全文
摘要:http://www.cplusplus.com 搜了才发现map的成员函数这么多orz,跟着cplusplus按字典序走一遍叭(顺序有微调orz <1> map::at (c++11) <2> map::begin/end <3>map::cbegin(c++11) <4> map::clear
阅读全文
摘要:https://codeforces.com/contest/1234/problem/A A. Equalize Prices Again 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 int
阅读全文
摘要:https://codeforces.com/contest/1228/problem/A A. Distinct Digits 超级简单嘻嘻,给你一个l和r然后寻找一个数,这个数要满足的条件是它的每一位的数字不相同,找出满足要求的最小的那个数输出,没有找到就输出-1; 1 #include<bit
阅读全文