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