上一页 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 木子川 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 题目描述 牛牛正在打一场CF比赛时间为T分钟,有N道题,可以在比赛时间内的任意时间提交代码第i道题的分数为maxPoints[i],题目的分数随着比赛的进行,每分钟减少pointsPerMinute[i]这是一场比较dark的Cf,分数可能减成负数已知第i道题需要花费 requiredTime[i] 阅读全文
posted @ 2020-08-31 20:01 木子川 阅读(284) 评论(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 木子川 阅读(219) 评论(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 木子川 阅读(152) 评论(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 木子川 阅读(227) 评论(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 木子川 阅读(1166) 评论(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 木子川 阅读(184) 评论(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 木子川 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 关于图的几个概念定义: 连通图:在无向图中,若任意两个顶点vivi与vjvj都有路径相通,则称该无向图为连通图。 强连通图:在有向图中,若任意两个顶点vivi与vjvj都有路径相通,则称该有向图为强连通图。 连通网:在连通图中,若图的边具有一定的意义,每一条边都对应着一个数,称为权;权代表着连接连个 阅读全文
posted @ 2019-11-09 21:44 木子川 阅读(298) 评论(0) 推荐(0) 编辑
摘要: 什么是线段树线段树,是一种二叉搜索树。它将一段区间划分为若干单位区间,每一个节点都储存着一个区间。它功能强大,支持区间求和,区间最大值,区间修改,单点修改等操作。线段树的思想和分治思想很相像。线段树的每一个节点都储存着一段区间[L…R]的信息,其中叶子节点L=R。它的大致思想是:将一段大区间平均地划 阅读全文
posted @ 2019-11-09 21:43 木子川 阅读(392) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 12 下一页