[1624] 死胡同 时间限制: 1000 ms 内存限制: 65535 K 问题描述 一个死胡同由排成一列的 n 个格子组成,编号从 1 到 n .实验室的“猪猪”一开始在1号格子,开始向前走,每步一格,并且每走 k 步会在当前的格子上打上记号(开始时,1号格子也有记号).由于这是死胡同,每当“猪猪”走到最左或者最右的格子时,它会改变方向.好奇的“猪猪”在想:如果我一直走,能否把所有格子都打上记号呢? 聪明的你一定知道答案! Hint1:如果 n=6,k=2,位置变化为:1 -> 3 ->…
343. Integer Break Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get. For example, given n = 2, return 1 (2 = 1 + 1); given n = 10, r…
EBCDIC Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 160 Accepted Submission(s): 81 Problem Description A mad scientist found an ancient message from an obsolete IBN System/360 mainframe.…
A------------------------------------------------------------------------------------ 题目链接:http://202.197.224.59/OnlineJudge2/index.php/problem/read/id/1260 题解:随机 n 个数把矩阵补全成 n × n 的.那么就是要算伴随矩阵的第一行,也就是逆矩阵的第一列,高斯消元即可. 源码:(Q神写的高斯消元,先贴一下诶,待补) #include<cs…
Grade Time Limit: 3000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 109 Accepted Submission(s): 63 Problem Description Ted is a employee of Always Cook Mushroom (ACM). His boss Matt gives him a pack of m…