@@ -0,0 +1,1684 @@
+package com.huawei.unsuccessed;%0A%0Aimport java.util.Scanner;%0A%0A/**%0A * Created by Yogurt on 16/7/3.%0A */%0Apublic class %E7%AC%94%E7%94%BB %7B%0A    private static int%5B%5D%5B%5D data,tmp;%0A    private static int n,step,startX,startY;%0A    private static boolean succeed;%0A    public static void main(String%5B%5D args)%7B%0A        Scanner sc=new Scanner(System.in);%0A        n=sc.nextInt();%0A        data=new int%5Bn%5D%5Bn%5D;%0A        tmp=new int%5Bn%5D%5Bn%5D;%0A        for(int i=0;i%3Cn;i++)%0A            for(int j=0;j%3Cn;j++)%0A                data%5Bi%5D%5Bj%5D=0;%0A        for(int i=0;i%3Cn;i++)%7B%0A            int a=sc.nextInt()-1;%0A            int b=sc.nextInt()-1;%0A            data%5Ba%5D%5Bb%5D=1;%0A            data%5Bb%5D%5Ba%5D=1;%0A        %7D%0A        for(int i=0;i%3Cn;i++)%7B%0A            int sum=0;%0A            for(int j=0;j%3Cn;j++)%0A                sum+=data%5Bi%5D%5Bj%5D;%0A            if (sum%252!=0) %7B%0A                System.out.println(%22false%22);%0A                return;%0A            %7D%0A        %7D%0A        for(int i=0;i%3Cn&&!succeed;i++)%7B%0A                succeed=false;%0A                step=0;%0A                startX=i;%0A%0A                for(int a=0;a%3Cn;a++)%0A                    for(int b=0;b%3Cn;b++)%0A                        tmp%5Ba%5D%5Bb%5D=data%5Ba%5D%5Bb%5D;%0A%0A                dfs(i);%0A        %7D%0A        if (succeed) System.out.println(%22true%22);%0A        else System.out.println(%22false%22);%0A    %7D%0A%0A    private static void dfs(int x) %7B%0A        if (succeed) return;%0A        if(step%3En&&x==startX)%7B%0A            succeed=true;%0A            return;%0A        %7D%0A        for(int i=0;i%3Cn;i++) %7B%0A            if (tmp%5Bx%5D%5Bi%5D == 1) %7B%0A                step++;%0A                tmp%5Bx%5D%5Bi%5D=tmp%5Bi%5D%5Bx%5D=0;%0A                dfs(i);%0A                tmp%5Bx%5D%5Bi%5D=1;%0A                tmp%5Bi%5D%5Bx%5D=1;%0A            %7D%0A        %7D%0A        return;%0A    %7D%0A%7D%0A

edit 笔画.java