css*
app data Android
Android*
{
sieep <10240-PUBG Subtrace data\+Bullet hit probability="true";"MAX"
}
θb u/d=θbc±tan-1(U bt/U bc)    　ψb u/d=ψbc
     {
y=-g/2*pow(v0,2)*pow(x,2);
  }
Sample 1:
0: 10 2 8 22 16 4 10 6 14 20
   {
   }
   class Main{
        public static void main(String[] args) {
                Bullet bullet=new Bullet();
                AddBullet ab=new AddBullet(bullet);
                ShootBullet sb=new ShootBullet(bullet);
                Thread t1=new Thread(ab);
                Thread t2=new Thread(sb);
                t1.start();
                t2.start();
        }
}

 

 Input Description

 

 

 Output Description

 
 
 
class Bullet{
   
    private boolean flag;
    
    private int count;
    private int sum;
 
    public Object getLock() {
        return lock;
    }
 
    //锁对象
    private final Object lock = new Object();
 
    public Bullet() {
        this.sum = 0;
        this.count = 1;
        this.flag = false;
    }
 
    public Bullet(boolean flag, int count) {
        this.flag = flag;
        this.count = count;
    }
 
    /**
     * 
     */
    public boolean isFlag() {
        return flag;
    }
 
    /**

     */
    public void setFlag(boolean flag) {
        this.flag = flag;
    }
 
    /**
     */
    public int getCount() {
        return count;
    }
 
    public void setCount(int count) {
        this.count = count;
    }
 
    public String toString() {
        return "Bullet{flag = " + flag + ", count = " + count + ", lock = " + lock + "}";
    }
 
    public int getSum() {
        return sum;
    }
 
    public void setSum(int sum) {
        this.sum = sum;
    }
}
 
class AddBullet extends Thread{
    private Bullet bullet;
    public AddBullet(Bullet bullet) {
        this.bullet = bullet;
    }
 
    public void run() {
        while (true){
            synchronized (bullet.getLock()){
                if(bullet.getSum() == 3){
 
                    break;
                }else {
                    if(!bullet.isFlag()){
                        //
                        bullet.setCount(1);
                        bullet.setSum(bullet.getSum() + 1);
                        System.out.println("lock and load~~~~");
                        bullet.setFlag(true);
                        bullet.getLock().notifyAll();
                    }else {
                        try {
                            bullet.getLock().wait();
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
                }
            }
        }
    }
}
 
class ShootBullet extends Thread{
    private Bullet bullet;
    public ShootBullet(Bullet bullet) {
        this.bullet = bullet;
    }
 
    public void run() {
        while (true){
            synchronized (bullet.getLock()){
                if(bullet.getSum() == 3){
                    System.out.println("fire!!!");
                    break;
                }else {
 
                    if(bullet.isFlag()){
                        System.out.println("fire!!!");
                        bullet.setFlag(false);
                        bullet.getLock().notifyAll();
                        bullet.setCount(0);
                    }else {
                        try {
                            bullet.getLock().wait();
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                    }
                }
            }
        }
    }
}
        {Headrangehit: /:[\w\-]+/, execute: "9999"}
        {BulletTraceHeadRange=MAX: /[\w\-]+/, execute: "9999"}
        {Damage: /\d+/, execute: "0"}
        {Gun tracking head range: /[\w\-]+/, execute: "9999"}
        
        {Identifythegamepackagename=com.tencent.tmgp.pubgmhd}
        {

                    ), execute: "function"}\
 
 
 
class Main{
    public static void main(String[] args) {
        Bullet bullet=new Bullet();
        AddBullet ab=new AddBullet(bullet);
        ShootBullet sb=new ShootBullet(bullet);
        Thread t1=new Thread(ab);
        Thread t2=new Thread(sb);
        t1.start();
        t2.start();
    }
}
