思维题
文章平均质量分 74
别安排了
带着脑子写代码,带着脑子走天下
展开
-
Codeforces Global Round 17 C. Keshi Is Throwing a Party
C. Keshi Is Throwing a Partytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKeshi is throwing a party and he wants everybody in the party to be happy.He has nfriends. His i-th friend has idol原创 2021-11-24 10:53:26 · 1169 阅读 · 0 评论 -
Codeforces Round #754 (Div. 2)C. Dominant Character(区间dp||find函数||硬做)
C. Dominant Charactertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAshish has a string sof length ncontaining only characters ‘a’, ‘b’ and ‘c’.He wants to find the length of the smallest s原创 2021-11-13 13:57:18 · 692 阅读 · 0 评论 -
[NOIP2009]最优贸易
链接:https://ac.nowcoder.com/acm/problem/16611来源:牛客网题目描述C国有n个大城市和m条道路,每条道路连接这n个城市中的某两个城市。任意两个城市之间最多只有一条道路直接相连。这m条道路中有一部分为单向通行的道路,一部分为双向通行的道路,双向通行的道路在统计条数时也计为1条。C国幅员辽阔,各地的资源分布情况各不相同,这就导致了同一种商品在不同城市的价格不一定相同。但是,同一种商品在同一个城市的买入价和卖出价始终是相同的。商人阿龙来到C国旅游。当他得知同一种商原创 2021-10-17 22:36:13 · 180 阅读 · 0 评论 -
2021-10-01cfA. CQXYM Count Permutations涉及求逆元和费马小定理的讲解
A. CQXYM Count Permutationstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputCQXYM is counting permutations length of 2n.A permutation is an array consisting of n distinct integers from 1 to n in arb原创 2021-10-01 11:34:31 · 365 阅读 · 2 评论 -
NC15553
题号:NC15553时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述今天qwb要参加一个数学考试,这套试卷一共有n道题,每道题qwb能获得的分数为ai,qwb并不打算把这些题全做完,他想选总共2k道题来做,并且期望他能获得的分数尽可能的大,他准备选2个不连续的长度为k的区间,即[L,L+1,L+2,…,L+k-1],[R,R+1,R+2,…,R+k-1](R >= L+k)。输入描述:第原创 2021-09-27 20:20:15 · 69 阅读 · 0 评论