[Offer收割]编程练习赛21 register

Ended

Participants:295

Verdict:Wrong Answer
Score:0 / 100
Submitted:2017-08-06 14:29:24

Lang:Java

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.util.*;
public class Main {
    private final static class Point{
        public int x;
        public int y;
        public Point(int xint y) {
            this.x = x;
            this.y = y;
        }
        @Override
        public int hashCode() {
            return x << 16 + y;
        }
        @Override
        public boolean equals(Object p) {
            if (!(p instanceof Point)) return false;
            return (this.x == ((Point)p).x && this.y == ((Point)p).y);
        }
        public final static int distance(Point p1Point p2) {
            return Math.abs(p1.x - p2.x+ Math.abs(p1.y - p2.y);
        }
    }
    private final static boolean detected(int KPoint[] dragonPoint cur) {
        for (int i = 0i < dragon.lengthi++) {
            if (Point.distance(curdragon[i]) < Kreturn true;
        }
        return false;
    }
    private final static boolean canEscape(int Nint Mint KPoint[] dragonPoint startPoint end) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX