上一页 1 ··· 7 8 9 10 11
摘要: 代码 #include <iostream>#include <cstdio>#include <map>#include <string>using namespace std;​​int main(){​ map<char,int> mp; map<char,int>::iterator max 阅读全文
posted @ 2022-07-08 20:18 qwasdasd 阅读(27) 评论(0) 推荐(0)
摘要: 关键 PAT的个数就是A左边P的个数乘以右边T的个数 时间复杂度必须为o(n) 思路 从头开始向后遍历字符串。 如果是’P',A左边的p的count++; 如果是‘A',cnt+=A左边的p的count*(t的count-A左边的t的count); 如果是’T‘,A左边的t的count++ 代码 # 阅读全文
posted @ 2022-07-08 19:20 qwasdasd 阅读(63) 评论(0) 推荐(0)
摘要: 代码 #include <iostream>#include <cstdio>#include <set>#include <string>using namespace std;​​int main(){ string s,s2; int l1,l2; int cnt=0; multiset<ch 阅读全文
posted @ 2022-07-08 17:32 qwasdasd 阅读(67) 评论(0) 推荐(0)
摘要: 关掉360 阅读全文
posted @ 2022-07-08 16:08 qwasdasd 阅读(570) 评论(0) 推荐(0)
摘要: 水题 代码 #include <iostream>#include <cstdio>using namespace std;​int a[102];int main(){ for(int i=0;i<101;i++){ a[i]=0; } long n,k; int m,j; cin>>n; for 阅读全文
posted @ 2022-07-08 16:07 qwasdasd 阅读(157) 评论(0) 推荐(0)
摘要: 注意点 输入为几个数字夹杂着字符时,要从中取出几个数字作为真正的输入 int、long、long long的取值范围与选择 问题 scanf和cout不能混用 long long情况下,在scanf里,不是%d,而是%lld 代码 #include <iostream>#include <cstdi 阅读全文
posted @ 2022-07-08 15:55 qwasdasd 阅读(22) 评论(0) 推荐(0)
摘要: 代码 #include <cstdio>#include <iostream>using namespace std;​int main(){ int n; int m; char c; cin>>n>>c; for(int i=0;i<n;i++){ cout<<c; } cout<<endl; 阅读全文
posted @ 2022-07-08 14:38 qwasdasd 阅读(122) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11