
弱弱的题解
文章平均质量分 71
保肝区题解
litian355
不能放弃思考,不能停止奔跑!
展开
-
cf798_brother_acm训练2题解
we brother_acm原创 2022-06-12 21:39:50 · 194 阅读 · 0 评论 -
cf551-brother_acm训练题解
A.二分来做,求出每个路线能承载seval 的最小时间,所有路线的最小时间就是答案。B.高中里的三视图,给你其中两个,和俯视方块存在的0/1矩阵,让你找到一种填充方式,判定就是存在?min(h(俯视),h(正视)) :0;C.01串题,把括号序列()看成0、1,(+1,-1)类似于卡特兰数的01串,S的所有严格前缀中0的个数要严格大于1的个数(也就是+1的个数要严格大于-1的个数)字符串中第一个字符一定是不是")",最后一个字符一定不是"(",且长度一定是偶数,这样就能构造出形如“(???????)”的字符原创 2022-06-11 23:26:13 · 164 阅读 · 0 评论 -
CF_EDU_127 solution
Problem C : Dolce Vita考虑贪心,因为涨价的额度是相同的,所以挑最便宜的商店买总会是最优的。先 sort 一下 ,我们需要求出每个商店的糖果最多能买多少次(天),我们先设b[ i ] 表示第i个商店的糖能买 b[i] 天,(b[i]-1)表示涨价了 多少天,sum[i] 表示前i 个商店的糖果在第一天的价格,涨价后 就有 总金额 x >= sum(i)+ (b[i]-1)* i,根据这个公式,轻松的出 b[i] <=(x-sum[i])/i+1;显然 当 ((x-sum[原创 2022-04-24 11:22:06 · 545 阅读 · 5 评论 -
Codeforces #774 Problem C
算法考察:二进制枚举+阶乘分解+数学。C. Factorials and Powers of Twotime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA number is calledpowerfulif it is a power of two or a factorial. In other words, ..原创 2022-03-06 10:27:40 · 182 阅读 · 0 评论 -
codefoces #771 A:Reverse
A. Reversetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a permutationp1,p2,…,pnp1,p2,…,pnof lengthnn. You have to choose two integersl,rl,r(1≤l≤r≤n1≤l≤r≤n) and reve...原创 2022-02-19 15:59:58 · 731 阅读 · 0 评论 -
codeforces #770 div2:C:OKEA
C. OKEAtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPeople worry that computers will get too smart and take over the world, but the real problem is that they're too stupid and they'v原创 2022-02-19 14:13:11 · 483 阅读 · 0 评论 -
codeforces round#122:Div2:Problem C:kill the monster
C. Kill the Monstertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMonocarp is playing a computer game. In this game, his character fights different monsters.A fight between a charac原创 2022-02-19 13:59:02 · 624 阅读 · 0 评论