
字符串
霍雨浩——舞麟
这个作者很懒,什么都没留下…
展开
-
nozomi和字符串
题目链接:https://ac.nowcoder.com/acm/contest/3002/H 显然操作要么全1变0,要么全0变1。 尺取法: #include<bits/stdc++.h> using namespace std; #define ll long long const int maxn=2e5+5; char q[maxn]; int main() { i...原创 2020-04-13 18:47:56 · 113 阅读 · 0 评论 -
eli和字符串
题目链接:https://ac.nowcoder.com/acm/contest/3002/G 思路: 第一维为26个字母,第二维度为该字符出现的次数,a[a~z][N]的值为该字符第N次出现的位置。后枚举作差取最小。 #include<bits/stdc++.h> using namespace std; #define ll long long const int maxn=2...原创 2020-04-13 18:10:00 · 179 阅读 · 0 评论 -
反转字符串——蓝桥杯填空
描述 我们把字符串 “cba” 称作字符串 “abc” 的反转串。 川草写了一个函数能够实现字符串 buf 的反转。其中 n 代表buf中待反转的字符串的长度。 你能猜猜川草写了什么? 请填写划线部分缺少的代码。 注意:本题请提交补全以后的所有代码(包括头文件) [C] #include <stdio.h> #include <string.h> #include <...原创 2020-03-28 08:50:04 · 230 阅读 · 0 评论