ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1102. Strange Dialog

whz i ve got wa1 at pc passes all tests
Posted by LiSu 3 Jun 2013 15:27
#include<iostream.h>
#include<string.h>
using namespace std;
int main()
{
    int number;
    cin>>number;
    string s;
    int i=0;
    for(;i<number;i++)
    {
       cin>>s;
       std::size_t find=s.find("puton");
       std::size_t find1=s.find("one");
       if((find != std::string::npos)||(find1 != std::string::npos))
       cout<<"YES\n";
       else
       cout<<"NO";
       s.clear();
    }
    //system("pause");
    return 0;
}
Re: whz i ve got wa1 at pc passes all tests
Posted by GastonFontenla 31 Jul 2015 18:53
Obviously you aren't testing all the words. You has to consider if the input string contains a substring that isn't (one/output/out/in/input/puton).
Re: whz i ve got wa1 at pc passes all tests
Posted by Whyyes 21 Aug 2016 03:15
I'll just add that test #1 for this problem is a pretty serious test that requires complete correctness, not just the samples to pass (unlike in other problems).