![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
----寒假集训----
饕餮梼杌之徒
这个作者很懒,什么都没留下…
展开
-
牛牛的k合因子数
题目描述合数是指自然数中除了能被1和本身整除外,还能被其他数(0除外)整除的数。牛牛最近在研究“k合因子数”,所谓“k合数”是指一个数的所有因子中,是合数的因子共有k个。例如20的因子有1,2,4,5,10,20,其中4,10,20为合数,它有3个合数因子,就称20是一个 “3合因子数”牛牛想要知道1~n中给定k的情况下k合因子数的数目。输入描述:第一行输入两个数字n,m(1≤n,m...原创 2020-02-10 16:52:26 · 378 阅读 · 0 评论 -
牛牛的Link Power I
题目描述链接:https://ac.nowcoder.com/acm/contest/3004/F来源:牛客网牛牛有一颗大小为n的神奇Link-Cut 数组,数组上的每一个节点都有两种状态,一种为link状态,另一种为cut状态。数组上任意一对处于link状态的无序点对(即(u,v)和(v,u)被认为是同一对)会产生dis(u,v)的link能量,dis(u,v)为数组上u到v的距离。我们...原创 2020-02-10 16:46:45 · 331 阅读 · 0 评论 -
牛牛的DRB迷宫I
题目描述牛牛有一个n*m的迷宫,对于迷宫中的每个格子都为’R’,‘D’,'B’三种类型之一,'R’表示处于当前的格子时只能往右边走’D’表示处于当前的格子时只能往下边走,而’B’表示向右向下均可以走。我们认为迷宫最左上角的坐标为(1,1),迷宫右下角的坐标为(n,m),除了每个格子有向右移动以及向下移动的限制之外,你也不能够走出迷宫的边界。牛牛现在想要知道从左上角走到右下角不同种类的走法共有...原创 2020-02-10 11:30:59 · 710 阅读 · 0 评论 -
敌兵布阵
C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视。中央情报局要研究敌人究竟演习什么战术,所以...转载 2020-01-10 16:02:28 · 83 阅读 · 0 评论 -
再做一遍+Monotonic Renumeration
You are given an array a consisting of n integers. Let’s denote monotonic renumeration of array a as an array b consisting of n integers such that all of the following conditions are met:b1=0;for ev...原创 2020-01-10 13:16:37 · 179 阅读 · 0 评论 -
Balanced Ternary String
You are given a string s consisting of exactly n characters, and each character is either ‘0’, ‘1’ or ‘2’. Such strings are called ternary strings.Your task is to replace minimum number of characters...原创 2020-01-10 13:01:02 · 181 阅读 · 0 评论 -
Doors Breaking and Repairing
You are policeman and you are playing a game with Slavik. The game is turn-based and each turn consists of two phases. During the first phase you make your move and during the second phase Slavik make...原创 2020-01-10 12:54:22 · 108 阅读 · 0 评论 -
Array K-Coloring
You are given an array a consisting of n integer numbers.You have to color this array in k colors in such a way that:Each element of the array should be colored in some color;For each i from 1 to k...原创 2020-01-10 12:50:16 · 278 阅读 · 0 评论 -
Integer Sequence Dividing
You are given an integer sequence 1,2,…,n. You have to divide it into two sets A and B in such a way that each element belongs to exactly one set and |sum(A)−sum(B)| is minimum possible.The value |x|...原创 2020-01-10 12:26:08 · 300 阅读 · 0 评论