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

I#include<bits/stdc++.h>

using namespace std;
#define ll long long int
#define vv vector<int>

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string s,t;
    cin >> s >> t;
    int n = s.size();
    int m = t.size();
    if(n+1 != m){
      cout<<"No";
      return 0;
    }
    for(int i = 0; i<n; i++){
      if(s[i] != t[i]){
        cout<<"No";
      }
    }
    cout<<"Yes";
    return 0;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | I#include<bits/stdc++.h>
      |  ^
a.cc:1:1: error: 'I' does not name a type
    1 | I#include<bits/stdc++.h>
      | ^
a.cc: In function 'int main()':
a.cc:8:5: error: 'ios_base' has not been declared
    8 |     ios_base::sync_with_stdio(false);
      |     ^~~~~~~~
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin.tie(NULL);
      |     ^~~
a.cc:9:13: error: 'NULL' was not declared in this scope
    9 |     cin.tie(NULL);
      |             ^~~~
a.cc:1:1: note: 'NULL' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>'
  +++ |+#include <cstddef>
    1 | I#include<bits/stdc++.h>
a.cc:10:5: error: 'string' was not declared in this scope
   10 |     string s,t;
      |     ^~~~~~
a.cc:11:12: error: 's' was not declared in this scope
   11 |     cin >> s >> t;
      |            ^
a.cc:11:17: error: 't' was not declared in this scope
   11 |     cin >> s >> t;
      |                 ^
a.cc:15:7: error: 'cout' was not declared in this scope
   15 |       cout<<"No";
      |       ^~~~
a.cc:20:9: error: 'cout' was not declared in this scope
   20 |         cout<<"No";
      |         ^~~~
a.cc:23:5: error: 'cout' was not declared in this scope
   23 |     cout<<"Yes";
      |     ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(void){
  string s,t,u;
  cin>>s;
  cin>>t;
  int t_len=t.length;
  u=substr(1,t_len-1);
  if(s==t){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: cannot convert 'std::__cxx11::basic_string<char>::length' 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 |   int t_len=t.length;
      |               ^~~~~~
a.cc:9:5: error: 'substr' was not declared in this scope
    9 |   u=substr(1,t_len-1);
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
 string s, t;
void pre(){
    
  for (int i = 0; i < s.size(); ++i) {
    if (s[i] != t[i]) {
      cout << "No" << "\n";
      return (0);
    }
  }
  cout << "Yes" << "\n";
    
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);

  cin >> s >> t;{
    pre();

}
  return 0;
}

Compiler output:
a.cc: In function 'void pre()':
a.cc:10:15: error: return-statement with a value, in function returning 'void' [-fpermissive]
   10 |       return (0);
      |              ~^~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'String' was not declared in this scope
    5 |   String S,T,f = 0;
      |   ^~~~~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S >> T;
      |          ^
a.cc:6:15: error: 'T' was not declared in this scope
    6 |   cin >> S >> T;
      |               ^
a.cc:9:31: error: 'f' was not declared in this scope
    9 |       if (S.at(i) != T.at(i)) f = 1;
      |                               ^
a.cc:12:8: error: 'f' was not declared in this scope
   12 |   else f = 1;
      |        ^
a.cc:14:6: error: 'f' was not declared in this scope
   14 |   if(f == 0) cout << "Yes" ;
      |      ^
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;
    int cnt=0;
    for(int i=0;i<n.size();i++){
        if(n.at(i)==t.at(i){
            cnt++;
            
    }else{
        return 0;
    }

    if(cnt=n.size()){
        printf('Yes');
    }else{
        printf('No');
    }

}


Compiler output:
a.cc:22:16: warning: multi-character character constant [-Wmultichar]
   22 |         printf('Yes');
      |                ^~~~~
a.cc:24:16: warning: multi-character character constant [-Wmultichar]
   24 |         printf('No');
      |                ^~~~
a.cc: In function 'int main()':
a.cc:8:12: error: expected unqualified-id before '=' token
    8 |     string = n;
      |            ^
a.cc:9:12: error: 'n' was not declared in this scope; did you mean 'yn'?
    9 |     cin >> n;
      |            ^
      |            yn
a.cc:10:12: error: expected unqualified-id before '=' token
   10 |     string = t;
      |            ^
a.cc:11:12: error: 't' was not declared in this scope; did you mean 'tm'?
   11 |     cin >> t;
      |            ^
      |            tm
a.cc:14:28: error: expected ')' before '{' token
   14 |         if(n.at(i)==t.at(i){
      |           ~                ^
      |                            )
a.cc:27:1: error: expected primary-expression before '}' token
   27 | }
      | ^
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<iostream>
#include<string>
using namesapce std;
int main()
{  string s1,s2;
  cin>>s1>>s2;
int ret=0;
 for(int i=0;i<s1.length();i++)
 { if(s1[i]!=s2[i])
 {  ret=-1;
    break;
 }
 }
 if(ret==-1)
    cout<<"No";
  else
    cout<<"Yes";
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namesapce'
    3 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:4: error: 'string' was not declared in this scope
    5 | {  string s1,s2;
      |    ^~~~~~
a.cc:5:4: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>s1>>s2;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:8: error: 's1' was not declared in this scope
    6 |   cin>>s1>>s2;
      |        ^~
a.cc:6:12: error: 's2' was not declared in this scope
    6 |   cin>>s1>>s2;
      |            ^~
a.cc:15:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |     cout<<"No";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     cout<<"Yes";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C

#include<stdio.h>

main int(void){
char [S] [T];
scanf("%s",&S);
scanf("%s",&T);
if (S = T)
	printf("yes");
else
	printf("no");
return 0;
}

Compiler output:
main.c:3:5: error: expected ';' before 'int'
    3 | main int(void){
      |     ^~~~
      |     ;
main.c:3:10: error: expected identifier or '(' before 'void'
    3 | main int(void){
      |          ^~~~
Language: Java

import java.util.Scanner;
public class Main {
    public static void main(String[] args){

        Scanner scan = new Scanner(System.in);
        String S = scan.next();
        String T = scan.next();

        if (S.contains(T.substring(0, S.length())) && T.length() == S.length() + 1 && S.length() <= 10 &&
                S.length() <= 1) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }

Compiler output:
Main.java:15: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
  string s,t,t1;
  if (s.length()==(t.length()-1))
  {
    t1=t.substr(0,s.length());
    if (s.equals(t1))
      cout<<"Yes"<<endl;
    else
      cout<<"No"<<endl;
  }
  else
    cout<<"No"<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'equals'
   10 |     if (s.equals(t1))
      |           ^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define ll long long
#define bp  __builtin_popcount
#define pb push_back
using namespace std;
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag, tree_order_statistics_node_update> indexed_set;
const int maxn=1e6+5;
const  double EPS = 1e-14;
const int MOD = 1e9+7;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
#ifndef ONLINE_JUDGE
  //  freopen("in.txt", "r", stdin);
#endif
    bool ok=true;
    string s,ss;
    cin>>s>>ss;
    for(int i=0;i<s.size();i++)
    {
        if(s[i]!=ss[i])
            ok=false;
    }
    if(ss.size()<=s.size()||ss.size>s.size()+1)
        ok=false;
    if(ok)
        cout<<"Yes";
    else
        cout<<"NO";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:29:32: 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 '()' ?)
   29 |     if(ss.size()<=s.size()||ss.size>s.size()+1)
      |                             ~~~^~~~
      |                                    ()
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'String' was not declared in this scope
    5 |   String S,T,f = 0;
      |   ^~~~~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S >> T;
      |          ^
a.cc:6:15: error: 'T' was not declared in this scope
    6 |   cin >> S >> T;
      |               ^
a.cc:9:31: error: 'f' was not declared in this scope
    9 |       if (S.at(i) != T.at(i)) f = 1;
      |                               ^
a.cc:12:8: error: 'f' was not declared in this scope
   12 |   else f = 1
      |        ^
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else cout << "No" ;
      |   ^~~~
Language: Java

import java.util.*;
public class Main
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
    String a=sc.next();
    String b=sc.next();
    
    if(a.length()==b.length()-1&&b.indexOf(a)==0)
    {
      System.out.println("Yes");
    }
    else
    {
      System.out.println("No");
    }
  }
}
import java.util.*;
public class Main
{
  public static void main(String args[])
  {
    Scanner sc=new Scanner(System.in);
    String a=sc.next();
    String b=sc.next();
    if(a.length()==b.length()-1&&b.indexOf(a)!=-1)
    {
      System.out.println("Yes");
    }
    else
    {
      System.out.println("No");
    }
  }
}
Submission Info

Compiler output:
Main.java:20: error: class, interface, enum, or record expected
import java.util.*;
^
Main.java:38: error: class, interface, enum, or record expected
Submission Info
^
2 errors
Language: Java

import java.util.*;

public class NoB {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //切り出しする文字列
        String S = sc.next();
        String T = sc.next();
        if(T.startsWith(S) && T.length() == S.length() + 1){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }
    }
}


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

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

int main() {
  string S,T,L;
  cin >> S >> T;
  L = S + T.at(T.size()-1)
  if ( L == T){
    cout << 'Yes' <<endl;
  }else{
    cout << 'No' << endl;
  }
}


Compiler output:
a.cc:9:13: warning: multi-character character constant [-Wmultichar]
    9 |     cout << 'Yes' <<endl;
      |             ^~~~~
a.cc:11:13: warning: multi-character character constant [-Wmultichar]
   11 |     cout << 'No' << endl;
      |             ^~~~
a.cc: In function 'int main()':
a.cc:7:27: error: expected ';' before 'if'
    7 |   L = S + T.at(T.size()-1)
      |                           ^
      |                           ;
    8 |   if ( L == T){
      |   ~~                       
a.cc:10:4: error: 'else' without a previous 'if'
   10 |   }else{
      |    ^~~~
Language: C

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

int main(void){
    string s,t;
    cin >> s >> t;
    for(int i = 0;i < s.size();i++){
        if(s.at(i) != t.at(i)){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}


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

#include<iostream.h>
using namespace std ;
#define ll long long
#define endl "\n"
#define pb push_back
#define mp make_pair
int main()
{
    
    string s,t;ll flag=0;
    cin>>s;
    cin>>t;
    for(ll i=0;i<s.size();i++)
    {
        if(s[i]!=t[i])
        {
            flag=1;
        }
    }
    if(flag==0 && s.size()+1==t.size())
    {
        cout<<"Yes";
    }
    else
    {
        cout<<"No";
    }
    return 0;
}

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

#include <iostream>
using namespace std;

int main() {
    String S, T, t;
    cin >> S >> T;
    t = T.erase(T.size());
    if( S == t ) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'String' was not declared in this scope
    5 |     String S, T, t;
      |     ^~~~~~
a.cc:6:12: error: 'S' was not declared in this scope
    6 |     cin >> S >> T;
      |            ^
a.cc:6:17: error: 'T' was not declared in this scope
    6 |     cin >> S >> T;
      |                 ^
a.cc:7:5: error: 't' was not declared in this scope; did you mean 'tm'?
    7 |     t = T.erase(T.size());
      |     ^
      |     tm
Language: C++

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

Compiler output:
a.cc:2:17: error: 'tsd' is not a namespace-name
    2 | using namespace tsd;
      |                 ^~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string S, T;
      |   ^~~~~~
a.cc:4:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:22: error: 'S' was not declared in this scope
    5 |   for(int i = 0; i < S.size(); i++){
      |                      ^
a.cc:6:19: error: 'T' was not declared in this scope
    6 |     if(S.at(i) == T.at(i) && T.size() == S.size() + 1){
      |                   ^
a.cc:7:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |       cout << "Yes" << endl;
      |       ^~~~
      |       std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |       cout << "Yes" << endl;
      |                        ^~~~
      |                        std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:9:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |       cout << "No" << endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |       cout << "No" << endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c,k;
    cin>>a>>b>>c>>k;
    int ans = 0;
    if(k<=a){
        cout<<a;
        return;
    }
    if(k<=a+b)
        cout<<a;
    else
        cout<<a-min((k-a-b),c);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   10 |         return;
      |         ^~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
	string a,b;
	cin >> a>>b;
	int c;
	c = a.size;
	string d;
	d = b.at(c);
	string e;
	e = a + e;
	if (b == e) {
		cout<<"Yes"<<endl;
	}
	else {
		cout << "NO" << endl;
	}
	return (0);

}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: 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 |         c = a.size;
      |               ^~~~
Language: Java

import java.io*;
class Registration
{
  public static void main(String args[])throws IOException
  {
    InputStreamReader ab = new InputStreamReader(System.in);
    BufferedReader cd = new BufferedReader(ab);
    String s = cd.readLine();
    String t = cd.readLine();
    int l1 = s.length();
    int l2= t.length();
    if(l2>l1)
      System.out.println("No");
    else
    {
      for(int i =0;i<l1;i++)
      {
        if (t.charAt(i) != s.charAt(i))
        {
          System.out.println("No");
          break;
        }
      }
      System.out.println("Yes");
    }}

Compiler output:
Main.java:1: error: ';' expected
import java.io*;
              ^
Main.java:25: error: reached end of file while parsing
    }}
      ^
2 errors
Language: C++

#include<iostream>
using namesapce std;
int main()
{  string s1,s2;
  cin>>s1>>s2;
int ret=0;
 for(int i=0;i<s1.length();i++)
 { if(s1[i]!=s2[i])
 {  ret=-1;
    break;
 }
 }
 if(ret==-1)
    cout<<"No";
  else
    cout<<"Yes";
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:4:4: error: 'string' was not declared in this scope
    4 | {  string s1,s2;
      |    ^~~~~~
a.cc:4:4: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included 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:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>s1>>s2;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:8: error: 's1' was not declared in this scope
    5 |   cin>>s1>>s2;
      |        ^~
a.cc:5:12: error: 's2' was not declared in this scope
    5 |   cin>>s1>>s2;
      |            ^~
a.cc:14:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   14 |     cout<<"No";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |     cout<<"Yes";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
#include <cstdio>
using namespace std;
int main()
{
    int cnt{0};
    char a[100],b[100];
    gets(a);
    gets(b);
    int x=strlen(a);
    for(int i=0;i<x;i++)
    {
        if(a[i]==b[i])
            cnt++;
    }
    if(cnt==x)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(a);
      |     ^~~~
      |     getw
Language: C++

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

int main(){
  string s,t;
  cin>>s>>t;
  if(s.size()==t.size()){
  rep(i,s.size()){
    if(s[i]!=t[i]){
      cout<<"No"<<endl;
      retrun 0;
    }
  }
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:7: error: 'retrun' was not declared in this scope
   13 |       retrun 0;
      |       ^~~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'for'
   11 |   for(int i=0;i<s.size();i++){
      |   ^~~
a.cc:11:15: error: 'i' was not declared in this scope
   11 |   for(int i=0;i<s.size();i++){
      |               ^
Language: C++


#include <bits/stdc++.h>
using namespace std;
int main(){
 string  S,T;
 cin>>S;
 cin>>T;
 size_t S.length();
 S[size_t]=T[size_t] ;
 if(S.compare(T)==0)
 cout<<"Yes"<<endl;
 else
 {
     cout<<"No"<<endl;

 }
 

 
    
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected initializer before '.' token
    8 |  size_t S.length();
      |          ^
a.cc:9:10: error: expected primary-expression before ']' token
    9 |  S[size_t]=T[size_t] ;
      |          ^
a.cc:9:20: error: expected primary-expression before ']' token
    9 |  S[size_t]=T[size_t] ;
      |                    ^
Language: C

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


int main() {
	char s[12];
	char t[12];
	scanf("%s", &s);
	scanf("%s", &t);
	int i = 0;
	for (i = 0; s[i] != '\0'; i++);
	int u;
	for (u = 0; u < i-1; u++) {
		if (s[u] != t[u]) {
			printf("No\n");
			break;
		}
		if (s[i - 1] == t[i - 1]) {
			printf("Yes");
		}
		else {
			printf("No");
		}
		return 0;
	}
	

Compiler output:
main.c: In function 'main':
main.c:26:9: error: expected declaration or statement at end of input
   26 |         }
      |         ^
Language: C++


#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
using namespace std;

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:33: error: expected ';' before ')' token
   12 | for(int i = 0; i < S.size(), i++){
      |                                 ^
      |                                 ;
Language: Java

import java.util.regex.Pattern;

Class Main {
 public static void main(String...args) {
   		Pattern p = Pattern.compile(S + "[a-z]$");
		return p.matcher(T).find() ? "Yes" : "No";
 }
  
  
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
Class Main {
^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
 public static void main(String...args) {
               ^
  (use --enable-preview to enable unnamed classes)
Main.java:10: error: class, interface, enum, or record expected
}
^
3 errors
Language: C++

#include<iostream>
#include<bits/stdc++.h>

using namespace std;

int main() {
    // 整数の入力
    // int n, k;
    // cin >> n >> k;
    //cout << n << " " << k << endl;
    string s, t;
    const string YES = "Yes";
    const string NO = "No";
    cin >> s >> t;

    if(s.empty() || t.empty()) {
        cout << NO;
        return 1;
    }
    if(s.length() == 0 || s.length() >= 10) {
        cout << NO;
        return 1;
    }
    if(s.length() + 1 != t.length()) {
        cout << NO;
        return 1;
    }
    if(t.substr(0, t.length - 1) != s) {
        cout << NO;
        return 1;
    }

    cout << YES;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:22: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   28 |     if(t.substr(0, t.length - 1) != s) {
      |                    ~~^~~~~~
      |                            ()
Language: C++

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

int main()
{
  string s,t;
  cin >> s >> t;
  if(s == t.substr(0,t.size()-1)
     {
       cout << "Yes" << endl;
     }
     else cout << "No" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: expected ';' before '{' token
    8 |   if(s == t.substr(0,t.size()-1)
      |                                 ^
      |                                 ;
    9 |      {
      |      ~                           
a.cc:8:8: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
    8 |   if(s == t.substr(0,t.size()-1)
      |      ~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3755:5: note: declared here
 3755 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:12:6: error: expected primary-expression before 'else'
   12 |      else cout << "No" << endl;
      |      ^~~~
a.cc:11:7: error: expected ')' before 'else'
   11 |      }
      |       ^
      |       )
   12 |      else cout << "No" << endl;
      |      ~~~~
a.cc:8:5: note: to match this '('
    8 |   if(s == t.substr(0,t.size()-1)
      |     ^
Language: Java

import java.uti.*;
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");
    return;
  }
}

Compiler output:
Main.java:1: error: package java.uti does not exist
import java.uti.*;
^
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Main
Main.java:7: error: cannot find symbol
    for(int i=0;i<s.length;i++){
                   ^
  symbol:   variable length
  location: variable s of type String
4 errors
Language: C

#include <iostream>
#include <string>

using namespace std;

typedef long long ll;

int main()
{
    string s, t;
    cin >> s >> t;
    bool flag = true;
    for (int i = 0; i < s.length; s++)
    {
        if (s[i] != t[i])
        {
            flag = false;
            break;
        }
    }
    cout << flag ? "Yes" : "No" << endl;
    return 0;
}

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 r=0;
string S,T;
cin >> S >> T ;

int main(){
	for(int i=0; i < S.size() ;i++){
  		if(S.at(i) == T.at(i)){
    		r = 1;
  		}
	}

  if(r == 0){
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}
  

Compiler output:
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >> S >> T ;
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define rep(i, n) for(ll i=0; i<n; i++)
#define all(v) v.begin(), v.end()
#define vec vector

/*  <<bit全探索>>
 
    for (int tmp = 0; tmp < (1 << ビット数); tmp++) {
        bitset<ビット数> s(tmp);
    }
*/
 
/*　<<stringで読み込んだ数列を一桁ずつint型へ変換>>
 
    string str;
    int N[桁数];
 
    cin >> str;
 
    for (int i = 0; i < 桁数; ++i) {
 
        N[i] = (int)(str[i] - '0');  //str[i]　はchar型なのでchar→intへ変換
 
        //cout << N[i] << endl;  //確認のため表示
    }
*/
 
typedef long long ll;

///////////////////////////////////////////////////////////////////////////


int main() {

    string S, T;
    cin >> S >> T;

    int s, t;
    s = S.size();
    t = T.size();
    
    int X = 0;

    if(s + 1 == t){
         rep(i,s){
             if(S.at(i) != T.at(i)){
                 X++;
             }
         }
    }

    else{
        X++;
    }

    if(X == 0){
        cout << "Yes" << endl;
    }

    else(
        cout << "No" << endl;
    )
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:29: error: expected ')' before ';' token
   63 |         cout << "No" << endl;
      |                             ^
      |                             )
a.cc:62:9: note: to match this '('
   62 |     else(
      |         ^
a.cc:64:5: error: expected primary-expression before ')' token
   64 |     )
      |     ^
Language: C++


#include <bits/stdc++.h>
using namespace std;
int main(){
 string  S,T;
 cin>>S;
 cin>>T;
 size_t S.length();
 S[size_t]=T[size_t] 
 if(S.compare(T)==0)
 cout<<"Yes"<<endl;
 else
 {
     cout<<"No"<,endl;
     
 }
 

 
    
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected initializer before '.' token
    8 |  size_t S.length();
      |          ^
a.cc:9:10: error: expected primary-expression before ']' token
    9 |  S[size_t]=T[size_t]
      |          ^
a.cc:9:20: error: expected primary-expression before ']' token
    9 |  S[size_t]=T[size_t]
      |                    ^
a.cc:12:2: error: 'else' without a previous 'if'
   12 |  else
      |  ^~~~
a.cc:14:17: error: expected primary-expression before ',' token
   14 |      cout<<"No"<,endl;
      |                 ^
Language: Java

def main():
    first_try = input()
    second_try = input()

    if first_try == second_try[:-1]:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()


Compiler output:
Main.java:6: error: unclosed character literal
        print('Yes')
              ^
Main.java:6: error: unclosed character literal
        print('Yes')
                  ^
Main.java:8: error: unclosed character literal
        print('No')
              ^
Main.java:8: error: unclosed character literal
        print('No')
                 ^
Main.java:11: error: unclosed character literal
if __name__ == '__main__':
               ^
Main.java:11: error: unclosed character literal
if __name__ == '__main__':
                        ^
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
def main():
^
  (use --enable-preview to enable unnamed classes)
7 errors
Language: Java

import java.io;
import java.util;
class Solution{
  public static void main(String args[]){
    Scanner sc=new Scanner();
    String s=sc.sscan();
    String t=sc.scan();
    t=t.substring(0,t.length-1);
    if(s.equals(t))
      System.out.println("Yes");
    else
      System.out.println("No");
  }
}


Compiler output:
Main.java:1: error: cannot find symbol
import java.io;
           ^
  symbol:   class io
  location: package java
Main.java:2: error: cannot find symbol
import java.util;
           ^
  symbol:   class util
  location: package java
Main.java:5: error: cannot find symbol
    Scanner sc=new Scanner();
    ^
  symbol:   class Scanner
  location: class Solution
Main.java:5: error: cannot find symbol
    Scanner sc=new Scanner();
                   ^
  symbol:   class Scanner
  location: class Solution
Main.java:8: error: cannot find symbol
    t=t.substring(0,t.length-1);
                     ^
  symbol:   variable length
  location: variable t of type String
5 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int cnt{0};
    char a[100],b[100];
    gets(a);
    gets(b);
    int x=strlen(a);
    for(int i=0;i<x;i++)
    {
        if(a[i]==b[i])
            cnt++;
    }
    if(cnt==x)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(a);
      |     ^~~~
      |     getw
Language: C

#include <bits/stdc++.h>
using namespace std;
#define ll           long long int
#define ld           long double
#define vi           vector<ll>
#define vvi          vector<vi>
#define vs           vector<string>
#define pb           push_back
#define pf           push_front
#define mp           make_pair
#define fs           first
#define se           second
#define all(x)       (x).begin(), (x).end()
#define rall(x)      (x).rbegin(), (x).rend()
#define fall(x)      (x).begin(),(x).end(),x.begin()
#define fastio       ios_base::sync_with_stdio(false); cin.tie(NULL);
int main()
{
    fastio
    string s,s1,s2=""; cin>>s>>s1;
    for(ll i=0;i<s1.size()-1;i++)
    {
        s2+=s1[i];
    }
    if(s2==s)
    cout<<"Yes";
    else
    cout<<"No";
}

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;
string s,t;
int main()
{
    cin>>s>>t;
	int ls=s.length();
	int flag=1;
	for(int i=0;i<ls;i++)
	{
		if(s[i]!=t[i]) flag=0;
	}
	if(flag==1) cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	return 0;
}

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>
#define rep(i,n) for(int i=0; i<(n); i++)
using namespace std;
typedef long long ll;

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

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'else' without a previous 'if'
   18 |         else cout << "No" << endl;
      |         ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  char S[11], T[12] ,*p;
  cin >> S >> T;
  for(p=S;*p==*(T+p-S);p++);
  cout << ((*p)?"No":"Yes") << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: invalid operands of types 'char [12]' and 'char*' to binary 'operator+'
    6 |   for(p=S;*p==*(T+p-S);p++);
      |                 ~^~
      |                 | |
      |                 | char*
      |                 char [12]
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: expected initializer before 'cin'
    5 |   cin >> S >> T;
      |   ^~~
a.cc:6:7: error: 'T' was not declared in this scope
    6 |   if (T.size() == S.size() + 1) {
      |       ^
Language: C++

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define int long long int
#define M 1000000007
#define pb push_back
#define pf push_front
#define ulli unsigned long long int
#define what_is(x) cerr << #x << " is " << x << endl;
#define pi 2*acos(0.0)
#define F  first
#define S  second
#define endl '\n'
using namespace std;
using namespace __gnu_pbds;
const int INF = 1e18L+5;
const int LG = 20;
const int N = 1e5+9;
typedef tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
int power(int x,int y){if(x==0)return 0;int res=1;while(y>0){if(y%2==1)res=(res*x)%M;x=(x*x)%M;y=y/2;}return res;}
bool isvowel(char c){if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u' || c=='A' || c=='E' || c=='I' || c=='O' || c=='U')return true;return false;}
int32_t main()
{
	//cout.precision(15);
	//cout.setf(ios::fixed,ios::floatfield);
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	int T=1;
	//cin>>T;
	while(T--)
	{
		string s,t;
		cin>>s>>t;
		for(int i=0;i<s.size()-1;i++)
		{
			if(s[i]!=t[i]){
			cout<<"No"<<endl;
			return 0;}
		}
		if(s.size()==1)
		{
			if(s[0]!=b[0])
			{
				cout<<"No"<<endl;
				return 0;
			}
		}
		cout<<"Yes"<<endl;
	}
}



Compiler output:
a.cc: In function 'int32_t main()':
a.cc:43:34: error: 'b' was not declared in this scope
   43 |                         if(s[0]!=b[0])
      |                                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s,t;
  getline(cin,s);
  getline(cin,t);
  int a=s.size();
  if((a+1)==t.size())
  {
    if(strncmp(s,t,a)==0)
    {
      printf("Yes\n");
    }
    else{
      printf("No\n");
    }
  }
  else
  {
    printf("No\n");
  }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   11 |     if(strncmp(s,t,a)==0)
      |                ^
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:159:33: note:   initializing argument 1 of 'int strncmp(const char*, const char*, size_t)'
  159 | extern int strncmp (const char *__s1, const char *__s2, size_t __n)
      |                     ~~~~~~~~~~~~^~~~
Language: C++

#include <stirng>
#include <iostream>
using namespace std;
typedef long long ll;

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


Compiler output:
a.cc:1:10: fatal error: stirng: No such file or directory
    1 | #include <stirng>
      |          ^~~~~~~~
compilation terminated.
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[i] != T[i]) {
            cout << "No" << endl;
            return 0;
        }
    }
    if (T.size == S.size - 1) {
        cout << "Yes" << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: 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 '()' ?)
    7 |     for (int i = 0; i < S.size; i++){
      |                         ~~^~~~
      |                               ()
a.cc:13:21: 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 '()' ?)
   13 |     if (T.size == S.size - 1) {
      |                   ~~^~~~
      |                         ()
Language: C

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char S[100000],T[100001],ch;
    int i,len,c;
    scanf("%s%s",&S,&T);
    len=strlen(S);
    c=1;
    for(i=0;i<len;i++){
        if(S[i]!=T[i]){
           c=0;
           printf("No\n");
           return 0;
        }
    }
    if(c==1)
       printf("Yes\n");
    return 0;
}


Compiler output:
main.c:1:9: 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() {
    cin >> s;
    cin >> t;
    if (t.substr(0,s.length())==s) {
        cout << "Yes";
    } else {
        cout << "No";
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 's' was not declared in this scope
    5 |     cin >> s;
      |            ^
a.cc:6:12: error: 't' was not declared in this scope; did you mean 'tm'?
    6 |     cin >> t;
      |            ^
      |            tm
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() {
 string s,t ;
  cin >> s >> t;
  for(int i = 0; i < s.size(); i++) {
    if(s[i] != t[i]) {
      cout << "No" << endl;
      return;
    }
  }
  cout << "Yes" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:7: error: return-statement with no value, in function returning 'int' [-fpermissive]
   12 |       return;
      |       ^~~~~~
Language: C++

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
using namespace std;

#define lint long long int

int main()
{
    char s[11], t[11];
    scanf("%s %s", s, t);
    
    int l = strlen(t);
    t[l-1] = '\0';
    
    if (strcmp(s,t)) cout << "No";
    else cout << "Yes";
    cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:13: error: 'strlen' was not declared in this scope
   18 |     int l = strlen(t);
      |             ^~~~~~
a.cc:9:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include <cmath>
  +++ |+#include <cstring>
    9 | using namespace std;
a.cc:21:9: error: 'strcmp' was not declared in this scope
   21 |     if (strcmp(s,t)) cout << "No";
      |         ^~~~~~
a.cc:21:9: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C

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


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

/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author zjsdut
 */

#include <utils.hpp>
#include <io.hpp>
using namespace std;
class ARegistration {
public:
  static void solve(istream&, ostream&) {
    string s, t;
    scan(s,t);
    rng (i, 0, SZ(s)) {
      if (s[i]!=t[i])
      {
        println("No");
        return;
      }
    }
    println("Yes");
  }
};
/*
 * Make sure that your laptop is plugged in or the build may be slow.
 */

#define in std::cin
#define out std::cout
int main() {
  ARegistration solver;
  solver.solve(in, out);
  return 0;
}


Compiler output:
a.cc:7:10: fatal error: utils.hpp: No such file or directory
    7 | #include <utils.hpp>
      |          ^~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
using namespace std ;
#define ll long long
#define endl "\n"
#define pb push_back
#define mp make_pair
int main()
{
    
    string s,t,;ll flag=0;
    cin>>s;
    cin>>t;
    for(ll i=0;i<s.size();i++)
    {
        if(s[i]!=t[i])
        {
            flag=1;
        }
    }
    if(flag==0 && s.size()+1==t.size())
    {
        cout<<"Yes";
    }
    else
    {
        cout<<"No";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:16: error: expected unqualified-id before ';' token
   10 |     string s,t,;ll flag=0;
      |                ^
Language: C

#include<stdio.h>
#include<string.h>
int main()
{
  char s[10],t[11];
scanf("%s %s",s,t);
int a=strlen(s);
int flag=0;
for(int i=0;i<a;i++)
{if(s[i]==t[i])
{
  flag=0;
}  else{ flag=1;
       }
}
if(flag==0)
{printf("YES")}
else{printf("NO")}
return 0;}


Compiler output:
main.c: In function 'main':
main.c:17:15: error: expected ';' before '}' token
   17 | {printf("YES")}
      |               ^
      |               ;
main.c:18:18: error: expected ';' before '}' token
   18 | else{printf("NO")}
      |                  ^
      |                  ;