Yesterday my colleague asked me for help...She has two android phones , one is hTC and the other is samsung. One day she changed the pattern lock and later she forgot...she tried all possible combination but in vain.. I check her phones and find them…
Valid Pattern Lock Time Limit: 2 Seconds      Memory Limit: 65536 KB Pattern lock security is generally used in Android handsets instead of a password. The pattern lock can be set by joining points on a 3 × 3 matrix in a chosen order. The points of t…
3861 - Valid Pattern Lock Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3861 Description Pattern lock security is generally used in Android handsets instead of a password. The pattern lock can b…
Description Pattern lock security is generally used in Android handsets instead of a password. The pattern lock can be set by joining points on a 3 × 3 matrix in a chosen order. The points of the matrix are registered in a numbered order starting wit…
题目传送门 /* 题意:手机划屏解锁,一笔连通所有数字,输出所有可能的路径: DFS:全排列 + ok () 判断函数,去除一些不可能连通的点:) */ #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <string> #include <map> #include <cmath> #include…
Yesterday she came to me with a Sony Xperia Z2 D6503. Guess what? She forgot the pattern so she could not unlock her phone.You guys could take a look at her phone as below: I installed Sony Companion and connected it to my workstation. All she want w…
1 2 3 4 5 6 7 8 9 只有中间没有其他键的两个键才能相连,比如1可以连 2 4 5 6 8 但不能连 3 7 9 但是如果中间键被使用了,那就可以连,比如5已经被使用了,那1就可以连9 每个键只能用一次,给定一个长度L,求问有多少unique path with length L Backtracking: 我的code不光可以知道数目,还可以打印所有Pattern package AndroidUnlockPattern; import java.util.*; public c…
Pattern类:      Pattern的创建:      Pattern pattern =Pattern.complie(String regex)     参数说明:regex:是一个正则表达式的字符串,(也是需要过滤或寻找字符串的正则表达式) pattern():     String regex=pattern.pattern();    方法说明:返回pattern实例对应的正则表达式(创建的时候传入的参数:regex): split():    String[] stringA…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3861 这道题当时没做出来,后来经过队友提醒才做出来. 3*3的九宫格,给你其中n个点按下面要求连起来: 1. 给你的n个点都要激活(至少经过一次) 2. 如果点A,B相连后要经过另一个点C,则C在序列中的位置必须在A,B之前 如 1 7 4是不合法的 3.线段相交是没关系的,如 7 6 9 4 我是直接生成n个数的全排列,然后在所有排列里面去掉不合法的. #include…
这道题目是队友写的,貌似是用暴力枚举出来. 题意:给出一组数,要求这组数在解锁的界面可能的滑动序列. 思路:按照是否能够直接到达建图,如1可以直接到2,但是1不能直接到3,因为中间必须经过一个2. 要注意的假如2已结访问过,那么1就可以直接到2. 建图DFS,图要更新. Source Code: #include <stdio.h> #include <string.h> ], ans[], n, vis[], k, fun[][]; ][] = { {}, {,,,,,,,,,}…