acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • 题解

    #include<bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while(t--) { int m; cin >> m >> m; string a,b; cin >> a >> b; int cnt=-1; for(int i=0; i<=m/2+1;i++){ if(a.find(b)!=-1) { cnt = i; break; }else{ a=a+a; } } cout << cnt << endl; } }

    userId_undefined

    对方正在输入...

    倔强青铜
    54阅读
    0回复
    3点赞
  • 题解

    userId_undefined

    ssssssssssssssss

    倔强青铜
    29阅读
    0回复
    1点赞
首页