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

#include <bits/stdc++.h>
using namespace std;
int main() {
  char in[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: In function 'int main()':
a.cc:5:11: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    5 |   int main(){
      |           ^~
a.cc:5:11: note: remove parentheses to default-initialize a variable
    5 |   int main(){
      |           ^~
      |           --
a.cc:5:11: note: or replace parentheses with braces to value-initialize a variable
a.cc:5:13: error: a function-definition is not allowed here before '{' token
    5 |   int main(){
      |             ^
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int n , k;
    string s;
    cin >> n >> k >> s;
    char a = a
    switch ((int)a){
        case 65:
            (int)a = 97;
            break;
        case 66:
            (int)a = 98;
            break;
        case 67:
            (int)a = 97;
            break;
    }
    for (int i = 0 ; i < n ; i++){
        if (i == k - 1){
            cout << a;
        }else{
            cout << s[i];
        }
    }
    cout << s;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: expected ',' or ';' before 'switch'
   11 |     switch ((int)a){
      |     ^~~~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main()
{
  int a,b;
  string s;
  cin>>a>>b>>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:9:8: error: 'k' was not declared in this scope
    9 |   if(s[k-1]=='A') s[k-1]='a';
      |        ^
a.cc:10:8: error: 'k' was not declared in this scope
   10 |   if(s[k-1]=='B') s[k-1]='b';
      |        ^
a.cc:11:8: error: 'k' was not declared in this scope
   11 |   if(s[k-1]=='C') s[k-1]='c';
      |        ^
Language: C

#include<iostream>
#include<string>
using namespace std;
int main(){
    string S;
    int N,K;
    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';
    }
  

}


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

#include <bits/stdc++.char in[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:1:35: error: missing terminating > character
    1 | #include <bits/stdc++.char in[55];
      |                                   ^
a.cc:1:10: fatal error: bits/stdc++.char in[55];: No such file or directory
    1 | #include <bits/stdc++.char in[55];
      |          ^
compilation terminated.
Language: C

#include<stdio.h>

int main(){
  int N,K;
  scanf("%d%d",&N,&K);
  
  char s[100];
  scanf("%s",s);
  
  s[k-1]+=32;
  
  printf("%s",s);

  return 0;
}


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

#include<stdio.h>

int main(){
  int N,K;
  scanf("%d%d",&N,&K);
  
  char s[100];
  scanf("%s",s);
  
  s[k-1]+=32;
  
  printf("%s",s);

  return 0;
}

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:34: error: 'a' was not declared in this scope
    7 |     if(S[K-1]=='A')S.replace(0,K,a);
      |                                  ^
a.cc:8:39: error: 'b' was not declared in this scope
    8 |     else if(S[K-1]=='B')S.replace(0,K,b);
      |                                       ^
a.cc:9:39: error: 'c' was not declared in this scope
    9 |     else if(S[K-1]=='C')S.replace(0,K,c);
      |                                       ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     if(S[K-1]=="A")S.replace(0,K,a);
a.cc:7:34: error: 'a' was not declared in this scope
    7 |     if(S[K-1]=="A")S.replace(0,K,a);
      |                                  ^
a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     else if(S[K-1]=="B")S.replace(0,K,b);
a.cc:8:39: error: 'b' was not declared in this scope
    8 |     else if(S[K-1]=="B")S.replace(0,K,b);
      |                                       ^
a.cc:9:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     else if(S[K-1]=="C")S.replace(0,K,c);
a.cc:9:39: error: 'c' was not declared in this scope
    9 |     else if(S[K-1]=="C")S.replace(0,K,c);
      |                                       ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if(s == "A")s = "a";
      |      ~~^~~~~~
a.cc:8:19: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    8 |   if(s == "A")s = "a";
      |                   ^~~
      |                   |
      |                   const char*
a.cc:9:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   else if(s == "B")s = "b";
      |           ~~^~~~~~
a.cc:9:24: error: invalid conversion from 'const char*' to 'char' [-fpermissive]
    9 |   else if(s == "B")s = "b";
      |                        ^~~
      |                        |
      |                        const char*
a.cc:10:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |   else s == "c";
      |        ~~^~~~~~
Language: C++

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

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

#include<bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int n,k;
  cin >> n >> k;
  cin >> s;
  string b="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  string l="abcdefghijklmnopqrstuvwxyz"
  for (int i=0;i<b.size();i++){
    if (s.at(k)==b.at(i)) {
      s.at(k) = l.at(i);
    }
    break;
  }
  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected ',' or ';' before 'string'
    9 |   string l="abcdefghijklmnopqrstuvwxyz"
      |   ^~~~~~
a.cc:10:16: error: 'i' was not declared in this scope
   10 |   for (int i=0;i<b.size();i++){
      |                ^
Language: C++

n,k=(int(x) for x in input().split())
s=list(input()) 
for i in range(n):
    if i==k-1:
        s[i]=s[i].lower()
str_s="".join(s)
print(str_s)

                                                  

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

#include<iostream>
#include<string>

using namespace std;

int main(){
  int N,K;
  string S;
  cin >> N;
  cin >> K;
  cin >> S;
  char tolow(char s){
    return(s+0x20);
  }
  S[K-1]=tolow(S[K-1]);
  cout << S;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: a function-definition is not allowed here before '{' token
   12 |   char tolow(char s){
      |                     ^
a.cc:15:10: error: 'tolow' was not declared in this scope; did you mean 'tolower'?
   15 |   S[K-1]=tolow(S[K-1]);
      |          ^~~~~
      |          tolower
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
  int N,K;
  string S;
  cin >> N;
  cin >> K;
  cin >> S;
  char tolow(string s){
    return(s+0x20);
  }
  S[K-1]=tolow(S[K-1]);
  cout << S;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:23: error: a function-definition is not allowed here before '{' token
   12 |   char tolow(string s){
      |                       ^
a.cc:15:10: error: 'tolow' was not declared in this scope; did you mean 'tolower'?
   15 |   S[K-1]=tolow(S[K-1]);
      |          ^~~~~
      |          tolower
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
  int N,K;
  string S;
  cin >> N;
  cin >> K;
  Cin >> S;
  char tolow(string s){
    return(s+0x20);
  }
  cout << tolow(S[K-1]);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'Cin' was not declared in this scope
   11 |   Cin >> S;
      |   ^~~
a.cc:12:23: error: a function-definition is not allowed here before '{' token
   12 |   char tolow(string s){
      |                       ^
a.cc:15:11: error: 'tolow' was not declared in this scope; did you mean 'tolower'?
   15 |   cout << tolow(S[K-1]);
      |           ^~~~~
      |           tolower
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
  int N,K;
  string S;
  cin >> N;
  cin >> K;
  cin >> S;
  char tolow(S[K-1]){
    return(s+0x20);
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected ',' or ';' before '{' token
   12 |   char tolow(S[K-1]){
      |                     ^
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main(){
  int N,K;
  string S;
  cin >> N;
  cin >> K;
  Cin >> S;
  char tolow(S[K-1]){
    return(s+0x20);
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 'Cin' was not declared in this scope
   11 |   Cin >> S;
      |   ^~~
a.cc:12:21: error: expected ',' or ';' before '{' token
   12 |   char tolow(S[K-1]){
      |                     ^
a.cc:14:4: error: expected '}' at end of input
   14 |   }
      |    ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

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

int main() {
  int N , K ;
  char S ; 
  
  cin >> N >> K ; 
  cin >> S ; 
  
  S.at(K) = S.at(K) + 32 ;  
  
  
  cout << S << endl ; 
  
  
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: request for member 'at' in 'S', which is of non-class type 'char'
   11 |   S.at(K) = S.at(K) + 32 ;
      |     ^~
a.cc:11:15: error: request for member 'at' in 'S', which is of non-class type 'char'
   11 |   S.at(K) = S.at(K) + 32 ;
      |               ^~
Language: C++

import java.util.Scanner;

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();
        s = s.substring(0, k - 1) + s.substring(k - 1, k).toLowerCase() + s.substring(k);
        System.out.println(s);
    }
}


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

#include<bits/stdc++.h>
#define ll long long
#define mp make_pair
#define F first
#define S second
#define db double
#define pb push_back
#define rep(i,a,b)  for(ll i=a;i<=b;i++)
#define all(a) a.begin(),a.end()
using namespace std;

 ll mod=1e9 +7;

ll expo(ll base,ll exponent,ll mod){
    ll ans=1;
    while(exponent!=0){
        if(exponent&1) ans=(1LL*ans*base)%mod;
        base=(1LL*base*base)%mod;
        exponent>>=1;
    }
    return ans%mod;
}
 
vector<bool>  prime(90000002,true);
void Sieve() 
{ 
   
    for (int p=2; p*p<=90000001; p++) 
    { 
        // If prime[p] is not changed, then it is a prime 
        if (prime[p] == true) 
        { 
            for (int i=p*p; i<=90000001; i += p) 
                prime[i] = false; 
        } 
    } 
}

ll get_val(vector<ll>&ft,ll index)
{
  ll res=0;
  for(;index>=0;index=(index & (index+1))-1)
    res+=ft[index];
  return res;
}

void update(vector<ll>&ft,ll index,ll val)
{
  for(;index<(ll)ft.size();index|=index+1)
    ft[index]+=val;
}

ll mex(vector<ll>&a, ll n)
{
  ll res=0;
  // set<ll>st;
  vector<ll>b(n+1,0);
  for(auto x:a) b[x]++;
    while(res<n && b[res]>0) res++;
  return res;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //   #ifndef ONLINE_JUDGE
    // // for getting input from input.txt
    // freopen("input.txt", "r", stdin);
    // // for writing output to output.txt
    // freopen("output.txt", "w", stdout);
    // #endif
    
    // Sieve();
   ll tests=1;
 // cin>>tests;
  // ll t=1;
    while(tests--)
    {
      string s,t;
      ll k,n;
      cin>>n>>k;
      cin>>s;
      t=s.substr(k-1,1);
      transform(t.begin(),t.end(),t.begin(),::tolower);
      s=s.substr(0,k-1) + t + s.substr(k,n-k);
      cout<<s;

    }

    return 0;
   }

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

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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ll n,k;
  cin>>n>>k;k--;
  string s; cin>>s;
  s[k]=tolower(s[k]);
  print(s);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'll' was not declared in this scope
    7 |   ll n,k;
      |   ^~
a.cc:8:8: error: 'n' was not declared in this scope; did you mean 'yn'?
    8 |   cin>>n>>k;k--;
      |        ^
      |        yn
a.cc:8:11: error: 'k' was not declared in this scope
    8 |   cin>>n>>k;k--;
      |           ^
a.cc:11:3: error: 'print' was not declared in this scope; did you mean 'rint'?
   11 |   print(s);
      |   ^~~~~
      |   rint
Language: C

#include <stdio.h>
char str[55];
int N,K; 
int main(){
  scanf("%d %d",&N,&K);
  scanf("%s",str);
  if(str[K-1]=='A'){
    str[K-1]='a';
  }
  else if(str[K-1]=='B'){
    str[K-1]='b';
  }
  else {
    (str[K-1]='c');   
  }
  printf("%s",str);
  return 0;
}
Aa

Compiler output:
main.c:19:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   19 | Aa
      | ^~
Language: Java

package com.example.demo.service;

import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(), k = sc.nextInt();
        String s = sc.next();
        char[] c = s.toCharArray();
        c[k - 1] = Character.toLowerCase(c[k - 1]);
        System.out.println(String.valueOf(c));
    }
}


Compiler output:
Main.java:3: error: package org.springframework.web.servlet.mvc.method.annotation does not exist
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
                                                            ^
1 error
Language: C++

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

int main(){
  int a,b;
  string S;
  cin >> a >> b >> S;
  for(int i=1;i<a;i++){
    if(a==k){
      if(S.at(a-1)=='A'){
        S.at(a-1)='a';
      }
      else if(S.at(a-1)=='B'){
        S.at(a-1)='b';
      }
      else{
        S.at(a-1)='c';
      }
    }
    cout << S.at(a-1);
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'k' was not declared in this scope
    9 |     if(a==k){
      |           ^
Language: C++

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

int main(){
  int a,b;
  string S;
  cin >> a >> b >> S;
  for(int i=1;i<a;i++){
    if(a==k){
      if(S.at(a-1)=='A'){
        S.at(a-1)=='a';
      }
      else if(S.at(a-1)=='B'){
        S.at(a-1)=='b';
      }
      else{
        S.at(a-1)=='c';
      }
    }
    cout << S.at(a-1);
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: 'k' was not declared in this scope
    9 |     if(a==k){
      |           ^
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 s1[] = s.split("");
    s1[k-1] = s1[k-1].toLowerCase();
    for (int i = 0; i < n; i++){
      System.out.print(s[i]);
    }
  }
}

Compiler output:
Main.java:12: error: array required, but String found
      System.out.print(s[i]);
                        ^
1 error
Language: C++

#include<iostream>
#include<cstring>
#include<cmath>
#include<bits/stdc++.h>
using namespace std;
int main() 
{

string  s;
int n,k;
cin>>n>>k;
for(int i=0;i<n;i++)
{
cin>>s;
}
if(s[i]==k)
{
putchar(tolower(s[i]));
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:6: error: 'i' was not declared in this scope
   16 | if(s[i]==k)
      |      ^
Language: C++

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;

int main(){

    int s;

    cin >> s;

    int x,y;

    x = (s - s%100)/100;
    y = s%100;

    int YYMM = 0;
    int MMYY = 0;

    if(x >= 1 && y <=12 && y >= 1){
        YYMM++;
    }
    if(y >＝ 1 && x <=12 && x >= 1){
        MMYY++;
    }

    if(YYMM == 1 && MMYY == 1){
        cout << "AMBIGUOUS" << endl;
    } else if(YYMM == 0 && MMYY == 1){
        cout << "MMYY" << endl;
    } else if(YYMM == 1 && MMYY == 0){
        cout << "YYMM" << endl;
    } else {
        cout << "NA"<< endl;
    }

}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:11: error: '\U0000ff1d' was not declared in this scope
   24 |     if(y >＝ 1 && x <=12 && x >= 1){
      |           ^~
a.cc:24:13: error: expected ')' before numeric constant
   24 |     if(y >＝ 1 && x <=12 && x >= 1){
      |       ~     ^~
      |             )
Language: C++

int main(){
int a;scanf("%d",&a);
int L=a/100;
int R=a%100;
if(1<=L&&L<=12){
if(1<=R&&R<=12)printf("AMBIGUOUS\n");
else printf("MMYY\n");
}else{
if(1<=R&&R<=12)printf("YYMM\n");
else printf("NA\n");
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:7: error: 'scanf' was not declared in this scope
    2 | int a;scanf("%d",&a);
      |       ^~~~~
a.cc:6:16: error: 'printf' was not declared in this scope
    6 | if(1<=R&&R<=12)printf("AMBIGUOUS\n");
      |                ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
a.cc:7:6: error: 'printf' was not declared in this scope
    7 | else printf("MMYY\n");
      |      ^~~~~~
a.cc:7:6: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:9:16: error: 'printf' was not declared in this scope
    9 | if(1<=R&&R<=12)printf("YYMM\n");
      |                ^~~~~~
a.cc:9:16: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:10:6: error: 'printf' was not declared in this scope
   10 | else printf("NA\n");
      |      ^~~~~~
a.cc:10:6: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

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

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 if( s.at(b) == "C" ){
    
    s.at(b) = 'c';
    
  }
  
    cout << s << endl;
  
}


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

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

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 if( s.at(b) == 'C' ){
    
    s.at(b) = c;
    
  }
  
    cout << s << endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:15: error: 'c' was not declared in this scope
   24 |     s.at(b) = c;
      |               ^
Language: C++

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

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 if( s.at(b) == "C" ){
    
    s.at(b) = c;
    
  }
  
    cout << s << endl;
  
}


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

char in[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: In function 'int main()':
a.cc:3:10: error: 'scanf' was not declared in this scope
    3 |  int a,b;scanf("%d%d",&a,&b);
      |          ^~~~~
a.cc:6:2: error: 'printf' was not declared in this scope
    6 |  printf("%s\n",in);
      |  ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | char in[55];
Language: C++

#include <cctype>
#include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;

char S[50];
int N;
int K;

int main(){
  cin >> N;
  cout << " ";
  cin >> K;
  cout << "\n";
  cin >> S[];
  tolower(S[K]);
  cout << "\n";
  for (int i = 0; i < N; i++){
    cout << S[i];
  }
}

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

char in[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: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 | int a,b;scanf("%d%d",&a,&b); scanf("%s",in);
      |         ^~~~~
a.cc:4:14: error: 'printf' was not declared in this scope
    4 | in[b-1]+=32; printf("%s\n",in);
      |              ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | char in[55];
Language: C++

char in[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: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 | int a,b;scanf("%d%d",&a,&b);
      |         ^~~~~
a.cc:6:1: error: 'printf' was not declared in this scope
    6 | printf("%s\n",in);
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | char in[55];
a.cc:6:19: error: expected '}' at end of input
    6 | printf("%s\n",in);
      |                   ^
a.cc:2:11: note: to match this '{'
    2 | int main(){
      |           ^
Language: C++

#include <iostream>

int main() {
  
  char N = A,B,C,K;
  string S = N;
  
  if(1<=N<=50 && 1<=K<=N)
    
    std::cout<<"String S\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 'A' was not declared in this scope
    5 |   char N = A,B,C,K;
      |            ^
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string S = N;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:8:21: error: 'K' was not declared in this scope
    8 |   if(1<=N<=50 && 1<=K<=N)
      |                     ^
Language: C++

char in[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: In function 'int main()':
a.cc:3:17: error: 'scanf' was not declared in this scope
    3 |         int a,b;scanf("%d%d",&a,&b);
      |                 ^~~~~
a.cc:6:9: error: 'printf' was not declared in this scope
    6 |         printf("%s\n",in);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | char in[55];
Language: C++

#include <bits/stdc++.h>
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.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') s.at(k-1) = c;
  cout << s << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:8:36: error: 'a' was not declared in this scope
    8 |   if(s.at(k-1) == 'A') s.at(k-1) = a;
      |                                    ^
a.cc:9:41: error: 'b' was not declared in this scope
    9 |   else if(s.at(k-1) == 'B') s.at(k-1) = b;
      |                                         ^
a.cc:10:25: error: expected ';' before 's'
   10 |   else(s.at(k-1) == 'C') s.at(k-1) = c;
      |                         ^~
      |                         ;
Language: C

#include <stdio.h>

int main(void)
{
        int k,n;
        scanf("%d%d",&n,&k);
        char s[n];
        scanf("%s",s);
        s[k-1]=s[k-1]+32;
        prinff("%s\n",s);
        return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'prinff'; did you mean 'printf'? [-Wimplicit-function-declaration]
   10 |         prinff("%s\n",s);
      |         ^~~~~~
      |         printf
Language: C

#include <stdio.h>
#include <ctype.h>
int N,K;
char a[100];
scanf("%d", &N);
scanf("%d", &K);
scanf("%s", a);
a[K-1]=tolower(a[K-1]);
printf("%s",a);
return 0;
}


Compiler output:
main.c:5:7: error: expected declaration specifiers or '...' before string constant
    5 | scanf("%d", &N);
      |       ^~~~
main.c:5:13: error: expected declaration specifiers or '...' before '&' token
    5 | scanf("%d", &N);
      |             ^
main.c:6:7: error: expected declaration specifiers or '...' before string constant
    6 | scanf("%d", &K);
      |       ^~~~
main.c:6:13: error: expected declaration specifiers or '...' before '&' token
    6 | scanf("%d", &K);
      |             ^
main.c:7:7: error: expected declaration specifiers or '...' before string constant
    7 | scanf("%s", a);
      |       ^~~~
main.c:7:13: error: expected declaration specifiers or '...' before 'a'
    7 | scanf("%s", a);
      |             ^
main.c:8:1: warning: data definition has no type or storage class
    8 | a[K-1]=tolower(a[K-1]);
      | ^
main.c:8:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:8:1: error: variably modified 'a' at file scope
main.c:8:1: error: conflicting types for 'a'; have 'int[1]'
main.c:4:6: note: previous declaration of 'a' with type 'char[100]'
    4 | char a[100];
      |      ^
main.c:8:8: error: invalid initializer
    8 | a[K-1]=tolower(a[K-1]);
      |        ^~~~~~~
main.c:9:8: error: expected declaration specifiers or '...' before string constant
    9 | printf("%s",a);
      |        ^~~~
main.c:9:13: error: expected declaration specifiers or '...' before 'a'
    9 | printf("%s",a);
      |             ^
main.c:10:1: error: expected identifier or '(' before 'return'
   10 | return 0;
      | ^~~~~~
main.c:11:1: error: expected identifier or '(' before '}' token
   11 | }
      | ^
Language: C

#include <stdio.h>
#include <ctype.h>
int N,K;
char a[100];
scanf("%d",&N);
scanf("%d",&K);
scanf("%s",a);
a[K-1]=tolower(a[K-1]);
printf("%s",a);
return 0;
}


Compiler output:
main.c:5:7: error: expected declaration specifiers or '...' before string constant
    5 | scanf("%d",&N);
      |       ^~~~
main.c:5:12: error: expected declaration specifiers or '...' before '&' token
    5 | scanf("%d",&N);
      |            ^
main.c:6:7: error: expected declaration specifiers or '...' before string constant
    6 | scanf("%d",&K);
      |       ^~~~
main.c:6:12: error: expected declaration specifiers or '...' before '&' token
    6 | scanf("%d",&K);
      |            ^
main.c:7:7: error: expected declaration specifiers or '...' before string constant
    7 | scanf("%s",a);
      |       ^~~~
main.c:7:12: error: expected declaration specifiers or '...' before 'a'
    7 | scanf("%s",a);
      |            ^
main.c:8:1: warning: data definition has no type or storage class
    8 | a[K-1]=tolower(a[K-1]);
      | ^
main.c:8:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:8:1: error: variably modified 'a' at file scope
main.c:8:1: error: conflicting types for 'a'; have 'int[1]'
main.c:4:6: note: previous declaration of 'a' with type 'char[100]'
    4 | char a[100];
      |      ^
main.c:8:8: error: invalid initializer
    8 | a[K-1]=tolower(a[K-1]);
      |        ^~~~~~~
main.c:9:8: error: expected declaration specifiers or '...' before string constant
    9 | printf("%s",a);
      |        ^~~~
main.c:9:13: error: expected declaration specifiers or '...' before 'a'
    9 | printf("%s",a);
      |             ^
main.c:10:1: error: expected identifier or '(' before 'return'
   10 | return 0;
      | ^~~~~~
main.c:11:1: error: expected identifier or '(' before '}' token
   11 | }
      | ^
Language: C

#include <stdio.h>
#include <ctype.h>
int N,K;
char a[100];
scanf("%d %d",&N,&K);
scanf("%s",a);
a[K-1]=tolower(a[K-1]);
printf("%s",a);
return 0;
}

Compiler output:
main.c:5:7: error: expected declaration specifiers or '...' before string constant
    5 | scanf("%d %d",&N,&K);
      |       ^~~~~~~
main.c:5:15: error: expected declaration specifiers or '...' before '&' token
    5 | scanf("%d %d",&N,&K);
      |               ^
main.c:5:18: error: expected declaration specifiers or '...' before '&' token
    5 | scanf("%d %d",&N,&K);
      |                  ^
main.c:6:7: error: expected declaration specifiers or '...' before string constant
    6 | scanf("%s",a);
      |       ^~~~
main.c:6:12: error: expected declaration specifiers or '...' before 'a'
    6 | scanf("%s",a);
      |            ^
main.c:7:1: warning: data definition has no type or storage class
    7 | a[K-1]=tolower(a[K-1]);
      | ^
main.c:7:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:7:1: error: variably modified 'a' at file scope
main.c:7:1: error: conflicting types for 'a'; have 'int[1]'
main.c:4:6: note: previous declaration of 'a' with type 'char[100]'
    4 | char a[100];
      |      ^
main.c:7:8: error: invalid initializer
    7 | a[K-1]=tolower(a[K-1]);
      |        ^~~~~~~
main.c:8:8: error: expected declaration specifiers or '...' before string constant
    8 | printf("%s",a);
      |        ^~~~
main.c:8:13: error: expected declaration specifiers or '...' before 'a'
    8 | printf("%s",a);
      |             ^
main.c:9:1: error: expected identifier or '(' before 'return'
    9 | return 0;
      | ^~~~~~
main.c:10:1: error: expected identifier or '(' before '}' token
   10 | }
      | ^
Language: Java


public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int K = sc.nextInt();

		String S = sc.next();

		char[] s = S.toCharArray();

		for(int i=0;i<S.length();i++) {
			if(i==K-1) {
				s[i] = Character.toLowerCase(s[i]);
			}
		}
		S = new String(s);
		System.out.println(S);
	}
}

Compiler output:
Main.java:3: error: cannot find symbol
	public static void main(String[] args) throws FileNotFoundException {
	                                              ^
  symbol:   class FileNotFoundException
  location: class Main
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
3 errors
Language: C++

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

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

	s.at(k-1) += 32;

	cout << s << endl;
}

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

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();  // input Integer
    int a = sc.nextInt();  // input Integer
    String s = sc.next();  // input String
    System.out.println(s.substring(0,a-1)+s.substring(a-1,a).toLowerCase()+s.substring(a);
  }
}

Compiler output:
Main.java:11: error: ')' or ',' expected
    System.out.println(s.substring(0,a-1)+s.substring(a-1,a).toLowerCase()+s.substring(a);
                                                                                         ^
1 error
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:7:16: error: 'A' was not declared in this scope
    7 |  if(S.at(K-1)==A){
      |                ^
a.cc:11:16: error: 'b' was not declared in this scope
   11 |      S.at(K-1)=b;
      |                ^
a.cc:14:12: error: 'c' was not declared in this scope
   14 |  S.at(K-1)=c;
      |            ^
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:7:16: error: 'A' was not declared in this scope
    7 |  if(S.at(K-1)==A){
      |                ^
a.cc:8:16: error: 'a' was not declared in this scope
    8 |      S.at(K-1)=a;
      |                ^
a.cc:10:22: error: 'B' was not declared in this scope
   10 |  else if (S.at(K-1)==B){
      |                      ^
a.cc:11:16: error: 'b' was not declared in this scope
   11 |      S.at(K-1)=b;
      |                ^
a.cc:14:12: error: 'c' was not declared in this scope
   14 |  S.at(K-1)=c;
      |            ^
Language: C++

char in[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: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 | int a,b;scanf("%d%d",&a,&b);
      |         ^~~~~
a.cc:6:1: error: 'printf' was not declared in this scope
    6 | printf("%s\n",in);
      | ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | char in[55];
Language: C++

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

int main(){
    int N,K;
    string S;
    cin >> A >> B >> 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:7:12: error: 'A' was not declared in this scope
    7 |     cin >> A >> B >> S;
      |            ^
a.cc:7:17: error: 'B' was not declared in this scope
    7 |     cin >> A >> B >> S;
      |                 ^
Language: C++

#include <iostream>
#include <locale>
using namespace std;
int main(){
  int N,K;
  char c[55];
  cin >> N >> K;
  for(int i = 0; i< N;i++){
    cin >> c[i];
  }
  for(int i = 0; i< N;i++){
    if(i == K-1) cout << tolower(c[i],l);
    else cout << c[i];
  }
  cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:39: error: 'l' was not declared in this scope
   12 |     if(i == K-1) cout << tolower(c[i],l);
      |                                       ^
Language: C++

#include <iostream>
#include <locale>
using namespace std;
int main(){
  int N,K;
  char c[55];
  cin >> N >> K;
  for(int i = 0; i< N;i++){
    cin >> c[i];
  }
  for(int i = 0; i< N;i++){
    if(i == K-1) cout << tolower(c[i]);
    else cout << c[i];
  }
  cout << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: expected '}' at end of input
   15 |   cout << endl;
      |                ^
a.cc:4:11: 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;
  char A, B, C;
  if (S.at(K) == A){
    S.at(K) = a;
  }
  else if (S.at(K) == B){
    S.at(K) = b;
  }
  else if (S.at(K) == C){
    S.at(K) = c;
  }
  cout << S << endl;
}
    


Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'a' was not declared in this scope
    9 |     S.at(K) = a;
      |               ^
a.cc:12:15: error: 'b' was not declared in this scope
   12 |     S.at(K) = b;
      |               ^
a.cc:15:15: error: 'c' was not declared in this scope
   15 |     S.at(K) = c;
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
const int N=2e5;
int n,cnt,hd[N],v[N],nxt[N],w[N];
long long d[N];
void dfs(int u,int fa){
    for(int i=hd[u];i;i=nxt[i])
    if(v[i]!=fa){
        d[v[i]]=d[u]+w[i];
        dfs(v[i],u);
    }
}
int main(){
    cin>>n;
    for(int i=1,x,y,z;i<n;i++){
		cin>>x>>y>>z;
		v[++cnt]=y;
		nxt[cnt]=hd[x];
		w[cnt]=z;
		hd[x]=cnt;
		v[++cnt]=x;
		nxt[cnt]=hd[y];
		w[cnt]=z;
		hd[y]=cnt;
	}
    dfs(1,0);
    for(int i=1;i<=n;i++){
        int op=d[i]&1;
        cout<<op<<endl;
    }
}
#include <bits/stdc++.h>
using namespace std;
const int N=2e5;
int n,cnt,hd[N],v[N],nxt[N],w[N];
long long d[N];
void dfs(int u,int fa){

Compiler output:
a.cc:34:11: error: redefinition of 'const int N'
   34 | const int N=2e5;
      |           ^
a.cc:3:11: note: 'const int N' previously defined here
    3 | const int N=2e5;
      |           ^
a.cc:35:5: error: redefinition of 'int n'
   35 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |     ^
a.cc:4:5: note: 'int n' previously declared here
    4 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |     ^
a.cc:35:7: error: redefinition of 'int cnt'
   35 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |       ^~~
a.cc:4:7: note: 'int cnt' previously declared here
    4 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |       ^~~
a.cc:35:11: error: redefinition of 'int hd [200000]'
   35 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |           ^~
a.cc:4:11: note: 'int hd [200000]' previously declared here
    4 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |           ^~
a.cc:35:17: error: redefinition of 'int v [200000]'
   35 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |                 ^
a.cc:4:17: note: 'int v [200000]' previously declared here
    4 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |                 ^
a.cc:35:22: error: redefinition of 'int nxt [200000]'
   35 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |                      ^~~
a.cc:4:22: note: 'int nxt [200000]' previously declared here
    4 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |                      ^~~
a.cc:35:29: error: redefinition of 'int w [200000]'
   35 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |                             ^
a.cc:4:29: note: 'int w [200000]' previously declared here
    4 | int n,cnt,hd[N],v[N],nxt[N],w[N];
      |                             ^
a.cc:36:11: error: redefinition of 'long long int d [200000]'
   36 | long long d[N];
      |           ^
a.cc:5:11: note: 'long long int d [200000]' previously declared here
    5 | long long d[N];
      |           ^
a.cc:37:6: error: redefinition of 'void dfs(int, int)'
   37 | void dfs(int u,int fa){
      |      ^~~
a.cc:6:6: note: 'void dfs(int, int)' previously defined here
    6 | void dfs(int u,int fa){
      |      ^~~
a.cc: In function 'void dfs(int, int)':
a.cc:37:24: error: expected '}' at end of input
   37 | void dfs(int u,int fa){
      |                       ~^
Language: C++

//
//  main.cpp
//  uecontest2
//
//  Created on 2020/04/29.
//  Copyright © 2020 エロやん. All rights reserved.
//

#include <iostream>
#include <stirng>
using namespace std;
int main(){
    int N,K;
    string str;
    cin>>N>>K;
    cin>>str;
    if(str[K]=='A')
        str[K]='a';
    if(str[K]=='B')
        str[K]='b';
    if(str[K]=='C')
        str[K]='c';
    cout<<str<<endl;
    
    
    return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9
#define PI 3.14159265359
#define MOD 1000000007
#define ALL(v) v.begin(),v.end()
#define ALLR(v) v.rbegin(),v.rend()
typedef long long ll;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
//isPrime
//modpow modinv
//getDigit
int main() {
  cout << fixed << setprecision(10);
  int n,k,s;
  cin >> n >> k >> s;
  s.at(k-1)=s.at(k-1)-'A'+'a';
  cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:5: error: request for member 'at' in 's', which is of non-class type 'int'
   19 |   s.at(k-1)=s.at(k-1)-'A'+'a';
      |     ^~
a.cc:19:15: error: request for member 'at' in 's', which is of non-class type 'int'
   19 |   s.at(k-1)=s.at(k-1)-'A'+'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";
  }
  else if(S[K]=="B"){
    S[K]="b";
  }
  else if(S[K]=="C"){
    S[K]="c";
  }
  cout<<S<<endl;
}

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

#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include<set>
#include<map>
using namespace std;


int main() {
    string s;
    int  a, b;
    cin >> a >> b >> s;
    for(int i = 0; i < a; i++){
        if(i == b-1){
            cout << v[i] + 32;
        }
        else
        {
            cout << v[i];
        }
        
    }
    
    cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:21: error: 'v' was not declared in this scope
   17 |             cout << v[i] + 32;
      |                     ^
a.cc:21:21: error: 'v' was not declared in this scope
   21 |             cout << v[i];
      |                     ^
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;
 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';
 }
 cout << s << endl;

 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:10: error: expected '(' before '{' token
   16 |  else if {
      |          ^
      |          (
Language: C

#include<stdio.h>
int main()
{
  printf("AMBIGUOUS);
         }

Compiler output:
main.c: In function 'main':
main.c:4:10: warning: missing terminating " character
    4 |   printf("AMBIGUOUS);
      |          ^
main.c:4:10: error: missing terminating " character
    4 |   printf("AMBIGUOUS);
      |          ^~~~~~~~~~~~
main.c:5:10: error: expected expression before '}' token
    5 |          }
      |          ^
main.c:4:10: error: expected ';' before '}' token
    4 |   printf("AMBIGUOUS);
      |          ^
      |          ;
    5 |          }
      |          ~