|
|
вернуться в форумwhz i ve got wa1 at pc passes all tests Послано LiSu 3 июн 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 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 Послано Whyyes 21 авг 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). |
|
|