Birthday Toy Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 644 Accepted Submission(s): 326 Problem Description AekdyCoin loves toys. It is AekdyCoin’s Birthday today and he gets a special “
Description Without expecting, Angel replied quickly.She says: "I'v heard that you'r a very clever boy. So if you wanna me be your GF, you should solve the problem called GF~. " How good an opportunity that Gardon can not give up! The "Prob
考研路茫茫——单词情结 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2789 Accepted Submission(s): 782 Problem Description 背单词,始终是复习英语的重要环节.在荒废了3年大学生涯后,Lele也终于要开始背单词了. 一天,Lele在某本单词书上看到了一个根据词根来背单词的方法.比
Given a 01 matrix M, find the longest line of consecutive one in the matrix. The line could be horizontal, vertical, diagonal or anti-diagonal. Example: Input: [[0,1,1,0], [0,1,1,0], [0,0,0,1]] Output: 3 Hint: The number of elements in the given matr
简单入门一下矩阵树Matrix-Tree定理.(本篇目不涉及矩阵树相关证明) 一些定义与定理 对于一个无向图 G ,它的生成树个数等于其基尔霍夫Kirchhoff矩阵任何一个N-1阶主子式的行列式的绝对值. 所谓的N-1阶主子式就是对于一个任意的一个 r ,将矩阵的第 r 行和第 r 列同时删去得到的新矩阵. 基尔霍夫Kirchhoff矩阵的一种求法: 基尔霍夫Kirchhoff矩阵 K =度数矩阵 D - 邻接矩阵 A 基尔霍夫Kirchhoff矩阵的具体构造 度数矩阵D:是一个 ${N}\t