cf

_yuen4 个月前
cf·比赛记录
「比赛记录」CF Round 954 (Div. 3)题目列表:A. X Axist组测试样例,每组样例给出三个整数,分别表示数轴上三个点的坐标,选取数轴上任意一个点,使得这个点到给定的三个点的距离和最小,求出这个最小距离和。
越125 个月前
开发语言·数据结构·c++·算法·cf
C. Rooks Defenders(树状数组)You have a square chessboard of size n×nn×n. Rows are numbered from top to bottom with numbers from 11 to nn, and columns — from left to right with numbers from 11 to nn. So, each cell is denoted with pair of integers (x,y)(x,y) (1≤x,y≤n1≤x,y≤n), where xx
sluckystar7 个月前
c++·cf
题解:CF1951E(No Palindromes)题目翻译:给定一个长度为 n n n 的字符串 s s s,询问是否可以将其分成若干份,使得每一份都不是回文串。若可以,输出 YES 并给出任意一组方案;若不可以,则直接输出 NO。其中,数据多测,共 t t t 组,保证 ∑ n ≤ 1 0 6 \sum n\leq10^6 ∑n≤106。
sluckystar7 个月前
数据结构·c++·算法·cf
题解:CF1946D(Birthday Gift)题目翻译:给定一个长度为 n n n 的数组 a a a 以及一个数 x x x,请找出最大的 k k k,使得数组 a a a 可以被分成 k k k 个部分,并且将每个部分中所有元素异或起来的结果按位或,最终的结果小于等于 x x x。
越128 个月前
数据结构·c++·算法·最短路·cf
Navigation System(djkstra,反向建图,思维)The map of Bertown can be represented as a set of nn intersections, numbered from 11 to nn and connected by mm one-way roads. It is possible to move along the roads from any intersection to any other intersection. The length of some path from one intersec
越128 个月前
开发语言·数据结构·c++·算法·cf
Pinkie Pie Eats Patty-cakes(贪心或者二分)Pinkie Pie has bought a bag of patty-cakes with different fillings! But it appeared that not all patty-cakes differ from one another with filling. In other words, the bag contains some patty-cakes with the same filling.