摘要:
分析: PPPATTTTPAT 第一个A的左边有3个P,右边有5个T,此时PAT共有15个。 第二个A的左边有4个P,右边有1个T,此时PAT共有4个。 这个字符串包含的PAT总共有19个。 总结,只要知道每个A的左边共有m个P,右边共有n个T,此时PAT的个数位即为m*n; #include<io 阅读全文
posted @ 2020-02-19 12:26
tangq123
阅读(254)
评论(0)
推荐(0)
摘要:
较水。 #include<iostream> using namespace std; int hashtable1[300] = {0},hashtable2[300]= {0}; int main() { string str1,str2; cin>>str1>>str2; for(int i 阅读全文
posted @ 2020-02-19 12:13
tangq123
阅读(155)
评论(0)
推荐(0)
摘要:
水题。 #include<iostream> using namespace std; int hashtable[111]= {0}; //成绩与人数的映射 int main() { int n,score,k; cin>>n; for(int i = 0; i < n; ++i) { scanf 阅读全文
posted @ 2020-02-19 12:11
tangq123
阅读(93)
评论(0)
推荐(0)
摘要:
水题。 #include<iostream> #include<algorithm> using namespace std; typedef long long LL; int main() { LL G1,S1,K1,G2,S2,K2; scanf("%lld.%lld.%lld %lld.%l 阅读全文
posted @ 2020-02-19 12:10
tangq123
阅读(81)
评论(0)
推荐(0)
摘要:
水题。 #include<iostream> #include<cmath> using namespace std; int main() { int n,m; char c; cin>>n>>c; m = round(n/2.0)-2;//行数 for(int i =0; i< n; ++i)/ 阅读全文
posted @ 2020-02-19 12:09
tangq123
阅读(118)
评论(0)
推荐(0)

浙公网安备 33010602011771号