Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

请问哪里错啦?

Posted by summery at 2006-05-07 14:44:57 on Problem 1936
#include<iostream>
#include<string>
using namespace std;
bool isAllinAll(string s,string t)
{ 
  if(s==t) return false;  
  intj =0;  
  for(int i =0; i<s.length(); i++)
  {
    
    j=t.find(s[i],j) ;
    if(j==-1)  return false;      
  }         
  return true;   
}
int main()
{
    string s,t;
   while(cin>>s>>t)
    {
     if(isAllinAll(s,t)) cout<<"YES"<<endl;
     else cout<<"NO"<<endl;               
    }  
}

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator