智能手机屏幕解锁图案研究
2012-11-27 18:21
459 查看
1 2 3
4 5 6
7 8 9
智能手机屏幕上的9个点依次记为1~9
4 5 6
7 8 9
智能手机屏幕上的9个点依次记为1~9
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.Net.Sockets; using System.Threading; namespace Test { class Program { static private int[] One = new int[] { 2, 4, 5, 6, 8 }; static private int[] Two = new int[] { 1, 3, 4, 5, 6, 7, 9 }; static private int[] Three = new int[] { 2, 4, 5, 6, 8 }; static private int[] Four = new int[] { 1, 2, 3, 5, 7, 8, 9 }; static private int[] Five = new int[] { 1, 2, 3, 4, 6, 7, 8, 9 }; static private int[] Six = new int[] { 1, 2, 3, 5, 7, 8, 9 }; static private int[] Seven = new int[] { 2, 4, 5, 6, 8 }; static private int[] Eight = new int[] { 1, 3, 4, 5, 6, 7, 9 }; static private int[] Nine = new int[] { 2, 4, 5, 6, 8 }; static private int[] Count = new int[9]; static void Main(string[] args) { int[] buf = new int[9]; int sum = 0; for (int i = 1; i <= 9; ++i) PushNum(buf, 0, i); for (int i = 3; i < 9; ++i) { sum += Count[i]; Console.WriteLine("{0}={1}", i + 1, Count[i]); } Console.WriteLine("Sum:{0}", sum); Console.ReadLine(); } static void PushNum(int[] buf, int index, int num) { if (index >= buf.Length) return; for (int i = 0; i < index; ++i) if (buf[i] == num) return; buf[index] = num; if (index >= 3) { Count[index] += 1; for (int i = 0; i < index; ++i) Console.Write("{0} ", buf[i]); Console.WriteLine(); } foreach (int v in GetNeighbor(num)) PushNum(buf, index + 1, v); } static int[] GetNeighbor(int value) { switch (value) { case 1: return One; case 2: return Two; case 3: return Three; case 4: return Four; case 5: return Five; case 6: return Six; case 7: return Seven; case 8: return Eight; case 9: return Nine; default: return null; } } } }
相关文章推荐
- 由Android系统智能手机解锁图案引出的排列组合问题
- 智能手机总共有多少种解锁图案(c++版本)
- 菜鸟晋级必修 智能手机越狱/解锁/刷机完全教程
- 手机的九宫格图案解锁总共能绘出多少种图案?(hiho模拟面试题2 - google在线技术笔试模拟)
- 拓墣研究:预测2011年智能手机出货量将超4亿部
- 主流智能手机屏幕材质介绍 及 LCD闪屏现象分析
- Android系统亮屏、锁屏、屏幕解锁事件(解决部分手机亮屏后未解锁即进入resume状态)
- 用C语言计算手机的九宫格图案解锁总共能绘出多少种图案
- 2016年中国智能手机市场发展趋势研究
- 还在使用图案解锁手机?来看看Dragon ID语音解锁吧
- 2011年中国Android智能手机用户调查研究报告
- Android之高仿手机QQ图案解锁
- HTC欲整合全球智能手机资源致力于社会研究
- HTML5实现手机屏幕解锁功能
- 检测手机屏幕是否亮屏解锁
- 智能手机屏幕尺寸和分辨率一览表
- 诺基亚智能手机E60精彩屏幕截图
- 智能手机尺寸与屏幕尺寸最佳公式:Y=0.7881X-14.902
- Android屏幕解锁图案破解
- CAGradientLayer(颜色渐变) -- 实现iphone手机屏幕“滑动来解锁”动画效果