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

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


int main(){
  int n;
  int A[100];
  cin >> n;
  for (int i=0;i<n;i++){
    cin >> A[i];
  }
  sort(A, A+n);
  int base = 0;
  int cnt =0;
  for (int i=0;i<n;i++){
    if (base < A[i]){
      base = A[i];
      cnt++;
    }
  }
  cout << cnt << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |   sort(A, A+n);
      |   ^~~~
      |   short
Language: C++

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


int main(){
  int n;
  int A[100];
  cin >> n;
  for (int i=0;i<n;i++){
    cin >> A[i];
  }
  sort(A, A+n);
  int base = 0;
  int cnt =0;
  for (int i=0;i<n;i++){
    if (base < A[i]){
      base = A[i];
      cnt++;
    }
  }
  cout << cnt << endl
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   13 |   sort(A, A+n);
      |   ^~~~
      |   short
a.cc:22:22: error: expected ';' before 'return'
   22 |   cout << cnt << endl
      |                      ^
      |                      ;
   23 |   return 0;
      |   ~~~~~~
Language: Java

import java.io.*;
class Main
{
  public static void main(String[] args) throws Exception
  {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String input = br.readLine();
    String[] param = input.split("/");
    
    int n1 = Integer.parseInt(param[0]);
    int n2 = Integer.parseInt(param[1]);
    int n3 = Integer.parseInt(param[2]);
    
    if(n1!=2018){
      n1 = 2018;
    }
    
    
    if(n3>=10{)
    System.out.println("2018/01/"+n3);
  }else{
  	System.out.println("2018/01/0" +n3);
  }
  }
}

Compiler output:
Main.java:20: error: ')' expected
    if(n3>=10{)
             ^
Main.java:20: error: illegal start of expression
    if(n3>=10{)
              ^
2 errors
Language: Java

import java.io.*;
class Main
{
  public static void main(String[] args)
  {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    
    String input = br.readLine();
    String[] param = input.split("/");
    
    int n1 = Integer.parseInt(param[0]);
    int n2 = Integer.parseInt(param[1]);
    int n3 = Integer.parseInt(param[2]);
    
    System.out.println("2018/01/"+n3);
  }
}
    
    

Compiler output:
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
    String input = br.readLine();
                              ^
1 error
Language: C++

int main() {
 string s;
 cin >> s;
 string t;
 s[3] = '8';
 cout << s << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:2: error: 'string' was not declared in this scope
    2 |  string s;
      |  ^~~~~~
a.cc:3:2: error: 'cin' was not declared in this scope
    3 |  cin >> s;
      |  ^~~
a.cc:3:9: error: 's' was not declared in this scope
    3 |  cin >> s;
      |         ^
a.cc:4:8: error: expected ';' before 't'
    4 |  string t;
      |        ^~
      |        ;
a.cc:6:2: error: 'cout' was not declared in this scope
    6 |  cout << s << endl;
      |  ^~~~
a.cc:6:15: error: 'endl' was not declared in this scope
    6 |  cout << s << endl;
      |               ^~~~
Language: C++

int main() {
 string s;
 cin >> s;
 string t;
 t=s;
 t[3] = '8';
 cout << t << endl;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:2: error: 'string' was not declared in this scope
    2 |  string s;
      |  ^~~~~~
a.cc:3:2: error: 'cin' was not declared in this scope
    3 |  cin >> s;
      |  ^~~
a.cc:3:9: error: 's' was not declared in this scope
    3 |  cin >> s;
      |         ^
a.cc:4:8: error: expected ';' before 't'
    4 |  string t;
      |        ^~
      |        ;
a.cc:5:2: error: 't' was not declared in this scope
    5 |  t=s;
      |  ^
a.cc:7:2: error: 'cout' was not declared in this scope
    7 |  cout << t << endl;
      |  ^~~~
a.cc:7:15: error: 'endl' was not declared in this scope
    7 |  cout << t << endl;
      |               ^~~~
Language: C++

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

int main()
{
  string S;
  cin >> S;
  
  S.at(3) = '8';
  
  cout << S << endl;
}

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

#incllude <iostream>
#include <string>

using namespace std;
int main(){

string s;
cin >> s;
s[3]='7';
cout << s << endl;
  
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incllude; did you mean #include?
    1 | #incllude <iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:1: error: 'cin' was not declared in this scope
    8 | cin >> s;
      | ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | 
a.cc:10:1: error: 'cout' was not declared in this scope
   10 | cout << s << endl;
      | ^~~~
a.cc:10:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:14: error: 'endl' was not declared in this scope
   10 | cout << s << endl;
      |              ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 |
Language: C++

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

string s;
cin >> s;
s[3]='7';
for(int i=0;i<10;i++){
	cout << s[i] << endl;
}
  
}

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

#incllude <iostream>
#include <string>
using namespace std;
int main(){

string s;
cin >> s;
s[3]='7';
for(int i=0;i<10;i++){
	cout << s[i] << endl;
}
  
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incllude; did you mean #include?
    1 | #incllude <iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
    7 | cin >> s;
      | ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <string>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout << s[i] << endl;
      |         ^~~~
a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:25: error: 'endl' was not declared in this scope
   10 |         cout << s[i] << endl;
      |                         ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <string>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: C++

#incllude <iostream>
using namespace std;
int main(){

string s;
cin >> s;
s[3]='7';
for(int i=0;i<10;i++){
	cout << s[i] << endl;
}
  
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incllude; did you mean #include?
    1 | #incllude <iostream>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:1: error: 'string' was not declared in this scope
    5 | 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 | #incllude <iostream>
a.cc:6:1: error: 'cin' was not declared in this scope
    6 | cin >> s;
      | ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incllude <iostream>
a.cc:6:8: error: 's' was not declared in this scope
    6 | cin >> s;
      |        ^
a.cc:9:9: error: 'cout' was not declared in this scope
    9 |         cout << s[i] << endl;
      |         ^~~~
a.cc:9:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:25: error: 'endl' was not declared in this scope
    9 |         cout << s[i] << endl;
      |                         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incllude <iostream>
Language: C++

#include <iostream>
using namespace std;
int main() {
  string s;
  cin >> s;
  s.at(3) = "8";
    cout << s << endl;
}

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

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

using ll=long long;
const ll MOD=1000000007;

int main() {
  string s;
  cin >> s;
  s[3]="8";
  cout << s << endl;
}

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

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

int main(void) {
  string S;
  cin >> S;

  s[3]==8;
  cout << S << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: 's' was not declared in this scope
   11 |   s[3]==8;
      |   ^
Language: C++

,>,>,>,>,>,>,>,>,>,<<<<<<+<<<.>.>.>.>.>.>.>.>.>.

Compiler output:
a.cc:1:1: error: expected unqualified-id before ',' token
    1 | ,>,>,>,>,>,>,>,>,>,<<<<<<+<<<.>.>.>.>.>.>.>.>.>.
      | ^
a.cc:1:2: error: expected unqualified-id before '>' token
    1 | ,>,>,>,>,>,>,>,>,>,<<<<<<+<<<.>.>.>.>.>.>.>.>.>.
      |  ^
Language: C++

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

int main(){
    string S;
    cin >> S;
    S[3] = 8;
    cout S << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 
  string S ;
  Cin>>S;
  
  if(S[3]=='7'){
    S[3]=8;
  }
  
  cout<<S<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'Cin' was not declared in this scope; did you mean 'sin'?
    7 |   Cin>>S;
      |   ^~~
      |   sin
Language: C++

int N, flag[101]; // Global variables are initially all 0.
// Also note that we need [101], not [100]!
 int main(){
 cin >> N;
 for(int i = 0; i < N; ++i){
 int d;
 cin >> d;
 flag[d] = 1;
 }
 int ans = 0;
 for(int i = 0; i < N; ++i){
 ans += flag[i];
 }
 cout << ans << endl;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:4:2: error: 'cin' was not declared in this scope
    4 |  cin >> N;
      |  ^~~
a.cc:14:2: error: 'cout' was not declared in this scope
   14 |  cout << ans << endl;
      |  ^~~~
a.cc:14:17: error: 'endl' was not declared in this scope
   14 |  cout << ans << endl;
      |                 ^~~~
Language: C++

#include "pch.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <utility>
#include <queue>
#include <algorithm>
#include <functional>
#include <string>
#include <bitset>

#define ll long long
#define fri(n) for(i=0;i<(n);i++)
#define frj(n) for(j=0;j<(n);i++)
#define min(p,q) ((p)<(q)?(p):(q))
#define max(p,q) ((p)>(q)?(p):(q))
#define INF 1000000000000000000//10^18
#define INFINT 2000000001//2*10^9+1
#define MOD 1000000007
#define MODANOTHER 998244353
#define PI acos(-1)

using namespace std;



int main(void)
{
	//変数の宣言
	int n,m;
	char s[20];

	//よく使う変数
	int i,j,k,l;
	int flag=0;
	int ans=0;
	int count=0;
	int temp=0;
	int temp1=0;
	int temp2=0;
	int temp3=0;
	int max=0;
	int min=INFINT;
	int len=0;
	int sum=0;
	int ok=0;
	int ng=0;
	char dummy;
	char stemp[11];
	
	//データの読み込み


//	scanf("%d",&n);
//	scanf_s("%d",&n);

//	scanf("%s",&s);
	scanf_s("%s",&s,20);


/*	for(i=0;i<n;i++){
//		scanf("%d",&b[i]);
		scanf_s("%d",&b[i]);
	}*/


/*	for(i=0;i<3;i++){
//		scanf("%s",&s);
		scanf_s("%s",&s[i],10);
	}*/


	//	printf("nは%dです\n", n);
	//	printf("データの読み込み終了\n");
	//実際の処理

//	clock_t start=clock();

	s[3]='8';

	printf("%s",s);

//	clock_t end=clock();

	//	printf("計算部分終了\n");

	//出力
	//printf("%d",min(sum+2*m,n-1));

//	printf("time=%lf",(double)(end-start)/CLOCKS_PER_SEC);
	//	printf("結果の出力終了\n");

	return 0;
}



Compiler output:
a.cc:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C++

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

int main(){
  string s;
  cin >> s;
  if(s[3] == '7') s[3] = '8';
  count << s <<endl;
}

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

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

int main(){
  string s;
  cin >> s;
  s[3] = "8";
  cout << s << endl;
  return 0;
}


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

#include <stdio.h>
#include <iostream>
#include <vector>
#include <cstdlib> 
#include <cmath>
#include <algorithm>
#include <sstream>
#include <string>
using namespace std;

int main() {
	string s;
	cin >> s;
	
	s[3] = '8';
	
	cout << s << endl;

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

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main(){
    string s;
    cin >> s;
    s[3] = '8'
    cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected ';' before 'cout'
    7 |     s[3] = '8'
      |               ^
      |               ;
    8 |     cout << s << endl;
      |     ~~~~
Language: Java


def Already2018(s):

    ans = s[:3] + '8' + s[4:]
    return ans

def main():
    s = str(input())
    print(Already2018(s))

if __name__ == '__main__':
    main()


Compiler output:
Main.java:11: error: unclosed character literal
if __name__ == '__main__':
               ^
Main.java:11: error: unclosed character literal
if __name__ == '__main__':
                        ^
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
def Already2018(s):
^
  (use --enable-preview to enable unnamed classes)
Main.java:2: error: ';' expected
def Already2018(s):
                  ^
4 errors
Language: C++

import std.stdio;

void main() {
  enum Head = "2018";
  auto s = readln();
  
  write(Head, s[Head.length..$]);
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import std.stdio;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: '::main' must return 'int'
    3 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:8: error: use of enum 'Head' without previous declaration
    4 |   enum Head = "2018";
      |        ^~~~
a.cc:4:13: error: expected unqualified-id before '=' token
    4 |   enum Head = "2018";
      |             ^
a.cc:5:12: error: 'readln' was not declared in this scope
    5 |   auto s = readln();
      |            ^~~~~~
a.cc:7:9: error: 'Head' was not declared in this scope
    7 |   write(Head, s[Head.length..$]);
      |         ^~~~
a.cc:7:29: error: expected unqualified-id before '.' token
    7 |   write(Head, s[Head.length..$]);
      |                             ^
a.cc:7:3: error: 'write' was not declared in this scope
    7 |   write(Head, s[Head.length..$]);
      |   ^~~~~
Language: C++

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

int main() {
  steing S;
  cin>>S;
  S[3]='8';
    cout<<S<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'steing' was not declared in this scope; did you mean 'stdin'?
    5 |   steing S;
      |   ^~~~~~
      |   stdin
a.cc:6:8: error: 'S' was not declared in this scope
    6 |   cin>>S;
      |        ^
Language: C++

#include<iostream>
#include<string>
#include<fstream>
using namespace std;
int main()
{
    string a,b=2018,c=2017;
    getline(cin,a);
    b=" "+a+" ";
    c=" "+a+" ";
    for(int k=0;(k=a.find(b,k))>=0;k+=c.size()-1)
       a.replace(k,b.size(),c);
    cout<<a.substr(1,a.size()-2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    7 |     string a,b=2018,c=2017;
      |                ^~~~
a.cc:7:23: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    7 |     string a,b=2018,c=2017;
      |                       ^~~~
Language: C++

#include<iostream>
#include<string>
#include<fstream>
using namespace std;
int main()
{
    string a,b=2018,c=2017;
    getline(cin,a);
    b=" "+a+" ";
    c=" "+a+" ";
    for(int k=0;(k=a.find(b,k))>=0;k+=c.size()-1)
       a.replace(k,b.size(),c)
    cout<<a.substr(1,a.size()-2);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    7 |     string a,b=2018,c=2017;
      |                ^~~~
a.cc:7:23: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
    7 |     string a,b=2018,c=2017;
      |                       ^~~~
a.cc:12:31: error: expected ';' before 'cout'
   12 |        a.replace(k,b.size(),c)
      |                               ^
      |                               ;
   13 |     cout<<a.substr(1,a.size()-2);
      |     ~~~~
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    StringBuilder sb = new StringBuilder();
    sb = sc.nextLine();
    char a = sb.charAt(4);
    if(a == '7') 
      sb.setCharAt(4, '8');
    System.out.println(sb);   
  }
}

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to StringBuilder
    sb = sc.nextLine();
                    ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    StringBuilder sb = new StringBuilder();
    sb = sc.nextLine();
    char a = sb.charAt(4).
    if(a == "7") 
      sb.setCharAt(4, "8");
    System.out.println(sb);   
  }
}

Compiler output:
Main.java:7: error: <identifier> expected
    char a = sb.charAt(4).
                          ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    StringBuilder sb = new StringBuilder();
    sb = sc.next();
    char a = sb.charAt(4);
    if(a == "7") 
      sb.setCharAt(4, "8");
    System.out.println(sb);   
  }
}

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to StringBuilder
    sb = sc.next();
                ^
Main.java:8: error: bad operand types for binary operator '=='
    if(a == "7") 
         ^
  first type:  char
  second type: String
Main.java:9: error: incompatible types: String cannot be converted to char
      sb.setCharAt(4, "8");
                      ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    StringBuilder sb = new StringBuilder();
    sb = sc.next();
    char a = sb.charAt(4).
    if(a == "7") 
      sb.setCharAt(4, "8");
    System.out.println(sb);   
  }
}

Compiler output:
Main.java:7: error: <identifier> expected
    char a = sb.charAt(4).
                          ^
1 error
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    StringBuilder sb = new StringBuilder();
    sc = sc.next();
    if(sb.charAt(4).equals(7) == 0) 
      sb.setCharAt(4, "8");
    System.out.println(sb);   
  }
}

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to Scanner
    sc = sc.next();
                ^
Main.java:7: error: char cannot be dereferenced
    if(sb.charAt(4).equals(7) == 0) 
                   ^
Main.java:8: error: incompatible types: String cannot be converted to char
      sb.setCharAt(4, "8");
                      ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
3 errors
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
    StringBuilder sb = new StringBuilder();
    sc = sc.next();
    if(sb.charAt(4) == "7") 
      setCharAt(4, "8");
    System.out.println(sc);   
  }
}

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to Scanner
    sc = sc.next();
                ^
Main.java:7: error: bad operand types for binary operator '=='
    if(sb.charAt(4) == "7") 
                    ^
  first type:  char
  second type: String
Main.java:8: error: cannot find symbol
      setCharAt(4, "8");
      ^
  symbol:   method setCharAt(int,String)
  location: class Main
3 errors
Language: Java

import java.util.*;
public class Main{
  public static void main{
    Scanner sc = new Scanner(system.in);
    String s = sc.next();
    s = s.replace("2017/01","2018/01");
    System.out.println(s);
  }
}


Compiler output:
Main.java:3: error: '(' expected
  public static void main{
                         ^
1 error
Language: C++

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

int main(){
  istring s;
  s.at(4)=8;
  cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'istring' was not declared in this scope; did you mean 'isprint'?
    5 |   istring s;
      |   ^~~~~~~
      |   isprint
a.cc:6:3: error: 's' was not declared in this scope
    6 |   s.at(4)=8;
      |   ^
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main(){
    string s;
    cin >> s;
    s[3] == "8";
    cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     s[3] == "8";
Language: C++

#include <iostream>

using namespace std;

int main(){
    string year;
    string month;
    string day;
    string sla;
    cin >> s;
    s[0] == "2";
    s[1] == "0";
    s[2] == "1";
    s[3] == "8";
    cout << s << endl;
}

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

#include<bits/stdc++.h>
using namespace std;
 
int main(){
  string s;
  cin >> s;
  s[3] = '8';
  cout << s;

  cout << price;
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'price' was not declared in this scope
   10 |   cout << price;
      |           ^~~~~
Language: C++

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

int main() {
    string s;
    cin >> s;
	s[3] = 8
    cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'cout'
    8 |         s[3] = 8
      |                 ^
      |                 ;
    9 |     cout << s << endl;
      |     ~~~~
Language: C++


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

int main() {
    ll N,Y;
    cin >> N >> Y;
    
    rep2(i,0,N+1){
        rep2(j,0,N-i+1){
            if( i*10000 + 5000*j  + 1000*(N-i-j)== Y ){
                cout << i << " " << j << " "<< N-i-j;
                return 0;
            }
        }
    }
    
    cout << -1 << " " << -1 << " "<< -1;
    return 1;
}


Compiler output:
a.cc:8:1: error: expected initializer before 'int'
    8 | int main() {
      | ^~~
Language: Java

import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int Y = sc.nextInt();
        for (int i = 0; i < N + 1; i++) {
            for (int j = 0; j < N + 1; j++) {  
                int total = 10000 * i + 5000 * j + 1000 * (N - i - j);
                if (total == Y) {
                    System.out.println(" " + i + " " + j + " " + z);
                    return;
                }
            }
        }
        System.out.println(" " + -1 + " " + -1 + " " + -1);
        return;
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
                    System.out.println(" " + i + " " + j + " " + z);
                                                                 ^
  symbol:   variable z
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
#include <string>

int main()
{
  string s;
  std::cin >> s;
  if (s[3] == 8) s[3] =7;
  
  std::cout << s << std::endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string s;
      |   ^~~~~~
a.cc:6:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:7:15: error: 's' was not declared in this scope
    7 |   std::cin >> s;
      |               ^
Language: C

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

int main(void){
    char s[11]; 

    scanf("%s", s);
    s[3] = '8';

    printf("%s\n", s);

    return 0;

} 


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 string s;
  cin >> s;
  s.at(3) = 8;
  cout << s << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: expected initializer before 's'
    5 |   int string s;
      |              ^
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
Language: C++

//do not think about past and stay in this moment
//organize and work - Abhinav IIITA
#include <bits/stdc++.h>
#include <ctime>
using namespace std;
#define int long long
#define ld long double
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(),(v).end() 
const ld pi = acos(-1.0);
const int day[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());


// -----------------------------------------------------------------------


void func(string s,string t){
	int l1=sz(s),l2=sz(t);
	if(l1>l2)
	return false;
	for(int i=0;i<=l2-l1;++i){
		bool fg=true;
		for(int j=0;j<l1;++j){
			if(s[j]!=t[j+i]){
				fg=false;
			}
		}
		if(fg)
		return fg;
	}
	return false;
}



// -----------------------------------------------------------------------

int arr[3000000];
void input(int n){
	for(int i=0;i<n;++i)
	cin>>arr[i];
}

// -----------------------------------------------------------------------



void solve(){
	
	string s;
  cin>>s;
  s[3]='8';
  cout<<s;
	
		
}


// -----------------------------------------------------------------------


int32_t main()
{
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); 	
	int t=1;
	//cin>>t;
	while(t--)
	solve();
	return 0;
}


Compiler output:
a.cc: In function 'void func(std::string, std::string)':
a.cc:21:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   21 |         return false;
      |                ^~~~~
a.cc:30:24: error: return-statement with a value, in function returning 'void' [-fpermissive]
   30 |                 return fg;
      |                        ^~
a.cc:32:16: error: return-statement with a value, in function returning 'void' [-fpermissive]
   32 |         return false;
      |                ^~~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    // Your code here!
 
    string S;
    cin >> S;
    
    s[3] = '8';
    cout << S << endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 's' was not declared in this scope
    9 |     s[3] = '8';
      |     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
	string a;
	cin >> s;

	s.at(3) = '8';
	cout << s << endl;
}

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

#include<iostream>
using namespace std;
 
int main() {
    string s;
    cin >> s;
    s[3] = "8";
    cout << s << endl;
}

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

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

int main() {
	string s;
	cin >> s;
	s[3] = '8'
	cout << s << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before 'cout'
    8 |         s[3] = '8'
      |                   ^
      |                   ;
    9 |         cout << s << endl;
      |         ~~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	string s;
	cin >> s;
	s[3] = '8'
	cout << s << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' before 'cout'
    7 |         s[3] = '8'
      |                   ^
      |                   ;
    8 |         cout << s << endl;
      |         ~~~~
Language: C++

#include<bits/stdc++.h>
#include<iomanip>
using namespace std;
typedef long long ll;
typedef long  l;
typedef pair<int,int> P;
#define rep(i,n) for(int i=0;i<n;i++)
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
const int INF=1000000001;
const double PI=3.141592653589;


int main(){
  string s; cin>>s;
  s[3]="8";
  cout<<s<<endl;

  return 0;
}


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

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

int main() {

  string S;
  cin >> S;
  S[4] = '8';
  cout << S << endl;

retrun 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:1: error: 'retrun' was not declared in this scope
   12 | retrun 0;
      | ^~~~~~
Language: C++

#include<iostresam>
#include<string>

using namespace std;

int main(){
	string S;
	cin >> S;
	
	S[3] = 8;
	cout >> S >>endl;
	
	return 0;
}

Compiler output:
a.cc:1:9: fatal error: iostresam: No such file or directory
    1 | #include<iostresam>
      |         ^~~~~~~~~~~
compilation terminated.
Language: Java

import java .util.*;

public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String day = sc.next();
    String tmp;
    
    for (int i = 0 ; i < 10; i++){
      if (i != 3){
        tmp += day.substring(i, i+1);
      }else{
        tmp += "8";
      }
    }
    System.out.println(tmp);
  }
}

Compiler output:
Main.java:11: error: variable tmp might not have been initialized
        tmp += day.substring(i, i+1);
        ^
Main.java:13: error: variable tmp might not have been initialized
        tmp += "8";
        ^
Main.java:16: error: variable tmp might not have been initialized
    System.out.println(tmp);
                       ^
3 errors
Language: Java

import java .util.*;

public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String day = sc.next();
    String tmp;
    
    for (i = 0 ; i < 10; i++){
      if (i != 3){
        tmp += day.substring(i, i+1);
      }else{
        tmp += "8";
      }
    }
    System.out.println(tmp);
  }
}

Compiler output:
Main.java:9: error: cannot find symbol
    for (i = 0 ; i < 10; i++){
         ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    for (i = 0 ; i < 10; i++){
                 ^
  symbol:   variable i
  location: class Main
Main.java:9: error: cannot find symbol
    for (i = 0 ; i < 10; i++){
                         ^
  symbol:   variable i
  location: class Main
Main.java:10: error: cannot find symbol
      if (i != 3){
          ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
        tmp += day.substring(i, i+1);
                             ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
        tmp += day.substring(i, i+1);
                                ^
  symbol:   variable i
  location: class Main
6 errors
Language: Java

import java .util.*;

public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String day = sc.next();
    String tmp;
    
    for (i = 0 ; i < 10; i++){
      if (i != 3){
        tmp += day.substring(i, i+1);
      }else{
        tmp += "8"
      }
    }
    System.out.println(tmp);
  }
}

Compiler output:
Main.java:13: error: ';' expected
        tmp += "8"
                  ^
1 error
Language: Java

import java .util.*;

public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String day = sc.next();
    String tmp;
    
    for (i = 0 ; i < 10; i++){
      if (i != 3){
        tmp += day.substring(i, i+1);
      }else{
        tmp += "8"
      }
    }
  }
}

Compiler output:
Main.java:13: error: ';' expected
        tmp += "8"
                  ^
1 error
Language: C++

#include<iostream>
#include<string>
using namespace std;
 
int main(){
  string S;
  cin>>S; 
  S[3]=s[3]+1;
  cout<<S;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: 's' was not declared in this scope
    8 |   S[3]=s[3]+1;
      |        ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,m,n) for(int i=m; i<n; i++)
#define co(n) cout << n << endl
using namespace std;
int main(){
  string s;
  cin >> s;
  s[3]="8";
  co(s);
  
  return 0;
}


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

#include <bits/stdc++.h>
using namespace std;
int main(){
  string S;
  cin >> S;
  S[3] == '8'
  cout << S << endl;
  
  
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: expected ';' before 'cout'
    6 |   S[3] == '8'
      |              ^
      |              ;
    7 |   cout << S << endl;
      |   ~~~~
Language: C++

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

int main() {
  string s;
  cin >> s;
  for(int i = 0; i < s.length(); i++) {
    if(s[3] == '7') {
      s[3] = '8'
    }
  }
  cout << s << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before '}' token
    9 |       s[3] = '8'
      |                 ^
      |                 ;
   10 |     }
      |     ~
Language: C++

#include <iostream>
using namespace std;
int main()
{

     string x;
  cin >>x;
  s[3] = '8';
  cout << x<< endl;





    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 's' was not declared in this scope
    8 |   s[3] = '8';
      |   ^
Language: C++

#include <iostream>
using namespace std;
int main()
{

     string s
  cin >> s;
  s[3] = '8';
  cout << s<< endl;





    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected initializer before 'cin'
    7 |   cin >> s;
      |   ^~~
a.cc:8:3: error: 's' was not declared in this scope
    8 |   s[3] = '8';
      |   ^
Language: C++

nclude<iostream>
using namespace std;
 
main(){
  string s;
  cin >> s;
  s[3] = '8';
  cout << s<< endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'nclude' does not name a type
    1 | nclude<iostream>
      | ^~~~~~
a.cc:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    4 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string s;
      |   ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> s;
      |   ^~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
a.cc:8:3: error: 'cout' was not declared in this scope
    8 |   cout << s<< endl;
      |   ^~~~
a.cc:8:15: error: 'endl' was not declared in this scope
    8 |   cout << s<< endl;
      |               ^~~~
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
    char ar[100];
    gets(ar);
    int a=strlen(ar),i;
    printf("2018");
    for(i=4;i<a;i++)
    printf("%c",ar[i]);
    printf("\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    6 |     gets(ar);
      |     ^~~~
      |     getw
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
    char ar[100];
    getc(ar);
    int a=strlen(ar),i;
    printf("2018");
    for(i=4;i<a;i++)
    printf( "%c",ar[i]);
    printf("\n");
    return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: cannot convert 'char*' to 'FILE*'
    6 |     getc(ar);
      |          ^~
      |          |
      |          char*
In file included from a.cc:1:
/usr/include/stdio.h:576:24: note:   initializing argument 1 of 'int getc(FILE*)'
  576 | extern int getc (FILE *__stream) __nonnull ((1));
      |                  ~~~~~~^~~~~~~~
Language: C++

/* Bismillahir Rahmanir Rahim */
#include<stdio.h>
#include<string.h>
int main()
{
    char a[100];
    int j,i;
    gets(a);
    int k=strlen(a);
    printf("2018/");
    for(i=5;i<k;i++)
        printf("%c",a[i]);

    printf("\n");

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(a);
      |     ^~~~
      |     getw
Language: C++

/* Bismillahir Rahmanir Rahim */
#include<stdio.h>
#include<math.h>
int main()
{
    char a[100];
    int j,i;
    gets(a);
    int k=strlen(a);
    printf("2018/");
    for(i=5;i<k;i++)
        printf("%c",a[i]);

    printf("\n");

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(a);
      |     ^~~~
      |     getw
a.cc:9:11: error: 'strlen' was not declared in this scope
    9 |     int k=strlen(a);
      |           ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<math.h>
  +++ |+#include <cstring>
    4 | int main()
Language: C++

#include<iostram>
#include<string>

int main() {
  std::string str;
  std::cin >> str;
  std::cout << "2018" + str.substr(5,5) << std::endl;
}

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

#include<iostram>
#include<string>

int main() {
  std::string str;
  std::cin >> str;
  std::cout << "2018" + str.substr(5,6) << std::endl;
}

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

#include<iostram>
#include<string>

int main() {
  std::string str;
  std::cin >> str;
  std::cout << "2018" + str.substr(5,11) << std::endl;
}

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

#include<iostream>
#include<string>
int main(void){
  std:string s;
  std::cin >> s;
  if(s.substr(0,4) == "2017") s[3] = '8';
  std::cout << s << std::endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:7: error: 'string' was not declared in this scope
    4 |   std:string s;
      |       ^~~~~~
a.cc:4:7: 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:5:15: error: 's' was not declared in this scope
    5 |   std::cin >> s;
      |               ^
Language: C++

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

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

  S.at(3) = '8'

  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: expected ';' before 'cout'
    8 |   S.at(3) = '8'
      |                ^
      |                ;
    9 | 
   10 |   cout << S << endl;
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin>>S;
  S[3]='7';
  cout<<S<<endl;

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

#inclide <bits/stdc++.h>
using namespace std;
int main (){
 string S;
  int i=0;
  S[3]='8'
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclide; did you mean #include?
    1 | #inclide <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:2: error: 'string' was not declared in this scope
    4 |  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 | #inclide <bits/stdc++.h>
a.cc:6:3: error: 'S' was not declared in this scope
    6 |   S[3]='8'
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
srting text;
cin >> text;
text.at(3)='8';
cout << text <<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'srting' was not declared in this scope
    4 | srting text;
      | ^~~~~~
a.cc:5:8: error: 'text' was not declared in this scope
    5 | cin >> text;
      |        ^~~~
Language: C++

include <iostream>
using namespace std;
int main(){
  int N,Y;
  cin >> N >> Y;
  for(int n1 = 0;n1<=N;n1++){
    for(int n2 = 0;n2<=N;n2++){
      int n3 = N-n1-n2;
      //      if(n3>=0 && n3<=N && Y==(n1*1000+n2*5000+n3*10000)){              
      if(n3>=0 && n3<=N && Y==(n1*10000+n2*5000+n3*1000)){
        cout << n1  << "  " << n2 << "  " << n3 << endl;
        //      cout << n3  << "  " << n2 << "  " << n1 << endl;                
        return 0;
      }
    }
  }
  cout << "-1 -1 -1" << endl;
  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> N >> Y;
      |   ^~~
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout << n1  << "  " << n2 << "  " << n3 << endl;
      |         ^~~~
a.cc:11:52: error: 'endl' was not declared in this scope
   11 |         cout << n1  << "  " << n2 << "  " << n3 << endl;
      |                                                    ^~~~
a.cc:17:3: error: 'cout' was not declared in this scope
   17 |   cout << "-1 -1 -1" << endl;
      |   ^~~~
a.cc:17:25: error: 'endl' was not declared in this scope
   17 |   cout << "-1 -1 -1" << endl;
      |                         ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int N,Y;
  cin >> N >> Y;
  int n1=0;int n2=0;int n3=0;
  for(n1 = 0;n1<=2000;n1++){
    if(Y<n1*10000){
       cout << "-1 -1 -1" << endl;
      return 0;
    }
    for(n2 = 0;n2<=2000;n2++){
      if(Y<n1*10000 + n2*5000){
        cout << "-1 -1 -1" << endl;
        return 0;
      }
      for(n3 = 0;n3<=2000;n3++){
        if(N!=n1+n2+n3) continue;
        if(Y!=n1*10000 + n2*5000 + n3*1000) continue;
        cout << n1  << "  " << n2 << "  " << n3 << endl;
        return 0;
      }
    }
  }
  cout << "-1 -1 -1" << endl;
  return 0;

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

#include<iostream>

using namespace std;

int main(){
int n, y, a=0, b=0, c=0;

cin >> n >> y;

int count = 0;

for(int i = 0; i <= n; i++){
for(int j = 0; j <= n; j++){
int k = x - i - j;
int sum = 10000*i + 5000*j + 1000*k;
if(sum==y && k > 0){
a=i;b=j;c=k;
count++;
}
}
}
if(count >0){cout << a << " " << b<< " " <<c;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'x' was not declared in this scope
   14 | int k = x - i - j;
      |         ^
Language: C++

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

int main(){

    int n,y;
    scanf("%d", &n);
    scanf("%d", &y);
    int n1 = -1;
    int n2 = -1;
    int n3 = -1;
    bool flag = false;

    for(int i = 0; i <= n; i++){
        for(int j = 0; j <= n - x; j++){
            if(10000 * i + 5000 * j + 1000 * (n-i-j) == y){
                falg = true;
                n1 = i;
                n2 = j;
                n3 = n - i - j;
                break;
            }
        }
        if(flag){
            break;
        }
    }
    printf("%d %d %d",n1,n2,n3);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:33: error: 'x' was not declared in this scope
   16 |         for(int j = 0; j <= n - x; j++){
      |                                 ^
a.cc:18:17: error: 'falg' was not declared in this scope; did you mean 'flag'?
   18 |                 falg = true;
      |                 ^~~~
      |                 flag