06 2017 档案
2017年上海金马五校程序设计竞赛:Problem K : Treasure Map (蛇形填数)
摘要:Description There is a robot, its task is to bury treasures in order on a N × M grids map, and each treasure can be represented by its weight, which i 阅读全文
posted @ 2017-06-04 17:59 渡…… 阅读(215) 评论(0) 推荐(0)
2017年上海金马五校程序设计竞赛:Problem I : Frog's Jumping (找规律)
摘要:Description There are n lotus leaves floating like a ring on the lake, which are numbered 0, 1, ..., n 1 respectively. The leaf 0 and n 1 are adjacent 阅读全文
posted @ 2017-06-04 17:46 渡…… 阅读(268) 评论(0) 推荐(0)
2017年上海金马五校程序设计竞赛:Problem G : One for You (博弈)
摘要:Description Given a m × n chessboard, a stone is put on the top left corner (1, 1). Kevin and Bob take turns moving the stone. One can only move the s 阅读全文
posted @ 2017-06-04 17:40 渡…… 阅读(406) 评论(0) 推荐(0)
2017年上海金马五校程序设计竞赛:Problem E : Find Palindrome (字符串处理)
摘要:Description Given a string S, which consists of lowercase characters, you need to find the longest palindromic sub string. A sub string of a string S 阅读全文
posted @ 2017-06-04 17:32 渡…… 阅读(180) 评论(0) 推荐(0)
2017年上海金马五校程序设计竞赛:Problem C : Count the Number (模拟)
摘要:Description Given n numbers, your task is to insert '+' or ' ' in front of each number to construct expressions. Note that the position of numbers can 阅读全文
posted @ 2017-06-04 17:27 渡…… 阅读(244) 评论(0) 推荐(0)
2017年上海金马五校程序设计竞赛:Problem B : Sailing (广搜)
摘要:Description Handoku is sailing on a lake at the North Pole. The lake can be considered as a two dimensional square plane containing N × N blocks, whic 阅读全文
posted @ 2017-06-04 17:20 渡…… 阅读(312) 评论(0) 推荐(0)
2017年上海金马五校程序设计竞赛:Problem A : STEED Cards (STL全排列函数)
摘要:Description Corn does not participate the STEED contest, but he is interested in the word "STEED". So, Corn writes all permutations of the word "STEED 阅读全文
posted @ 2017-06-04 16:57 渡…… 阅读(240) 评论(0) 推荐(0)
之江学院第0届校赛 qwb去面试 (找规律)
摘要:Description 某一天,qwb去WCfun面试,面试官问了他一个问题:把一个正整数n拆分成若干个正整数的和,请求出这些数乘积的最大值。 qwb比较猥琐,借故上厕所偷偷上网求助,聪明的你能帮助他吗? Input 第一行为一个正整数T.(T include include define mod 阅读全文
posted @ 2017-06-04 16:47 渡…… 阅读(188) 评论(0) 推荐(0)
之江学院第0届校赛 qwb与支教 (容斥公式)
摘要:description qwb同时也是是之江学院的志愿者,暑期要前往周边地区支教,为了提高小学生的数学水平。她把小学生排成一排,从左至右从1开始依次往上报数。 玩完一轮后,他发现这个游戏太简单了。于是他选了3个不同的数x,y,z;从1依次往上开始报数,遇到x的倍数、y的倍数或z的倍数就跳过。如果x= 阅读全文
posted @ 2017-06-04 15:55 渡…… 阅读(473) 评论(0) 推荐(0)
矩阵快速幂基础讲解
摘要:1.基础知识储备篇 矩阵的相关运算会再线性代数中学到。 1.1矩阵的定义:  N阶方阵(N阶矩阵):行数m与列数n相同的矩阵,如下图所示就是一个4 4的方阵: 行矩阵(行向量):只有一行的矩阵,下图就是一个行矩阵: ​ 列矩阵(列向量):只有一列的矩阵,下图就是一个列矩阵: ​ 同型矩阵:设先有矩 阅读全文
posted @ 2017-06-03 08:51 渡…… 阅读(38294) 评论(10) 推荐(69)