criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  char s[50], t[50];
  for(int i = 0; i < (int)sizeof s; i++) {
    char s[50], t[50];
    if(s[i] == t[i] && (int)sizeof s + 1 = (int)sizeof t) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: lvalue required as left operand of assignment
    8 |     if(s[i] == t[i] && (int)sizeof s + 1 = (int)sizeof t) {
      |        ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
//#include<cstdlib>
//#include <algorithm>
//#include <string>
using namespace std;

int main(){
    int i,flug=0;
    string S;
    string T;
    //string t;

    cin >> S >> T;

    //t=T;

    for(i=0;i<S.size();i++){
        if(S.at(i)==T.at(i)){
            flug=1;
        }
        else{
            flug=0;
        }
    }
    //t=transform (T.begin (), T.end (), T.begin (), tolower);

    if(T.size()-S.size()==1 && flug==/* && T.at(S.size()+1)==t.at(t.size()+1)*/){
        if(T.size()<=11){
            if(T.size()>=1){
                cout << "Yes" << endl;
            }
            else{
                cout << "No" << endl;
            }
        }
        else{
            cout << "No" << endl;
        }
    }
    else{
        cout << "No" << endl;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:80: error: expected primary-expression before ')' token
   27 |     if(T.size()-S.size()==1 && flug==/* && T.at(S.size()+1)==t.at(t.size()+1)*/){
      |                                                                                ^
Language: C

#include<stdio.h>
int main(void){
int str[10];
int str2[10];
int i,k;

printf("文字列1を入力してください\n");
scanf("%s", &str);

printf("文字列2を入力してください\n");
scanf("%s", &str2);
for(k=0; str2[k]!='\0'; ++k);

i=0;
for(i=0;i<k;++i)
{
if(str1[i] == str2[i])
{
printf("Yes\n");
return 0;
}
++i;
}
printf("No\n");
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:17:4: error: 'str1' undeclared (first use in this function); did you mean 'str2'?
   17 | if(str1[i] == str2[i])
      |    ^~~~
      |    str2
main.c:17:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
	std::string S;
	std::string T;
	cin >> S >> T;
	
	
	if(S == T-1){
		cout << "Yes" << endl;
		
	}else {
		cout << "No" << endl;
		
	}

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: no match for 'operator-' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'int')
   11 |         if(S == T-1){
      |                 ~^~
      |                 | |
      |                 | int
      |                 std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/string:48,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_iterator.h:618:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__y.base() - __x.base())) std::operator-(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)'
  618 |     operator-(const reverse_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:618:5: note:   template argument deduction/substitution failed:
a.cc:11:19: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_Iterator>'
   11 |         if(S == T-1){
      |                   ^
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr decltype ((__x.base() - __y.base())) std::operator-(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)'
 1790 |     operator-(const move_iterator<_IteratorL>& __x,
      |     ^~~~~~~~
/usr/include/c++/14/bits/stl_iterator.h:1790:5: note:   template argument deduction/substitution failed:
a.cc:11:19: note:   'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>'
   11 |         if(S == T-1){
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string S, T;
  cin >> S >> T;
  int A = S.size();
  int B = A + 1;
  int C = T.size()
  if(C = B)
  {
    for(int i = 0; i < A; i++)
    {
      if (i == A - 1){
        cout << "Yes" << endl;
      }
      if(S.at(i) == T.at(i))
      {
        continue;
      }
      else
      {
        cout << "No" << endl;
        break;
      }
    }
  }
  else
  {
    cout << "No" << endl;
    break;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'if'
   10 |   if(C = B)
      |   ^~
a.cc:28:3: error: 'else' without a previous 'if'
   28 |   else
      |   ^~~~
a.cc:31:5: error: break statement not within loop or switch
   31 |     break;
      |     ^~~~~
Language: C

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int main()
  {
  char S, T;
  int i=0, j=0, flag=0;
  gets(S);
  gets(T);
  while(i<strlen(S)&&j<strlen(T)-1) {
    if(S[i]==T[j]) {
      i++;
      j++;
    }
    else{
      flag=1;
      break;
    }

  }
  if(flag==0) {
    printf("Yes") ;
  }
  else{
  printf("No");
  }
}




Compiler output:
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |   gets(S);
      |   ^~~~
      |   fgets
main.c:10:18: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
   10 |   while(i<strlen(S)&&j<strlen(T)-1) {
      |                  ^
      |                  |
      |                  char
In file included from main.c:2:
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:10:31: error: passing argument 1 of 'strlen' makes pointer from integer without a cast [-Wint-conversion]
   10 |   while(i<strlen(S)&&j<strlen(T)-1) {
      |                               ^
      |                               |
      |                               char
/usr/include/string.h:407:35: note: expected 'const char *' but argument is of type 'char'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
main.c:11:9: error: subscripted value is neither array nor pointer nor vector
   11 |     if(S[i]==T[j]) {
      |         ^
main.c:11:15: error: subscripted value is neither array nor pointer nor vector
   11 |     if(S[i]==T[j]) {
      |               ^
Language: C

#include <stdio.h>
#include <string.h>
 
int main(void){
  char s[10];
  char t[10];
  int len = strlen(t);
  t[len-1] = '\0';
  if(strcmp(s,t) == ){
    printf("Yes");
  } else {
    printf("No");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:21: error: expected expression before ')' token
    9 |   if(strcmp(s,t) == ){
      |                     ^
Language: Java


class Solution
{
  public static void main(String[] args)
  {
  	Scanner sc= new Scanner(System.in);
    String S= sc.nextLine();
    String T= sc.nextLine();
    if(S.compareTo(T)>=0)
      System.out.println("Yes");
    else
      System.out.println("No");
  }
  
}

Compiler output:
Main.java:6: error: cannot find symbol
  	Scanner sc= new Scanner(System.in);
  	^
  symbol:   class Scanner
  location: class Solution
Main.java:6: error: cannot find symbol
  	Scanner sc= new Scanner(System.in);
  	                ^
  symbol:   class Scanner
  location: class Solution
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  char s[50];
  for(int i = 0; i < (int)sizeof s; i++) {
    char s[50], t[50];
    if(s[i] == t[i] && (int)sizeof s + 1 = (int)sizeof t) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: lvalue required as left operand of assignment
    8 |     if(s[i] == t[i] && (int)sizeof s + 1 = (int)sizeof t) {
      |        ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S, T;
  cin >> S >> T;
  bool answer = true;
  for (int i = 0; i < S.size(); i++){
    if (S.at(i) != T.at(i)){
      answer = false;
      break;
    }
  }
  if (answer){
    cout << Yes <<endl;
  }
  else {
     cout << No << endl;
  }
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'Yes' was not declared in this scope
   15 |     cout << Yes <<endl;
      |             ^~~
a.cc:18:14: error: 'No' was not declared in this scope
   18 |      cout << No << endl;
      |              ^~
Language: C

#include <stdio.h>
#include <string.h>

int main(void){
  char s[10];
  char t[10];
  int len = strlen(t);
  t[len-1] = '\0';
  if(strcmp(s,t) == ){
    printf("Yes");
  } else {
    printf("No")
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:21: error: expected expression before ')' token
    9 |   if(strcmp(s,t) == ){
      |                     ^
main.c:12:17: error: expected ';' before '}' token
   12 |     printf("No")
      |                 ^
      |                 ;
   13 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i, n) for(int i = 0; i < n; i++)
using P=pair<int,int>;
    
    string n;
    cin>>n;
    string t;
    cin>>t;
    int cnt=0;
int main() {
    
    for(int i=0;i<n.size();i++){
        if(n.at(i)==t.at(i)){
            cnt++;
            
    }else{
        return 0;
    }
    }

    if(cnt==n.size()){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }

}


Compiler output:
a.cc:8:5: error: 'cin' does not name a type
    8 |     cin>>n;
      |     ^~~
a.cc:10:5: error: 'cin' does not name a type
   10 |     cin>>t;
      |     ^~~
Language: Java

package atCoder;

import java.util.Scanner;

public class Practice01 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String userS="";
		do{
			userS = scan.nextLine();
		}while (userS.length() <= 0 || userS.length() >= 10);

		String userT = scan.nextLine();;

		if(canSet(userS, userT)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}

	}

	public static boolean canSet(String userS, String userT) {
		boolean canSet = true;

		if(userS.length() + 1 != userT.length()){
			canSet = false;
		}

		for (int i = 0, len = userS.length(); i < len ; i++){
			if(userS.charAt(i) != userT.charAt(i)){
				canSet = false;
			}
		}
		return canSet;
	}
}


Compiler output:
Main.java:5: error: class Practice01 is public, should be declared in a file named Practice01.java
public class Practice01 {
       ^
1 error
Language: Java

import java.util.Scanner;
public class Codechef{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		String t = sc.next();
		s = s.toLowerCase();
		t=t.toLowerCase();
		t=t.replace(s,"");
		t=t.trim();
		if(t.length()==1) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
	}
}
}

Compiler output:
Main.java:19: error: class, interface, enum, or record expected
}
^
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    string S,T,a,b;
    cin>>S>>T;
    int cS,cT;
    cS=S.size-1;
    cT=T.size-2;
    a=S.assign(S,0,cS);
    b=T.assign(T,0,cT);
    if(a==b||T.size=S.size+1)
    {
        cout<<"yes"<<endl;
    }
    else
    {
        cout<<"no"<<endl;
    }
    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    8 |     cS=S.size-1;
      |        ~~^~~~
      |              ()
a.cc:9:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |     cT=T.size-2;
      |        ~~^~~~
      |              ()
a.cc:12:16: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |     if(a==b||T.size=S.size+1)
      |              ~~^~~~
      |                    ()
a.cc:12:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |     if(a==b||T.size=S.size+1)
      |                     ~~^~~~
      |                           ()
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  
  string S, T;
  cin >> S >> T;
  bool a = false;
  int s, t;
  s = S.size();
  t = T.size();
  for (int i; i<s; i++){
    for (int j; j<s; j++){
    if (S.at(i) == T.at(j)){
      a = true;
      continue;
    }
    else {
      a = false;
      break;
    }
    }
  }
  
      
      
   if (t == s + 1 && a == true){
    
    cout << "Yes" << endl;
  }
  else if (t == s + 1 && a == false){
    cout << "No" << endl;
  }
  else {
    cout << "No" << endl
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:25: error: expected ';' before '}' token
   35 |     cout << "No" << endl
      |                         ^
      |                         ;
   36 |   }
      |   ~
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main(){
  string a,b;
  cin >> a >> b;
  char s[10],t[10];
  for(int i=0; i<=length(a)-1; i++){
    s[i] = a[i];
    t[i] = b[i];
    if(s[i] != t[i]){
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'length' was not declared in this scope
    9 |   for(int i=0; i<=length(a)-1; i++){
      |                   ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  
  string S, T;
  cin >> S >> T;
  bool a = false;
  int s, t;
  s = S.size();
  t = T.size();
  for (int i; i<s; i++){
    for (int j; j<s; j++){
    if (S.at(i) == T.at(j)){
      a = true;
      continue;
    }
    else {
      a = false;
      break;
    }
    }
  }
  
      
      
   if (t == s + 1 && a == true){
    
    cout << "Yes" << endl;
  }
  else if (t == s + 1 && a == false){
    cout << "No" << endl;
  }
  else cout << "No" << endl
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:28: error: expected ';' before '}' token
   34 |   else cout << "No" << endl
      |                            ^
      |                            ;
   35 | 
   36 | }
      | ~
Language: Java


class Solution
{
  public static void main(String[] args)
  {
  	Scanner sc= new Scanner(System.in);
    String S= sc.nextLine();
    String T= sc.nextLine();
    if(S.compareTo(T)>=1)
      System.out.println("Yes");
    else
      System.out.println("No");
  }
  
}

Compiler output:
Main.java:6: error: cannot find symbol
  	Scanner sc= new Scanner(System.in);
  	^
  symbol:   class Scanner
  location: class Solution
Main.java:6: error: cannot find symbol
  	Scanner sc= new Scanner(System.in);
  	                ^
  symbol:   class Scanner
  location: class Solution
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S, T;
  cin >> s >> T;
  bool answer = false;
  for (int i = 0; i < S.size(); i++){
    if (S.at(i) != T.at(i)){
      answer = false;
      break;
    }
  }
  if (answer){
    cout << Yes <<endl;
  else {
     cout << No << endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s >> T;
      |          ^
a.cc:15:13: error: 'Yes' was not declared in this scope
   15 |     cout << Yes <<endl;
      |             ^~~
a.cc:16:3: error: expected '}' before 'else'
   16 |   else {
      |   ^~~~
a.cc:14:14: note: to match this '{'
   14 |   if (answer){
      |              ^
a.cc:17:14: error: 'No' was not declared in this scope
   17 |      cout << No << endl;
      |              ^~
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define M 998244353
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int s,t;
	cin>>s>>t;
  	bppl flag=0;
  	for(int i=0;i<s.size();i++)
    {
      if(s[i]!=t[i])
      {
        flag=1;
      }
    }
  	if(flag==0)
    {
      cout<<"Yes";
    }
  else
  {
    cout<<"No";
  }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'bppl' was not declared in this scope
   12 |         bppl flag=0;
      |         ^~~~
a.cc:13:25: error: request for member 'size' in 's', which is of non-class type 'int'
   13 |         for(int i=0;i<s.size();i++)
      |                         ^~~~
a.cc:15:11: error: invalid types 'int[int]' for array subscript
   15 |       if(s[i]!=t[i])
      |           ^
a.cc:15:17: error: invalid types 'int[int]' for array subscript
   15 |       if(s[i]!=t[i])
      |                 ^
a.cc:17:9: error: 'flag' was not declared in this scope
   17 |         flag=1;
      |         ^~~~
a.cc:20:12: error: 'flag' was not declared in this scope
   20 |         if(flag==0)
      |            ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i, n) for(int i = 0; i < n; i++)
using P=pair<int,int>;
    
    string  n;
    cin >> n;
    string  t;
    cin >> t;
    int cnt=0;
int main() {
    

    for(int i=0;i<n.size();i++){
        if(n.at(i)==t.at(i)){
            cnt++;
            
    }else{
        return 0;
    }
    }

    if(cnt==n.size()){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }

}


Compiler output:
a.cc:8:5: error: 'cin' does not name a type
    8 |     cin >> n;
      |     ^~~
a.cc:10:5: error: 'cin' does not name a type
   10 |     cin >> t;
      |     ^~~
Language: C++

//Bismillah hirrahmanir Rahim
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define dbug printf("I am here\n");
#define Fast ios_base::sync_with_stdio(false); cin.tie(0);

const int m = 10e6;
using namespace std;

int main(){
  ll a,b,c,d,n,k;
  string s,s1;
  cin>>s>>s1;
  if(s==s1){
    cout<<"No"<<endl;
    return 0;
  }

  int cnt = abs((s1.size()) - (s.size()));
 // cout<<cnt<<endl;
  if(cnt>1){
    cout<<"No"<<endl;
    return 0;
  }


 for(int i=0;i<s.size()- cnt ;i++){
    if(s[i] != s1[i]){
        cout<<"No"<<endl;
        return 0;
    }
 }
 cout<<"Yes"<<endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: call of overloaded 'abs(std::__cxx11::basic_string<char>::size_type)' is ambiguous
   20 |   int cnt = abs((s1.size()) - (s.size()));
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:2:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
  137 |   abs(__float128 __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
   85 |   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string S, T;
  cin >> S >> T;
  int A = S.size();
  int B = A + 1;
  int C = T.size()
  if(C = B){
    for(int i = 0; i < A; i++)
    {
      if(S.at(i) == T.at(i))
      {
        continue;
      }
      else
      {
        cout << "No" << endl;
        break;
      }
    }
  }
  else
  {
    cout << "No" << endl;
    break;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'if'
   10 |   if(C = B){
      |   ^~
a.cc:24:3: error: 'else' without a previous 'if'
   24 |   else
      |   ^~~~
a.cc:27:5: error: break statement not within loop or switch
   27 |     break;
      |     ^~~~~
Language: C++

#include <bits/stdc+.h>
using namespace std;

int main() {
  string S, T; cin >> S >> T;
  if (S==T+'a' || S==T+'b' || S==T+'c' || S==T+'d' || S==T+'e' || S==T+'f' ||
      S==T+'g' || S==T+'h' || S==T+'i' || S==T+'j' || S==T+'k' || S==T+'l' ||
      S==T+'m' || S==T+'n' || S==T+'o' || S==T+'p' || S==T+'q' || S==T+'r' ||
      S==T+'s' || S==T+'t' || S==T+'u' || S==T+'v' || S==T+'w' || S==T+'x' ||
      S==T+'y' || S==T+'z') cout << "Yes" << endl;
  else cout << "No" << endl;
}

Compiler output:
a.cc:1:10: fatal error: bits/stdc+.h: No such file or directory
    1 | #include <bits/stdc+.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;
import java.util.regex;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String t = sc.next();
    for(int i=0;i<s.length();i++){
      if(s.charAt(i)!=t.charAt(i)){
        System.out.println("No");
        return;
      }
    }
    System.out.println("Yes");
  }
}
    

Compiler output:
Main.java:2: error: cannot find symbol
import java.util.regex;
                ^
  symbol:   class regex
  location: package java.util
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
    string S,T,a,b;
    cin>>S>>T;
    int cS,cT;
    cS=S.size;
    cT=T.size-1;
    a=S.assign(S,0,cS);
    b=T.assign(T,0,cT);
    if(a==b||T.size=S.size+1)
        cout<<"yes"<<endl;
        else
        {
            cout<<"no"<<endl;
        }

    return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
    8 |     cS=S.size;
      |          ^~~~
a.cc:9:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |     cT=T.size-1;
      |        ~~^~~~
      |              ()
a.cc:12:16: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |     if(a==b||T.size=S.size+1)
      |              ~~^~~~
      |                    ()
a.cc:12:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |     if(a==b||T.size=S.size+1)
      |                     ~~^~~~
      |                           ()
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i, n) for(int i = 0; i < n; i++)
using P=pair<int,int>;
    
    string  n;
    cin >> n;
    string  t;
    cin >> t;
    int cnt=0;
int main() {
    

    for(int i=0;i<n.size();i++){
        if(n.at(i)==t.at(i){
            cnt++;
            
    }else{
        return 0;
    }
    }

    if(cnt==n.size()){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }

}


Compiler output:
a.cc:8:5: error: 'cin' does not name a type
    8 |     cin >> n;
      |     ^~~
a.cc:10:5: error: 'cin' does not name a type
   10 |     cin >> t;
      |     ^~~
a.cc: In function 'int main()':
a.cc:16:28: error: expected ')' before '{' token
   16 |         if(n.at(i)==t.at(i){
      |           ~                ^
      |                            )
a.cc:22:5: error: expected primary-expression before '}' token
   22 |     }
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
    string S,T;
    string ans = "Yes";
    cin >> S >> T;

    for(int i=0;i<S.size();i++){
        if(S.at(i)!=T.at(i)){
            ans = "No"
        }          
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:23: error: expected ';' before '}' token
   11 |             ans = "No"
      |                       ^
      |                       ;
   12 |         }
      |         ~
Language: C++

#include <bits/std++.h>
#define ll long long int 
#define pb push_back
using namespace std;

int main() {
	// your code goes here
	string a, b;
	cin >> a >> b;
	b.pop_back();
	if(a == b)
	    std::cout <<  "Yes" << std::endl;
	 else 
	    cout << "No" << endl;
	return 0;
}


Compiler output:
a.cc:1:10: fatal error: bits/std++.h: No such file or directory
    1 | #include <bits/std++.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
#include<string.h>
int main(){
	char s[15]={'\0'},t[15]={'\0'};
	scanf("%s",s);
	getchar();
	scanf("%s",t);
	int length=strlen(s);
	t[length]={'\0'};
	if(strcmp(s,t)==0) printf("Yes");
	else printf("No");
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:19: error: expected expression before '{' token
    9 |         t[length]={'\0'};
      |                   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string S, T;
  cin >> S >> T;
  int A = S.size();
  int B = A + 1;
  int C = T.size()
  if(C = B)
  {
    for(int i = 0; i < A; i++)
    {
      if(S.at(i) == T.at(i))
      {
        continue;
      }
      else
      {
        cout << "No" << endl;
        break;
      }
    }
  }
  else
  {
    cout << "No" << endl;
    break;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'if'
   10 |   if(C = B)
      |   ^~
a.cc:25:3: error: 'else' without a previous 'if'
   25 |   else
      |   ^~~~
a.cc:28:5: error: break statement not within loop or switch
   28 |     break;
      |     ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s,t;
  cin>>s>>t;
  int x = s.length();
  int flag =1;
  for(int i=0; i<x; i++){
    if(t[i] != s[i]){
      flag =0;
      break;
    }
  }
  if(flag == 1){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
  return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: expected '}' at end of input
   20 |   return 0;
      |            ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S,T;
  cin >> S >> T;
  for(int i=0;i<S.size();i++){
    if(S.at(i)==T.at(i)){
  continue;
      if(i==S.size()-1){
        cout << "Yes" << endl;
        
    }
    else{
      cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:7:30: note: to match this '{'
    7 |   for(int i=0;i<S.size();i++){
      |                              ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main(){
  string a,b;
  cin >> a >> b;
  char s[10],t[10];
  for(int i=0; i<=lengh(a)-1; i++){
    s[i] = a;
    t[i] = b;
    if(s[i] != t[i]){
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: 'lengh' was not declared in this scope
    9 |   for(int i=0; i<=lengh(a)-1; i++){
      |                   ^~~~~
a.cc:10:12: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in assignment
   10 |     s[i] = a;
      |            ^
      |            |
      |            std::string {aka std::__cxx11::basic_string<char>}
a.cc:11:12: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in assignment
   11 |     t[i] = b;
      |            ^
      |            |
      |            std::string {aka std::__cxx11::basic_string<char>}
Language: C++

#include <bits/stdc++.h> 
using namespace std;

int main()
{
  string s,t;
  cin>>s;
  cin>>t;
  if(t.size()-s.size()==1){
  t.erase(s.size());
  if(s==t)
  cout<<"YES";
  else
  cout<<"NO";
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
 string S,N;
  cin >> S;
  cin >> T;
  T.resize(T.size()-1);
  if(S==T)
    cout << "Yes" <<endl;
  else
    cout << "No" <<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'T' was not declared in this scope
    9 |   cin >> T;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  
  string S, T;
  cin >> S >> T;
  bool a = false;
  for (int i; i<S.size(); i++){
    for (int j; j<S.size(); j++){
    if (S.at(i) == T.at(j)){
      s = true;
      continue;
    }
    else {
      a = false;
      break;
    }
    }
  }
  
      
      
   if (T.size() == S.size() + 1 && a == true){
    
    cout << "Yes" << endl;
  }
  else if (T.size() == S.size() + 1 && a == false{
    cout << "No" << endl;
  }
  else cout << "No" << endl;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: 's' was not declared in this scope
   12 |       s = true;
      |       ^
a.cc:28:50: error: expected ';' before '{' token
   28 |   else if (T.size() == S.size() + 1 && a == false{
      |                                                  ^
      |                                                  ;
a.cc:31:3: error: expected primary-expression before 'else'
   31 |   else cout << "No" << endl;
      |   ^~~~
a.cc:30:4: error: expected ')' before 'else'
   30 |   }
      |    ^
      |    )
   31 |   else cout << "No" << endl;
      |   ~~~~
a.cc:28:11: note: to match this '('
   28 |   else if (T.size() == S.size() + 1 && a == false{
      |           ^
Language: Java

import java.util.*
public class Main{
  public static void main(String[] args){
    Scanner scanner = new Scanner(System.in);
    String S = scanner.nextLine();
    String T = scanner.nextLine();
    
    if(T.length() != S.length() && T.substring(0,S.length()).equals(S)){
      System.out.println("Yes");
    }else{
      System.out.println("No");
    }
    
  }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string S,t;
  cin >> S >> T;
    if(S.at(1) == T.at(1) &&
       S.at(2) == T.at(2) &&
       S.at(3) == T.at(3) && 
       S.at(4) == T.at(4) && 
       S.at(5) == T.at(5)) {
    
      cout << "Yes" << endl;}
   
  else{
    cout << "No" <<endl;}
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'T' was not declared in this scope
    6 |   cin >> S >> T;
      |               ^
Language: Java

import java.util.regex.Pattern;
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        String S = s.next();
      	String T = s.next();
		Pattern p = Pattern.compile(S + "[a-z]$");
		if(p.matcher(T).find()){
          return "Yes";
        }else {
          return "No";
        }
    }
}

Compiler output:
Main.java:10: error: incompatible types: unexpected return value
          return "Yes";
                 ^
Main.java:12: error: incompatible types: unexpected return value
          return "No";
                 ^
2 errors
Language: C

#include <bits/stdc++.h>
using namespace std;

int main(){
  string S, T;
  cin>>S>>T;
  int SN=S.size();
  int K=0;
  for(int i=0;i<SN;i++){
    if(S.at(i)!=T.at(i)){
      K=1;
    }
  }
  if(K==1){
    cout<<"No";
  }
  else{
    cout<<"Yes";
  }
}

Compiler output:
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string s,t;
  cin>>s;
  cin>>t;
  int n=t.length(),c=0;
  for(int i=0;i<n;i++)
  { if(s[i]==t[i])
      continue;
    else 
      c++;}
       if((c==0) || (c>1))
         cout<<"No";
       else
         cout<<"Yes";
       
       
       
       
       
    

Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: expected '}' at end of input
   16 |          cout<<"Yes";
      |                      ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;

main(){
    string S,T,a,b;
    cin>>S>>T;
    int cS,cT;
    cS=S.size;
    cT=T.size-1;
    a=S.assign(S,0,cS);
    b=T.assign(T,0,cT);
    if(a==b||T.size=S.size+1)
        cout<<"yes"<<endl;
        else
        {
            cout<<"no"<<endl;
        }
        
    
    return 0; 
}

Compiler output:
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:8:10: error: cannot convert 'std::__cxx11::basic_string<char>::size' from type 'std::__cxx11::basic_string<char>::size_type (std::__cxx11::basic_string<char>::)() const noexcept' {aka 'long unsigned int (std::__cxx11::basic_string<char>::)() const noexcept'} to type 'int'
    8 |     cS=S.size;
      |          ^~~~
a.cc:9:10: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |     cT=T.size-1;
      |        ~~^~~~
      |              ()
a.cc:12:16: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |     if(a==b||T.size=S.size+1)
      |              ~~^~~~
      |                    ()
a.cc:12:23: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   12 |     if(a==b||T.size=S.size+1)
      |                     ~~^~~~
      |                           ()
Language: C++

#include<algorithm>
#include<queue>
#include<map>


using namespace std;

int main(void){
 char s[50];
 char t[50];

 cin>>s;
 cin>>t;
 
 if(strlen(s)+1!=strlen(t)){
   cout<<"No"<<endl;
   return 0;
 }
 else;
 
 for(int i=0; i<strlen(s); i++){
  if(s[i]==t[i]);
  else {
   cout<<"No"<<endl;
   return 0;
  }
 }
 cout<<"Yes"<<endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:2: error: 'cin' was not declared in this scope
   12 |  cin>>s;
      |  ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<map>
  +++ |+#include <iostream>
    4 | 
a.cc:15:5: error: 'strlen' was not declared in this scope
   15 |  if(strlen(s)+1!=strlen(t)){
      |     ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<map>
  +++ |+#include <cstring>
    4 | 
a.cc:16:4: error: 'cout' was not declared in this scope
   16 |    cout<<"No"<<endl;
      |    ^~~~
a.cc:16:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:16: error: 'endl' was not declared in this scope
   16 |    cout<<"No"<<endl;
      |                ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include<map>
  +++ |+#include <ostream>
    4 | 
a.cc:21:17: error: 'strlen' was not declared in this scope
   21 |  for(int i=0; i<strlen(s); i++){
      |                 ^~~~~~
a.cc:21:17: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:24:4: error: 'cout' was not declared in this scope
   24 |    cout<<"No"<<endl;
      |    ^~~~
a.cc:24:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:24:16: error: 'endl' was not declared in this scope
   24 |    cout<<"No"<<endl;
      |                ^~~~
a.cc:24:16: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:28:2: error: 'cout' was not declared in this scope
   28 |  cout<<"Yes"<<endl;
      |  ^~~~
a.cc:28:2: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:15: error: 'endl' was not declared in this scope
   28 |  cout<<"Yes"<<endl;
      |               ^~~~
a.cc:28:15: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  string s;
  for(int i = 0; i < s.size(); i++) {
    string s, t;
    if(s[i] == t[i] && s.size() + 1 = t.size()) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}  


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: lvalue required as left operand of assignment
    8 |     if(s[i] == t[i] && s.size() + 1 = t.size()) {
Language: C++

#include <bits/stdc++.h> 
using namespace std;

int main()
{
  string s,t;
  cin>>s;
  cin>>t;
  if(t.size()-s.size()==1){
  t.erase(s.size());
  if(s==t)
  cout<<"YES";
  else
  cout<<"NO";
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: Java

import java.util.*;
public class TaskOne{
	public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
      	String s = sc.next();
		String t = sc.next();
		t=t.replace(s,"");
		t=t.trim();
		if(t.length()==1) {
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
    }
}

Compiler output:
Main.java:2: error: class TaskOne is public, should be declared in a file named TaskOne.java
public class TaskOne{
       ^
1 error
Language: C++

#include <iostream>
#include <string>
using namespace std;

int main() {
    string S,T;
    string ans = "Yes"
    cin >> S >> T;

    for(int i=0;i<S.size();i++){
        if(S.at(i)!=T.at(i)){
            ans = "No"
        }          
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected ',' or ';' before 'cin'
    8 |     cin >> S >> T;
      |     ^~~
a.cc:12:23: error: expected ';' before '}' token
   12 |             ans = "No"
      |                       ^
      |                       ;
   13 |         }
      |         ~
Language: C

#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>

int main()
{
  char a[100],b[100];
  int n;
  
  scanf_s("%s", a);
  scanf_s("%s", b);
  
  n = strlen(a);
  
  if(strncmp(a,b,n)==0 && strlen(b)==n+1)
  {
    printf("Yes");
  }else
  {
   printf("No"); 
  }
  return 0; 
}


Compiler output:
main.c: In function 'main':
main.c:10:3: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   10 |   scanf_s("%s", a);
      |   ^~~~~~~
      |   scanf
Language: C

#include <iostream>
#include <string>
using namespace std;

int main() {
    string S,T;
    string ans = "Yes"
    cin >> S >> T;

    for(int i=0;i<S.size();i++){
        if(S.at(i)!=T.at(i)){
            ans = "No"
        }          
    }
    cout << ans << endl;
}


Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string S, T;
  cin >> S >> T;
  int A = S.size();
  int B = A + 1;
  int C = T.size()
  if(C == B)
  {
    for(int i = 0; i < A; i++)
    {
      if(S.at(i) == T.at(i))
      {
        continue;
      }
      else
      {
        cout << "No" << endl;
        break;
      }
    }
  }
  else
  {
    cout << "No" << endl;
    break;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'if'
   10 |   if(C == B)
      |   ^~
a.cc:25:3: error: 'else' without a previous 'if'
   25 |   else
      |   ^~~~
a.cc:28:5: error: break statement not within loop or switch
   28 |     break;
      |     ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string S, T;
  cin >> S >> T;
  if(T.size() != S.size() + 1){
    cout << "No" << endl;
  } else{
    for(int i = 0; i < S.size(); i++){
    	if(S.at(i) != T.at(i) ){
          cout << "No" << endl;
          break;
          } else {
           cout << "Yes" << endl;
         }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i, n) for(int i = 0; i < n; i++)
using P=pair<int,int>;

int main() {
    string  n;
    cin >> n;
    string  t;
    cin >> t;

    for(int cnt =0,int i=0;i<n.size();i++){
        if(n.at(i)==t.at(i){
            cnt++;
            
    }else{
        return 0;
    }

    if(cnt==n.size()){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:20: error: expected unqualified-id before 'int'
   13 |     for(int cnt =0,int i=0;i<n.size();i++){
      |                    ^~~
a.cc:13:20: error: expected ';' before 'int'
   13 |     for(int cnt =0,int i=0;i<n.size();i++){
      |                    ^~~
      |                    ;
a.cc:13:38: error: expected ')' before ';' token
   13 |     for(int cnt =0,int i=0;i<n.size();i++){
      |        ~                             ^
      |                                      )
a.cc:13:39: error: 'i' was not declared in this scope
   13 |     for(int cnt =0,int i=0;i<n.size();i++){
      |                                       ^
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:7:12: note: to match this '{'
    7 | int main() {
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
string s,t;
int main()
{
   getline(cin, s)
   for(int i=0; i<=s.size()-1; i++)
       if(s[i + 1]!=t[i])
       {
           cout<<"NO";
           return 0;
       }
   cout<<"YES";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected ';' before 'for'
    6 |    getline(cin, s)
      |                   ^
      |                   ;
    7 |    for(int i=0; i<=s.size()-1; i++)
      |    ~~~             
a.cc:7:17: error: 'i' was not declared in this scope
    7 |    for(int i=0; i<=s.size()-1; i++)
      |                 ^
Language: C++

#include<stdio.h>
#include <iostream>
using namespace std;
int main(void)
{
    string S,T;
    cin >> S;
    cin >> T;

   int i=0;
   int flag=0;
   while(S[i] != "\0"){
     if(S[i]!=T[i]){
        flag = 1;
        break;
    }
i++;
}

if((flag == 0 )&&(S.size()==T.size()+1)){
     cout << "YES"
}else{
 cout << "NO"
}

return0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |    while(S[i] != "\0"){
a.cc:21:19: error: expected ';' before '}' token
   21 |      cout << "YES"
      |                   ^
      |                   ;
   22 | }else{
      | ~                  
a.cc:23:14: error: expected ';' before '}' token
   23 |  cout << "NO"
      |              ^
      |              ;
   24 | }
      | ~             
a.cc:26:1: error: 'return0' was not declared in this scope
   26 | return0;
      | ^~~~~~~
Language: C++

#include<stdio.h>
int main(){
  char* S,T;
  scanf("%s %s",S,T);
  T==T.pop_back();
  if(S=T){printf("Yes");}
  else{printf("No");}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: request for member 'pop_back' in 'T', which is of non-class type 'char'
    5 |   T==T.pop_back();
      |        ^~~~~~~~
a.cc:6:8: error: invalid conversion from 'char' to 'char*' [-fpermissive]
    6 |   if(S=T){printf("Yes");}
      |        ^
      |        |
      |        char
Language: Java

import java.util.regex.Pattern;
import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner s = new Scanner(System.in);
        String S = s.next();
      	String T = s.next();
		Pattern p = Pattern.compile(S + "[a-z]$");
		return p.matcher(T).find() ? "Yes" : "No";
    }
}

Compiler output:
Main.java:9: error: incompatible types: unexpected return value
		return p.matcher(T).find() ? "Yes" : "No";
		                           ^
1 error
Language: Java

import java.util.Scanner;
class Solution
{
  public static void main(String[] args)
  {
  	Scanner sc= new Scanner(System.in);
    String S= sc.nextLine();
    String T= sc.nextline();
    if(S.compareTo(T)==1)
      System.out.println("Yes");
    else
      System.out.println("No");
  }
  
}

Compiler output:
Main.java:8: error: cannot find symbol
    String T= sc.nextline();
                ^
  symbol:   method nextline()
  location: variable sc of type Scanner
1 error