上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: 核心思想: (1)树状数组中的每个元素是原数组中一个或者多个连续元素的和。 (2)在进行连续求和操作a[1]+...+a[n]时,只需要将树状数组中某几个元素的和即可。时间复杂度为O(lgn) (3)在进行修改某个元素a[i]时,只需要修改树状数组中某几个元素的和即可。时间复杂度为O(lgn) 下图 阅读全文
posted @ 2018-07-21 10:24 TTTCoder 阅读(193) 评论(0) 推荐(0) 编辑
摘要: package 选课管理系统; import java.sql.*; public class 连接数据库 { static Connection con = null; static String datascore = "教务系统"; static String URL = "jdbc:mysql://localhost:3306/"+datascore+"?use... 阅读全文
posted @ 2018-07-03 16:36 TTTCoder 阅读(170) 评论(0) 推荐(0) 编辑
摘要: An Arc of Dream is a curve defined by following function: where a 0 = A0 a i = a i-1*AX+AY b 0 = B0 b i = b i-1*BX+BY What is the value of AoD(N) modu 阅读全文
posted @ 2018-05-03 20:59 TTTCoder 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #define LL long long 6 using namespace std; 7 const int N = 10;//矩阵大小 8 int mod; 9 int k;//矩阵的幂 10 int a[15]; 11 12 struct Matrix 13 { 14 ... 阅读全文
posted @ 2018-05-02 15:35 TTTCoder 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Arthur and his sister Caroll have been playing a game called Nim for some time now. Nim is played as follows: The starting position has a number of he 阅读全文
posted @ 2018-04-30 22:05 TTTCoder 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 找规律 首先2~9 先手赢 然后10 ~~18 后手赢 然后19~~162 先手赢,这个先想到的是19 ~~36先手赢,然后想37谁赢?37 / 9 = 4;先手给4,后手又输了,说明先手的控制范围应该更大,这才给到4,先手是可以给到9的,然后想到81,81的时候先手给8,后手又输了,82的时候先手 阅读全文
posted @ 2018-04-28 19:02 TTTCoder 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 看完大佬写的博客才懂的,但是大佬的博客我要看好久才能看懂,自己比较菜,我需要看那种秒懂的博客才可以,所以写下这篇博客希望可以帮到像我一样的蒟蒻 =_= =_= 根据奇偶性,目标日期11月4日是奇数,那么偶数的日期一定会是必胜! 下面解释一下为什么偶数日期必胜: 1.当前日期是偶数,我的下一步一定可以 阅读全文
posted @ 2018-04-26 19:49 TTTCoder 阅读(168) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #define LL long long using namespace std; typedef __int64 int64; const int N = 3; __int64 k , MOD = 1e9+7; int arr[50] ; struct Matrix{ int64 mat[N][N]; ... 阅读全文
posted @ 2018-04-18 17:42 TTTCoder 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 半个小时看懂了大佬写的10行代码 阅读全文
posted @ 2018-04-10 21:43 TTTCoder 阅读(188) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; typedef __int64 int64; const int N = 10; const int MOD = 9973; int k,n; int arr[N],f[N]; struct Matrix{ int mat[N][N]; Matrix operato... 阅读全文
posted @ 2018-02-07 23:44 TTTCoder 阅读(168) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页