openjudge邮箱验证,求找错!不知道为啥wrong answer
#include <iostream>
#include <cstring>
using namespace std;
int lx(string str1,int p){
int k;
for(k=0;k<p;k++){
if(str1[k]=='/0') return 1;
}
}
int main()
{ string str;
int i,j,n,m,s,count;
while(getline(cin,str)){
count=0;
s=0;
n=str.length();
if(str[0]=='@'||str[0]=='.'||str[n-1]=='@'||str[n-1]=='.') cout<<"NO"<<endl;
else{
if(lx) {cout<<"NO"<<endl;}
else{
for(i=0;i<n;i++){if(str[i]=='@') {count=count+1; m=i;}}
if(count==1){
for(j=m;j<n;j++){if(str[j]=='.') s=s+1;}
if(s>=1&&str[m+1]!='.') cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
else cout<<"NO"<<endl;}
}
}
return 0;
}
[解决办法]
if(lx) {cout<<"NO"<<endl;}什么意思???