上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页
2023年10月11日
摘要: 点击查看代码 message='"Hellw world"' # 大小写转化 print(message.title()) print(message.lower()) print(message.upper()) first_name = "ruo" second_name = "ye" # f字 阅读全文
posted @ 2023-10-11 15:11 ruoye123456 阅读(9) 评论(0) 推荐(0)
2023年10月7日
摘要: 传送 点击查看代码 #include<bits/stdc++.h> using namespace std; char s[131080]; int _solve(int L,int R,char x) { if(L==R) return s[L]!=x; int M=L+(R-L)/2; int 阅读全文
posted @ 2023-10-07 14:35 ruoye123456 阅读(8) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; int n,m; long long f[10][1024][100]; int v[1024]; void init() { for(int i=1;i<1<<n;++i) { int c=0; 阅读全文
posted @ 2023-10-07 11:03 ruoye123456 阅读(24) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=7e4,p=1e9+7; int f[N],c[100]; int nxt(int x) { int t=(x|(x-1))+1; int y=t|((t&-t)/(x&- 阅读全文
posted @ 2023-10-07 10:29 ruoye123456 阅读(18) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; const int N=7e4,p=1e9+7; int f[N]; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; ci 阅读全文
posted @ 2023-10-07 10:08 ruoye123456 阅读(44) 评论(0) 推荐(0)
摘要: 点击查看代码 #include<bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin>>n; vector<int> a(n); int res=0; 阅读全文
posted @ 2023-10-07 09:56 ruoye123456 阅读(10) 评论(0) 推荐(0)
2023年10月6日
摘要: 传送 点击查看代码 #include<bits/stdc++.h> using namespace std; typedef long long ll; int a[100010]; int n,A,R,M; ll f(int x) { ll y=0,z=0;//y表示需要增加的次数,z表示需要减少 阅读全文
posted @ 2023-10-06 18:25 ruoye123456 阅读(57) 评论(0) 推荐(0)
2023年9月22日
摘要: 【深基13.例1】查找 题目描述 输入 \(n\) 个不超过 \(10^9\) 的单调不减的(就是后面的数字不小于前面的数字)非负整数 \(a_1,a_2,\dots,a_{n}\),然后进行 \(m\) 次询问。对于每次询问,给出一个整数 \(q\),要求输出这个数字在序列中第一次出现的编号,如果 阅读全文
posted @ 2023-09-22 16:10 ruoye123456 阅读(104) 评论(0) 推荐(0)
2023年9月20日
摘要: 有 n 个线性序列,第 i 个序列可以表示成 ki×x+bi 的形式 (x=0,1,2,... )。 请问将这些序列中的数按从小到大的顺序合并起来,前 m 个数分别是多少(重复出现的数合并后也会出现多次)? 输入格式 第一行一个整数 n 。 接下来 n 行每行两个整数 ki,bi 。 最后一行一个整 阅读全文
posted @ 2023-09-20 15:42 ruoye123456 阅读(83) 评论(0) 推荐(0)
2023年9月17日
摘要: 【模板】manacher 算法 题目描述 给出一个只由小写英文字符 \(\texttt a,\texttt b,\texttt c,\ldots\texttt y,\texttt z\) 组成的字符串 \(S\) ,求 \(S\) 中最长回文串的长度 。 字符串长度为 \(n\)。 输入格式 一行小 阅读全文
posted @ 2023-09-17 22:48 ruoye123456 阅读(22) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 19 下一页