PAT 1093. Count PAT's
来源:互联网 发布:blued同志软件下载 编辑:程序博客网 时间:2024/05/20 02:52
CODE:
#include<cstdio>#include<cstring>#define LL long longusing namespace std;const int MOD=1000000007;const int N=1e5;char s[N+5];int main(){ while(scanf("%s",s)==1) { LL p=0; LL pa=0; LL pat=0; int len=strlen(s); for(int i=0;i<len;i++) { if(s[i]=='P') { p++; } if(s[i]=='A') { pa=pa+p; } if(s[i]=='T') { pat=pat+pa; } } printf("%d\n",pat%MOD); } return 0;}
0 0
- PAT 1093. Count PAT's
- PAT 1093. Count PAT's
- PAT 1093. Count PAT's
- 【PAT】1093. Count PAT's
- 1093.Count PAT's
- 1093. Count PAT's
- 1093. Count PAT's
- 1093. Count PAT's
- 1093. Count PAT's
- 1093. Count PAT's
- PAT 1093. Count PAT's (25)
- PAT A 1093. Count PAT's (25)
- pat 1093. Count PAT's (25)
- PAT 1093. Count PAT's (25)
- 【PAT】1093. Count PAT's (25)
- pat 1093. Count PAT's (25)
- PAT 1093. Count PAT's (25)
- PAT-A 1093. Count PAT's
- Sourceinsight显示完整路径
- iOS-CoreLocation:无论你在哪里,我都要找到你!
- 安卓使用教程:(八门神器)破解游戏内购方法及原理
- HTML5DevelopAPP
- Android 开发最佳实践
- PAT 1093. Count PAT's
- WIN7开机提示BOOT\BCD错误是怎么回事,怎么修复?
- Android自定义进度框
- CAN通讯的总结
- 自动生成bean层dao层以及xml层工具
- GitHub和sourceTree使用入门
- Java串口开发 进制转换
- POJ 3984 迷宫问题 DFS
- 你不知道的21个Qt隐藏功能和技巧