摘要: 原题链接 可以在A点或S点分裂, 每次只能走一个分裂出来的点, 那么可以得知最后的答案一定是点与点之间相连的边权的总和. 边权我们可以通过bfs计算任意两个点之间的距离得到 (吐槽: 为什么越界也是WA...调了好久才发现) 1 #include <iostream> 2 #include <cma 阅读全文
posted @ 2021-08-27 02:33 Lotus3th 阅读(24) 评论(0) 推荐(0)
摘要: 农夫约翰的农场由 NN 块田地组成,每块地里都有一定数量的牛,其数量不会少于 $1$ 头,也不会超过 $2000$ 头。 约翰希望用围栏将一部分连续的田地围起来,并使得围起来的区域内每块地包含的牛的数量的平均值达到最大。 围起区域内至少需要包含 $F$ 块地,其中 $F$ 会在输入中给出。 在给定条 阅读全文
posted @ 2021-07-25 15:52 Lotus3th 阅读(28) 评论(0) 推荐(0)
摘要: 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 长度不超过$n$,且包含子序列us的、只由小写字符构成的字符串有多少个? 答案对$10^9+7$取模。 所谓子序列,指一个字符串删除部分字符( 阅读全文
posted @ 2021-07-22 18:58 Lotus3th 阅读(90) 评论(0) 推荐(0)
摘要: Agri-Net Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 81076 Accepted: 33464 Description Farmer John has been elected mayor of his town! 阅读全文
posted @ 2021-02-22 19:38 Lotus3th 阅读(50) 评论(0) 推荐(0)
摘要: Building a Space Station Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 18364 Accepted: 8153 Description You are a member of the space sta 阅读全文
posted @ 2021-02-20 11:41 Lotus3th 阅读(40) 评论(0) 推荐(0)
摘要: N 的阶乘(记作 N!)是指从 1 到 N(包括 1 和 N)的所有整数的乘积。 阶乘运算的结果往往都非常的大。 现在,给定数字 N,请你求出 N! 的最右边的非零数字是多少。 例如 \(5!=1×2×3×4×5=120\),所以 5! 的最右边的非零数字是 2。 输入格式 共一行,包含一个整数 \ 阅读全文
posted @ 2021-02-15 08:22 Lotus3th 阅读(36) 评论(0) 推荐(0)
摘要: The Suspects Time Limit: 1000MS Memory Limit: 20000K Total Submissions: 66564 Accepted: 31466 Description Severe acute respiratory syndrome (SARS), an 阅读全文
posted @ 2020-12-12 21:36 Lotus3th 阅读(38) 评论(0) 推荐(0)
摘要: Wireless Network Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 55834 Accepted: 22702 Description An earthquake takes place in Southeast 阅读全文
posted @ 2020-12-11 20:14 Lotus3th 阅读(85) 评论(0) 推荐(0)
摘要: Wormholes Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 83995 Accepted: 31141 Description While exploring his many farms, Farmer John has 阅读全文
posted @ 2020-12-11 01:14 Lotus3th 阅读(92) 评论(0) 推荐(0)
摘要: Time Limit: 8000MS Memory Limit: 262144K Total Submissions: 41399 Accepted: 13298 Description In the age of television, not many people attend theater 阅读全文
posted @ 2020-12-10 00:38 Lotus3th 阅读(53) 评论(1) 推荐(1)