摘要:
CF的专业题解 :The problem was to find greatest d, such that ai ≥ d, ai mod d ≤ k holds for each i.Let m = min(ai), then d ≤ m. Let consider two cases:. In this case we will brute force answer from k + 1 to m. We can check, if number d is a correct answer in the following way:We have to check that ai mod. 阅读全文
摘要:
1355其实就是求质因子的个数 这样肯定是最多的 注意一下 除到最后不是1的情况 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 #define N 32000 9 int p[N],g,f[N];10 void init()11 {12 int i,j;13 f[0] = 1;14 f[1] = 1;15 for(i = 2; i >t;28 while(t--)29 {30 cin>>n>>m... 阅读全文