Description Alice想要得到一个长度为nn的序列,序列中的数都是不超过mm的正整数,而且这nn个数的和是pp的倍数。 Alice还希望,这nn个数中,至少有一个数是质数。 Alice想知道,有多少个序列满足她的要求。 输入输出格式 输入格式: 一行三个数,n,m,p。 输出格式: 一行 ...
分类:
其他好文 时间:
2019-02-17 20:30:42
阅读次数:
188
Chinese people think of '8' as the lucky digit. Bob also likes digit '8'. Moreover, Bob has his own lucky number L. Now he wants to construct his luck ...
分类:
其他好文 时间:
2019-02-16 19:27:03
阅读次数:
197
题目描述 Alice有n个字符串S_1,S_2...S_n,Bob有一个字符串集合T,一开始集合是空的。 接下来会发生q个操作,操作有两种形式: “1 P”,Bob往自己的集合里添加了一个字符串P。 “2 x”,Alice询问Bob,集合T中有多少个字符串包含串S_x。(我们称串A包含串B,当且仅当 ...
分类:
其他好文 时间:
2019-02-13 21:09:29
阅读次数:
165
飞行路线(luoguP4568) Description Alice和Bob现在要乘飞机旅行,他们选择了一家相对便宜的航空公司。该航空公司一共在n个城市设有业务,设这些城市分别标记为0到n?1,一共有m种航线,每种航线连接两个城市,并且航线有一定的价格。 Alice和Bob现在要从一个城市沿着航线到 ...
分类:
其他好文 时间:
2019-02-11 20:06:59
阅读次数:
322
Farmer John has received a noise complaint from his neighbor, Farmer Bob, stating that his cows are making too much noise. FJ's N cows (1 <= N <= 10,0 ...
分类:
其他好文 时间:
2019-02-09 16:28:48
阅读次数:
192
csdn : https://blog.csdn.net/su_cicada/article/details/86773007 例题5 8 Unixls命令(Unix ls,UVa400) 输入正整数n以及n个文件名,按照 字典序排序 后按 列优先 的方式 左对齐输出 。 假设最长文件名有M字符,则 ...
分类:
其他好文 时间:
2019-02-09 00:56:56
阅读次数:
215
Description Alice、Bob和Cynthia总是为他们之间混乱的债务而烦恼,终于有一天,他们决定坐下来一起解决这个问题。不过,鉴别钞票的真伪是一件很麻烦的事情,于是他们决定要在清还债务的时候尽可能少的交换现金。比如说,Alice欠Bob 10元,而Cynthia和他俩互不相欠。现在假设 ...
分类:
其他好文 时间:
2019-02-08 21:25:43
阅读次数:
165
Alice get a string S. She thinks palindrome string is interesting. Now she wanna know how many three tuple (i,j,k) satisfy 1≤i≤j<k≤length(S) , S[i..j] ...
分类:
其他好文 时间:
2019-02-08 13:03:50
阅读次数:
244
第 1 段 1.Listen to a conversation between a student and his English professor. 请听一段学生与他的英文教授的对话。 第 2 段 1.Hi, Bob. How is it going? Are you enjoying the... ...
分类:
其他好文 时间:
2019-02-07 22:08:50
阅读次数:
234
Diffie Hellman密钥交换 加密过程 有全局两个公开的参数: p,g p是一个大素数,g是p的一个本原根 现在有Alice和Bob两个人要交换密钥。 ① Alice选定一个小于p的数a作为Alice私钥,并且计算Alice的公钥A=g^a mod p,公开Alice的公钥A ② 与此同时B ...
分类:
其他好文 时间:
2019-02-06 22:25:12
阅读次数:
221