fork download
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4.  
  5. int main(){
  6. int n;
  7. cin >> n;
  8. cin.ignore();
  9. while(n--){
  10. string l[4],s[4]={};
  11. for(int i=0;i<4;i++){
  12. getline(cin,l[i]);
  13. transform(l[i].begin(),l[i].end(),l[i].begin(),tolower);
  14. int j=l[i].length();
  15. do{
  16. j--;
  17. s[i]+=l[i][j];
  18. } while(j>0&&l[i][j]!=' '&&l[i][j]!='a'&&l[i][j]!='e'&&l[i][j]!='i'&&l[i][j]!='o'&&l[i][j]!='u');
  19. }
  20. if(s[0]==s[1]&&s[2]==s[3]){
  21. if(s[1]==s[2]) cout << "perfect\n";
  22. else cout << "even\n";
  23. }
  24. else if(s[0]==s[2]&&s[1]==s[3]) cout << "cross\n";
  25. else if(s[0]==s[3]&&s[1]==s[2]) cout << "shell\n";
  26. else cout << "free\n";
  27. }
  28. return 0;
  29. }
Compilation error #stdin compilation error #stdout 0s 3436KB
stdin
2
It seems thouGh
that without some dough
creating such a bash
is a weighty in terms of cash
But how I see
the problem so fair
is to write subtle verse
with hardly a rhyme
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:13:58: error: no matching function for call to ‘transform(std::basic_string<char>::iterator, std::basic_string<char>::iterator, std::basic_string<char>::iterator, <unresolved overloaded function type>)’
    transform(l[i].begin(),l[i].end(),l[i].begin(),tolower);
                                                          ^
prog.cpp:13:58: note: candidates are:
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:2:
/usr/include/c++/4.8/bits/stl_algo.h:4938:5: note: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
     transform(_InputIterator __first, _InputIterator __last,
     ^
/usr/include/c++/4.8/bits/stl_algo.h:4938:5: note:   template argument deduction/substitution failed:
prog.cpp:13:58: note:   couldn't deduce template parameter ‘_UnaryOperation’
    transform(l[i].begin(),l[i].end(),l[i].begin(),tolower);
                                                          ^
In file included from /usr/include/c++/4.8/algorithm:62:0,
                 from prog.cpp:2:
/usr/include/c++/4.8/bits/stl_algo.h:4975:5: note: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
     transform(_InputIterator1 __first1, _InputIterator1 __last1,
     ^
/usr/include/c++/4.8/bits/stl_algo.h:4975:5: note:   template argument deduction/substitution failed:
prog.cpp:13:58: note:   candidate expects 5 arguments, 4 provided
    transform(l[i].begin(),l[i].end(),l[i].begin(),tolower);
                                                          ^
stdout
Standard output is empty