2019icpc徐州网络赛
A Who is better? 题意 excrt+斐波那契博弈 分析 Java的BigInteger对象默认为null,不能直接比较。 代码 import java.math.BigInteger; import java.util.Scanner; public class Main { static int n; static BigInteger[] a=new BigInteger[25]; static BigInteger[] b=new BigInteger[25]; static BigInteger INF=BigInteger.valueOf((long)1e15); static BigInteger[] fib=new BigInteger[110]; static int cnt=0; static void init(){ fib[1]=BigInteger.ONE; fib[2]=BigInteger.ONE; cnt=2; for(int i=3;i<110;i++){ fib[i]=fib[i-1].add(fib[i-2]); if(fib[i].compareTo(INF)>0){ break; } cnt++; } } static boolean check(BigInteger t){ for(int i=1;i<=cnt;i++){