RT,在某篇题解里面看见使用find函数为查找成功是会返回1844674407370955161的,但是我使用如下的代码来侦测是否未查询到目标却依然成功,请问其中的机制是什么呢?
#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
int main()
{
string s = "1145149191810", h;
while(1)
{
cin >> h;
long long x = s.find(h);
if(x == -1)
{
cout << "Not found" << endl;
}
else
cout << x << endl;
}
}