上一页 1 2 3 4 5 6 7 ··· 12 下一页
摘要: #include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; //整数加法 void add(string &a,string &b){ if(a.size()<b.size 阅读全文
posted @ 2020-09-07 18:36 木子川 阅读(172) 评论(0) 推荐(0)
摘要: 题目描述 牛牛正在打一场CF比赛时间为T分钟,有N道题,可以在比赛时间内的任意时间提交代码第i道题的分数为maxPoints[i],题目的分数随着比赛的进行,每分钟减少pointsPerMinute[i]这是一场比较dark的Cf,分数可能减成负数已知第i道题需要花费 requiredTime[i] 阅读全文
posted @ 2020-08-31 20:01 木子川 阅读(323) 评论(0) 推荐(0)
摘要: 链接:https://ac.nowcoder.com/acm/problem/21313来源:牛客网 题目描述 牛牛喜欢整数序列,他认为一个序列美丽的定义是 1:每个数都在0到40之间 2:每个数都小于等于之前的数的平均值 具体地说:for each i, 1 <= i < N, A[i] <= ( 阅读全文
posted @ 2020-08-31 15:38 木子川 阅读(255) 评论(0) 推荐(0)
摘要: 题目描述 牛牛喜欢这样的数组:1:长度为n2:每一个数都在1到k之间3:对于任意连续的两个数A,B,A<=B 与(A % B != 0) 两个条件至少成立一个请问一共有多少满足条件的数组,对1e9+7取模 输入描述: 输入两个整数n,k1 ≤ n ≤ 101 ≤ k ≤ 100000 输出描述: 输 阅读全文
posted @ 2020-08-31 14:10 木子川 阅读(172) 评论(0) 推荐(0)
摘要: #include <cstdio> #include <cstdlib> #include <climits> #include <fstream> #include <algorithm> #include <cmath> #include <deque> #include <vector> #i 阅读全文
posted @ 2020-08-31 13:47 木子川 阅读(252) 评论(0) 推荐(0)
摘要: 斐波那契数列指的是这样一个数列: 这个数列从第3项开始,每一项都等于前两项之和。 1.递归形式 int fibonacci(int n) { if(n<=2) return 1; return fibonacci(n-1)+fibonacci(n-2); } 2.循环形式 F[1] = 1; F[2 阅读全文
posted @ 2020-02-24 14:59 木子川 阅读(1330) 评论(0) 推荐(0)
摘要: Nasa, being the most talented programmer of his time, can’t think things to be so simple. Recently all his neighbors have decided to connect themselve 阅读全文
posted @ 2019-11-12 21:55 木子川 阅读(190) 评论(0) 推荐(0)
摘要: In order to prepare the “The First National ACM School Contest” (in 20??) the major of the city decided to provide all the schools with a reliable sou 阅读全文
posted @ 2019-11-11 18:10 木子川 阅读(278) 评论(0) 推荐(0)
摘要: 关于图的几个概念定义: 连通图:在无向图中,若任意两个顶点vivi与vjvj都有路径相通,则称该无向图为连通图。 强连通图:在有向图中,若任意两个顶点vivi与vjvj都有路径相通,则称该有向图为强连通图。 连通网:在连通图中,若图的边具有一定的意义,每一条边都对应着一个数,称为权;权代表着连接连个 阅读全文
posted @ 2019-11-09 21:44 木子川 阅读(313) 评论(0) 推荐(0)
摘要: 次小生成树是指在一个树中除最小生成树外第二小的生成树,因此它是在最小生成树算法上衍生的。首先在求出最小生成树后,假如我们要加上一条树外的边,这样就会形成一个闭环,然后将这个闭环的最大 的边删除,那么剩下的依然是一个树,如果这个树<=最小生成树,那么它就是次小生成树。 如果我们要加边的话,加的肯定是树 阅读全文
posted @ 2019-11-09 21:43 木子川 阅读(179) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 12 下一页