【悬赏2关注】SPJ判断子串求调
  • 板块学术版
  • 楼主_hyy_
  • 当前回复9
  • 已保存回复9
  • 发布时间2023/1/29 12:15
  • 上次更新2023/10/24 02:43:11
查看原帖
【悬赏2关注】SPJ判断子串求调
710739
_hyy_楼主2023/1/29 12:15

RT,答案为 super,输出内容中只要含有子串 super 就正确。

#include "testlib.h"

int main(int argc, char* argv[]) {
    registerTestlibCmd(argc,argv);
    string pans=ouf.readString();
    string jans=ans.readString();
	if(pans.find(jans)!=pans.npos) quitf(_ok, "The answer is correct.");
    else quitf(_wa, "The answer is wrong.");
}
2023/1/29 12:15
加载中...