码迷,mamicode.com
首页 >  
搜索关键字:magic squares    ( 1700个结果
欧拉工程第68题:Magic 5-gon ring
题目链接 任意一条线上的三个数的和都等于9,顺时针,从最小的外圈开始,得到的序列是:432621213 和 序列 9位的字符串;三角环所能形成的最大字符串为432621513。 使用数字1到10,通过不同的安排,可以得到16位或17位的字符串。五角环所能形成的最大的16位的字符串是什么? 16位的字...
分类:其他好文   时间:2015-09-20 17:46:45    阅读次数:331
poj 1753 Flip Game
DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and ...
分类:其他好文   时间:2015-09-20 16:08:46    阅读次数:164
LeetCode -- Perfect Squares
LeetCode -- Perfect Squares...
分类:其他好文   时间:2015-09-19 16:53:56    阅读次数:103
Magic Pairs - SGU 119(同余)
题目大意:如果A0*X + B0*Y能够整除 N,求出来多有少A*X+B*Y 也能够整除去N,求出所有的A,B(0 (K * A0) % N = A, (K * B0) % N = B, (k=[0....N))。ps.记得排序去重复......代码如下:======================...
分类:其他好文   时间:2015-09-18 13:28:56    阅读次数:191
[CareerCup] 9.3 Magic Index 魔法序号
9.3 A magic index in an array A[0.. .n-1] is defined to be an index such that A[i] = i. Given a sorted array of distinct integers, write a method to f...
分类:其他好文   时间:2015-09-18 11:50:05    阅读次数:125
UVA-12113 Overlapping Squares (回溯+暴力)
题目大意:问能不能用不超过6张2x2的方纸在4x4的方格中摆出给定的图形?题目分析:暴力枚举出P(9,6)种(最坏情况)方案即可。代码如下:# include# include# include# includeusing namespace std;int vis[10];char mp[8][1...
分类:移动开发   时间:2015-09-17 23:08:24    阅读次数:332
磁盘,分区及系统引导
1 Master Boot Record1.1 boot code 默认的bootcode实现: 扫描分区表(DPT)查找活动分区 加载活动分区的PBR 执行PBR1.2 Disk Partition Table1.3 Magic Number0x1FE 0X1FF2 Partiti...
分类:其他好文   时间:2015-09-17 16:49:58    阅读次数:138
Magic of David Copperfield II(奇偶性)
题目大意:这是一个魔术游戏,首先把你的手指放在一个左上角的格子里面,然后魔术师说你可以移动K1步,移动完之后,他会删除一些方格,并且说,你肯定不在这里,删除的方格不可以再去了,然后让你再走K2步,继续删除一些格子,直到就剩下一个格子为止,魔术师就可以说抓住你了,输出每个Ki和删除的格子。分析:比较明...
分类:其他好文   时间:2015-09-16 12:44:14    阅读次数:212
poj 1753 Flip Game(bfs状态压缩 或 dfs枚举)
DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and ...
分类:其他好文   时间:2015-09-15 21:36:04    阅读次数:205
LeetCode "Perfect Squares"
An intuitive DP.class Solution {public: int numSquares(int n) { vector dp(n + 1, INT_MAX); dp[0] = 0; for(int i = 0; i...
分类:其他好文   时间:2015-09-12 09:33:31    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!