首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
龍木
获赞
9
粉丝
17
关注
63
看过 TA
21
男
浙江财经大学
2022
C++
IP属地:广东
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑龍木吗?
发布(629)
评论
刷题
收藏
龍木
关注TA,不错过内容更新
关注
2020-09-15 19:33
已编辑
浙江财经大学 C++
D1. Add on a Tree
链接:https://codeforces.ml/contest/1189/problem/D1 Note that this is the first problem of the two similar problems. You can hack this problem only if you solve both problems. You are given a tree with nn nodes. In the beginning, 00 is written on all edges. In one operation, you can choose any 22 disti...
0
点赞
评论
收藏
分享
2020-09-15 19:32
已编辑
浙江财经大学 C++
A 牛牛与序列计数
链接:https://ac.nowcoder.com/acm/contest/4381/A 牛牛特别羡慕那些会计数的选手,作为一个计数非常菜的选手,牛牛也想计数变得这么厉害,然而实在是太菜了。 牛牛最近又被一个简单计数题难住了,这个题目是这样的,现在有红,蓝,黑,白四种颜色的球无数种。牛牛现在想数有多少种长度为nn的序列满足红色和蓝色的球的数量都是偶数个,黑色和白色的球的数量都是奇数个。 由于这样的序列的个数可能太多了,你只需要输出在模1e9+71e9+7之后的答案就可以了。 输入描述: 一行一个nn表示序列的长度. 输出描述: 一个整数表示在模1e9 + 71e9+7...
0
点赞
评论
收藏
分享
2020-09-15 19:32
浙江财经大学 C++
B 牛牛与组合数学
链接:https://ac.nowcoder.com/acm/contest/4381/B 题目描述 牛牛并不是一个擅长组合数学的选手,但是这并不妨碍他喜欢做组合数学。虽然他人是菜,但是他嘴巴不菜。 众所周知,计算组合数C_i^jCij是组合数学中最简单的事情.现在牛牛遇到了一个难题,给出n,m,pn,m,p,他想知道C_n^mCnm是否等于pp。 输入描述: 一行三个数分别代表n,m,pn,m,p. 输出描述: 如果C_n^m = pCnm=p,输出Yes!Yes!.否则输出No!No! 示例1 输入 复制 4 2 6 输出 复制 Yes! 备注: 1 \leq...
0
点赞
评论
收藏
分享
2020-09-15 19:32
已编辑
浙江财经大学 C++
浅谈组合数
写这个类型博客的目的就是想总结一下某个专题的知识点,方便以后比赛前复习,由于太菜,如有错误,还请斧正。 首先不知道组合数的同学先自行百度(虽然应该没有人) 先说说组合数的几种求法(以下代码参考自宝藏数论文章https://www.cnblogs.com/linyujun/p/5194189.html) 1.递推(在数量级比较小的情况下使用)O(n^2) const int N = 2000 + 5; const int MOD = (int)1e9 + 7; int comb[N][N]; void init(){ for(int i = 0; i < N; i ++){ comb[i]...
0
点赞
评论
收藏
分享
2020-09-15 19:31
浙江财经大学 C++
C 交换游戏
链接:https://ac.nowcoder.com/acm/contest/4462/C 一列上有12个孔,这12个孔中有些孔被遮挡住了。 假定我们用 '-' 来表示没被遮挡住的孔,用 'o' 来表示被遮挡住的孔。 如果相邻的三个孔有两个孔被遮挡,并且被遮挡的两个孔相邻,就是 '-oo' 和 'oo-'。 对于这样的三个孔,我们可以将中间的孔的遮挡物移开,代价是将一端的遮挡物移到另一端没有被遮挡的孔上面。 对于一列给定的孔,你的任务是制定操作的顺序,使得最后剩余的被遮挡的孔的个数最少,并输出最后剩余的被遮挡的孔的个数。 输入描述: 第一行输入一个n, n \le 10^5n,n≤105...
0
点赞
评论
收藏
分享
2020-09-15 19:31
已编辑
浙江财经大学 C++
C. Restoring Permutation
链接:https://codeforces.ml/contest/1315/problem/C You are given a sequence b1,b2,…,bnb1,b2,…,bn. Find the lexicographically minimal permutation a1,a2,…,a2na1,a2,…,a2n such that bi=min(a2i−1,a2i)bi=min(a2i−1,a2i), or determine that it is impossible. Input Each test contains one or more test cases. The ...
0
点赞
评论
收藏
分享
2020-09-15 19:31
浙江财经大学 C++
D. Three Integers
链接:https://codeforces.ml/contest/1311/problem/D You are given three integers a≤b≤ca≤b≤c. In one move, you can add +1+1&nbs***bsp;−1−1 to any of these integers (i.e. increase or decrease any number by one). You can perform such operation any (possibly, zero) number of times, you can even perform ...
0
点赞
评论
收藏
分享
2020-09-15 19:30
已编辑
浙江财经大学 C++
B. Nick and Array
链接:https://codeforces.ml/contest/1180/problem/B Nick had received an awesome array of integers a=[a1,a2,…,an]a=[a1,a2,…,an] as a gift for his 55 birthday from his mother. He was already going to explore its various properties but after unpacking he was disappointed a lot because the product a1⋅a2⋅…a...
0
点赞
评论
收藏
分享
2020-09-15 19:30
已编辑
浙江财经大学 C++
浅谈中国剩余定理
写这个类型博客的目的就是想总结一下某个专题的知识点,方便以后比赛前复习,由于太菜,如有错误,还请斧正。 中国剩余定理又称孙子定理,简单来说是解决两两互质同余问题的最小非负整数解 在模下的解是唯一的,解为 其中,而为模的逆元。 void exgcd(int a,int b,int &x,int &y) { if(b==0){ x=1; y=0; return;} exgcd(b,a%b,x,y); int tp=x; x=y; y=tp-a/b*y; } int china() { int ans=0,lcm=1,x,y; for(int i=1;i<=k;+...
0
点赞
评论
收藏
分享
2020-09-15 19:30
已编辑
浙江财经大学 C++
C. Playlist
链接:https://codeforces.ml/contest/1140/problem/C You have a playlist consisting of nn songs. The ii-th song is characterized by two numbers titi and bibi — its length and beauty respectively. The pleasure of listening to set of songs is equal to the total length of the songs in the set multiplied by ...
0
点赞
评论
收藏
分享
2020-09-15 19:29
已编辑
浙江财经大学 C++
D. Minimum Triangulation
链接:https://codeforces.ml/contest/1140/problem/D You are given a regular polygon with nn vertices labeled from 11 to nn in counter-clockwise order. The triangulation of a given polygon is a set of triangles such that each vertex of each triangle is a vertex of the initial polygon, there is no pair of...
0
点赞
评论
收藏
分享
2020-09-15 19:29
浙江财经大学 C++
E1. String Coloring (easy version)
链接:https://codeforces.ml/contest/1296/problem/E1 This is an easy version of the problem. The actual problems are different, but the easy version is almost a subtask of the hard version. Note that the constraints and the output format are different. You are given a string ss consisting of nn lowercas...
0
点赞
评论
收藏
分享
2020-09-15 19:29
已编辑
浙江财经大学 C++
E2. String Coloring (hard version)
链接:https://codeforces.ml/contest/1296/problem/E2 This is a hard version of the problem. The actual problems are different, but the easy version is almost a subtask of the hard version. Note that the constraints and the output format are different. You are given a string ss consisting of nn lowercase...
0
点赞
评论
收藏
分享
2020-09-15 19:28
浙江财经大学 C++
C 矩阵消除游戏
链接:https://ac.nowcoder.com/acm/contest/4090/C 牛妹在玩一个名为矩阵消除的游戏,矩阵的大小是{n}n行{m}m列,第{i}i行第{j}j列的单元格的权值为a_{i,j}ai,j,牛妹可以进行{k}k个回合的游戏,在每个回合,牛妹可以选择一行或者选择一列,然后将这一行或者这一列的所有单元格中的权值变为{0}0,同时牛妹的分数会加上这一行或者这一列中的所有单元格的权值的和。 牛妹想最大化她的得分,球球你帮帮她吧! 输入描述: 第一行三个整数{n,m,k}n,m,k 接下来{n}n行每行{m}m个整数表示矩阵中各个单元格的权值。 输出描述: 输出一个整数...
0
点赞
评论
收藏
分享
2020-09-15 19:28
已编辑
浙江财经大学 C++
B. Journey Planning
链接:https://codeforces.ml/contest/1321/problem/B Tanya wants to go on a journey across the cities of Berland. There are nn cities situated along the main railroad line of Berland, and these cities are numbered from 11 to nn. Tanya plans her journey as follows. First of all, she will choose some city ...
0
点赞
评论
收藏
分享
1
13
14
15
16
17
42
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务