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

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

int main() {
string t;
cin >> t;
for(int i = 0; i < t.length(); i++) if(t[i] == ’?’) t[i] = 'D';
cout << t << endl;
return 0;
}

Compiler output:
a.cc:7:48: error: extended character ’ is not valid in an identifier
    7 | for(int i = 0; i < t.length(); i++) if(t[i] == ’?’) t[i] = 'D';
      |                                                ^
a.cc:7:50: error: extended character ’ is not valid in an identifier
    7 | for(int i = 0; i < t.length(); i++) if(t[i] == ’?’) t[i] = 'D';
      |                                                  ^
a.cc: In function 'int main()':
a.cc:7:48: error: '\U00002019' was not declared in this scope
    7 | for(int i = 0; i < t.length(); i++) if(t[i] == ’?’) t[i] = 'D';
      |                                                ^
a.cc:7:51: error: expected ':' before ')' token
    7 | for(int i = 0; i < t.length(); i++) if(t[i] == ’?’) t[i] = 'D';
      |                                                   ^
      |                                                   :
a.cc:7:51: error: expected primary-expression before ')' token
Language: C++

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

int main() {
	string t;
	cin >> t;
    int len=lenght(t);
    for (int i=0; i<len; i++){
      if (t.at(i)=='?')
        t.at(i)=='D';
    }
	cout << t << endl;
}

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

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

int main() {
	string t;
	cin >> t;
    for (i=0; i<t.length(); i++){
      if (t.at(i)=='?')
        t.at(i)=='D';
    }
	cout << t << endl;
}

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

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

int main(void){
  std::string t;
  std::cin >> t;

  std::replace(t.begin(), t.end(), '?', 'D');

  std::cout << t;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:8: error: 'replace' is not a member of 'std'
   10 |   std::replace(t.begin(), t.end(), '?', 'D');
      |        ^~~~~~~
Language: C++

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

int main(){
  string T;
  cin >> T;
  int C=T.size()
  for(int i=0;i<C;i++){
    if(T.at(i)=='?'){
      T.at(i)='D';
    }
    cout << T.at(i);
    if(i==T.at(i)-1){
      cout << endl;
    }
  }
}

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

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

int main(){
  string T;
  cin >> T;
  for(int i=0;i<T.size();i++){
    if(T.at(i)='?'){
      cout << 'D';
    }
      else{
        cout << T.at(i);
      }
      if(i==T.at(i)-1){
        cout << endl;
      }
    }
  }
}

Compiler output:
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

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

int main(){
  string T;
  cin >> T;
  for(int i=0;i<T.size();i++){
    if(T.at(i)='?'){
      cout << 'D';
      else{
        cout << T.at(i);
      }
      if(i==T.at(i)-1){
        cout << endl;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: expected '}' before 'else'
   10 |       else{
      |       ^~~~
a.cc:8:20: note: to match this '{'
    8 |     if(T.at(i)='?'){
      |                    ^
a.cc: At global scope:
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

int main(){
    char str[200000];
    cin >> str;
    
    for(int i=0; i<strlen(str);i++){
        if(str[i]=='?'){
            str[i] = 'D';
        }

    }
    cout << str << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> str;
      |     ^~~
a.cc:5:20: error: 'strlen' was not declared in this scope
    5 |     for(int i=0; i<strlen(str);i++){
      |                    ^~~~~~
a.cc:1:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | int main(){
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << str << endl;
      |     ^~~~
a.cc:11:20: error: 'endl' was not declared in this scope
   11 |     cout << str << endl;
      |                    ^~~~
Language: C++

#include <iostream>

int main() {
  std::string s;
  std::cin >> s;
  
  for(int i = 0; i < n; i++)
    std::cout << (s[i] == 'P' ? 'P' : 'D');
  
  std::cout << std::endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:22: error: 'n' was not declared in this scope
    7 |   for(int i = 0; i < n; i++)
      |                      ^
Language: C++

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

int main() {
	string s;
    cin >> s;
    int n = s.size();
    for(int i = 0; i<n; i++) if(s[i]=='?) s[i] = 'D';
    cout << s << endl;
}


Compiler output:
a.cc:8:39: warning: multi-character literal with 10 characters exceeds 'int' size of 4 bytes
    8 |     for(int i = 0; i<n; i++) if(s[i]=='?) s[i] = 'D';
      |                                       ^~~~~~~~~~~~~
a.cc:8:52: warning: missing terminating ' character
    8 |     for(int i = 0; i<n; i++) if(s[i]=='?) s[i] = 'D';
      |                                                    ^
a.cc:8:52: error: missing terminating ' character
    8 |     for(int i = 0; i<n; i++) if(s[i]=='?) s[i] = 'D';
      |                                                    ^~
a.cc: In function 'int main()':
a.cc:8:39: error: unable to find character literal operator 'operator""D' with 'int' argument
    8 |     for(int i = 0; i<n; i++) if(s[i]=='?) s[i] = 'D';
      |                                       ^~~~~~~~~~~~~
a.cc:10:1: error: expected primary-expression before '}' token
   10 | }
      | ^
a.cc:9:23: error: expected ')' before '}' token
    9 |     cout << s << endl;
      |                       ^
      |                       )
   10 | }
      | ~                      
a.cc:8:32: note: to match this '('
    8 |     for(int i = 0; i<n; i++) if(s[i]=='?) s[i] = 'D';
      |                                ^
a.cc:10:1: error: expected primary-expression before '}' token
   10 | }
      | ^
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
    
    string T;
    cin>>T;
    for(int i = 0;i<T.length();i++){
        if(T[i] == "?"){
            T[i] = "D";
        }
       
    }
    cout<<T<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if(T[i] == "?"){
a.cc:12:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |             T[i] = "D";
      |                    ^~~
      |                    |
      |                    const char*
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
    
    string T;
    cin>>T;
    for(int i = 0;i<string.length();i++){
        if(T[i] == "?"){
            T[i] = "D";
        }
       
    }
    cout<<T<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: expected primary-expression before '.' token
   10 |     for(int i = 0;i<string.length();i++){
      |                           ^
a.cc:11:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         if(T[i] == "?"){
a.cc:12:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |             T[i] = "D";
      |                    ^~~
      |                    |
      |                    const char*
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
    
    string T;
    cin>>T;
    for(int i = 0;i<string.length();i++){
        if(c == "?"){
            T[i] = "D";
        }
       
    }
    cout<<T<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: expected primary-expression before '.' token
   10 |     for(int i = 0;i<string.length();i++){
      |                           ^
a.cc:11:12: error: 'c' was not declared in this scope
   11 |         if(c == "?"){
      |            ^
a.cc:12:20: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |             T[i] = "D";
      |                    ^~~
      |                    |
      |                    const char*
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
    
    string T;
    cin>>T;
    char c;
    char pc = "a";
    int ans = 0;

    for(int i = 0;i<string.size();i++){
        
        c = T[i];
        if(c == "?"&&pc == "P"){
            ans+=2;
        }
        if(c=="D"){
            ans+= 1;
        }
        pc = c;
    }
    cout<<ans<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   11 |     char pc = "a";
      |               ^~~
      |               |
      |               const char*
a.cc:14:27: error: expected primary-expression before '.' token
   14 |     for(int i = 0;i<string.size();i++){
      |                           ^
a.cc:17:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |         if(c == "?"&&pc == "P"){
      |            ~~^~~~~~
a.cc:17:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |         if(c == "?"&&pc == "P"){
      |                      ~~~^~~~~~
a.cc:20:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |         if(c=="D"){
      |            ~^~~~~
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
    
    string T;
    cin>>T;
    char c;
    char pc = null;
    int ans = 0;

    for(int i = 0;i<string.size();i++){
        
        c = T[i];
        if(c == "?"&&pc == "P"){
            ans+=2;
        }
        if(c=="D"){
            ans+= 1;
        }
        pc = c;
    }
    cout<<ans<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: 'null' was not declared in this scope
   11 |     char pc = null;
      |               ^~~~
a.cc:14:27: error: expected primary-expression before '.' token
   14 |     for(int i = 0;i<string.size();i++){
      |                           ^
a.cc:17:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |         if(c == "?"&&pc == "P"){
      |            ~~^~~~~~
a.cc:17:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |         if(c == "?"&&pc == "P"){
      |                      ~~~^~~~~~
a.cc:20:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |         if(c=="D"){
      |            ~^~~~~
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
    
    string T;
    cin>>T;
    char c,pc;
    int ans = 0;

    for(int i = 0;i<string.size();i++){
        
        c = string[i];
        if(c == "?"&&pc == "P"){
            ans+=2;
        }
        if(c=="D"){
            ans+= 1;
        }
        pc = c;
    }
    cout<<ans<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:27: error: expected primary-expression before '.' token
   13 |     for(int i = 0;i<string.size();i++){
      |                           ^
a.cc:15:19: error: expected primary-expression before '[' token
   15 |         c = string[i];
      |                   ^
a.cc:16:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |         if(c == "?"&&pc == "P"){
      |            ~~^~~~~~
a.cc:16:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |         if(c == "?"&&pc == "P"){
      |                      ~~~^~~~~~
a.cc:19:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |         if(c=="D"){
      |            ~^~~~~
Language: C++

#incldue<bits/stdc++.h>
using namespace std;
int main()
{
 string str;
  cin>>str;
  for(int i=0;i<str.length();i++)
  {
    if(str[i] == '?')
    {
      cout<<'D';
    }
    else
      cout<<str[i];
  }
  cout<<endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue<bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:2: error: 'string' was not declared in this scope
    5 |  string str;
      |  ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #incldue<bits/stdc++.h>
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>str;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incldue<bits/stdc++.h>
a.cc:6:8: error: 'str' was not declared in this scope; did you mean 'std'?
    6 |   cin>>str;
      |        ^~~
      |        std
a.cc:11:7: error: 'cout' was not declared in this scope
   11 |       cout<<'D';
      |       ^~~~
a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:7: error: 'cout' was not declared in this scope
   14 |       cout<<str[i];
      |       ^~~~
a.cc:14:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:3: error: 'cout' was not declared in this scope
   16 |   cout<<endl;
      |   ^~~~
a.cc:16:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:9: error: 'endl' was not declared in this scope
   16 |   cout<<endl;
      |         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incldue<bits/stdc++.h>
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define pb push_back
#define pf push_front
const int mod = 1e9 + 7;
const int INF = 1e9;
const double pi = acos(-1.0);
typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vi;
int main(){
    string t; cin >> t;
    rep(i,t.size())cout << ((t[i]=='?')'D':t[i]);
    cout << endl;

    return 0;
}  

Compiler output:
a.cc: In function 'int main()':
a.cc:19:40: error: expected ')' before 'D'
   19 |     rep(i,t.size())cout << ((t[i]=='?')'D':t[i]);
      |                            ~           ^~~
      |                                        )
Language: C++

using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
int main(void){

        string T;

        cin>>T;

        rep(i,T.length()){
                if(T[i]=='?'){
                        T[i]='D';
                }
        cout<<T<<endl;
          return 0;
        }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string T;
      |         ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | using namespace std;
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>T;
      |         ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:7:14: error: 'T' was not declared in this scope
    7 |         cin>>T;
      |              ^
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout<<T<<endl;
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:13:18: error: 'endl' was not declared in this scope
   13 |         cout<<T<<endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:15:10: error: expected '}' at end of input
   15 |         }
      |          ^
a.cc:3:15: note: to match this '{'
    3 | int main(void){
      |               ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stdlib.h>
#include <cmath>
#include <numeric>
#include <functional>
#include <stack>
#include <iomanip>
#include <map>
#include <cstdio>


int main() {
	std::string s;

	std::cin >> s;

	std::replace(s.begin(), s.end(), "?", "D");

	std::cout << s << std::endl;

	return 0;
}


Compiler output:
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:4:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::replace(_FIter, _FIter, const _Tp&, const _Tp&) [with _FIter = __gnu_cxx::__normal_iterator<char*, __cxx11::basic_string<char> >; _Tp = char [2]]':
a.cc:20:14:   required from here
   20 |         std::replace(s.begin(), s.end(), "?", "D");
      |         ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4293:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
 4293 |         if (*__first == __old_value)
      |             ~~~~~~~~~^~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4294:20: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
 4294 |           *__first = __new_value;
      |           ~~~~~~~~~^~~~~~~~~~~~~
      |                    |
      |                    const char*
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String T =sc.next();
    int N =T.length();
    String t[] =T.split("",0);
    String anss ="0";
    for(int i=0;i<N;i++){
      if(t[i].equals("?")){
        t[i]=="D";}
      anss =anss +t[i];}
    String ans =anss.split(1,N+1);
    System.out.println(ans);
  }
}

Compiler output:
Main.java:11: error: not a statement
        t[i]=="D";}
            ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
	string t;
	cin >> t;
	for(int i=0;i<t.lenght(),i++){
		if(t[i]=='?')
			t[i]='D';
	}
	cout << t << endl;
    return 0;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:25: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'lenght'; did you mean 'length'?
    7 |         for(int i=0;i<t.lenght(),i++){
      |                         ^~~~~~
      |                         length
a.cc:7:37: error: expected ';' before ')' token
    7 |         for(int i=0;i<t.lenght(),i++){
      |                                     ^
      |                                     ;
Language: C++

1. #include <iostream>
2. #include <cstring>
3. //#include <bits/stdc++.h>
4. using namespace std;
5. int main(){
6.     //char a[200000];
7.     string a;
8.     cin>>a;
9.     int b=a.length();
10.     //b=strlen(a);
11.     //cout<<b<<endl;
12.     for(int i=0;i<b;i++){
13.         if(a[i]=='?'){
14.                 a[i]='D';
15. 
16.             /*if(a[i-1]=='P'){
17.                 a[i]='D';
18.             }
19.             if(a[i-1]=='D'){
20.                 if(a[i+1]=='D'||a[i+1]=='?'){
21.                     a[i]='P';
22.                 }else{
23.                     a[i]='D';
24.                 }
25.                 a[i]='D';
26.             }*/
27.         }
28.     }
29.     cout<<a<<endl;
30. }


Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | 1. #include <iostream>
      |    ^
a.cc:2:4: error: stray '#' in program
    2 | 2. #include <cstring>
      |    ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 1. #include <iostream>
      | ^~
a.cc:5:1: error: expected unqualified-id before numeric constant
    5 | 5. int main(){
      | ^~
Language: C++

1. #include <iostream>
2. #include <cstring>
3. //#include <bits/stdc++.h>
4. using namespace std;
5. int main(){
6.     //char a[200000];
7.     string a;
8.     cin>>a;
9.     int b=a.length();
10.     //b=strlen(a);
11.     //cout<<b<<endl;
12.     for(int i=0;i<b;i++){
13.         if(a[i]=='?'){
14.                 a[i]='D';
15. 
16.             /*if(a[i-1]=='P'){
17.                 a[i]='D';
18.             }
19.             if(a[i-1]=='D'){
20.                 if(a[i+1]=='D'||a[i+1]=='?'){
21.                     a[i]='P';
22.                 }else{
23.                     a[i]='D';
24.                 }
25.                 a[i]='D';
26.             }
27.         }*/
28.     }
29.     cout<<a<<endl;
30. }


Compiler output:
a.cc:1:4: error: stray '#' in program
    1 | 1. #include <iostream>
      |    ^
a.cc:2:4: error: stray '#' in program
    2 | 2. #include <cstring>
      |    ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 1. #include <iostream>
      | ^~
a.cc:5:1: error: expected unqualified-id before numeric constant
    5 | 5. int main(){
      | ^~
Language: C++

#include <iostream>
#include <string>
 
using namespace std;
 
int main()
{
	string T;
	cin >> T;
	for (int i = 0; i < (int)T.length(); ++i)
	{
		if (T[i] == '?')
		{
			
				T[i] = 'D';
			
	}
	cout << T << endl;
}

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

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

int main() {
  string t;
  int count =0;
  cin >> t;
for(int i = 0;i<t.size()+1;i++){
    if(t.at(i)=='P'){
        if(t.at(i)== 'D' || '?' ){
            count++;
        }
        }else{
            count++;
        }
    }
}

  cout << count << endl;
} 

Compiler output:
a.cc:19:3: error: 'cout' does not name a type
   19 |   cout << count << endl;
      |   ^~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  if(t[0]=="?")
    if(s[1]=="D")
      s[0]="P";
    else
      s[0]="D";
  for(int i=1;s[i];i++)#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  if(s[0]=='?')
    if(s[1]=='D')
      s[0]='P';
    else
      s[0]='D';
  for(int i=1;s[i];i++)
  {
    if(s[i]=='?')
      if(s[i-1]=='D')
        s[i]='P';
      else
        s[i]='D';
  }
  for(int i=0;s[i];i++)
    cout << s[i];
  }

  {
    if(s[i]=="?")
      if(s[i-1]==D)
        s[i]="P";
      else
        s[i]="D";
  }
  for(int i=0;s[i];i++)
    cout << s[i];
  }

Compiler output:
a.cc:12:24: error: stray '#' in program
   12 |   for(int i=1;s[i];i++)#include<bits/stdc++.h>
      |                        ^
a.cc: In function 'int main()':
a.cc:7:6: error: 't' was not declared in this scope
    7 |   if(t[0]=="?")
      |      ^
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(s[1]=="D")
a.cc:9:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |       s[0]="P";
      |            ^~~
      |            |
      |            const char*
a.cc:11:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   11 |       s[0]="D";
      |            ^~~
      |            |
      |            const char*
a.cc:12:25: error: 'include' was not declared in this scope
   12 |   for(int i=1;s[i];i++)#include<bits/stdc++.h>
      |                         ^~~~~~~
a.cc:12:33: error: 'bits' was not declared in this scope
   12 |   for(int i=1;s[i];i++)#include<bits/stdc++.h>
      |                                 ^~~~
a.cc:12:38: error: 'stdc' was not declared in this scope; did you mean 'std'?
   12 |   for(int i=1;s[i];i++)#include<bits/stdc++.h>
      |                                      ^~~~
      |                                      std
a.cc:13:1: error: expected primary-expression before 'using'
   13 | using namespace std;
      | ^~~~~
a.cc:14:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   14 | int main()
      |         ^~
a.cc:14:9: note: remove parentheses to default-initialize a variable
   14 | int main()
      |         ^~
      |         --
a.cc:14:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:15:1: error: a function-definition is not allowed here before '{' token
   15 | {
      | ^
a.cc:36:10: error: 'i' was not declared in this scope
   36 |     if(s[i]=="?")
      |          ^
a.cc:37:18: error: 'D' was not declared in this scope
   37 |       if(s[i-1]==D)
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin>>s;
  if(t[0]=="?")
    if(s[1]=="D")
      s[0]="P";
    else
      s[0]="D";
  for(int i=1;s[i];i++)
  {
    if(s[i]==?)
      if(s[i-1]==D)
        s[i]="P";
      else
        s[i]="D";
  }
  for(int i=0;s[i];i++)
    cout << s[i];
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 't' was not declared in this scope
    7 |   if(t[0]=="?")
      |      ^
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(s[1]=="D")
a.cc:9:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |       s[0]="P";
      |            ^~~
      |            |
      |            const char*
a.cc:11:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   11 |       s[0]="D";
      |            ^~~
      |            |
      |            const char*
a.cc:14:14: error: expected primary-expression before '?' token
   14 |     if(s[i]==?)
      |              ^
a.cc:14:15: error: expected primary-expression before ')' token
   14 |     if(s[i]==?)
      |               ^
a.cc:14:15: error: expected ':' before ')' token
   14 |     if(s[i]==?)
      |               ^
      |               :
a.cc:14:15: error: expected primary-expression before ')' token
a.cc:15:18: error: 'D' was not declared in this scope
   15 |       if(s[i-1]==D)
      |                  ^
a.cc:16:14: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   16 |         s[i]="P";
      |              ^~~
      |              |
      |              const char*
a.cc:18:14: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   18 |         s[i]="D";
      |              ^~~
      |              |
      |              const char*
Language: C++

 #include<bits/stdc++.h> 
using namespace std;
 int main() { 
   string t;
   cin >> t; 
   for(int i = 0; i < t.length(); i++) 
     if(t[i] == ’?’) t[i] = ’D’; 
   cout << t << endl; return 0;  }


Compiler output:
a.cc:7:17: error: extended character ’ is not valid in an identifier
    7 |      if(t[i] == ’?’) t[i] = ’D’;
      |                 ^
a.cc:7:19: error: extended character ’ is not valid in an identifier
    7 |      if(t[i] == ’?’) t[i] = ’D’;
      |                   ^
a.cc:7:29: error: extended character ’ is not valid in an identifier
    7 |      if(t[i] == ’?’) t[i] = ’D’;
      |                             ^
a.cc:7:29: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:7:17: error: '\U00002019' was not declared in this scope
    7 |      if(t[i] == ’?’) t[i] = ’D’;
      |                 ^
a.cc:7:20: error: expected ':' before ')' token
    7 |      if(t[i] == ’?’) t[i] = ’D’;
      |                    ^
      |                    :
a.cc:7:20: error: expected primary-expression before ')' token
a.cc:7:29: error: '\U00002019D\U00002019' was not declared in this scope
    7 |      if(t[i] == ’?’) t[i] = ’D’;
      |                             ^~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
#define rep(i,a,b) for (int i = (a); i < (b); i++ )

int main() {
	string t;
	cin >> t;
rep(i,0,t.size()){
  if (t.at(i)=='?'){
    t.at(i)="D";
  }
	}
cout<< t<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   10 |     t.at(i)="D";
      |             ^~~
      |             |
      |             const char*
Language: C++

#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    t = input()
    bef = '!'
    s = ""
    for c in t:
        nc = c
        if c == '?':
            if bef == "P":
                nc = "D"
            else:
                nc = "P"
        bef = nc
        s += nc
    print(s)



if __name__ == '__main__':
    main()


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python
      |  ^
a.cc:2:3: error: invalid preprocessing directive #coding
    2 | # coding: utf-8
      |   ^~~~~~
a.cc:30:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   30 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:4:1: error: 'def' does not name a type
    4 | def ri():
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  string t;
  cin>>t;
  for (int i=0;i<t.size();i++){
    if (t.at(i)=="?"){
      t.at(i)="D";}
 cout<<t.at(i);
  }
  cout<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     if (t.at(i)=="?"){
      |         ~~~~~~~^~~~~
a.cc:8:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    8 |       t.at(i)="D";}
      |               ^~~
      |               |
      |               const char*
Language: Java

import java.util.Scanner;

public class NOMURA2020BSandbox {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String T = sc.next();
        System.out.println(T.replaceAll("\\?", "D"));
    }
}

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

import java.util.Scanner;

public class NOMURA2020BSandbox {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String T = sc.next();

        System.out.println(T.replaceAll("/?", "D"));
    }
}

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


#include <iostream>
#include <cstring>
using namespace std;
int main(){
    char a[200000];
    cin>>a;
    int b=strlen(a);
    //b=strlen(a);
    //cout<<b<<endl;
    for(int i=0;i<b;i++){
        if(a[i]=='?'){
            if(a[i-1]=='P'){
                a[i]='D';
            }
            if(a[i-1]=='D'){
                /*if(a[i+1]=='D'||a[i+1]=='?'){
                    a[i]='P';
                }else{
                    a[i]='D';
                }*/
                a[i]='D';
            }
        }
    }
    cout<<a<<endl;
}


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

#include <bits/stdc++.h>
 
using namespace std;
 
int main(){
 
  string data;
  cin >> data;
  
  for(int i=0;i<(int)data.size()-1;i++){
	if(data.substr(i, 1)=="P" && data.substr(i+1, 1)=="?"){
		data.replace(i+1, 1, "D");
    }else if(data.substr(i, 1)=="D" && data.substr(i+1, 1)=="?"){
      	data.replace(i+1, 1, "D");
    }
    if(data.substr(i, 1)=="?"){
		data.replace(i+1, 1, "D");
    }
  }
 
  cout << data << endl;
  return 0;
}
#include <bits/stdc++.h>
 
using namespace std;
 
int main(){
 
  string data;
  cin >> data;
  
  for(int i=0;i<(int)data.size();i++){
	if(data.substr(i, 1)=="?"){
		data.replace(i+1, 1, "D");
    }
  }

  cout << data << endl;
  return 0;
}

Compiler output:
a.cc:28:5: error: redefinition of 'int main()'
   28 | int main(){
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(){
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() 
{
string t;
cin >> t;
for(int i = 0; i < t.length(); i++) 
  if(t[i] == ’?’) 
    t[i] = ’D’;
  cout << t << endl;
return 0;
}

Compiler output:
a.cc:8:14: error: extended character ’ is not valid in an identifier
    8 |   if(t[i] == ’?’)
      |              ^
a.cc:8:16: error: extended character ’ is not valid in an identifier
    8 |   if(t[i] == ’?’)
      |                ^
a.cc:9:12: error: extended character ’ is not valid in an identifier
    9 |     t[i] = ’D’;
      |            ^
a.cc:9:12: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:14: error: '\U00002019' was not declared in this scope
    8 |   if(t[i] == ’?’)
      |              ^
a.cc:8:17: error: expected ':' before ')' token
    8 |   if(t[i] == ’?’)
      |                 ^
      |                 :
a.cc:8:17: error: expected primary-expression before ')' token
a.cc:9:12: error: '\U00002019D\U00002019' was not declared in this scope
    9 |     t[i] = ’D’;
      |            ^~~
Language: C

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

int main()
{
    int i;
    char s[200000]={};
    scanf("%s",&s);
    int l=strlen(s);
    for(i=0;i<l);i++){
        if(s[i]=='?') printf("D");
        else printf("%c",s[i]);
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:11:16: error: expected ';' before ')' token
   11 |     for(i=0;i<l);i++){
      |                ^
      |                ;
main.c:11:21: error: expected ';' before ')' token
   11 |     for(i=0;i<l);i++){
      |                     ^
      |                     ;
main.c:11:21: error: expected statement before ')' token
Language: Java

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class PostDoc {
	public static void main(String[] args) {
		InputReader r = new InputReader(System.in);
		char[] arr = r.next().toCharArray();
		for (int i = 0; i < arr.length; i++) {
			if (arr[i] == '?')
				arr[i] = 'D';
		}
		System.out.println(new String(arr));
	}

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

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

		public InputReader(FileReader stream) {
			reader = new BufferedReader(stream);
			tokenizer = null;
		}

		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return 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 int nextInt() {
			return Integer.parseInt(next());
		}

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

		public double nextDouble() {
			return Double.parseDouble(next());
		}
	}
}


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

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using vb = vector<bool>;
using P = pair<ll, ll>;
template <typename T> using pq = priority_queue<T>;
template <typename T> using minpq = priority_queue<T, vector<T>, greater<T>>;
template <typename T, typename K> using ump = unordered_map<T, K>;
const ll dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
const ll mod = 1000000007;
const ll inf = ll(1e9);
const ll e5 = ll(1e5);
const ll ll_inf = ll(1e9) * ll(1e9);

#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repr(i, n) for (ll i = ll(n - 1); i >= 0; i--)
#define each(i, mp) for (auto &i : mp)
#define eb emplace_back
#define F first
#define S second
#define all(obj) (obj).begin(), (obj).end()

template <class T> ostream &operator<<(ostream &out, const vector<T> &list) {
    ll n = list.size();
    rep(i, n) out << list[i] << ' ';
    return out;
}

template <class T> istream &operator>>(istream &in, vector<T> &list) {
    ll n = list.size();
    rep(i, n) in >> list[i];
    return in;
}

template <class T> ostream &operator<<(ostream &out, const vector<vector<T>> &list) {
    ll n = list.size();
    rep(i, n) out << list[i] << '\n';
    return out;
}

/* ------------- ANSWER ------------- */
/* ---------------------------------- */

void solve() {
    string t;
    cin >> t;
    ll n = t.size();
    ll ans = 0;
    rep(i, n) {
        if (t[i] == '?') {
            t[i] = 'D'
        }
    }
    cout << t << '\n';
}

int main() {
#ifdef MY_DEBUG
    while (true) {
#endif
        solve();
#ifdef MY_DEBUG
    }
#endif
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:54:23: error: expected ';' before '}' token
   54 |             t[i] = 'D'
      |                       ^
      |                       ;
   55 |         }
      |         ~
Language: C++

#pragma GCC optimize("Ofast")
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>

const long long INF = 1e17+7;
const long long MOD = 1e9+7;
const double PI=acos(-1);

using namespace std;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	string s;
	cin >> s;
	string res="";
	for(int i=0;i<s.size();i++){
		if(s[i]=='?'){
			res+='D';
		}else{
			res+=s[i];
		}
	}
	cout << res << endl;
	return 0;
}a


Compiler output:
a.cc:34:2: error: 'a' does not name a type
   34 | }a
      |  ^
Language: C++

#pragma GCC optimize("Ofast")
#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<string.h>
#include<math.h>
#include<map>
#include<iomanip>
#include<queue>

const long long INF = 1e17+7;
const long long MOD = 1e9+7;
const double PI=acos(-1);

using namespace std;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	string s;
	getline(cin,s);
	string res="";
	for(int i=0;i<s.size();i++){
		if(s[i]=='?'){
			res+='D';
		}else{
			res+=s[i];
		}
	}
	cout << res << endl;
	return 0;
}a


Compiler output:
a.cc:34:2: error: 'a' does not name a type
   34 | }a
      |  ^
Language: C

#include <bits/stdc++.h>
#include <boost/range/adaptor/reversed.hpp>
#include <boost/range/algorithm/sort.hpp>
#include <boost/range/irange.hpp>

using namespace std;
using boost::irange;
using boost::sort;
using boost::adaptors::reversed;

int main() {
    string t;
    cin >> t;
    for (int i = 0; i < (int)t.length(); i++) {
        if (t[i] == '?') t[i] = 'D';
    }

    cout << t << endl;
}


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 _GLIBCXX_DEBUG
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define square(x) pow(x 2.0)
#define all(x) (x).begin(),(x).end()
#define F first
#define S second
#define max_queue(x) priority_queue<x>
#define min_queue(x) priority_queue<x, vector<x>, greater<x>>
#define big_sort(v) sort(all(v), [](int a, int b) { return a > b; })//大きい順にソート
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
#define co(x) cout << x << endl;
#define cins(n,v) rep(i,n){cin >> v.at(i);}
#define couts(v) rep(i,v.size()){cout << v.at(i) << endl;}
// aよりもbが大きいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>
bool chmax(T &a, const T& b) {
  if (a < b) {
    a = b;  // aをbで更新
    return true;
  }
  return false;
}
// aよりもbが小さいならばaをbで更新する
// (更新されたならばtrueを返す)
template <typename T>
bool chmin(T &a, const T& b) {
  if (a > b) {
    a = b;  // aをbで更新
    return true;
  }
  return false;
}
/*
#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
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
*/
int main() {
  srand((unsigned)time(NULL));
  string t;
  cin >> t;
  rep(i,t.size()){
    if(t[i]=='?'){t[i]==D};
    cout << t[i] << endl;
  }

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:64:25: error: 'D' was not declared in this scope
   64 |     if(t[i]=='?'){t[i]==D};
      |                         ^
Language: C

// AtCoder150 C

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <string.h>
#include <memory.h>
#include <malloc.h>
#include <stdlib.h>
#include <ctype.h>

// qsortで用いる比較用関数．*a<*bならaが先になる．
int compare(const void* a, const void* b) {
    return *(int*)a - *(int*)b;
}

int revcompare(const void* a, const void* b) {
    return *(int*)b- *(int*)a;
}

double dmax(double x, double y){
    if(x < y) return y;
    return x;
}

int main(void)
{
    int i,j,n;

    char t[200001];

    scanfI("%s", t);

    for(i=0;i<strlen(t); i++){
        if(t[i] == '?') t[i] = 'D';
    }

    printf("%s", t);
   
    return 0;

}

Compiler output:
main.c: In function 'main':
main.c:33:5: error: implicit declaration of function 'scanfI'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   33 |     scanfI("%s", t);
      |     ^~~~~~
      |     scanf
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(SYSTEM>IN);
    String str  = sc.next();
    String result = str.replace("?","D");
    System.out.println(result);
  }
}

Compiler output:
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(SYSTEM>IN);
                             ^
  symbol:   variable SYSTEM
  location: class Main
Main.java:4: error: cannot find symbol
    Scanner sc = new Scanner(SYSTEM>IN);
                                    ^
  symbol:   variable IN
  location: class Main
2 errors
Language: C++

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

int main() {
	string t; cin >> t; string s = t;
	int a =0; int b = 0;
	for(int i=t.size();i>0;i--) {
		if(t[i]=='?') {
			t[i] = 'D';
		}
	}
	else cout << t << endl;
}


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

#include <bits/stdc++.h>
#define MOD 1000000007
#define INF 1001001001
#define LINF 1001001001001001001
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define bit(n) (1LL<<(n))
using namespace std;

typedef pair<int, int> P;
typedef pair<long long, long long> LLP;
typedef long long ll;

int main() {

    string T;
    cin >> T;
    rep(i,T.size()) {cout << (T[i] == '?' ? 'D' : T[i]) << endl;
    
    return 0;
}

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

#include <stdio.h>
 
int main(void) {
  char T[200000];
  if(scanf("%s", T)==1);
  int i, frag;
  for (i=0; i<200000; i++) {
    if (T[i]=='?') {
      A[i]='D';
    }
    else if(T[i]==NULL) {
      break;
    }
  }
  printf("%s", D);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:7: error: 'A' undeclared (first use in this function)
    9 |       A[i]='D';
      |       ^
main.c:9:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:17: warning: comparison between pointer and integer
   11 |     else if(T[i]==NULL) {
      |                 ^~
main.c:15:16: error: 'D' undeclared (first use in this function)
   15 |   printf("%s", D);
      |                ^
Language: C++

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

int main() {
  string S;
  cin>>S;
  
  for(int i=0;i < S.size();i++){
    if(S.(i)=='?')
      S.(i)='D';
  }
  
  cout<<S<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected unqualified-id before '(' token
    9 |     if(S.(i)=='?')
      |          ^
a.cc:10:9: error: expected unqualified-id before '(' token
   10 |       S.(i)='D';
      |         ^
Language: C++

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

int main() {
  string S;
  cin>>S;
  
  for(int i=0;i<S.size();i++){
    if(S.(i)=='?')
      S.(i)='D';
  }
  
  cout<<S<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected unqualified-id before '(' token
    9 |     if(S.(i)=='?')
      |          ^
a.cc:10:9: error: expected unqualified-id before '(' token
   10 |       S.(i)='D';
      |         ^
Language: C++

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

int main() {
  string S;
  cin>>S;
  
  for(it i=0;i<S.size();i++){
    if(S.(i)=='?')
      S.(i)='D';
  }
  
  cout<<S<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'it' was not declared in this scope; did you mean 'int'?
    8 |   for(it i=0;i<S.size();i++){
      |       ^~
      |       int
a.cc:8:14: error: 'i' was not declared in this scope
    8 |   for(it i=0;i<S.size();i++){
      |              ^
a.cc:9:10: error: expected unqualified-id before '(' token
    9 |     if(S.(i)=='?')
      |          ^
a.cc:10:9: error: expected unqualified-id before '(' token
   10 |       S.(i)='D';
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
string t;
int main() {
  cin >> t;
  for(int i = 0;i<t.size();i++){
    if(t.at(i) == '?'){
      t.at(i) = 'D'
    }
  }
  cout << t << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: expected ';' before '}' token
    8 |       t.at(i) = 'D'
      |                    ^
      |                    ;
    9 |     }
      |     ~
Language: C++

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

int main(){
  string s;
  cin>>s;
  for(int i=0;i<n;i++){
    if(s[i]=='?'){
      cout<<'D';
    }else{
      cout<<s[i];
    }
  }
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: 'n' was not declared in this scope
    7 |   for(int i=0;i<n;i++){
      |                 ^
Language: C++

ｇｄｔｒｔｇ

Compiler output:
a.cc:1:1: error: '\U0000ff47\U0000ff44\U0000ff54\U0000ff52\U0000ff54\U0000ff47' does not name a type
    1 | ｇｄｔｒｔｇ
      | ^~~~~~~~~~~~