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

/*dismint|jjc*/
#include <bits/stdc++.h>
using namespace std;
#define forl(V, S, E) for(int V = S; V < E; V++)
#define ford(V, S, E) for(int V = S; V >= E; V--)
#define fore(E, X) for(auto &E:X)
#define println(X) cout << X << endl
#define printe(X) for(auto &E:X) cout << E << " "; cout << endl
typedef unordered_map<int, unordered_set<int>> graph;
typedef long long ll;

int main() {
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	int n, s; string s; cin >> n >> s >> k;
	s[k-1] = tolower(s[k-1]);
	println(s);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:26: error: conflicting declaration 'std::string s'
   14 |         int n, s; string s; cin >> n >> s >> k;
      |                          ^
a.cc:14:16: note: previous declaration as 'int s'
   14 |         int n, s; string s; cin >> n >> s >> k;
      |                ^
a.cc:14:46: error: 'k' was not declared in this scope
   14 |         int n, s; string s; cin >> n >> s >> k;
      |                                              ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
#include <climits>

using namespace std;


int main() {
  int N, K;
  int S;
  cin >> N >> K >> S;
  
  cout << (( 1==K? "" : S.substr(0, K-1) ) << tolower(S[K-1]) << ( (N==K? "" : S.substr(K) ) << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: request for member 'substr' in 'S', which is of non-class type 'int'
   15 |   cout << (( 1==K? "" : S.substr(0, K-1) ) << tolower(S[K-1]) << ( (N==K? "" : S.substr(K) ) << endl;
      |                           ^~~~~~
a.cc:15:56: error: invalid types 'int[int]' for array subscript
   15 |   cout << (( 1==K? "" : S.substr(0, K-1) ) << tolower(S[K-1]) << ( (N==K? "" : S.substr(K) ) << endl;
      |                                                        ^
a.cc:15:82: error: request for member 'substr' in 'S', which is of non-class type 'int'
   15 |   cout << (( 1==K? "" : S.substr(0, K-1) ) << tolower(S[K-1]) << ( (N==K? "" : S.substr(K) ) << endl;
      |                                                                                  ^~~~~~
a.cc:15:101: error: expected ')' before ';' token
   15 |   cout << (( 1==K? "" : S.substr(0, K-1) ) << tolower(S[K-1]) << ( (N==K? "" : S.substr(K) ) << endl;
      |                                                                  ~                                  ^
      |                                                                                                     )
a.cc:15:101: error: expected ')' before ';' token
   15 |   cout << (( 1==K? "" : S.substr(0, K-1) ) << tolower(S[K-1]) << ( (N==K? "" : S.substr(K) ) << endl;
      |           ~                                                                                         ^
      |                                                                                                     )
Language: C++

<?php

  list($n, $m) = explode(" ", trim(fgets(STDIN)));

  list($s) = explode(" ", trim(fgets(STDIN)));

  $m--;
  for ($i=0; $i<$n; $i++) {
    if($i==$m){
      if($s[$i]=='A'){
        echo 'a';
      }else if($s[$i]=='B'){
        echo 'b';
      }else{
        echo 'c';
      }
    }else{    
      echo $s[$i];
    }
  }

Compiler output:
a.cc:1:1: error: expected unqualified-id before '<' token
    1 | <?php
      | ^
a.cc:5:7: error: expected constructor, destructor, or type conversion before '(' token
    5 |   list($s) = explode(" ", trim(fgets(STDIN)));
      |       ^
a.cc:7:3: error: '$m' does not name a type
    7 |   $m--;
      |   ^~
a.cc:8:3: error: expected unqualified-id before 'for'
    8 |   for ($i=0; $i<$n; $i++) {
      |   ^~~
a.cc:8:14: error: '$i' does not name a type
    8 |   for ($i=0; $i<$n; $i++) {
      |              ^~
a.cc:8:21: error: '$i' does not name a type
    8 |   for ($i=0; $i<$n; $i++) {
      |                     ^~
Language: C++

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

int main() {
  int N,K;
  string S;
  cin >> N >> K >> S;
  
  int Q = K-1
  
  if(S[Q] == 'A')
    S[Q] = 'a';
    
  if(S[Q] == 'B')
    S[Q] = 'b';
    
  if(S[Q] == 'C')
    S[Q] = 'c';
    
  cout << S << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'if'
   11 |   if(S[Q] == 'A')
      |   ^~
Language: C++

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

int main() {
  int N,K;
  string S;
  cin >> N >> K >> S;
  
  if(S[K] == A)
    S[K] = 'a';
    
  if(S[K] == B)
    S[K] = 'b';
    
  if(S[K] == C)
    S[K] = 'c';
    
  cout << S << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: 'A' was not declared in this scope
    9 |   if(S[K] == A)
      |              ^
a.cc:12:14: error: 'B' was not declared in this scope
   12 |   if(S[K] == B)
      |              ^
a.cc:15:14: error: 'C' was not declared in this scope
   15 |   if(S[K] == C)
      |              ^
Language: C++

#include <iostream>
using namespace std;
char s[50];
int main()
{
  int n,k;
  string s;
  cin >> n;
  cin >> k;
  cin >> s;
  s[k]=s[k]-'A'+'a';
  cout << s
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: expected ';' before '}' token
   12 |   cout << s
      |            ^
      |            ;
   13 | }
      | ~
Language: C++

using System;
using System.Numerics;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace debug
{
    class ProgramA
    {
        static void Main(string[] args)
        {

            //入力
            string[] n = Console.ReadLine().Split(' ');
            string s  = Console.ReadLine();

            //
            int num = int.Parse(n[1]) - 1;
            for(int i = 0;i < int.Parse(n[0]);i++)
            {
                int temp = s[i];
                if(i == num)
                {
                    temp += 32;
                    Console.Write((char)temp);
                }
                else
                {
                    Console.Write((char)temp);
                }
            }

        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Numerics;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Text;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:35:6: error: expected ';' after class definition
   35 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void debug::ProgramA::Main(int*)':
a.cc:15:13: error: 'string' was not declared in this scope
   15 |             string[] n = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:15:20: error: expected primary-expression before ']' token
   15 |             string[] n = Console.ReadLine().Split(' ');
      |                    ^
a.cc:16:20: error: expected ';' before 's'
   16 |             string s  = Console.ReadLine();
      |                    ^
a.cc:19:23: error: expected primary-expression before 'int'
   19 |             int num = int.Parse(n[1]) - 1;
      |                       ^~~
a.cc:20:31: error: expected primary-expression before 'int'
   20 |             for(int i = 0;i < int.Parse(n[0]);i++)
      |                               ^~~
a.cc:20:31: error: expected ';' before 'int'
a.cc:20:31: error: expected primary-expression before 'int'
a.cc:20:31: error: expected ')' before 'int'
a.cc:20:16: note: to match this '('
   20 |             for(int i = 0;i < int.Parse(n[0]);i++)
      |                ^
a.cc:20:34: error: expected unqualified-id before '.' token
   20 |             for(int i = 0;i < int.Parse(n[0]);i++)
      |                                  ^
a.cc:20:47: error: 'i' was not declared in this scope
   20 |             for(int i = 0;i < int.Parse(n[0]);i++)
      |                                               ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int N,K;
  cin>>N>>K;
  string S;
  cin>>S;
  S.at(k-1)-=0x20;
  cout<<S<<endl;

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 'k' was not declared in this scope
    8 |   S.at(k-1)-=0x20;
      |        ^
Language: C++

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

int main(){
    int N,K; cin >> N >> K;
    string S; cin >> S;
    if(S.at(K)=='A'){
        S.st(K)=='a';
    }
    else if(S.at(K)=='B'){
        S.at(K)=='b';
    }
    else{
        S.at(K)=='c';
    }
    cout << S << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'st'; did you mean 'at'?
    8 |         S.st(K)=='a';
      |           ^~
      |           at
Language: C++

n,k = map(int,input().split())
s = str(input())
for i in range(n):
    if i == k-1:
        print(str.lower(s[i]),end="")
    else:
        print(s[i],end="")
print()

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

#include<stdio.h>

char[55];
int main(){
int a,b;scanf("%d%d",&a,&b);
  scanf("%s",in);
  in[b-1]+=32;
  printf("%s\n",in);
  
}


Compiler output:
main.c:3:5: error: expected identifier or '(' before '[' token
    3 | char[55];
      |     ^
main.c: In function 'main':
main.c:6:14: error: 'in' undeclared (first use in this function); did you mean 'int'?
    6 |   scanf("%s",in);
      |              ^~
      |              int
main.c:6:14: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<stdio.h>

char[55];
int main(){
int a,b;scanf("%d%d",&a,&b);
  scanf("%s",in);
  in[b-1]+=32;
  printf("%s\n",in);
  
}

Compiler output:
a.cc:3:6: error: expected identifier before numeric constant
    3 | char[55];
      |      ^~
a.cc:3:6: error: expected ']' before numeric constant
    3 | char[55];
      |      ^~
      |      ]
a.cc:3:5: error: structured binding declaration cannot have type 'char'
    3 | char[55];
      |     ^
a.cc:3:5: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:3:5: error: empty structured binding declaration
a.cc:3:9: error: expected initializer before ';' token
    3 | char[55];
      |         ^
a.cc: In function 'int main()':
a.cc:6:14: error: 'in' was not declared in this scope; did you mean 'int'?
    6 |   scanf("%s",in);
      |              ^~
      |              int
Language: C++

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

#define dbg(a)	cerr << __LINE__ << ": " << #a << " = " << a << '\n'

int main(){
	int n, k;	cin >> n >> k;
	string s;	cin >> s;
	s[k-1] = s[k-1]+32;
	cout << s << endl;
	return 0;
}4

Compiler output:
a.cc:12:2: error: expected unqualified-id before numeric constant
   12 | }4
      |  ^
Language: C++

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

int main(){
	ll n,k; cin >> n >> k;
	sreing s; cin >> s;
	if(s[k-1] == 'A')s[k-1] = 'a';
	else if(s[k-1] == 'B')s[k-1] = 'b';
	else s[k-1] = 'c';
	cout << s << endl;
}

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

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

int main() {
  int N,K,;
  string S;
  cin >> N >> K >> S;
  if (S.at(K) == 'A') S.at(K) = 'a';
  if (S.at(K) == 'B') S.at(K) = 'b';
  if (S.at(K) == 'C') S.at(K) = 'c';
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: expected unqualified-id before ';' token
    5 |   int N,K,;
      |           ^
Language: C++

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

int main() {
  int N,K,S;
  cin >> N >> K >> S;
  if (S.at(K) == 'A') S.at(K) = 'a';
  if (S.at(K) == 'B') S.at(K) = 'b';
  if (S.at(K) == 'C') S.at(K) = 'c';
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   if (S.at(K) == 'A') S.at(K) = 'a';
      |         ^~
a.cc:7:25: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   if (S.at(K) == 'A') S.at(K) = 'a';
      |                         ^~
a.cc:8:9: error: request for member 'at' in 'S', which is of non-class type 'int'
    8 |   if (S.at(K) == 'B') S.at(K) = 'b';
      |         ^~
a.cc:8:25: error: request for member 'at' in 'S', which is of non-class type 'int'
    8 |   if (S.at(K) == 'B') S.at(K) = 'b';
      |                         ^~
a.cc:9:9: error: request for member 'at' in 'S', which is of non-class type 'int'
    9 |   if (S.at(K) == 'C') S.at(K) = 'c';
      |         ^~
a.cc:9:25: error: request for member 'at' in 'S', which is of non-class type 'int'
    9 |   if (S.at(K) == 'C') S.at(K) = 'c';
      |                         ^~
Language: C++

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

int main() {
  int N,K,S;
  cin >> N >> K >> S;
  if (S.at(K) == 'A') S.at(K) = 'a'
  if (S.at(K) == 'B') S.at(K) = 'b'
  if (S.at(K) == 'C') S.at(K) = 'c'
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   if (S.at(K) == 'A') S.at(K) = 'a'
      |         ^~
a.cc:7:25: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   if (S.at(K) == 'A') S.at(K) = 'a'
      |                         ^~
Language: C++

#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,N) for(int i = 0;i < (int)(N);i++)
int main(){
  int n,k;
  string s;
  cin>>a>>b;
  cin>>s;
  s[k-1]=s[k-1]-'A'+'a';
  cout<<s<<endl;
}

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

#include<iostream>
#include<fstream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
#include<map>
#include<ctime> 
#include<windows.h>
using namespace std;
int main()
{
    string s;
    int n,k;
    cin>>n>>k;
    cin>>s;
    s[k-1]+=32;
    cout<<s;
    return 0;
}

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

#include#include<bits/stdc++.h>
using namespace std ;
int main()
{
    int n ,k;
    string s;
    cin>>n>>k>>s;
    s[k-1]-=('A'-'a');
    cout<<s<<endl;
}


Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include#include<bits/stdc++.h>
      |         ^
a.cc: In function 'int main()':
a.cc:6:5: error: 'string' was not declared in this scope
    6 |     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 | #include#include<bits/stdc++.h>
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>n>>k>>s;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include#include<bits/stdc++.h>
a.cc:7:16: error: 's' was not declared in this scope
    7 |     cin>>n>>k>>s;
      |                ^
a.cc:9:5: error: 'cout' was not declared in this scope
    9 |     cout<<s<<endl;
      |     ^~~~
a.cc:9:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:14: error: 'endl' was not declared in this scope
    9 |     cout<<s<<endl;
      |              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include#include<bits/stdc++.h>
Language: C

#include <stdio.h>
#include <math.h>

int main(void){
	
	int n=0,k=0;
	int p=0;
	int i=0;
	double sum=0;
	
	scanf("%d %d",&n,&k);
	
	for(i=1;i<=n;i++){
		p=0;
		while(i*pow(2.0,(double)p)<（double）k){
			p++;
		}
		printf("%f\n",n*pow(2.0,(double)p));
		sum+=1.0/(double)n/pow(2.0,(double)p);
	}
	
	printf("%.12f\n",sum);
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:44: error: '\U0000ff08double\U0000ff09k' undeclared (first use in this function)
   15 |                 while(i*pow(2.0,(double)p)<（double）k){
      |                                            ^~~~~~~~~~~
main.c:15:44: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
 int main(){
   int a,b;
   string s;
   cin >>a>>b>>s;
   s.at(b)+=32
     cout<<s<<endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before 'cout'
    8 |    s.at(b)+=32
      |               ^
      |               ;
    9 |      cout<<s<<endl;
      |      ~~~~
Language: C++

#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
 int main(){
   int a,b;
   string s;
   s.at(b)+=32
     cout<<s<<endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'cout'
    7 |    s.at(b)+=32
      |               ^
      |               ;
    8 |      cout<<s<<endl;
      |      ~~~~
Language: C++

#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
 int main(){
   int a,b;
   string s;
   cin>>a>>b>>s;
   if(s.at(b-1)=="A")s.at(b-1)='a';
   else if(s.at(b-1)=="B")s.at(b-1)='b';
   else s.at(b-1)='c';
   cout<<s<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |    if(s.at(b-1)=="A")s.at(b-1)='a';
      |       ~~~~~~~~~^~~~~
a.cc:9:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |    else if(s.at(b-1)=="B")s.at(b-1)='b';
      |            ~~~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
 int main(){
   int a,b;
   string s;
   cin>>a>>b>>s;
   if(s.at(b)=="A")s.at(b)='a';
   else if(s.at(b)=="B")s.at(b)='b';
   else s.at(b)='c';
   cout<<s<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |    if(s.at(b)=="A")s.at(b)='a';
      |       ~~~~~~~^~~~~
a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |    else if(s.at(b)=="B")s.at(b)='b';
      |            ~~~~~~~^~~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |    if(s.at(b)=="A")s.at(b)="a";
      |       ~~~~~~~^~~~~
a.cc:8:28: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    8 |    if(s.at(b)=="A")s.at(b)="a";
      |                            ^~~
      |                            |
      |                            const char*
a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |    else if(s.at(b)=="B")s.at(b)="b";
      |            ~~~~~~~^~~~~
a.cc:9:33: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |    else if(s.at(b)=="B")s.at(b)="b";
      |                                 ^~~
      |                                 |
      |                                 const char*
a.cc:10:17: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   10 |    else s.at(b)="c";
      |                 ^~~
      |                 |
      |                 const char*
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |    if(s.at(b)=="A")s.at(b)=a;
      |       ~~~~~~~^~~~~
a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |    else if(s.at(b)=="B")s.at(b)=b;
      |            ~~~~~~~^~~~~
a.cc:10:17: error: 'c' was not declared in this scope
   10 |    else s.at(b)=c;
      |                 ^
Language: C++

#include <bits/stdc++.h>
 using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
 int main(){
   int a,b;
   string s;
   cin>>a>>b>>s;
   if(s.at(b)==A)s.at(b)=a;
   else if(s.at(b)==B)s.at(b)=b;
   else s.at(b)=c;
   cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'A' was not declared in this scope
    8 |    if(s.at(b)==A)s.at(b)=a;
      |                ^
a.cc:9:21: error: 'B' was not declared in this scope
    9 |    else if(s.at(b)==B)s.at(b)=b;
      |                     ^
a.cc:10:17: error: 'c' was not declared in this scope
   10 |    else s.at(b)=c;
      |                 ^
Language: C++

program Changing_a_Character
    implicit none
    integer(4):: n, k
    character(:),allocatable:: s

    read*, n,k
    allocate(character(n):: s)
    read*, s

    s(k:k) = char(ichar(s(k:k)) - (ichar('A') - ichar('a')))
    print*, s(:)
end program Changing_a_Character

Compiler output:
a.cc:1:1: error: 'program' does not name a type
    1 | program Changing_a_Character
      | ^~~~~~~
Language: C++

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

int main(){
  int s,a,b;
  string ans;
  cin >> s;
  b = s%100;
  a = s-b;
  if(a<12 || b<12){ans = "AMBIGUOUS";}
  else if(a<12 && b>12){ans = "MMYY";}
  else if(a>12 $$ b<12){ans = "YYMM";}
  else  {ans = "NA";}
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: expected ')' before '$$'
   12 |   else if(a>12 $$ b<12){ans = "YYMM";}
      |          ~    ^~~
      |               )
Language: C++

#include<iostream>
using namespace std;
int main()
{ int n.k;
 cin>>n>>k;
 string s;
 cin>>s;
 if(s[k - 1] == 'A') s[k - 1] = 'a';
 if (s[k - 1] == 'B') s[k - 1] = 'b';
 if (s[k - 1] == 'C') s[k - 1] = 'c';
 cout << s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:8: error: expected initializer before '.' token
    4 | { int n.k;
      |        ^
a.cc:5:7: error: 'n' was not declared in this scope
    5 |  cin>>n>>k;
      |       ^
a.cc:5:10: error: 'k' was not declared in this scope
    5 |  cin>>n>>k;
      |          ^
Language: C++

#include<iostream>
using namespace std;
int main()
{ int n, k;
  cin >> n >> k;
  string s;
  ci>>s;
 if (s[k - 1] == 'A') s[k - 1] = 'a';
 if (s[k - 1] == 'B') s[k - 1] = 'b';
 if (s[k - 1] == 'C') s[k - 1] = 'c';
 cout << s;
}
  
 

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

#include <iostream>
using namespace std;

int main()
{
	int n, k;
	string s;
	cin >> n >> k >> s;
	k--;
	s[k] += 32
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected ';' before '}' token
   10 |         s[k] += 32
      |                   ^
      |                   ;
   11 | }
      | ~
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int n,k;
	cin >> n >> k;
	string s;
	cin >> s;
	if (s[k-1]=="A")
	s[k-1]="a";
	if (s[k-1]=="B")
	s[k-1]="b";
	if (s[k-1]=="C")
	s[k-1]="c";
	cout << s;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if (s[k-1]=="A")
a.cc:11:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   11 |         s[k-1]="a";
      |                ^~~
      |                |
      |                const char*
a.cc:12:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |         if (s[k-1]=="B")
a.cc:13:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   13 |         s[k-1]="b";
      |                ^~~
      |                |
      |                const char*
a.cc:14:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |         if (s[k-1]=="C")
a.cc:15:16: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   15 |         s[k-1]="c";
      |                ^~~
      |                |
      |                const char*
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int n,k;
	cin >> n >> k;
	string s;
	cin >> s;
	if s[k-1]==("A")
	s[k-1]="a";
	if s[k-1]==("B")
	s[k-1]="b";
	if s[k-1]==("C")
	s[k-1]="c";
	cout << s;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: expected '(' before 's'
   10 |         if s[k-1]==("A")
      |            ^
      |            (
a.cc:12:12: error: expected '(' before 's'
   12 |         if s[k-1]==("B")
      |            ^
      |            (
a.cc:14:12: error: expected '(' before 's'
   14 |         if s[k-1]==("C")
      |            ^
      |            (
Language: C++

#include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
int main() {
  int a,b;
  string c;
  cin>>a>>b>>c;
  if(c.at(b)=='A')c.at(b)=a;
  else if(c.at(b)=='B')c.at(b)=b;
  else c.at(b)=c;
  cout<<c;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} in assignment
   11 |   else c.at(b)=c;
      |                ^
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
Language: Java

import java.util.*;

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

    int n = sc.nextInt();
    int k = sc.nextInt();
    String s = sc.next();
    char[] c = new char[n];
    c = s.toCharArray();

    if(c[k - 1] == 'A'){
      c[k - 1] = 'a';
    } else if(c[k - 1] == 'B'){
      c[k - 1] = 'b';
    } else if{
      c[k - 1] = 'c';
    }

    for(int i = 0; i < n; i++){
      System.out.print(c[i]);
    }
  }
}


Compiler output:
Main.java:17: error: '(' expected
    } else if{
             ^
1 error
Language: C++

#include<iostream>

using namespace std;

int main(void)
{
  int n,k; cin>>n>>k;
  string s; cin>>s;
  
  s[k-1]+=32;
  
  printf("%f",s); cou<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:19: error: 'cou' was not declared in this scope
   12 |   printf("%f",s); cou<<endl;
      |                   ^~~
Language: C++

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

int main(){
  int n,k;
  cin >> n >> k;
  string s;
  cin >> s;
  s[k-1] += 32
  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected ';' before 'cout'
    9 |   s[k-1] += 32
      |               ^
      |               ;
   10 |   cout << s << endl;
      |   ~~~~
Language: C++

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

int main(){
  int n,k;
  cin >> n,k;
  string s;
  if(s[k-1] == 'A') s[k-1] = 'a'
  else if (s[k-1] == 'B') s[k-1] = 'b'
  else s[k-1] = 'c' 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: expected ';' before 'else'
    8 |   if(s[k-1] == 'A') s[k-1] = 'a'
      |                                 ^
      |                                 ;
    9 |   else if (s[k-1] == 'B') s[k-1] = 'b'
      |   ~~~~
Language: C++

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

int main(){
  string s;
  int n, k;
  cin >> n >> k >> s;

  s.at(k-1) = s.at(k-1) -- 26;

  cout << s << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:27: error: expected ';' before numeric constant
    9 |   s.at(k-1) = s.at(k-1) -- 26;
      |                           ^~~
      |                           ;
Language: C++

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

int main{
  string s;
  int k;
  cin >> s >> k;

  s.at(k-1) = s.at(k-1) - 26;

  cout << s << endl;
  }


Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:10: error: expected primary-expression before 's'
    5 |   string s;
      |          ^
a.cc:5:10: error: expected '}' before 's'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:7:3: error: 'cin' does not name a type
    7 |   cin >> s >> k;
      |   ^~~
a.cc:9:3: error: 's' does not name a type
    9 |   s.at(k-1) = s.at(k-1) - 26;
      |   ^
a.cc:11:3: error: 'cout' does not name a type
   11 |   cout << s << endl;
      |   ^~~~
a.cc:12:3: error: expected declaration before '}' token
   12 |   }
      |   ^
Language: C++

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

int main{
  string s;
  int k;
  cin >> s >> k;

  s.at(k-1) = s.at(k-1) - 26;

  cout << s << endl;
  }


Compiler output:
a.cc:2:20: error: expected ';' before ':' token
    2 | using namespace std:
      |                    ^
      |                    ;
a.cc:2:20: error: expected unqualified-id before ':' token
Language: C++





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

int main{
  string s;
  int n, k;
  cin >> n >> s >> k;

  s.at(k-1) = s.at(k-1) - 26;

  cout << s << endl;
  }


Compiler output:
a.cc:6:20: error: expected ';' before ':' token
    6 | using namespace std:
      |                    ^
      |                    ;
a.cc:6:20: error: expected unqualified-id before ':' token
Language: C++


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

int main{
  string s;
  int k;
  cin >> s >> k;

  s.at(k-1) = s.at(k-1) - 26;

  cout << s << endl;
  }

Compiler output:
a.cc:3:20: error: expected ';' before ':' token
    3 | using namespace std:
      |                    ^
      |                    ;
a.cc:3:20: error: expected unqualified-id before ':' token
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    char[] ltrs = new char[n];
    String str = sc.next();
    for(int i = 0; i < n; i++){
      ltrs[i] = str.charAt(i);
    }
    ltrs[k-1] = (int)ltrs[k - 1] - 32;
    String out = new String(ltrs);
    System.out.println(out);
    
  }
}

Compiler output:
Main.java:12: error: incompatible types: possible lossy conversion from int to char
    ltrs[k-1] = (int)ltrs[k - 1] - 32;
                                 ^
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    char[] ltrs = new char[n];
    String str = sc.next();
    for(int i = 0; i < n; i++){
      ltrs[i] = str.charAt(i);
    }
    ltrs[k-1] = ltrs[k - 1] - 32;
    String out = new String(ltrs);
    System.out.println(out);
    
  }
}

Compiler output:
Main.java:12: error: incompatible types: possible lossy conversion from int to char
    ltrs[k-1] = ltrs[k - 1] - 32;
                            ^
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    char[] ltrs = new char[n]
    String str = sc.next();
    for(int i = 0; i < n; i++){
      ltrs[i] = str.charAt(i);
    }
    ltrs[k-1] = ltrs[k - 1] - 32;
    String out = new String(ltrs);
    System.out.println(out);
    
  }
}

Compiler output:
Main.java:7: error: ';' expected
    char[] ltrs = new char[n]
                             ^
1 error
Language: C

#include <stdio.h>

int main(void) {
	int  n, k;
	scanf("%d %d", &n, &k);
	char* s=new char[n];
	scanf("%s", s);
	s[k-1] = s[k-1] + 32;

	for (int i = 0; i < n; ++i) {
		printf("%c", s[i]);
	}



	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:17: error: 'new' undeclared (first use in this function)
    6 |         char* s=new char[n];
      |                 ^~~
main.c:6:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:21: error: expected ',' or ';' before 'char'
    6 |         char* s=new char[n];
      |                     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0;i<n;i++)
typedef long long ll;
 
int main() {
  ll a,b;cin>>a>>b;
  char s[60];
  rep(i,n) cin>>s[i];
  if (s[b-1]=='A') s[b-1]='a';
  else if (s[b-1]=='B') s[b-1]='b';
  else s[b-1]='c';
  rep(i,n) cout<<s[i];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'n' was not declared in this scope
    9 |   rep(i,n) cin>>s[i];
      |         ^
a.cc:3:33: note: in definition of macro 'rep'
    3 | #define rep(i,n) for (int i=0;i<n;i++)
      |                                 ^
a.cc:13:9: error: 'n' was not declared in this scope
   13 |   rep(i,n) cout<<s[i];
      |         ^
a.cc:3:33: note: in definition of macro 'rep'
    3 | #define rep(i,n) for (int i=0;i<n;i++)
      |                                 ^
Language: C

#include <stdio.h>
 
int main()
{
 
   int n,k;
   scanf("%d%d",&n,&k);
  char s[n+1];
  scanf("%s",&s);
  int i;
  for(i=0;i<n;++i)
  {
     if(i+i==k)
     {
       if(s[i]>='A' && s[i]<='Z')
           printf("%c",s[i]+32);
       
       else
          printf("%c",s[i]);
     }
    
    else
       printf("%c",s[i]);
  }
  
  
}
#include <bits/stdc++.h>
 
 
using namespace std;
 
int main()
{
 
   int n,k;
   scanf("%d%d",&n,&k);
  char s[n+1];
  scanf("%s",&s);
  int i;
  for(i=0;i<n;++i)
  {
     if((i+1)==k)
     {
       if(s[i]>='A' && s[i]<='Z')
           printf("%c",s[i]+32);
       
       else
          printf("%c",s[i]);
     }
    
    else
       printf("%c",s[i]);
  }
  
  
}

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

#include <stdio.h>
 
 
using namespace std;
 
int main()
{
 
   int n,k;
   scanf("%d%d",&n,&k);
  char s[n+1];
  scanf("%s",&s);
  int i;
  for(i=0;i<n;++i)
  {
     if(i+i==k)
     {
       if(s[i]>='A' && s[i]<='Z')
           printf("%c",s[i]+32);
       
       else
          printf("%c",s[i]);
     }
    
    else
       printf("%c",s[i]);
  }
  
  
}
#include <bits/stdc++.h>


using namespace std;

int main()
{
 
   int n,k;
   scanf("%d%d",&n,&k);
  char s[n+1];
  scanf("%s",&s);
  int i;
  for(i=0;i<n;++i)
  {
     if(i+i==k)
     {
       if(s[i]>='A' && s[i]<='Z')
           printf("%c",s[i]+32);
       
       else
          printf("%c",s[i]);
     }
    
    else
       printf("%c",s[i]);
  }
  
  
}
Submission Info

Compiler output:
main.c:4:1: error: unknown type name 'using'
    4 | using namespace std;
      | ^~~~~
main.c:4:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    4 | using namespace std;
      |                 ^~~
main.c:31:10: fatal error: bits/stdc++.h: No such file or directory
   31 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <bits/stdc++.h>


using namespace std;

int main()
{
 
   int n,k;
   scanf("%d%d",&n,&k);
  char s[n+1];
  scanf("%s",&s);
  int i;
  for(i=0;i<n;++i)
  {
     if(i+i==k)
     {
       if(s[i]>='A' && s[i]<='Z')
           printf("%c",s[i]+32);
       
       else
          printf("%c",s[i]);
     }
    
    else
       printf("%c",s[i]);
  }
  
  
}

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

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

int main() {
	int N,K;
    cin >> N >> K;
    string s;
    getline(cin,s);
    if(s.at(K-1)=='A'){
      s.at(K-1) = 'a';
      
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, K;
  string S;
  cin >> N >> K >> S;
  if (S.at(K - 1) == 'A') {
    S.at(K - 1) = "a";
  }
  else if (S.at(K - 1) == 'B') {
    S.at(K - 1) = "b";
  }
  else {
    S.at(K - 1) = "c";
  }
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |     S.at(K - 1) = "a";
      |                   ^~~
      |                   |
      |                   const char*
a.cc:12:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |     S.at(K - 1) = "b";
      |                   ^~~
      |                   |
      |                   const char*
a.cc:15:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   15 |     S.at(K - 1) = "c";
      |                   ^~~
      |                   |
      |                   const char*
Language: C++

#include<iostream>
using namespace std;
int main (){
  int N, K;
  cin >> N >> K ;
  string S;
  cin >> S;
  if(S[K-1]==A){S[K-1]=a;}
  else if(S[K-1]==B){S[K-1]=b;}
  else if(S[K-1]==C){S[K-1]=c;} 
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:14: error: 'A' was not declared in this scope
    8 |   if(S[K-1]==A){S[K-1]=a;}
      |              ^
a.cc:8:24: error: 'a' was not declared in this scope
    8 |   if(S[K-1]==A){S[K-1]=a;}
      |                        ^
a.cc:9:19: error: 'B' was not declared in this scope
    9 |   else if(S[K-1]==B){S[K-1]=b;}
      |                   ^
a.cc:9:29: error: 'b' was not declared in this scope
    9 |   else if(S[K-1]==B){S[K-1]=b;}
      |                             ^
a.cc:10:19: error: 'C' was not declared in this scope
   10 |   else if(S[K-1]==C){S[K-1]=c;}
      |                   ^
a.cc:10:29: error: 'c' was not declared in this scope
   10 |   else if(S[K-1]==C){S[K-1]=c;}
      |                             ^
Language: C++

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

int main() {
    string s;
    int n, k;
    cin >> n >> k >> s;
    if (s[k-1] == 'A') s[k-1] = 'a';
    if (s[k-1] == 'B') s[k-1] = 'b';
    if (s[k-1] == 'C') s[k-1] = 'c';
    cout << s << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:16:23: error: expected '}' at end of input
   16 |     cout << s << endl;
      |                       ^
a.cc:9:12: note: to match this '{'
    9 | int main() {
      |            ^
Language: C++

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

int main(){
    int n, k;
    string s;
   cin>> n >> k >> s;
    if(s[k-1] == 'A') s[k-1] == 'a';
    else if (s[k-1] == 'B') s[k-1] == 'b';
    else (s[k-1] == 'C') s[k-1] == 'c';
    cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: expected ';' before 's'
   15 |     else (s[k-1] == 'C') s[k-1] == 'c';
      |                         ^~
      |                         ;
Language: Java

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


public class Main{
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] line1 = br.readLine().split(" ");
    int numOfCards = Integer.parseInt(line1[0]);
    int numOfHints = Integer.parseInt(line1[1]);
    
    int[] groupArray = new int[numOfCards];
    int x;
    int y;
    int groupX;
    int groupY;
    int groupMaxNum = 1;
    int numOfGroup = 0;
    
    for(int i=0; i<numOfHints; i++){
      String[] hint = br.readLine().split(" ");
      x = Integer.parseInt(hint[0]);
      y = Integer.parseInt(hint[1]);
      
      groupX = groupArray[x];
      groupY = groupArray[y];
      
      if(groupX == 0){
        if(groupY == 0){
          groupArray[x] = groupMaxNum;
          groupArray[y] = groupMaxNum;
          groupMaxNum++;
          numOfGroup++;
        }else{
         groupArray[x] = groupY; 
        }
      }else{
        if(groupY == 0){
          groupArray[y] = groupX;
        }else if(groupX != groupY){
          numOfGroup--;
          for(int i=0; i<numOfCards; i++){
            if(groupArray[i] == groupY){
              groupArray[i] == groupX;
            }
          }
        }
      }
    }
    for(int groupNum; groupArray){
      if(groupNum == 0){
        numOfGroup++;
      }
    }
    System.out.println(numOfGroup);
  }
}

Compiler output:
Main.java:45: error: not a statement
              groupArray[i] == groupX;
                            ^
Main.java:51: error: ';' expected
    for(int groupNum; groupArray){
                                ^
2 errors
Language: C++

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

int main(){
  int N, K;
  cin >> N >> K;
  string s;
  cin >> s;
  s[k-1] = s[k-1] - 'A' + 'a';
  cout << s << endl;
  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'k' was not declared in this scope
   10 |   s[k-1] = s[k-1] - 'A' + 'a';
      |     ^
Language: C++

#include <bits/stdc++.h> 
#define int long long
#define deb(x) cout<<#x <<" = "<<x<<"\n";
using namespace std; 

signed main() 
{
	//freopen("input.txt", "r", stdin);
	
	int n, k; cin>>n>>k;
	string s; cin>>s;
	s[k-1] = to_lower(s[k-1]);
	cout<<s<<"\n";
	
	
	
	
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: 'to_lower' was not declared in this scope; did you mean 'towlower'?
   12 |         s[k-1] = to_lower(s[k-1]);
      |                  ^~~~~~~~
      |                  towlower
Language: C++

#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> a[100005];
int ans[100005];
void dfs(int no,int father){ 
	for (int i=0;i<a[no].size();i++){
		int u=a[no][i].first;
		int w=a[no][i].second%2; 
		if (u!=father){
			ans[u]=ans[no]^w;　
			dfs(u,no);　
		}
	}
}
int main(){
    int n;
	cin>>n;
	for (int i=1;i<n;i++){
		int u,v,c;
		cin>>u>>v>>c;
		a[u].push_back({v,c});
		a[v].push_back({u,c});
	}
	dfs(1,-1);
	for(int i=1;i<=n;i++) cout<<ans[i]<<endl;
}

Compiler output:
a.cc:10:42: error: extended character 　 is not valid in an identifier
   10 |                         ans[u]=ans[no]^w;　
      |                                          ^
a.cc:11:35: error: extended character 　 is not valid in an identifier
   11 |                         dfs(u,no);　
      |                                   ^
a.cc: In function 'void dfs(int, int)':
a.cc:10:42: error: '\U00003000' was not declared in this scope
   10 |                         ans[u]=ans[no]^w;　
      |                                          ^~
a.cc:11:37: error: expected ';' before '}' token
   11 |                         dfs(u,no);　
      |                                     ^
      |                                     ;
   12 |                 }
      |                 ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,K;
  cin>>N>>K;
vector<char> S(N);
  for(int i=0;i<N;i++){
    cin>>S.at(i)
  }
  if(S.at(K-1)=='A'){
    cout<<'A'+32<<endl;
  }
  else if(S.at(K-1)=='B'){
    cout<<'B'+32<<endl;
  }
  else if(S.at(K-1)=='C'){
    cout<<'C'+32<<endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before '}' token
    8 |     cin>>S.at(i)
      |                 ^
      |                 ;
    9 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,K;
  cin>>N>>K;
vector<char> vec(N);
  for(int i=0;i<N;i++){
    cin>>S.at(i)
  }
  if(S.at(K-1)=='A'){
    cout<<'A'+32<<endl;
  }
  else if(S.at(K-1)=='B'){
    cout<<'B'+32<<endl;
  }
  else if(S.at(K-1)=='C'){
    cout<<'C'+32<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: 'S' was not declared in this scope
    8 |     cin>>S.at(i)
      |          ^
a.cc:10:6: error: 'S' was not declared in this scope
   10 |   if(S.at(K-1)=='A'){
      |      ^
Language: C++

n, k = map(int, input().split())
s = input()
for i, c in enumerate(s):
    if i+1==k:
        print(c.lower(), end="")
    else:
        print(c, end="")
print("")

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

#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
#define rep(X,N) for(ll X = 0; X < (N); X++)
#define PI (acos(-1.0))
#define pback push_back
#define mpair make_pair
#define MODN 1000000007
#define ALL(V) (V).begin(),(V).end()
#define CERR if(false) cerr

typedef long long ll;

using namespace std;
//using namespace boost::multiprecision;

int main(){

    int n, k;
    string s;
    cin >> n >> k;
    cin >> s;

    if(s[k - 1] == 'A'){
        s[k - 1] = 'a'
    }else if(s[k - 1] == 'B'){
        s[k - 1] == 'b'
    }else{
        s[k - 1] == 'c'
    }

    cout << s << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:23: error: expected ';' before '}' token
   24 |         s[k - 1] = 'a'
      |                       ^
      |                       ;
   25 |     }else if(s[k - 1] == 'B'){
      |     ~                  
a.cc:26:24: error: expected ';' before '}' token
   26 |         s[k - 1] == 'b'
      |                        ^
      |                        ;
   27 |     }else{
      |     ~                   
a.cc:28:24: error: expected ';' before '}' token
   28 |         s[k - 1] == 'c'
      |                        ^
      |                        ;
   29 |     }
      |     ~
Language: Java

import java.util.*

public class Main {
	public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
 
    String s = sc.next();
    String result = s.toLowerCase();
    System.out.println(result);
    }
}

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

import java.util.*

public class Main {
	public static void main(String args[]) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    sc.nextLine();
    String s = sc.next();
    String result = s.toLowerCase();
    System.out.println(result);
    }
}

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