码迷,mamicode.com
首页 >  
搜索关键字:square    ( 2122个结果
毒害一代Java程序猿的HttpClient
前言 2016年以来,越来越多Android开发者使用Retrofit作为HTTP请求框架。原因其一,Google发布Android 6.0 SDK (API 23) 抛弃了HttpClient;其二,Square在2016.1.2发布okhttp3.0、2016.3.11正式发布Retrofit ...
分类:编程语言   时间:2016-09-02 11:48:13    阅读次数:265
POJ 1017 Packets
Packets Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 51871 Accepted: 17612 Description A factory produces products packed in square pack ...
分类:其他好文   时间:2016-09-01 18:45:13    阅读次数:193
LeetCode-Perfect Squares
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...) which sum to n. For example, given n = 12, ...
分类:其他好文   时间:2016-09-01 12:48:33    阅读次数:142
LeetCode-Maximal Square
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. For example, given the following ma ...
分类:其他好文   时间:2016-09-01 08:12:04    阅读次数:154
codeforces #369div2 B. Chris and Magic Square
题目:在网格某一处填入一个正整数,使得网格每行,每列以及两条主对角线的和都相等 分析:题目不难,找到要填的那个数填进去,然后循环比较每行每列以及对角线的和是否相等,题目提交上去卡了几次要注意几点 注意:1.答案数据范围1<=x<=1e18,要用 long long 2.特殊情况,n==1时,由于一定 ...
分类:其他好文   时间:2016-08-31 15:25:59    阅读次数:143
CodeForces 711B Chris and Magic Square (暴力,水题)
题意:给定n*n个矩阵,其中只有一个格子是0,让你填上一个数,使得所有的行列的对角线的和都相等。 析:首先n为1,就随便填,然后就是除了0这一行或者这一列,那么一定有其他的行列是完整的,所以,先把其他的算出来,然后再作差就算这个数了, 然后再去验证其他的对不对就好了。除了n为1,其他的都是唯一解应该 ...
分类:其他好文   时间:2016-08-31 00:52:20    阅读次数:187
Codeforces 711B. Chris and Magic Square
题目链接:http://codeforces.com/problemset/problem/711/B 题意: 给你一个n * n 的矩阵, 其中除了含有一个 ”0“ 以外, 都是正整数, 问你是否存在一个大于 0 的数, 使得这个数取代 ”0“ 的位置后, 这个矩阵每行, 每列, 主副对角线上的数 ...
分类:其他好文   时间:2016-08-30 09:31:01    阅读次数:298
Codeforces Round #369 (Div. 2)
题目链接: A. Bus to Udayland B. Chris and Magic Square C. Coloring Trees 分析: (做出几道说几道QAQ) A:简单模拟,把相邻OO改成++即可; B: 找magic number,找到满足每行和==每列和==两对角线和即可,只需先用两 ...
分类:其他好文   时间:2016-08-30 09:23:23    阅读次数:321
python之函数
1.创建函数def函数名(参数):函数体return值2.文档化函数defsquare(x):‘calculatethesquareofthenumber‘returnx*x给函数写文档让别人容易理解,可以加入注释(以#开头),或者直接写上文档字符串文档字符串可以按照如下方式访问:square.__doc__‘calculatethesquareofthenumb..
分类:编程语言   时间:2016-08-29 20:55:02    阅读次数:189
CodeForces 710C Magic Odd Square
构造。 先只考虑用$0$和$1$构造矩阵。 $n=1$,$\left[ 1 \right]$。 $n=3$,(在$n=1$的基础上,最外一圈依次标上$0$,$1$,$0$,$1$......) $\left[ {\begin{array}{*{20}{c}}0&1&0\\1&1&1\\0&1&0\e ...
分类:其他好文   时间:2016-08-28 11:01:10    阅读次数:181
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!