摘要:
# 循环同构 如果字符串$S$选择一个位置$i$满足 $$ S[i...n]+S[1...i-1] = T $$ 则称$S$与$T$循环同构 # 最小表示 字符串$S$的最小表示为所有与$S$循环同构中字典序最小的 # 最小表示法 对于一对字符串$A,B$,他们在原串中的起始位置分别为$i,j$,且 阅读全文
摘要:
# A - Order Something Else ```cpp #include using namespace std; #define int long long int32_t main() { ios::sync_with_stdio(false), cin.tie(nullptr), 阅读全文
摘要:
# A. Vika and Her Friends 枚举所有的点,判断是否存在点与Vika的距离和其他 k 个人的距离的奇偶性不同。 ```cpp #include using namespace std; #define int long long const int mod = 99824435 阅读全文
摘要:
# A. Telephone Number 找到第一个 8 ```cpp #include using namespace std; #define int long long const int mod = 998244353; #define mp make_pair void solve() 阅读全文
摘要:
# A - Filter ```cpp #include using namespace std; #define int long long int32_t main() { ios::sync_with_stdio(false) , cin.tie(nullptr) , cout.tie(nul 阅读全文
摘要:
# RC-v1 您好呀 ```python print("Nin Hao Ya ~") ``` # RC-v2 爷爷奶奶您好呀 ```cpp #include using namespace std; #define int long long int32_t main() { ios::sync_ 阅读全文
摘要:
# A. Curriculum Vitae 因为`1`之后不能出现`0`,所以求一下前缀`0`的个数和后缀`1`的个数,然后枚举第一个`1`的位置即可 ```cpp #include using namespace std; #define int long long int32_t main() 阅读全文
摘要:
# A. Subtraction Game 答案就是`a+b`此时后手必胜因为无论怎么操作后手都可保证自己取的时候一次全部取完 ```cpp #include using namespace std; void solve(){ int a , b; cin >> a >> b; cout > t; 阅读全文
摘要:
# RC-u1 不要浪费金币 ```cpp #include using namespace std; int main() { ios::sync_with_stdio(false) , cin.tie(nullptr) , cout.tie(nullptr); int n , m , res = 阅读全文
摘要:
# A. Treasure Hunt ```cpp #include using namespace std; int read() { int x = 0, f = 1, ch = getchar(); while ((ch '9') && ch != '-') ch = getchar(); i 阅读全文