摘要:
A. Generous Kefa One day Kefa found n baloons. For convenience, we denote color of i-th baloon as si — lowercase letter of the Latin alphabet. Also Ke 阅读全文
摘要:
暴力水过 #include<bits/stdc++.h> using namespace std; const int maxn = 1e3+10; int s[maxn]; bool b_s(int l,int r,int t) { int ans = -1; while (l <= r) { i 阅读全文
摘要:
给出2个数M和N(M < N),且M与N互质,找出一个数K满足0 < K < N且K * M % N = 1,如果有多个满足条件的,输出最小的。 Input 输入2个数M, N中间用空格分隔(1 <= M < N <= 10^9) Output 输出一个数K,满足0 < K < N且K * M % 阅读全文