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

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

int main(){
    int n,k;
    vector<string> s;
    cin >> n >> 
    for(int i+0;i<n;i++){
        char c;
        cin >> c;
        s.at(i) =c;
    } 
    cin >> k;
    char c=s.at(k-1);


        for(int i+0;i<n;i++){
        if(s.at(i) != c){
            s.at(i) = "*"
        }
    cout << s << endl;
    } 

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected primary-expression before 'for'
    8 |     for(int i+0;i<n;i++){
      |     ^~~
a.cc:8:17: error: 'i' was not declared in this scope
    8 |     for(int i+0;i<n;i++){
      |                 ^
a.cc:14:16: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization
   14 |     char c=s.at(k-1);
      |            ~~~~^~~~~
      |                |
      |                __gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type {aka std::__cxx11::basic_string<char>}
a.cc:17:18: error: expected ';' before '+' token
   17 |         for(int i+0;i<n;i++){
      |                  ^
      |                  ;
a.cc:17:24: error: expected ')' before ';' token
   17 |         for(int i+0;i<n;i++){
      |            ~           ^
      |                        )
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll,ll> P;
#define M 1000000007
int main(){
  int n,k;string s;
  cin>>n>>s>>k;k--;
  for(int i=0;i<n;i++){
    if(s[i]!=s[k])s[i]="*";
  }
  cout<<s;
}

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

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

int int_len(int n) {
  int s=0;
  while(n!=0) s++, n/=10;
  return s;
}

int int_sum(int n) {
  int m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(int i=s-1;i>=0;i--) m+=n/((int)pow(10,i))-(n/((int)pow(10,i+1)))*10;
  return m;
}


int vec_sum(vector<int> v){
  int n=0;
  for(int i=0;i<v.size();i++) n+=v[i];
  return n;
}

int main() {
  int a,b;
  string s;
  char c;
  cin>>a>>s>>b;
  c=s[b-1];
  rep(i,n){
    if(s[i]==c){
      cout<<'c';
    }else{
      cout<<'*';
    }
  }
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:31:9: error: 'n' was not declared in this scope
   31 |   rep(i,n){
      |         ^
a.cc:3:39: note: in definition of macro 'rep'
    3 | #define rep(i, n) for(int i = 0; i < (n); i++)
      |                                       ^
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
    int i,n,k;
    string s;
    char a;
    cin>>n>>s>>k;
    a = s[k-1];
    for(i=0;i<n;i++){
        if(s[i]!=a){
            s[i]='*'
        }
    }
    cout<<s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ';' before '}' token
   12 |             s[i]='*'
      |                     ^
      |                     ;
   13 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n,k;
  string s;
  cin >> n >> s >> k;
  char c = s.at(k - 1)l;
  for(int i = 0;i < n;i++) {
    if(s.at(i) != c) {
      s.at(i) = '*';
    }
  }
  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ',' or ';' before 'l'
    7 |   char c = s.at(k - 1)l;
      |                       ^
Language: C

#include<stdio.h>
int main()
{
    char s[10];
    int N,K;
    scanf("%d%s%d",s,&N,&K);
    char ch;
    ch = s[k];
    int i;
    for(i=0; i<N; i++)
    {
        if(s[i] == ch)
        {
            printf("%c",ch);
        }
        else
        {
            printf("*");
        }
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:12: error: 'k' undeclared (first use in this function)
    8 |     ch = s[k];
      |            ^
main.c:8:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main()
{
  int n, k;
  char s[11];
  scanf("%d" &n);
  scanf("%s", &s);
  scanf("%d", &k);
  int i;
  char c = s[k - 1];
  for (i = 0; i < n; i++) {
    if (s[i] != c)
      s[i] = '*';
  }
  printf("%s", s);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:14: error: invalid operands to binary & (have 'char *' and 'int')
    7 |   scanf("%d" &n);
      |         ~~~~ ^
      |         |
      |         char *
Language: C

#include <stdio.h>

int main()
{
  int n, k;
  char s[11];
  scanf("%d" &n);
  scanf("%s", &s);
  scanf("%d", &k);
  int i;
  char c = s[k - 1];
  for (i = 0; i < n; i++) {
    if (s[i] != c)
      s[i] = '*';
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:14: error: invalid operands to binary & (have 'char *' and 'int')
    7 |   scanf("%d" &n);
      |         ~~~~ ^
      |         |
      |         char *
Language: C

#include <stdio.h>

int main()
{
  int n, k;
  char s[11];
  scanf("%d" &n);
  scanf("%s", &s);
  scanf("%d", &k);
  int i;
  char c = s[k - 1];
  for (i = 0; i < N; i++) {
    if (s[i] != c)
      s[i] = '*';
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:14: error: invalid operands to binary & (have 'char *' and 'int')
    7 |   scanf("%d" &n);
      |         ~~~~ ^
      |         |
      |         char *
main.c:12:19: error: 'N' undeclared (first use in this function)
   12 |   for (i = 0; i < N; i++) {
      |                   ^
main.c:12:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include "bits/stdc++.h"

using namespace std;

using ll = long long;
using ld = long double;
using P = pair<int, int>;
constexpr ld EPS = 1e-12;
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr int MOD = 1e9 + 7;

template <typename T>
void printv(const vector<T> &v)
{
    int sz = v.size();
    for (int i = 0; i < sz; i++)
    {
        cout << v[i] << " \n"[i == sz - 1];
    }
}

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

    int n, k;
    string s;
    cin >> n >> s >> k;
    k-- : for (int i = 0; i < n; i++)
    {
        if (s[i] != s[k])
            s[i] = '*';
    }
    cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:8: error: expected ';' before ':' token
   30 |     k-- : for (int i = 0; i < n; i++)
      |        ^~
      |        ;
a.cc:30:27: error: 'i' was not declared in this scope
   30 |     k-- : for (int i = 0; i < n; i++)
      |                           ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vb=vector<bool>;
using vvb=vector<vb>;
using vd=vector<double>;
using vvd=vector<vd>;
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using tll=tuple<ll,ll>;
using tlll=tuple<ll,ll,ll>;
using vs=vector<string>;

#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rep(i,n) range(i,0,n)
#define rrep(i,n) for(int i=(n)-1;i>=0;i--)
#define range(i,a,n) for(int i=(a);i<(n);i++)

#define LINF ((ll)1ll<<60)
#define INF ((int)1<<30)
#define EPS (1e-9)
#define MOD (1000000007ll)
#define fcout(a) cout<<setprecision(a)<<fixed
#define fs first
#define sc second
#define PI 3.1415926535897932384

int dx[]={1,0,-1,0,1,-1,-1,1},dy[]={0,1,0,-1,1,1,-1,-1};

template<class T>bool chmax(T&a,T b){if(a<b){a=b; return true;}return false;}
template<class T>bool chmin(T&a,T b){if(a>b){a=b; return true;}return false;}
template<class S>S acm(vector<S>&a){return accumulate(all(a),S());}
template<class S>S max(vector<S>&a){return *max_element(all(a));}
template<class S>S min(vector<S>&a){return *min_element(all(a));}
void YN(bool b){cout<<(b?"YES":"NO")<<"\n";}
void Yn(bool b){cout<<(b?"Yes":"No")<<"\n";}
void yn(bool b){cout<<(b?"yes":"no")<<"\n";}

ll max(int a,ll b){return max((ll)a,b);} ll max(ll a,int b){return max(a,(ll)b);}
template<class T>void puta(T&&t){cout<<t<<"\n";}
template<class H,class...T>void puta(H&&h,T&&...t){cout<<h<<' ';puta(t...);}
template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>p){os<<"["<<p.first<<", "<<p.second<<"]";return os;};
template<class S>auto&operator<<(ostream&os,vector<S>t){bool a=1; for(auto s:t){os<<(a?"":" ")<<s;a=0;} return os;}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n,k;
	string s;
	cin>>n>>s>>k;
	rep(i,s.size()){
		cout<<((s[k-1]==s[i])?s[k-1]:"*");
	}
	cout<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:57:38: error: operands to '?:' have different types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char*'
   57 |                 cout<<((s[k-1]==s[i])?s[k-1]:"*");
      |                        ~~~~~~~~~~~~~~^~~~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
  char s[10];
  int n, k;
  
  cin >> n;
  
  for (int x = 0; x<n ; x++)
    cin >> s[x];
  
  cin >> k;
  
  for (int x = 0; x<n; x++)
  {
    if (s[x] != s[k-1]) s[x] = "*";
  }
  
  for (int x = 0; x<n; x++) cout << s[x];
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:32: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   19 |     if (s[x] != s[k-1]) s[x] = "*";
      |                                ^~~
      |                                |
      |                                const char*
Language: C++

#include <iostream>

using namespace std;

int main()
{
  char s[10];
  int n, k;
  
  cin >> n;
  
  for (int x = 0; x<n ; x++)
    cin >> s[x];
  
  cin >> k;
  
  for (int x = 0; x<n; x++)
  {
    if (s[x] != s[k]) s[x] = "*";
  }
  
  for (int x = 0; x<n; x++) cout << s[x];
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:30: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
   19 |     if (s[x] != s[k]) s[x] = "*";
      |                              ^~~
      |                              |
      |                              const char*
Language: C++

#include <iostream>

using namespace std;

int main()
{
  string s;
  int n, k;
  
  cin >> n >> s >> k;
  
  for (int x = 0; x<n; x++)
  {
    if (s[x] != s[k]) s[x] = "*";
  }
  
  cout << s;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   14 |     if (s[x] != s[k]) s[x] = "*";
      |                              ^~~
      |                              |
      |                              const char*
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cstring>
#include <complex>
#include <stack>
#include <queue>
#include <unordered_map>
#include <map>
using namespace std;
 
int main() {
    int i, i1, 12;
    string s;
    string ans;
    cin >> i1;
    cin >> s;
    cin >> i2;
    for (i=0;i1>i;i++) {
        if (i == s[i2-1]) {
            ans += s[i2-1];
        } else {
            ans += "*";
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:16: error: expected unqualified-id before numeric constant
   14 |     int i, i1, 12;
      |                ^~
a.cc:19:12: error: 'i2' was not declared in this scope; did you mean 'i1'?
   19 |     cin >> i2;
      |            ^~
      |            i1
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int N,K;
  string S;
  cin >> N >> S >> K;
  
  for(int i=0;i<N;i++){
    if (S[i] != s[K-1])S[i]="*";
  }
  
  cout << S << endl;
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: 's' was not declared in this scope
   10 |     if (S[i] != s[K-1])S[i]="*";
      |                 ^
a.cc:10:29: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   10 |     if (S[i] != s[K-1])S[i]="*";
      |                             ^~~
      |                             |
      |                             const char*
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int N,K;
  string S;
  cin >> N >> S >> K;
  
  char a=S[K];
  
  for(int i=0;i<N;i++){
    if (S[i] != a)S[i]="*";
  }
  
  cout << S << endl;
}
  
  

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

#include<iostream>
#include<string>
using namespace std;
int main(){
  int N,K;
  string S;
  cin >> N >> S >> K;
  
  char a=S[K];
  
  for(int i=0;i<N;i++){
    if (S[i] != a)S[i]=*;
  }
}
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:12:25: error: expected primary-expression before ';' token
   12 |     if (S[i] != a)S[i]=*;
      |                         ^
Language: C++

#include <iostream>
#include <sstream>
#include <vector>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iomanip>
#include <vector>
#include <cstdio>
#include <float.h>
#include <queue>
#include <set>
#include <map>
#include <fstream>
#include <cstdlib>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <stack>
#include <functional>
 
using namespace std;
 
#define endl '\n'
#define MOD 1000000007
#define INF 1ll<<30
#define MAX 100010
#define eps 1e-11
#define bit_max 1ll<<32
#define _USE_MATH_DEFINES

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
  //  freopen("input.txt","r",stdin);
  //  freopen("output.txt","w",stdout);
    int n;
    cin>>n;
    stering a;
    cin>>a;
    int k;
    cin>>k;
    for(int i=0;i<a.size();i++)
    {
        if(a[i]!=a[k-1])
            a[i]='*';
    }
    cout<<a;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:5: error: 'stering' was not declared in this scope; did you mean 'stdin'?
   42 |     stering a;
      |     ^~~~~~~
      |     stdin
a.cc:43:10: error: 'a' was not declared in this scope
   43 |     cin>>a;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
typedef pair<ll,ll> P;
#define pb push_back
#define ft first
#define sd second
#define mp make_pair
#define fr(i,n) for(int i=0;i<(n);i++)
#define Fr(i,n) for(int i=0;i++<(n);)
#define ifr(i,n) for(int i=(n)-1;i>=0;i--)
#define iFr(i,n) for(int i=(n);i>0;i--)

int main(){
  int n,k;
  string s;
  cin>>>>n>>s>>k;
  k--;
  char c=s[k];
  fr(i,n){
    if(s[i]==c) cout<<s[i];
    else cout<<"*";
  }
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:8: error: expected primary-expression before '>>' token
   18 |   cin>>>>n>>s>>k;
      |        ^~
Language: Java

import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        String S = sc.next();
        int K = sc.nextInt()+1;
        char ans = S.charAt(K);

        for(int i = 0;i < S.length();i++){
            if(ans == S.caharAt(i)){
                System.out.print(ans);
            }else{
                System.out.print('*');
            }
        }
    }
}

Compiler output:
Main.java:12: error: cannot find symbol
            if(ans == S.caharAt(i)){
                       ^
  symbol:   method caharAt(int)
  location: variable S of type String
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define mp make_pair
#define pb push_back
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
#define RALL(A) A.rbegin(),A.rend()
typedef long long LL;
typedef pair<LL,LL> P;
const LL mod=998244353;
const LL LINF=1LL<<62;
const int INF=1<<30;


int main(){
    int n;cin >> n;
    string s;cin >> s;
    int k;cin >> k;
    for (int i = 0; i < s.length(); i++) {
        cout << (s[i]==s[k-1]?s[i]:"*");
    }
    cout << "\n";
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: operands to '?:' have different types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char*'
   22 |         cout << (s[i]==s[k-1]?s[i]:"*");
Language: C

#include <stdio.h>
int main(){
 int n,pl;
 scanf("%d",&n);
  char s[n+1];
  scanf("%s\n%d",s,&pl);
  for(i=0;i<n;i++){
    if(s[i]==s[pl-1])printf("%c",s[i]);
    else printf("*");
  }
}

Compiler output:
main.c: In function 'main':
main.c:7:7: error: 'i' undeclared (first use in this function)
    7 |   for(i=0;i<n;i++){
      |       ^
main.c:7:7: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;

public class Main{
	public static void main(String[] args){
    	Scanner scan = new Scanner(System.in);
    	int N = scan.nextInt();
      	String s = scan.next();
      	int k = scan.nextInt();
      	String b = s.charAt(k-1);
      	for(int i = 0; i < N; i++){
        	if(s.charAt(i) != b){
            	s.replaceAll(s.charAt(i), "*");
            }
        }
     	System.out.print(s);
      
      
    }

}

Compiler output:
Main.java:9: error: incompatible types: char cannot be converted to String
      	String b = s.charAt(k-1);
      	                   ^
Main.java:11: error: bad operand types for binary operator '!='
        	if(s.charAt(i) != b){
        	               ^
  first type:  char
  second type: String
Main.java:12: error: incompatible types: char cannot be converted to String
            	s.replaceAll(s.charAt(i), "*");
            	                     ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors
Language: C

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

int main(void){
  int a, b;
  char str[10];
  char ch;
  scanf("%d", &a);
  for ( i = 0; i < a; i++ ) {
    scanf("%c", &str[i]);
  }
  scanf("%d", &b);
  ch = str[b];
  for ( i = 0; i < a; i++ ) {
    if ( str[i] != ch ) {
      str[i] = '*';
    }
  }
  printf("%s", str);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'i' undeclared (first use in this function)
    9 |   for ( i = 0; i < a; i++ ) {
      |         ^
main.c:9:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N;
  verctor<string> s;
  int a;
  cin >> N >> a;
  for(int i=0; i<N; i++){
    cin >> s[i];
  }
  int count = 0;
  for(int j=0; j<N; j++){
    if(s[j] != s[a]){
      count++;
      s[j] = '*';
    }
  }
  cout << s;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'verctor' was not declared in this scope
    6 |   verctor<string> s;
      |   ^~~~~~~
a.cc:6:17: error: expected primary-expression before '>' token
    6 |   verctor<string> s;
      |                 ^
a.cc:6:19: error: 's' was not declared in this scope
    6 |   verctor<string> s;
      |                   ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N;
  verctor<int> s;
  int a;
  cin >> N >> a;
  for(int i=0; i<N; i++){
    cin >> s[i];
  }
  int count = 0;
  for(int j=0; j<N; j++){
    if(s[j] != s[a]){
      count++;
      s[j] = '*';
    }
  }
  cout << s;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'verctor' was not declared in this scope
    6 |   verctor<int> s;
      |   ^~~~~~~
a.cc:6:11: error: expected primary-expression before 'int'
    6 |   verctor<int> s;
      |           ^~~
a.cc:10:12: error: 's' was not declared in this scope
   10 |     cin >> s[i];
      |            ^
a.cc:14:8: error: 's' was not declared in this scope
   14 |     if(s[j] != s[a]){
      |        ^
a.cc:19:11: error: 's' was not declared in this scope
   19 |   cout << s;
      |           ^
Language: Java

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

public class Main{
 public static void main(String[] args){
  Scanner s = new Scanner(System.in);
   int k = s.nextInt();
   s.nextLine();
   String inp = s.nextLine();
   int rep = s.nextInt();
   char txt = inp.charAt(rep +1);
   
   for(int i=0; i<k; i++){
   if(inp.charAt(i) != txt){
   inp.charAt(i) ='*' ;
   }
   }
   
   System.out.print(inp);
 }
}

Compiler output:
Main.java:15: error: unexpected type
   inp.charAt(i) ='*' ;
             ^
  required: variable
  found:    value
1 error
Language: C++

k = int( input())
s = list(str(input()))
n = int( input())
  
for i in range(len(s)):
	if s[i] != s[n-1]:
	s[i] = "*"
          
print(s)

Compiler output:
a.cc:1:1: error: 'k' does not name a type
    1 | k = int( input())
      | ^
Language: C++

#include <bits/stdc++.h>
#define N 1000005
#define ll long long int 	
#define MP make_pair
#define pb push_back
#define ppb pop_back
#define sp " "
#define endl "\n"
#define fi first
#define se second
#define ii pair<int,int>
#define lli pair<ll,ll>
#define fast cin.tie(0);cout.tie(0);ios_base::sync_with_stdio(false)
#define fast2 freopen ("myfile.in","r",stdin);freopen ("myfile.out","w",stdout);
#define mod 1000000007
#define fs(x,y) for(int i=1;i<=y;i++) cin>>x[i]
#define fo(i,x,y) for(int i=x;i<=y;i++)
using namespace std;

ll n,m,ar[N],sum;

char s[N],ans[i];



int main()
{
	fast;
	cin>>n>>s+1>>m;
	fo(i,1,n)
	if(s[i]!=s[m])
		ans[i]='*';
	else
		ans[i]=s[i];
	cout<<ans+1;

}

Compiler output:
a.cc:22:15: error: 'i' was not declared in this scope
   22 | char s[N],ans[i];
      |               ^
a.cc: In function 'int main()':
a.cc:32:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   32 |                 ans[i]='*';
      |                 ^~~
      |                 abs
a.cc:34:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |                 ans[i]=s[i];
      |                 ^~~
      |                 abs
a.cc:35:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   35 |         cout<<ans+1;
      |               ^~~
      |               abs
Language: C++

#include <iostream>
#include <string>

int main() {
    std::string s;
    int n, k;
  	std::cin >> n >> s >> k;
    const char& c = s[k];
  	for (int i = 0; i < n; ++i) {
    	std::cout << ((s[i] != c) ? : '*' : s[i]);
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:42: error: expected ')' before ':' token
   10 |         std::cout << ((s[i] != c) ? : '*' : s[i]);
      |                      ~                   ^~
      |                                          )
Language: C++

int main() {
    std::string s;
    int n, k;
  	std::cin >> n >> s >> k;
    const char& c = s[k];
  	for (int i = 0; i < n; ++i) {
    	std::cout << ((s[i] != c) ? : '*' : s[i]);
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:10: error: 'string' is not a member of 'std'
    2 |     std::string s;
      |          ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | int main() {
a.cc:4:14: error: 'cin' is not a member of 'std'
    4 |         std::cin >> n >> s >> k;
      |              ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main() {
a.cc:4:26: error: 's' was not declared in this scope
    4 |         std::cin >> n >> s >> k;
      |                          ^
a.cc:7:14: error: 'cout' is not a member of 'std'
    7 |         std::cout << ((s[i] != c) ? : '*' : s[i]);
      |              ^~~~
a.cc:7:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:42: error: expected ')' before ':' token
    7 |         std::cout << ((s[i] != c) ? : '*' : s[i]);
      |                      ~                   ^~
      |                                          )
Language: C++

#include <iostream>

int main() {
    std::string s;
    int n, k;
  	std::cin >> n >> s >> k;
    const char& c = s[k];
  	for (int i = 0; i < n; ++i) {
    	std::cout << (s[i] != c) ? : '*' : s[i]);
    }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:34: error: operands to '?:' have different types 'std::basic_ostream<char>::__ostream_type' {aka 'std::basic_ostream<char>'} and 'char'
    9 |         std::cout << (s[i] != c) ? : '*' : s[i]);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
Language: Java

import java.util.*;

class Main
{
  	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
  		int n = Integer.parseInt(sc.next());
  		String as= sc.next();
  		char[] s = as.toCharArray();
		int k = Integer.parseInt(sc.next());
  		char[] ans = new char[n];
  		for(int i=0; i<n; i++){
      		if(s[i]!=s[k]){
      			ans[i]='*';		
      		}else{
              ans[i]=a[i];
            }
    	}
      	for(int i=0;i<s.length;i++){
      		System.out.print(ans);  
      	}
    }
	
}


Compiler output:
Main.java:16: error: cannot find symbol
              ans[i]=a[i];
                     ^
  symbol:   variable a
  location: class Main
1 error
Language: C++

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

int main() {
	string S;
	int K,N;
	cin >>N>>S>>K;
	for(int i = 0 ; i < N ; i++){
		if(S[i] != S[K-1]){
			S[i] = '*'
		}
	}
	cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:35: error: expected ';' before '}' token
   10 |                         S[i] = '*'
      |                                   ^
      |                                   ;
   11 |                 }
      |                 ~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int N;
  
  cin >> N;
  
  char S[N+1];
  int K;

  cin >> S >> K;
  
  for(int i = 0; i < N; i++){
  	if(S[K] != S[i])
      S[i] = *;
  }
  
  cout << S << "\n" << endl;
  
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: expected primary-expression before ';' token
   16 |       S[i] = *;
      |               ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
  int n,k,i;
  string s;
  cin >> n >> s >> k;
  char c = s[k-1];
  for(i=0;i<n;i++){
    if(s[i]!=c) s[i] = '*'
  }
  cout << s << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: expected ';' before '}' token
   12 |     if(s[i]!=c) s[i] = '*'
      |                           ^
      |                           ;
   13 |   }
      |   ~
Language: C++

#include <iostream>

using namespace std;

int main() {
  int N;
  char s[256];
  int K;
  
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> s[i];
  cin >> K;
  char c = s[K - 1];
  for (int i = 0; i < N; ++i) cout << ((char)s[i] == (char)c ? c : "*");
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:62: error: operands to '?:' have different types 'char' and 'const char*'
   14 |   for (int i = 0; i < N; ++i) cout << ((char)s[i] == (char)c ? c : "*");
      |                                        ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
  int N;
  char s[256];
  int K;
  
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> s[i];
  cin >> K;
  char c = s[K - 1];
  for (int i = 0; i < N; ++i) cout << ((char)s[i] == c ? c : "*");
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:56: error: operands to '?:' have different types 'char' and 'const char*'
   14 |   for (int i = 0; i < N; ++i) cout << ((char)s[i] == c ? c : "*");
      |                                        ~~~~~~~~~~~~~~~~^~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
  int N;
  char s[256];
  int K;
  
  cin >> N;
  scanf("%s", s);
  cin >> K;
  char c = s[K - 1];
  for (int i = 0; i < N; ++i) cout << (s[i] == c ? c : "*");
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:50: error: operands to '?:' have different types 'char' and 'const char*'
   14 |   for (int i = 0; i < N; ++i) cout << (s[i] == c ? c : "*");
      |                                        ~~~~~~~~~~^~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
  int N;
  char s[256];
  int K;
  
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> s[i];
  cin >> K;
  char c = s[K - 1];
  for (int i = 0; i < N; ++i) cout << (c == s[i] ? c : "*");
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:50: error: operands to '?:' have different types 'char' and 'const char*'
   14 |   for (int i = 0; i < N; ++i) cout << (c == s[i] ? c : "*");
      |                                        ~~~~~~~~~~^~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
  int N;
  char s[256];
  int K;
  
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> s[i];
  cin >> K;
  char c = s[K - 1];
  for (int i = 0; i < N; ++i) cout << (s[i] == c ? c : "*");
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:50: error: operands to '?:' have different types 'char' and 'const char*'
   14 |   for (int i = 0; i < N; ++i) cout << (s[i] == c ? c : "*");
      |                                        ~~~~~~~~~~^~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
  int N;
  char s[256];
  int K;
  
  cin >> N;
  cin >> s;
  cin >> K;
  char c = s[K - 1];
  for (int i = 0; i < N; ++i) cout << (s[i] == c ? c : "*");
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:50: error: operands to '?:' have different types 'char' and 'const char*'
   14 |   for (int i = 0; i < N; ++i) cout << (s[i] == c ? c : "*");
      |                                        ~~~~~~~~~~^~~~~~~~~
Language: C++

#include <iostream>

using namespace std;

int main() {
  int N;
  char s[256];
  int K;
  
  char c;
  cin >> N;
  for (int i = 0; i < N; ++i) cin >> s[i];
  c = s[K - 1];
  for (int i = 0; i < N; ++i) cout << (s[i] == c ? c : '*');
  cout << endl;
  return;
}

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

#include<bits/stdc++.h>
signed main(){
    int N,K;
    string S;
    cin >> N >> S >> K;
    char c = S[K - 1];
    for(int i = 0;i < N;i++){
        if(S[i] != c){
            S[i] = '*';
        }
    }
    cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'string' was not declared in this scope
    4 |     string S;
      |     ^~~~~~
a.cc:4:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> N >> S >> K;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:5:17: error: 'S' was not declared in this scope
    5 |     cin >> N >> S >> K;
      |                 ^
a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |     cout << S << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |     cout << S << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String b = sc.next();
    int c = sc.nextInt();
    
    for(int i=1;i<=b.length;i++){
      System.out.println((b.charAt(i)!=(b.charAt(c)))?"*":b.charAt(i));
    }
  }
}


Compiler output:
Main.java:10: error: cannot find symbol
    for(int i=1;i<=b.length;i++){
                    ^
  symbol:   variable length
  location: variable b of type String
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String b = sc.next();
    int c = sc.nextInt();
    
    for(int i=1;i<=b.length;i++){
      System.out.println((b.charAt(i)!=ch)?"*":b.charAt(i));
    }
  }
}


Compiler output:
Main.java:10: error: cannot find symbol
    for(int i=1;i<=b.length;i++){
                    ^
  symbol:   variable length
  location: variable b of type String
Main.java:11: error: cannot find symbol
      System.out.println((b.charAt(i)!=ch)?"*":b.charAt(i));
                                       ^
  symbol:   variable ch
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String b = sc.next();
    int c = sc.nextInt();
    
    for(int i=1;i<=b.length();i++){
      if(b.charAt(i).equals(b.charAt(c))){
      }else{
        b.charAt(i) = "*";
      }
    }
    System.out.println(b);
  }
}


Compiler output:
Main.java:11: error: char cannot be dereferenced
      if(b.charAt(i).equals(b.charAt(c))){
                    ^
Main.java:13: error: unexpected type
        b.charAt(i) = "*";
                ^
  required: variable
  found:    value
2 errors
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String b = sc.next();
    int c = sc.nextInt();
    
    for(int i=1;i<=b.length;i++){
      if(b.charAt(i).equals(b.charAt(c))){
      }else{
        b.charAt(i) = "*";
      }
    }
    System.out.println(b);
  }
}


Compiler output:
Main.java:10: error: cannot find symbol
    for(int i=1;i<=b.length;i++){
                    ^
  symbol:   variable length
  location: variable b of type String
Main.java:11: error: char cannot be dereferenced
      if(b.charAt(i).equals(b.charAt(c))){
                    ^
Main.java:13: error: unexpected type
        b.charAt(i) = "*";
                ^
  required: variable
  found:    value
3 errors
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String b = sc.next();
    int c = sc.nextInt();
    
    for(int i=1;i<=b.length;i++){
      if(b.charAt(i) != b.charAt(c)){
        b.charAt(i) = "*";
      } 
    }
    System.out.println(b);
  }
}


Compiler output:
Main.java:10: error: cannot find symbol
    for(int i=1;i<=b.length;i++){
                    ^
  symbol:   variable length
  location: variable b of type String
Main.java:12: error: unexpected type
        b.charAt(i) = "*";
                ^
  required: variable
  found:    value
2 errors
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    String b = sc.next();
    int c = sc.nextInt();
    
    for(int i=1;i<=b.length();i++){
      if(b.charAt(i) != b.charAt(c)){
        b.charAt(i) = "*";
      } 
    }
    System.out.println(b);
  }
}


Compiler output:
Main.java:12: error: unexpected type
        b.charAt(i) = "*";
                ^
  required: variable
  found:    value
1 error
Language: C++

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

int main() {
  int N, K;
  string S;
  cin >> N >> S >> K;
  for(int i=0;i<N;++i) {
    if(S[i] != S[K-1]) S[i] = '*';
  }
  cout << S << endl;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlucde; did you mean #include?
    2 | #inlucde <string>
      |  ^~~~~~~
      |  include
Language: C++

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

int main() {
  int N, K;
  string S;
  cin >> N >> S >> K;
  for(int i=0;i<N;++i) {
    if(S[i] != S[K-1]) S[i] = '*';
  }
  cout << S << endl;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #Inlucde
    2 | #Inlucde <string>
      |  ^~~~~~~
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <iomanip>
#include <functional>
#include <queue>
#include <stack>
#include <map>
#include <vector>
#include <cmath>
#include <cctype>
#include <cstdio>
#define ll long long
#define INF 1e+9
#define MOD 1000000007
using namespace std;


int main(){
    int N,K;
    string S;
    cin >> N >> S >> K;
    for(int i=0; i<N; i++){
        if(S[i]!=S[k-1]){
            cout<<"*";
        }else{
            cout<<S[i];
        }
    }
    cout<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:20: error: 'k' was not declared in this scope
   25 |         if(S[i]!=S[k-1]){
      |                    ^
Language: C++

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

//repetition
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

//container util
#define all(x) (x).begin(),(x).end()

//typedef
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VLL;
typedef vector<VLL> VVLL;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<ll, ll> PLL;




Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <string>
#include <algorithm>
using namespace std;
int main(){
	int N,K;
	string S;
	while(cin>>N>>S>>K){
		char t = S[K-1];
		string out= S;
		s = out.size();
		for(int i = 0;i<s;i++){
			if(out[i]!=t)out[i] = '*';
		}
		cout<<out<<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: 'cin' was not declared in this scope
    7 |         while(cin>>N>>S>>K){
      |               ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <algorithm>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:10:17: error: 's' was not declared in this scope
   10 |                 s = out.size();
      |                 ^
a.cc:14:17: error: 'cout' was not declared in this scope
   14 |                 cout<<out<<endl;
      |                 ^~~~
a.cc:14:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:28: error: 'endl' was not declared in this scope
   14 |                 cout<<out<<endl;
      |                            ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <algorithm>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C

#include <stdio.h>

int main()
{
  int n,k;
  char s[n];
  char s_rem = s[k-1];
  for (int i=0; i<n; i++) {
    if s[i] == s_rem s[i] = '*';
  }
  printf("%d",s);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:8: error: expected '(' before 's'
    9 |     if s[i] == s_rem s[i] = '*';
      |        ^
      |        (
Language: C

#include <stdio.h>

int main()
{
  int n,k;
  char[n] s;
  char s_rem = s[k-1];
  for (int i=0; i<n; i++) {
    if s[i] == s_rem s[i] = '*';
  }
  printf("%d",s);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: error: expected identifier or '(' before '[' token
    6 |   char[n] s;
      |       ^
main.c:7:16: error: 's' undeclared (first use in this function)
    7 |   char s_rem = s[k-1];
      |                ^
main.c:7:16: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:8: error: expected '(' before 's'
    9 |     if s[i] == s_rem s[i] = '*';
      |        ^
      |        (
Language: C++

#include <bits/stdc++.h>

int main()
{
  int N, K;
  string s;
  cin >> N >> s >> K;
  char c = s[K-1];
  for (auto a : s) {
    if (a == c) cout << a;
    else cout << '*';
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> N >> s >> K;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:15: error: 's' was not declared in this scope
    7 |   cin >> N >> s >> K;
      |               ^
a.cc:10:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |     if (a == c) cout << a;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:10: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     else cout << '*';
      |          ^~~~
      |          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |   cout << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |   cout << endl;
      |           ^~~~
      |           std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
  int N, K;
  string S;
  cin >> N >> S >> K;
  char r = S[K-1];
  for(char c:S)
  {
    if(c !=r)
      cout << '*';
    else
      cout << c;
  }
  cout << endl;
  return 0;
}
yat

Compiler output:
a.cc:21:1: error: 'yat' does not name a type
   21 | yat
      | ^~~
Language: C

n = int(input())
s = input()
k = int(input())
print(s.replace(s[k-1],'*'))


Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | n = int(input())
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'n' [-Wimplicit-int]
main.c:1:5: error: expected expression before 'int'
    1 | n = int(input())
      |     ^~~
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
int N,K,p=0,z;

	cin >> N ;
	int a[N];
	for(int y=0;y<N;y++){
		cin >> a[y] ;
	}
	cin >> K ;
	for(int i=0;i<N;i++){
	if(a[K]==a[i]){
		z=z+1;
	}
		else{
a[i] = *;
		}
}
  for(int m=0;m<N;m++){
    printf("%d\n", a[m]);
  }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: expected primary-expression before ';' token
   18 | a[i] = *;
      |         ^
Language: C++

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

 int main() {
     int N;
     cin >> N;
     
     string S;
     cin >> S;
     
     int K;
     cin >> K;
     
     
     for (int i = -1; i < N; i++){
     
     
     if( i-- != K){
     S.at(i--) == '*'
     } 
   cout << S.at(i);
 }
       cout << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:19:22: error: expected ';' before '}' token
   19 |      S.at(i--) == '*'
      |                      ^
      |                      ;
   20 |      }
      |      ~
Language: C

#include <stdio.h>
int main(){
int a,c= 0;
  char b[a+1];
  scanf("%d",&a);
  scanf("%s",b);
  scanf("%d",&c);
  char d = b[c-1];
  for(int i=1; i<=a; i++){
    if(b[i]!=d){
      b[i] = '*';
    }
  }
　for(int i=1;i<=a;++i){
    printf("%s", b[i]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:1: error: stray '\343' in program
   14 | <U+3000>for(int i=1;i<=a;++i){
      | ^~~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
	int n, k;
	string s[a];
    a=n;
	cin >> n >> s[n] >> k;
	for (int i = 0; i <= a; i++) {
		if (s[i] == s[k]) {
			s[i] = "*";
		}
	}
	cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:18: error: 'a' was not declared in this scope
    5 |         string s[a];
      |                  ^
a.cc:7:21: error: 's' was not declared in this scope
    7 |         cin >> n >> s[n] >> k;
      |                     ^
Language: C

#include <stdio.h>
int main(){
int a,c= 0;
  char b[a+1];
  scanf("%d",&a);
  scanf("%s",b);
  scanf("%d",&c);
  char d = b[c-1];
  for(int i=1; i<=a; i++){
    if(b[i]!=d){
      b[i] = '*';
    }
  }
　for(int i=1;i<=a;++i){
    printf("%s", a[i]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:1: error: stray '\343' in program
   14 | <U+3000>for(int i=1;i<=a;++i){
      | ^~~~~~~~
main.c:15:19: error: subscripted value is neither array nor pointer nor vector
   15 |     printf("%s", a[i]);
      |                   ^
Language: C

#include <stdio.h>
int main(){
int a,c,d = 0;
  char b[a+1];
  scanf("%d",&a);
  scanf("%s",b);
  scanf("%d",&c);
  char d = b[c-1];
  for(int i=1; i<=a; i++){
    if(b[i]!=d){
      b[i] = '*';
    }
  }
　for(int i=1;i<=a;++i){
    printf("%s", a[i]);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:8: error: conflicting types for 'd'; have 'char'
    8 |   char d = b[c-1];
      |        ^
main.c:3:9: note: previous definition of 'd' with type 'int'
    3 | int a,c,d = 0;
      |         ^
main.c:14:1: error: stray '\343' in program
   14 | <U+3000>for(int i=1;i<=a;++i){
      | ^~~~~~~~
main.c:15:19: error: subscripted value is neither array nor pointer nor vector
   15 |     printf("%s", a[i]);
      |                   ^