- 接龙游戏
泰裤辣
- 2023-8-8 14:57:57 @
#include<bits/stdc++.h> using namespace std; int main(){ string c; int he=0; int m; int n; cin>>n>>m; string o; cin>>o; int y=o.size(); for(int i=0;i<m;i++){ cin>>c; for(int P=0;P<y-2;P++){ if(c[0]==o[P]&&c[1]==o[P+1]&&c[2]==o[P+2]){ he++; } } if(c[0]==o[y-2]&&c[1]==o[y-1]&&c[2]==o[0]){ he++; } else if(c[0]==o[y-1]&&c[1]==o[0]&&c[2]==o[1]){ he++; } } cout<<he; return 0; }😕
0 条评论
目前还没有评论...
信息
- ID
- 990
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 4
- 标签
- 递交数
- 36
- 已通过
- 13
- 上传者