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

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


bool find_ans(string s,ll i,ll cnt){
    if(i>=s.length()) return true;
    ll l=s.length();
    if(l-i<5) return false;
    if(s[i]=='e'){
        if(i+4<=l-1){
            if(s[i+1]=='s' && s[i+2]=='a' && s[i+3]=='r' && s[i+4]=='e')return find_ans(s,i+5,cnt);
        }
        else return false;
    }
    else if(s[i]=='m'){
        if(i+4<=l-1){
            if(s[i+1]=='a' && s[i+2]=='e' && s[i+3]=='r' && s[i+4]=='d') return find_ans(s,i+5,cnt);
        }
        return false;
    }
    else if(s[i]=='r'){
        if(s[i+2]=='s'){
            if((i+5<=l-1) && s[i+1]=='e' && s[i+2]=='s' && s[i+3]=='a' && s[i+4]=='r' && s[i+5]=='e') return find_ans(s,i+6,cnt);
            return false;
        }
        else if(s[i+2]=='m'){
            if((i+6<=l-1) && s[i+1]=='e' && s[i+2]=='m' && s[i+3]=='a' && s[i+4]=='e' && s[i+5]=='r' && s[i+6]=='d') return find_ans(s,i+7,cnt);
            return false;
        }
        else{
            return false;
        }
    }
    return false;
}

int main() {

    IO; 
    // esare , resare, maerd, remaerd
    string s;
    cin>>s;
    ll i=0;
    bool flag=true;
    memset(dp,-1,sizeof(dp));
    reverse(s.begin(),s.end());
    flag=find_ans(s,0,0);
    
    if(flag){
        cout<<"YES"<<endl;
    }
    else{
        cout<<"NO"<<endl;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:5: error: 'IO' was not declared in this scope; did you mean 'EIO'?
   40 |     IO;
      |     ^~
      |     EIO
a.cc:46:12: error: 'dp' was not declared in this scope; did you mean 'dup'?
   46 |     memset(dp,-1,sizeof(dp));
      |            ^~
      |            dup
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define all(a)  (a).begin(),(a).end()
typedef long long ll;
ll mod=1000000007;
bool isok=false;
string s;
vector<string> v{ "dream", "dreamer", "erase", "eraser"};

void rec(){
  if(s.size()==0) isok=true;
  for(int i=0;i<4;++i){
    auto pos = s.find(v[i]);
    if(pos == 0){
      s = s.substr(v[i].size(),s.size()- v[i].size());
      rec(sub);
    }
  }
}


int main() {
  cin >> s;
  rec();
  if(isok) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'void rec()':
a.cc:16:11: error: 'sub' was not declared in this scope; did you mean 'fsub'?
   16 |       rec(sub);
      |           ^~~
      |           fsub
Language: C++

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

int main()
{
	//input
	string S; cin >> S;
	
	//compute
	string ans;
	while(S.size() != 0){
		int cnt = 0;
		if (S.substr(0, 5) == "dream" || S.substr(0, 5) == "erase") {
			S.erase(0, 5);
			cnt = 1;
		}
		if (S.substr(0, 6) == "eraser") {
			S.erase(0, 6);
			cnt = 1
		}
		if (S.substr(0, 7) == "dreamer") {
			S.erase(0, 7);
			cnt = 1;
		}
		if (cnt == 0) break;
	}
	if (S.size() == 0) ans = "YES";
	else ans = "NO";
	//output
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: expected ';' before '}' token
   19 |                         cnt = 1
      |                                ^
      |                                ;
   20 |                 }
      |                 ~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
  string s;
  cin >> s;
  int n = s.size()-1;
  string ss;
  while(n>=0){
    if(s[n-2] == 'e' && s[n-1] == 'a' && s[n] == 'm'){
      if(n<4){
        cout << "NO" << endl;
        return 0;
      }
      else{
        for(int i = n-4;i<=n;i++){
          ss.push_back(s[i]);
        }
        if(ss="dream"){
          n-=5;
        }
        else{
          cout << "NO" << endl;
          return 0;
        }
      }
    }else if(s[n-2] == 'm' && s[n-1] == 'e' && s[n] == 'r'){
      if(n<6){
        cout << "NO" << endl;
        return 0;
      }
      else{
        for(int i = n-6;i<=n;i++){
          ss.push_back(s[i]);
        }
        if(ss="dreamer"){
          n-=7;
        }
        else{
          cout << "NO" << endl;
          return 0;
        }
      }
    }else if(s[n-2] == 'a' && s[n-1] == 's' && s[n] == 'e'){
      if(n<4){
        cout << "NO" << endl;
        return 0;
      }
      else{
        for(int i = n-4;i<=n;i++){
          ss.push_back(s[i]);
        }
        if(ss="erase"){
          n-=5;
        }
        else{
          cout << "NO" << endl;
          return 0;
        }
      }
    }else if(s[n-2] == 's' && s[n-1] == 'e' && s[n] == 'r'){
      if(n<5){
        cout << "NO" << endl;
        return 0;
      }
      else{
        for(int i = n-5;i<=n;i++){
          ss.push_back(s[i]);
        }
        if(ss="eraser"){
          n-=6;
        }
        else{
          cout << "NO" << endl;
          return 0;
        }
      }
    }
    ss = "";
  }
  cout << "YES" << endl;
}
        
  


Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: could not convert 'ss.std::__cxx11::basic_string<char>::operator=(((const char*)"dream"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   19 |         if(ss="dream"){
      |            ~~^~~~~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:36:14: error: could not convert 'ss.std::__cxx11::basic_string<char>::operator=(((const char*)"dreamer"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   36 |         if(ss="dreamer"){
      |            ~~^~~~~~~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:53:14: error: could not convert 'ss.std::__cxx11::basic_string<char>::operator=(((const char*)"erase"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   53 |         if(ss="erase"){
      |            ~~^~~~~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:70:14: error: could not convert 'ss.std::__cxx11::basic_string<char>::operator=(((const char*)"eraser"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   70 |         if(ss="eraser"){
      |            ~~^~~~~~~~~
      |              |
      |              std::__cxx11::basic_string<char>
Language: C++

#include <iostream>
#include <string>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <queue>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define int long long
#define INF 1e9 + 7
#define cae cout << ans << endl;
#define cye cout << "YES" << endl;
#define cne cout << "NO" << endl;
#define r0 return 0;
using namespace std;
typedef pair<int,int>P;
typedef long long ll;
signed main() {
    string s;
    cin >> s;
    bool bl[114514] = {false};
    bl[0] = true;
    rep(i, s.size()) {
        if (bl[i] == false) {
            continue;
        } else {
            string a1 = s.substr(i, i + 5);
            string a2 = s.substr(i, i + 6);
            string a3 = s.substr(i, i + 7);
            if (a1 == "dream" || a1 == "erase") {
                bl[i + 5] = true;
            }
            if (a2 == "eraser") {
                bl[i + 6] = true;
            }
            if (a3 == "dreamer") {
                bl[i + 7] = true;
        }
    }
    if (bl[s.size()]) {
        cye
    } else {
        cne
    }
    r0
}

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

#include<bits/stdc++.h>
using namespace std;
using lint = long long;
using litn = lint;
template<class T>
using vec = vector<T>;

#define FOR(i,a,b) for(int i=((int)(a));i<((int)(b));i++)
#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define all(x) (x).begin(),(x).end()


int main(){
  string s;
  cin >>s;

  string d[4] = {"dream","deramer","erase","eraser"};

  reverse(all(s));
  REP(i,4) reverse(all(d[i]));

  bool u=true;
  for(int i=0;i<s.size();){
    bool ju = false;
    REP(j,4){
      string do = d[j]
      if(s.substr(i,do.size()) == do){
        ju = true;
        i += do.size();
      }
    }
    if(!ju){
      u = false;
      break;
    }
  }

  if(u){
    cout <<"YES" <<endl;
  }else{
    cout <<"NO" <<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:14: error: expected unqualified-id before 'do'
   26 |       string do = d[j]
      |              ^~
Language: C++

#include<bits/stdc++.h>
#include<string>
using namespace std;
string divide[4]={"dream","erase","eraser","dreamer"};
string s;
bool DFS(int n){
    if(n==s.size())return true;
    for(string i:divide){
        if(n+i.size()<=s.size()&& s.sbustr(n,i.size())==i){
            if(DFS(n+i.size()))return true;
        }
    }
    return false;
}
int main(){
    cin>>s;
    cout<<DFS(0) ? "YES" :"NO")<<endl;
}

Compiler output:
a.cc: In function 'bool DFS(int)':
a.cc:9:37: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sbustr'; did you mean 'substr'?
    9 |         if(n+i.size()<=s.size()&& s.sbustr(n,i.size())==i){
      |                                     ^~~~~~
      |                                     substr
a.cc: In function 'int main()':
a.cc:17:31: error: expected ';' before ')' token
   17 |     cout<<DFS(0) ? "YES" :"NO")<<endl;
      |                               ^
      |                               ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
string divide[4]={"dream","erase","eraser","dreamer"};
string s;
bool DFS(int n){
    if(n==s.size())return true;
    for(string i:divide){
        if(n+i.size()<=s.size()&& s.sbustr(n,i.size())==i){
            if(DFS(n+i.size()))return true;
        }
    }
    return false;
}
int main(){
    cin>>S;
    cout<<DFS(0) ? "YES" :"NO"<<endl;
}

Compiler output:
a.cc: In function 'bool DFS(int)':
a.cc:8:37: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'sbustr'; did you mean 'substr'?
    8 |         if(n+i.size()<=s.size()&& s.sbustr(n,i.size())==i){
      |                                     ^~~~~~
      |                                     substr
a.cc: In function 'int main()':
a.cc:15:10: error: 'S' was not declared in this scope
   15 |     cin>>S;
      |          ^
a.cc:16:31: error: invalid operands of types 'const char [3]' and '<unresolved overloaded function type>' to binary 'operator<<'
   16 |     cout<<DFS(0) ? "YES" :"NO"<<endl;
      |                           ~~~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
  string divide[4]={"dream","dreamer","erase","eraser"};
int main(){
    strgin s;
    cin>>s;:
    reverse(s.begin(),s.end());
    for(int i=0;i<4;i++)reverse(divide[i].begin(),divide[i].end());
    bool cna=true;
    for(int i=0;i<s.size();){
        bool cna2=false;
        for(int j=0;j<4;j++){
            string d=divide[j];
            if(s.substr(i,d.size())==d){
                can2=true;
                i+=d.size();
            }
        }
        if(!can2){
            can=false;
            break;
        }
    }
    if(can){
        cout<<"YES"<<endl;
    }else{
        cout<<"NO"<<endl;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'strgin' was not declared in this scope; did you mean 'strspn'?
    5 |     strgin s;
      |     ^~~~~~
      |     strspn
a.cc:6:10: error: 's' was not declared in this scope
    6 |     cin>>s;:
      |          ^
a.cc:6:12: error: expected primary-expression before ':' token
    6 |     cin>>s;:
      |            ^
a.cc:15:17: error: 'can2' was not declared in this scope; did you mean 'cna2'?
   15 |                 can2=true;
      |                 ^~~~
      |                 cna2
a.cc:19:13: error: 'can2' was not declared in this scope; did you mean 'cna2'?
   19 |         if(!can2){
      |             ^~~~
      |             cna2
a.cc:20:13: error: 'can' was not declared in this scope; did you mean 'cna'?
   20 |             can=false;
      |             ^~~
      |             cna
a.cc:24:8: error: 'can' was not declared in this scope; did you mean 'cna'?
   24 |     if(can){
      |        ^~~
      |        cna
Language: C++

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

int main(void){
  
  string S,T = "";
  
  string  divide[4] = {"dream","dreamer","erase","eraser"}
  
  cin >> S;
  
  reverse(S.begin(),S.end());
  
  for(int i = 0; i < 4; i++){
  	  reverse(divide[i].begin(),divide[i].end());
  }
  
  bool can = true;
  
  for(int i = 0; i < S.size();){
    
    bool can2 = false;
    
    for(int j = 0; j < 4; j++){
      string d = divide[j];
      if(S.substr(i,d.size()) == d){
        can2 = true;
        i+= d.size();
      }
    }
    if(!can2){
      can = false;
      break;
    }
  }
  
  if(can) cout << "YES" << endl;
  else cout << "NO" << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'cin'
   12 |   cin >> S;
      |   ^~~
Language: C++

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

int main(void){
  
  string S,T = "";
  
  string[4]  divide = {"dream","dreamer","erase","eraser"}
  
  cin >> S;
  
  reverse(S.begin(),S.end());
  
  for(int i = 0; i < 4; i++){
  	  reverse(divide[i].begin(),divide[i].end());
  }
  
  bool can = true;
  
  for(int i = 0; i < S.size();){
    
    bool can2 = false;
    
    for(int j = 0; j < 4; j++){
      string d = divide[j];
      if(S.substr(i,d.size()) == d){
        can2 = true;
        i+= d.size();
      }
    }
    if(!can2){
      can = false;
      break;
    }
  }
  
  if(can) cout << "YES" << endl;
  else cout << "NO" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:10: error: expected identifier before numeric constant
   10 |   string[4]  divide = {"dream","dreamer","erase","eraser"}
      |          ^
a.cc:10:10: error: expected ']' before numeric constant
   10 |   string[4]  divide = {"dream","dreamer","erase","eraser"}
      |          ^
      |          ]
a.cc:10:9: error: structured binding declaration cannot have type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   10 |   string[4]  divide = {"dream","dreamer","erase","eraser"}
      |         ^
a.cc:10:9: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:9: error: empty structured binding declaration
a.cc:10:14: error: expected initializer before 'divide'
   10 |   string[4]  divide = {"dream","dreamer","erase","eraser"}
      |              ^~~~~~
a.cc:17:19: error: 'divide' was not declared in this scope
   17 |           reverse(divide[i].begin(),divide[i].end());
      |                   ^~~~~~
a.cc:27:18: error: 'divide' was not declared in this scope
   27 |       string d = divide[j];
      |                  ^~~~~~
Language: Java

import java.io.*;
import java.util.StringTokenizer;

public class Solution {

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String[] end = {"dream", "dreamer", "erase", "eraser"};
            String s = in.next();
            for (String str : end){
                if (s.endsWith(str)){
                    out.println("YES");
                    return;
                }
            }

            out.println("NO");

        }
    }


    static class InputReader implements AutoCloseable {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            //reader = new BufferedReader(new FileReader(stream), 32768);
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return "";
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public void close() {
        }

    }
}

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

import java.io.*;
import java.util.StringTokenizer;

public class Solution {

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, in, out);
        out.close();
    }

    static class Task {

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String[] end = {"dream", "dreamer", "erase", "eraser"};
            String s = in.next();
            for (String str : end){
                if (s.endsWith(str)){
                    out.println("YES");
                    return;
                }
            }

            out.println("NO");

        }
    }


    static class InputReader implements AutoCloseable {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            //reader = new BufferedReader(new FileReader(stream), 32768);
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return "";
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public void close() {
        }

    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.StringTokenizer;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Solution {
      | ^~~~~~
Language: C++

# -*- coding: utf-8 -*-
# input
s = input()

while len(s) > 4:
    if s[-5:] == 'dream':
        s = s[:-5]
    elif s[-7:] == 'dreamer':
        s = s[:-7]
    elif s[-5:] == 'erase':
        s = s[:-5]
    elif s[-6:] == 'eraser':
        s = s[:-6]
    else:
        break

if len(s) > 0:
    print('NO')
else:
    print('YES')


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:2:3: error: invalid preprocessing directive #input
    2 | # input
      |   ^~~~~
a.cc:6:18: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    6 |     if s[-5:] == 'dream':
      |                  ^~~~~~~
a.cc:8:20: warning: multi-character literal with 7 characters exceeds 'int' size of 4 bytes
    8 |     elif s[-7:] == 'dreamer':
      |                    ^~~~~~~~~
a.cc:10:20: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   10 |     elif s[-5:] == 'erase':
      |                    ^~~~~~~
a.cc:12:20: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   12 |     elif s[-6:] == 'eraser':
      |                    ^~~~~~~~
a.cc:18:11: warning: multi-character character constant [-Wmultichar]
   18 |     print('NO')
      |           ^~~~
a.cc:20:11: warning: multi-character character constant [-Wmultichar]
   20 |     print('YES')
      |           ^~~~~
a.cc:3:1: error: 's' does not name a type
    3 | s = input()
      | ^
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		S = S.replaceAll("eraser","")
        S = S.replaceAll("erase","")
        S = S.replaceAll("dreamer","")
        S = S.replaceAll("dream","");

		if(S.length() == 0) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}
	}
}


Compiler output:
Main.java:7: error: ';' expected
		S = S.replaceAll("eraser","")
		                             ^
Main.java:8: error: ';' expected
        S = S.replaceAll("erase","")
                                    ^
Main.java:9: error: ';' expected
        S = S.replaceAll("dreamer","")
                                      ^
3 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args throws Exception) {
		Scanner sc = new Scanner(System.in);
		String S = sc.nextLine();
		S = S.replaceAll("eraser","").replaceAll("erase","").replaceAll("dreamer","").replaceAll("dream","");

		System.out.println(S);

		if(S.length() == 0) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}
	}
}


Compiler output:
Main.java:4: error: ',', ')', or '[' expected
	public static void main(String[] args throws Exception) {
	                                     ^
Main.java:4: error: ';' expected
	public static void main(String[] args throws Exception) {
	                                                      ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
	string s;
	vector<string> words={"dream","dreamer","erase","eraser"};
	int num;
	string ret="NO";
void dfs(int i){
	if(i==num){
      ret="YES";
      break;
    }
	for(auto&& w:words){
   //   	cout<<i<<" "<<w<<endl;
		if(i+w.size()<=num && s.substr(i,w.size())==w){
			dfs(i+w.size());
		}
	}	
	

	}


int main(){
	cin >>s;
	num=s.size();
  dfs(0);
  cout<<ret<<endl;
	

}


Compiler output:
a.cc: In function 'void dfs(int)':
a.cc:10:7: error: break statement not within loop or switch
   10 |       break;
      |       ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
string divide[4]={"dream","dreamer","erase","eraser"};
int main(){
  string S;
  cin>>S;
  for(int i=0;i<4;i++) reverse(divide[i].begin(),divide[i].end());
  reverse(S.begin(),S.end());
  bool can=true;
  for(int i=0;i<S.size();i++){
    bool can2=false;
    for(int j=0;j<4;j++){
      string d=divide[j];
      if(substr(i,d.size())==d){
        can2=true;
        i+=d.size();
      }
    }
    if(!can2){
      can=false;
      break;
    }
  }
  if(can)cout<<"Yes"<<endl;
  else<<cout<<"true"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:10: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   14 |       if(substr(i,d.size())==d){
      |          ^~~~~~
      |          strstr
a.cc:25:7: error: expected primary-expression before '<<' token
   25 |   else<<cout<<"true"<<endl;
      |       ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
string divide[4]={"dream","dreamer","erase","eraser"};
int main(){
  string S;
  cin>>S;
  for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end());
  reverse(S.begin(),S.end());
  bool can=true;
  for(int i=0;i<S.size();i++){
    bool can2=false;
    for(int j=0;j<4;j++){
      string d=divide[j];
      if(substr(i,d.size())==d){
        can2=true;
        i+=d.size();
      }
    }
    if(!can2){
      can=false;
      break;
    }
  }
  if(can)cout<<"Yes"<<endl;
  else<<cout<<"true"<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: initializer in range-based 'for' loop
    7 |   for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end());
      |            ^
a.cc:7:18: error: expected ')' before ';' token
    7 |   for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end());
      |      ~           ^
      |                  )
a.cc:7:19: error: 'i' was not declared in this scope
    7 |   for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end());
      |                   ^
a.cc:14:10: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   14 |       if(substr(i,d.size())==d){
      |          ^~~~~~
      |          strstr
a.cc:25:7: error: expected primary-expression before '<<' token
   25 |   else<<cout<<"true"<<endl;
      |       ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
string divide[4]={dream,dreamer,erase,eraser};
int main(){
  string S;
  cin>>S;
  for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end());
  reverse(S.begin(),S.end());
  bool can=true;
  for(int i=0;i<S.size();i++){
    bool can2=false;
    for(int j=0;j<4;j++){
      string d=divide[j];
      if(substr(i,d.size())==d){
        can2=true;
        i+=d.size();
      }
    }
    if(!can2){
      can=false;
      break;
    }
  }
  if(can)cout<<"Yes"<<endl;
  else<<cout<<"true"<<endl;
}

Compiler output:
a.cc:3:19: error: 'dream' was not declared in this scope; did you mean 'drem'?
    3 | string divide[4]={dream,dreamer,erase,eraser};
      |                   ^~~~~
      |                   drem
a.cc:3:25: error: 'dreamer' was not declared in this scope
    3 | string divide[4]={dream,dreamer,erase,eraser};
      |                         ^~~~~~~
a.cc:3:33: error: 'erase' was not declared in this scope
    3 | string divide[4]={dream,dreamer,erase,eraser};
      |                                 ^~~~~
a.cc:3:39: error: 'eraser' was not declared in this scope
    3 | string divide[4]={dream,dreamer,erase,eraser};
      |                                       ^~~~~~
a.cc: In function 'int main()':
a.cc:7:12: error: initializer in range-based 'for' loop
    7 |   for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end());
      |            ^
a.cc:7:18: error: expected ')' before ';' token
    7 |   for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end());
      |      ~           ^
      |                  )
a.cc:7:19: error: 'i' was not declared in this scope
    7 |   for(int i=0:i<4;i++) reverse(divide[i].begin(),divide[i].end());
      |                   ^
a.cc:14:10: error: 'substr' was not declared in this scope; did you mean 'strstr'?
   14 |       if(substr(i,d.size())==d){
      |          ^~~~~~
      |          strstr
a.cc:25:7: error: expected primary-expression before '<<' token
   25 |   else<<cout<<"true"<<endl;
      |       ^~
Language: C++

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

string S;
string divide[4] = {"dream", "dreamer", "erase", "eraaser"};

int main(){
    cin >> S;

    bool can =true;

    reverse (S.begin(), S.end());
    for(int i = 0 ;i < 4; i++){
        reverse(divide[i].begin(), diveide[i].end());
    }


    for (int i = 0; i< S.size(); ){
        bool can2 =false;
        for(int j = 0; j < 4; j++){
            string d = divide[j];
            if (S.substr(i, d.size()) == d){
                can2 = true;
                i = i+ d.size();
            }
        }

        if (!can2){
            can = false;
            break;
        }
    }

    if(can) {
        cout << "YES" << endl;
    }
    else cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:36: error: 'diveide' was not declared in this scope; did you mean 'divide'?
   16 |         reverse(divide[i].begin(), diveide[i].end());
      |                                    ^~~~~~~
      |                                    divide
Language: C++

#include <vector>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <cstdlib>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define REP(i,n) for(int i=0;i<n;i++)
#define SORT(c) sort((c).begin(),(c).end())
#define ALL(a) (a).begin(),(a).end()

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

  string S;
  cin >> S;

	int rec = strlen(S) - 1;
	while (true) {
		if (rec <= 0) { break; }
		if (S[rec - 4] == 'd'&&
			S[rec - 3] == 'r'&&
			S[rec - 2] == 'e'&&
			S[rec - 1] == 'a'&&
			S[rec] == 'm') {
			rec -= 5;
		} else if (S[rec - 6] == 'd'&&
			S[rec - 5] == 'r'&&
			S[rec - 4] == 'e'&&
			S[rec - 3] == 'a'&&
			S[rec - 2] == 'm'&&
			S[rec - 1] == 'e'&&
			S[rec] == 'r') {
			rec -= 7;
		} else if (S[rec - 4] == 'e'&&
			S[rec - 3] == 'r'&&
			S[rec - 2] == 'a'&&
			S[rec - 1] == 's'&&
			S[rec] == 'e') {
			rec -= 5;
		} else if (S[rec - 5] == 'e'&&
			S[rec - 4] == 'r'&&
			S[rec - 3] == 'a'&&
			S[rec - 2] == 's'&&
			S[rec - 1] == 'e'&&
			S[rec] == 'r') {
			rec -= 6;
		} else {
			ans = false;
			break;
		}
	}

	if (ans == true) {
    cout << "YES";
  } else {
    cout << "NO";
  }
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:26: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   25 |         int rec = strlen(S) - 1;
      |                          ^
      |                          |
      |                          std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from a.cc:6:
/usr/include/string.h:407:35: note:   initializing argument 1 of 'size_t strlen(const char*)'
  407 | extern size_t strlen (const char *__s)
      |                       ~~~~~~~~~~~~^~~
a.cc:56:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   56 |                         ans = false;
      |                         ^~~
      |                         abs
a.cc:61:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   61 |         if (ans == true) {
      |             ^~~
      |             abs
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		String m = "";
		try {
			m = sc.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}
      sc.close();
		String ans = "YES";
		int no = 0;
		
		while (m.length() > no && m.length() > 4) {
			if (m.substring(no).startsWith("dream")) {
				no += 5;
				if (!m.substring(no).startsWith("era") && m.substring(no).startsWith("er")) {
					no += 2;
				}
			} else if (m.substring(no).startsWith("erase")) {
				no += 5;
				if (m.substring(no).startsWith("r")) {
					no += 1;
				}
			} else {
				break;
			}
		}

		if (m.length() != no) {
			ans = "NO";
		}
		System.out.println(ans);
	}
}


Compiler output:
Main.java:14: error: unreported exception IOException; must be caught or declared to be thrown
      sc.close();
              ^
1 error
Language: C++

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

string divide[4] ={"dream", "dreamer", "erase", "eraser"};

int main(){
 string S;
  cin>>S;
  revese(S.being(),S.end());
  for(int i=0;i<4;++i) reverse(divide[i].begin(), divide[i].end());
  bool can = true;
    for (int i = 0; i < S.size();) {
        bool can2 = false; 
        for (int j = 0; j < 4; ++j) {
            string d = divide[j];
            if (S.substr(i, d.size()) == d) { 
                can2 = true;
                i += d.size(); 
            }
        }
        if (!can2) { 
            can = false;
            break;
        }
    }

    if (can) cout << "YES" << endl;
    else cout << "NO" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:12: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'being'
   11 |   revese(S.being(),S.end());
      |            ^~~~~
a.cc:11:3: error: 'revese' was not declared in this scope
   11 |   revese(S.being(),S.end());
      |   ^~~~~~
Language: C++

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

string divide[4] ={"dream", "dreamer", "erase", "eraser"}

int main(){
 string S;
  cin>>S;
  revese(S.being(),S.end());
  for(int i=0;i<4;++i) reverse(divide[i].begin(), divide[i].end());
  bool can = true;
    for (int i = 0; i < S.size();) {
        bool can2 = false; 
        for (int j = 0; j < 4; ++j) {
            string d = divide[j];
            if (S.substr(i, d.size()) == d) { 
                can2 = true;
                i += d.size(); 
            }
        }
        if (!can2) { 
            can = false;
            break;
        }
    }

    if (can) cout << "YES" << endl;
    else cout << "NO" << endl;
}

Compiler output:
a.cc:8:1: error: expected ',' or ';' before 'int'
    8 | int main(){
      | ^~~
Language: C++

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

string divide[4] ={"dream", "dreamer", "erase", "eraser"}

int main(){
 string S;
  cin>>S;
  revese(S.being(),S.end());
  for(int i=0;i<4;++i) reverse(divide[i].begin(), divide[i].end());
  bool can = true;
    for (int i = 0; i < S.size();) {
        bool can2 = false; 
        for (int j = 0; j < 4; ++j) {
            string d = divide[j];
            if (S.substr(i, d.size()) == d) { 
                can2 = true;
                i += d.size(); 
            }
        }
        if (!can2) { 
            can = false;
            break;
        }
    }

    if (can) cout << "YES" << endl;
    else cout << "NO" << endl;
}

  
}

Compiler output:
a.cc:8:1: error: expected ',' or ';' before 'int'
    8 | int main(){
      | ^~~
a.cc:34:1: error: expected declaration before '}' token
   34 | }
      | ^
Language: C

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

int main(){
	
	char S[100010],T[100010],i,revS[100010],dream[]="maerd",dreamer[]="remaerd",erase[]="esare",eraser[]="resare";
	int i,moji=0,j,count;
	
	
	scanf("%s",S);
	
	for(i=1;i<=strlen(S);i++){
		
		revS[i-1]=S[strlen(S)-i];
		
	}
	
	
	
	while(moji<strlen(S)){
	count=0;
	
	for(i=0;i<5;i++){
		
		if(revS[moji+i]!=dream[i]){
		break;
		}
		if(i==4){
		count=1;
		
	}
	}
	for(i=0;i<7;i++){
		if(revS[moji+i]!=dreamer[i]){
		break;
		}
		if(i==6){
		count=2;
		
	}
	}
	for(i=0;i<5;i++){
		
		if(revS[moji+i]!=erase[i]){
		break;
		}
		if(i==4){
		count=3;
		
	}
	}
	for(i=0;i<6;i++){
		
		if(revS[moji+i]!=eraser[i]){
		break;
		}
		if(i==5){
		count=4;
		
	}
	}
	if(count==0){
		printf("\nNO\n\n");
		return 0;
	}else if(count==1){
		moji+=5;
	}else if(count==2){
		moji+=7;
	}else if(count==3){
		moji+=5;
	}else if(count==4){
		moji+=6;
	}
	}
	
	
	
	printf("\nYES\n\n");
	
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:13: error: conflicting types for 'i'; have 'int'
    7 |         int i,moji=0,j,count;
      |             ^
main.c:6:34: note: previous declaration of 'i' with type 'char'
    6 |         char S[100010],T[100010],i,revS[100010],dream[]="maerd",dreamer[]="remaerd",erase[]="esare",eraser[]="resare";
      |                                  ^
Language: C++

#include <algorithm>
#include <bitset>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;

int main() {
    string S,T;
    string answer = "";
    vector<string> matcher = vector<string>(4,"");
    matcher[0]="dream";
    matcher[1]="dreamer";
    matcher[2]="erase";
    matcher[3]="eraser";
    T = "";
    vector<string> tmp;
    cin >> S;

    tmp.push_back(T);

    while(!tmp.empty()){
        T = tmp[tmp.size()-1];
        if (T == S){
            answer = "YES";
            break;
        }
        tmp.pop_back();
        for(int j = 0; j < matcher.size(); j++){
            string calc_tmp = T + matcher[j];
            int tmp_size = calc_tmp.size() -1;
            if(S.compare(0,tmp_size,calc_tmp,0,tmp_size) == 0){
                tmp.push_back(calc_tmp);
            }
        }
    }

    if (T == S){
        answer = "YES";
    }else{
        answer = "NO";
    }

    cout << answer << endl;
    return 0;

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

// 参考URL: https://qiita.com/drken/items/fd4e5e3630d0f5859067#%E7%AC%AC-9-%E5%95%8F--abc-049-c---daydream-300-%E7%82%B9

#include <bits/stdc++.h>

using namespace std;

int main() {


    string divide[4] = {"dream", "dreamer", "erase", "eraser"};

    string S;
    cin >> S;


    // 前後入れ替え
    reverse(S.begin(), S.end());
    cout << S;

    int N = S.size();

    // divide
    for (int i = 0; i < 4; ++i) {
        reverse(divide[i].begin(), divide[i].end());
    }
    bool can =true;
    string str;
    for (int i = 0; i < N; ++i) {
        bool flag = false;
        for (int j = 0; j < 4; ++j) {
            string d = divide[j];
            str = S.substr(i, d.size());
            if (str == d) {
                flag = true;
                i += d.size();
            }
        }
        if (!flag) {
            can = false;
            break;
        }

    }

    if (!can) {
        ans = "NO";
    }

    if (can){
        ans = "YES";
    }


    cout << ans << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:46:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   46 |         ans = "NO";
      |         ^~~
      |         abs
a.cc:50:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   50 |         ans = "YES";
      |         ^~~
      |         abs
a.cc:54:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   54 |     cout << ans << endl;
      |             ^~~
      |             abs
Language: C++

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

int main(){
    int i, m;
    string s;
    cin >> s;
    i = s.size()-1;
    while(i>0){
        m = i;
        if(i > 3){
            if(s.substr(i-4, 5) == "dream" || s.substr(i-4, 5) == "erase"){
                i -= 5;
            }
        }
        if(i > 4){
            if(s.substr(i-5, 6) == "eraser"){
                c -= 6;
            }
        }
        if(i > 5){
            if(s.substr(i-6, 7) == "dreamer"){
                i -= 7;
            }
        }
        if(m == i){
            cout << "NO";
            return 0;
        }
    }
    cout << "YES";
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: 'c' was not declared in this scope
   18 |                 c -= 6;
      |                 ^
Language: C++

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main(){
 	string added_symbol[] = {"dream","dreamer","erase","eraser" };
  	string s;
   	cin >> s;
  	
	reverse(s.begin(), s.end());
  	for(int i=0; i<4; i++) reverse(added_symbol[i].begin(), added_symbol[i].end());
  
  	for(int i=0; i<s.length();){
      	bool judge = false;
  		for(int j=0; j<4; j++){
          string temp = added_symbol[j];
          s.substr(i, temp.size());
          if(s.substr(i, temp.size()) ==  temp ){
            i+=added_symbol[j].length();
            judge = true;
          }
        }
      
      	if(judge == false) break;
    }
  
  	if(judge){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:19: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   19 |           s.substr(i, temp.size());
      |           ~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:3208:7: note: declared here
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |       ^~~~~~
a.cc:29:12: error: 'judge' was not declared in this scope
   29 |         if(judge){
      |            ^~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main(){
 	string added_symbol[] = {"dream","dreamer","erase","eraser" };
  	string s;
   	cin >> s;
  	
	reverse(s.begin(), s.end());
  	for(int i=0; i<4; i++) reverse(added_symbol[i].begin(), added_symbol[i].end());
  
  	for(int i=0; i<s.length();){
      	int judge = i;
  		for(int j=0; j<4; j++){
          string temp = added_symbol[j];
          s.substr(i, temp.size());
          if(s.substr(i, temp.size()) ==  temp ){
          	s.erase(i,temp.size()); 
            i+=added_symbol[j];
          }
        }
      
      	if(judge == i) break;
    }
  
  	if(s.length() == 0){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:19: warning: ignoring return value of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]', declared with attribute 'nodiscard' [-Wunused-result]
   19 |           s.substr(i, temp.size());
      |           ~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:3208:7: note: declared here
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |       ^~~~~~
a.cc:22:14: error: no match for 'operator+=' (operand types are 'int' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   22 |             i+=added_symbol[j];
      |             ~^~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <basic_string>
#include <algorithm>

using namespace std;

int main(){
 	string added_symbol[] = {"dream","dreamer","erase","eraser" };
  	string s;
   	cin >> s;
  	
	reverse(s.begin(), s.end());
  	for(int i=0; i<4; i++) reverse(added_symbol[i].begin(), added_symbol[i].end());
  
  	for(int i=0; i<s.length();){
  		for(int j=0; j<4; j++){
          string temp = added_symbol[j];
          if(temp == s.substr( s.begin(), temp.size() ) ){
          	s.erase(s.begin(), temp.size()); 
            i+=added_symbol[j];
          }
        }
    }
  
  	if(s.length() == 0){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
}

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

#include <iostream>
#include <string>
#include <algorithm>

using namespace std;

int main(){
 	string added_symbol[] = {"dream","dreamer","erase","eraser" };
  	string s;
   	cin >> s;
  	
	reverse(s.begin(), s.end());
  	for(int i=0; i<4; i++) reverse(added_symbol[i].begin(), added_symbol[i].end());
  
  	for(int i=0; i<s.length();){
  		for(int j=0; j<4; j++){
          string temp = added_symbol[j];
          if(temp == s.substr(s.begin(), temp.size()){
          	s.erase(s.begin(), temp.size()); 
            i+=added_symbol[j];
          }
        }
    }
  
  	if(s.length() == 0){
      cout << "YES" << endl;
    }else{
      cout << "NO" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:38: error: cannot convert 'std::__cxx11::basic_string<char>::iterator' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
   18 |           if(temp == s.substr(s.begin(), temp.size()){
      |                               ~~~~~~~^~
      |                                      |
      |                                      std::__cxx11::basic_string<char>::iterator
In file included from /usr/include/c++/14/string:54,
                 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/basic_string.h:3208:24: note:   initializing argument 1 of 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::substr(size_type, size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]'
 3208 |       substr(size_type __pos = 0, size_type __n = npos) const
      |              ~~~~~~~~~~^~~~~~~~~
a.cc:18:54: error: expected ')' before '{' token
   18 |           if(temp == s.substr(s.begin(), temp.size()){
      |             ~                                        ^
      |                                                      )
a.cc:22:9: error: expected primary-expression before '}' token
   22 |         }
      |         ^