Submission #2406210


Source Code Expand

#include <iostream>
 int main() {
   std::string A, B, C;
   std::cin >> A >> B >> C;
   if (A.back == B.front && B.back == C.front) {
     std::cout << "YES" <<std::endl;
   } else {
     std::cout << "NO" <<std::endl;
   }
   
   
   return 0;
   
   
 }

Submission Info

Submission Time
Task A - Shiritori
User fazerog02
Language C++14 (GCC 5.4.1)
Score 0
Code Size 270 Byte
Status CE

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:5:20: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘<unresolved overloaded function type>’ to binary ‘operator==’
    if (A.back == B.front && B.back == C.front) {
                    ^
./Main.cpp:5:41: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘<unresolved overloaded function type>’ to binary ‘operator==’
    if (A.back == B.front && B.back == C.front) {
                                         ^