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

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

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

}

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

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

int main(){
  int N,Y;
  cin >>N>>Y;
  Y = Y/1000;
  int t=Y-N;
  int x=-1,y=-1,z=-1;
    for(int i=0;9*i<=t;i++){
      if((t-9*i)%4 == 0){
        x = i;
        y = (t-9*i)/4;
        z = N-x-y;
        if(z<0){
          x=-1;
          y=-1;
          z=-1;
          continue;
        else break;
      }
    }
  cout <<x<<" "<<y<<" "<<z<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:9: error: expected '}' before 'else'
   20 |         else break;
      |         ^~~~
a.cc:15:16: note: to match this '{'
   15 |         if(z<0){
      |                ^
Language: C++

#-*- coding:utf-8 -*-

N, Cost = map(int, input().split())

a_out, b_out = -1, -1
 
for a in range(2000):
  for b in range(2000):
     if 1000*a + 5000*b + 10000*(N-a-b) == Cost:
        a_out = a
        b_out = b
        c_out = N-a-b
 
if a_out == -1:
    print('-1 -1 -1')
else:
    print(c_out, b_out, a_out)                                                 

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #-
    1 | #-*- coding:utf-8 -*-
      |  ^
a.cc:15:11: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   15 |     print('-1 -1 -1')
      |           ^~~~~~~~~~
a.cc:3:1: error: 'N' does not name a type
    3 | N, Cost = map(int, input().split())
      | ^
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:3:21: error: expected unqualified-id before ']' token
    3 | using namespace std;]
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	string s,ans;
	cin>>s;
	ans="2018"+s.substr(5,6)
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:33: error: expected ';' before 'cout'
    6 |         ans="2018"+s.substr(5,6)
      |                                 ^
      |                                 ;
    7 |         cout<<ans<<endl;
      |         ~~~~
Language: C++

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

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


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

#include <iosteam>
#include <string>

using namespace std;

int main(){
  string s;
  cin >> s;
  cout << s.substr(0, 3) << "8" << s.substr(5, 6) << endl; 
}

Compiler output:
a.cc:1:10: fatal error: iosteam: No such file or directory
    1 | #include <iosteam>
      |          ^~~~~~~~~
compilation terminated.
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:7:16: error: expected ';' before 'cout'
    7 |     S.at(3)='8'
      |                ^
      |                ;
    8 | 
    9 |     cout << S << endl;
      |     ~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;
      |   ^~~~~~
a.cc:3: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:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin >> s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:10: error: 's' was not declared in this scope
    4 |   cin >> s;
      |          ^
a.cc:6:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout << s << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:6:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << s << endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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


Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'nameapaca'
    3 | using nameapaca std;
      |       ^~~~~~~~~
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/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:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>s;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s;
      |        ^
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout<<s<<endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout<<s<<endl;
      |            ^~~~
      |            std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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

#include<iostream>
#include<string>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: 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++

package main

import (
	"fmt"
	"strings"
)

// 2018-07-29T20:36:21+0800
func main() {
	var s string
	fmt.Scanf("%s", &s)
	fmt.Println(strings.Replace(s, "2017", "2018", -1))
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
	strign s;
	cin >> s;
	for(int i = 0; i < s.size() ; i++){
		if(i == 3){
			cout << "8";
		}else{
			cout << s[i];
		}
	}
	cout << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'strign' was not declared in this scope; did you mean 'strspn'?
    4 |         strign s;
      |         ^~~~~~
      |         strspn
a.cc:5:16: error: 's' was not declared in this scope
    5 |         cin >> s;
      |                ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: 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 <bits/stdc++.h>
using namespace std;

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

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

#include <bits/stdc++.h>
using namespace std;
int main(void){
	long a,b,c,i,d,f,g;
	string A,B,C;
	cin>>A;
	A[3]="8";
	cout<<A<<endl;
	return 0;
}

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

#include <bits/stdc++.h>
#include <string>
using namespace std;
int main(void){
	int a,b,c,i;
	string A;
	cin>>A;
	A[3]="8";
	cout<<A<<endl;
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main(void){
	int a,b,c,i;
	string A;
	cin>>A;
	A[3]="8";
	cout<<A<<endl;
	return 0;
}

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

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'stirng' was not declared in this scope
    5 |   stirng s;
      |   ^~~~~~
a.cc:6:10: error: 's' was not declared in this scope
    6 |   cin >> s;
      |          ^
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:9:12: error: expected ';' before 'cout'
    9 |    S[3] = 8
      |            ^
      |            ;
   10 |    cout << S << endl;
      |    ~~~~
Language: C++

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

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

#include <iostream>
#include <string>
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:11: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    8 |   S.at(3)="8";
      |           ^~~
      |           |
      |           const char*
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
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[6] = "8";
      |          ^~~
      |          |
      |          const char*
Language: Java

import java.util.Scanner;

public class ABC {
    public static void main(String[] arg){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char[] s2 = s.toCharArray();
        s2[3] = '8';
        System.out.println(s2);
    }
}

Compiler output:
Main.java:3: error: class ABC is public, should be declared in a file named ABC.java
public class ABC {
       ^
1 error
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 <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <complex>
#include <fstream>
#include <cmath>

using namespace std;

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


Compiler output:
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:3:
/usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::replace(_FIter, _FIter, const _Tp&, const _Tp&) [with _FIter = char; _Tp = char [2]]':
a.cc:14:12:   required from here
   14 |     replace(s[3],s[3],"7","8");
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4293:13: error: invalid type argument of unary '*' (have 'char')
 4293 |         if (*__first == __old_value)
      |             ^~~~~~~~
/usr/include/c++/14/bits/stl_algo.h:4294:11: error: invalid type argument of unary '*' (have 'char')
 4294 |           *__first = __new_value;
      |           ^~~~~~~~
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <numeric>
#include <string>
using namespace std;
const double PI = acos(-1.0);
const string alp = "abcdefghijklmnopqrstuvwxyz";
const string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n+1)
#define SUM(c) accumulate((c).begin(),(c).end(),0)
#define UNIQ(c) (c).erase(unique((c).begin(), (c).end()), (c).end());
#define Yn(b) puts(b?"Yes":"No")
#define YN(b) puts(b?"YES":"NO")
 
bool isprime(int p) {
  if (p==1) return false;
  FOR(i,2,p) {
    if (p%i==0) return false;
  }
  return true;
}
 
int main(){
  string s;
  cin >> s;
  cout << s.substr(0,3) << 8 << s.substr(3,6)
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:46: error: expected ';' before 'return'
   32 |   cout << s.substr(0,3) << 8 << s.substr(3,6)
      |                                              ^
      |                                              ;
   33 |   return 0;
      |   ~~~~~~
Language: C++

#include <iostream>
#include <string>
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:9:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |         s.at(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;
}


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

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

typedef long long int ll;

int X, Y;
const int x = 10;
const int y = 5;
const int z = 1;

int main(){
    cin >> X >> Y;
    Y /= 1000;
    
    vector<int> t = {1, -2};
    int a = t[0] * (Y-z*X);
    int b = t[1] * (Y-z*X);

    if(b < 0){
        int k = (-b+x-z-1)/(x-z);
        a -= k*(y-z);
        b += k*(x-z);
    }else{
        int k = b/(x-z);
        a += k*(y-z);
        b -= k*(x-z);
    }
    
    if(a<0 || b<0 || a+b>X)
        a = b = c = -1;
    
    cout << a << " " << b << " " << c << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:17: error: 'c' was not declared in this scope
   31 |         a = b = c = -1;
      |                 ^
a.cc:33:37: error: 'c' was not declared in this scope
   33 |     cout << a << " " << b << " " << c << endl;
      |                                     ^
Language: Java

import java.util.Scanner;
public class Main1 {
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);
	String input = scan.nextLine();
	String output = input.replace("2017","2018");
	System.out.println(output);
    }
}


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

#include<iostream>
using namespace std;
int main(){
    string s;
    int i;
    cin >> s;
    s[4] = '8' 
    cout << s << endl;
    return 0;
}


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

s = list(str(input()))
s[3] = '8'
 
ss = ''
 
for i in s:
  ss = ss + i
  
print(ss)


Compiler output:
a.cc:4:6: error: empty character constant
    4 | ss = ''
      |      ^~
a.cc:1:1: error: 's' does not name a type
    1 | s = list(str(input()))
      | ^
Language: C++

include<iostream>
using namespace std;

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

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: '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:9:3: error: 'cout' was not declared in this scope
    9 |   cout << s << endl;
      |   ^~~~
a.cc:9:16: error: 'endl' was not declared in this scope
    9 |   cout << s << endl;
      |                ^~~~
Language: C++

N,yen=map(int, input().split())

for X in range(N+1):
    for Y in range(N+1):
        if(X +Y > N):
            break
        elif(10000*X+5000*Y+1000*(N-X-Y) == yen):
            print(str(X)+" "+str(Y)+" "+" "+str(N-X-Y))
            exit()
                       
print("-1 -1 -1")

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

#include <stdio.h>
#include <string.h>
main(){
  	char s[];
	scanf("%s",s);
  	s[3] = '8';
  	printf("%s",s);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:14: error: array size missing in 's'
    4 |         char s[];
      |              ^
Language: C

#include <stdio.h>
#include <string.h>
main(){
  	char[10] s;
	scanf("%s",s);
  	s[3] = '8';
  	printf("%s",s);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:13: error: expected identifier or '(' before '[' token
    4 |         char[10] s;
      |             ^
main.c:5:20: error: 's' undeclared (first use in this function)
    5 |         scanf("%s",s);
      |                    ^
main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>
main(){
  	char[] s;
	scanf("%s",s);
  	s[3] = '8';
  	printf("%s",s);
}

Compiler output:
main.c:3:1: error: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~
main.c: In function 'main':
main.c:4:13: error: expected identifier or '(' before '[' token
    4 |         char[] s;
      |             ^
main.c:5:20: error: 's' undeclared (first use in this function)
    5 |         scanf("%s",s);
      |                    ^
main.c:5:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C++


import java.util.*;

class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		System.out.println(S.replaceAll("2017", "2018"));
	}

}


Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:15: error: expected ':' before 'static'
    6 |         public static void main(String[] args) {
      |               ^~~~~~~
      |               :
a.cc:6:33: error: 'String' has not been declared
    6 |         public static void main(String[] args) {
      |                                 ^~~~~~
a.cc:6:42: error: expected ',' or '...' before 'args'
    6 |         public static void main(String[] args) {
      |                                          ^~~~
a.cc:13:2: error: expected ';' after class definition
   13 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:8:17: error: 'Scanner' was not declared in this scope
    8 |                 Scanner sc = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:9:17: error: 'String' was not declared in this scope
    9 |                 String S = sc.next();
      |                 ^~~~~~
a.cc:10:17: error: 'System' was not declared in this scope
   10 |                 System.out.println(S.replaceAll("2017", "2018"));
      |                 ^~~~~~
a.cc:10:36: error: 'S' was not declared in this scope
   10 |                 System.out.println(S.replaceAll("2017", "2018"));
      |                                    ^
Language: Java

package abc;
import java.io.*;
public class Contest085_A {

	public static void main(String[] args) throws IOException{
		BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));
		System.out.println("日付を入力して下さい。");
		int day = 0;
		int trueDay = 0;
		int falseDay = 0;
		day = Integer.parseInt(bReader.readLine());
		if(0 < day && day < 31) {
			trueDay = day; 
		}else {
			falseDay = day;
		}
		String S = "2018/01/" + trueDay;
		System.out.println(S);
		
	}

}

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

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

int main() {
    int n, y;
    cin >> n >> y;
    for(int i=n; i>=0; i--){
        for(int j=n-i; j>=0; j--){
            for(int k=n-i-j; k>=0; k--){
                if(10000*i + 5000*j + 1000*k == y){
                    cout << i << " " << j << " " << k << endl;
                    return 0;
                }
            }
        }
    }
    cout << -1 << " " << -1 << " " << -1 endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:41: error: expected ';' before 'endl'
   18 |     cout << -1 << " " << -1 << " " << -1 endl;
      |                                         ^~~~~
      |                                         ;
Language: C++

#include<iostream>
using namespace std;
string a;
int main()
{
    cin>>a;
    cout<<"2018";
    for(int 1=4;i<=9;i++)
    cout<<a[i];
    cout<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected unqualified-id before numeric constant
    8 |     for(int 1=4;i<=9;i++)
      |             ^
a.cc:8:12: error: expected ';' before numeric constant
    8 |     for(int 1=4;i<=9;i++)
      |            ^~
      |            ;
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |     for(int 1=4;i<=9;i++)
      |             ^
a.cc:8:17: error: 'i' was not declared in this scope
    8 |     for(int 1=4;i<=9;i++)
      |                 ^
a.cc:8:21: error: expected ')' before ';' token
    8 |     for(int 1=4;i<=9;i++)
      |        ~            ^
      |                     )
a.cc:8:22: error: 'i' was not declared in this scope
    8 |     for(int 1=4;i<=9;i++)
      |                      ^
Language: C

#include<stdio.h>

int main(){
	int yyyy, mm, dd;
	
	scanf("%d%*c%d%*c%d", &yyyy, &mm, &dd);
	
	if(dd<10);	printf("2018/01/0%d", dd);
	else if;	printf("2018/01/%d", dd);
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:9: error: 'else' without a previous 'if'
    9 |         else if;        printf("2018/01/%d", dd);
      |         ^~~~
main.c:9:16: error: expected '(' before ';' token
    9 |         else if;        printf("2018/01/%d", dd);
      |                ^
      |                (
Language: C

#include<stdio.h>

int main(){
	int yyyy, mm, dd;
	
	scanf("%d%*c%d%*c%d", &yyyy, &mm, &dd);
	
	if(dd<10)	printf("2018/01/0%d", dd);
	else if		printf("2018/01/%d", dd);
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:25: error: expected '(' before 'printf'
    9 |         else if         printf("2018/01/%d", dd);
      |                         ^~~~~~
      |                         (
Language: C++

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

int main() {
 string date;
  cin >> date;
  data = date.replace(0,4,"2017");
  cout << date <<std::endl;
  
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:33: error: overloaded function with no contextual type information
    8 |   data = date.replace(0,4,"2017");
      |                                 ^
Language: C++

#include<iostream>
#include<set>
#include<string>
#include<algorithm>
using namespace std;
 
#define rep0(n) for(int i=0;i<n;i++)
#define rep(n) for(int i=1;i<=n;i++)
 
double const pi = 3.1415926535;
int const mod = 1000000007;
int const inf = 2147483647;
 
int yesno(bool flag, string yes, string no) {
	if (flag)cout << yes << endl;
	else cout << no << endl;
	return 0;
}
 
int printint(int n) {
	cout << n << endl;
	return 0;
}
 
int prints(string s) {
	cout << s << endl;
	return 0;
}
int main (){
  int N;
  int d [110];
  cin >> N;
  for int (i = 0; i < N; i++);　cin >> d[i]
  
  set<int> values;
  for (int i = 0; i < N; i++){
    values.insert(d[i]);
  }
  cout << values.size() <<endl;
  } 


Compiler output:
a.cc:33:31: error: extended character 　 is not valid in an identifier
   33 |   for int (i = 0; i < N; i++);　cin >> d[i]
      |                               ^
a.cc: In function 'int main()':
a.cc:33:7: error: expected '(' before 'int'
   33 |   for int (i = 0; i < N; i++);　cin >> d[i]
      |       ^~~
      |       (
a.cc:33:12: error: 'i' was not declared in this scope
   33 |   for int (i = 0; i < N; i++);　cin >> d[i]
      |            ^
a.cc:33:31: error: '\U00003000cin' was not declared in this scope
   33 |   for int (i = 0; i < N; i++);　cin >> d[i]
      |                               ^~~~~
a.cc:33:42: error: 'i' was not declared in this scope
   33 |   for int (i = 0; i < N; i++);　cin >> d[i]
      |                                          ^
a.cc:37:5: error: 'values' was not declared in this scope
   37 |     values.insert(d[i]);
      |     ^~~~~~
a.cc:39:11: error: 'values' was not declared in this scope
   39 |   cout << values.size() <<endl;
      |           ^~~~~~
Language: Java

import java.util.*;
public class Hagamimochi {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int mochi[] = new int[x];
		for(int i = 0;i < x;i++){
			mochi[i] = sc.nextInt();
		}
		Arrays.sort(mochi);
		int count = 1;
		for(int k = 0;k < x;k++){
			if(mochi[k] > mochi[k-1])count++;
		}
		System.out.println(count);
	}
}

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

import java.util.*;
public class Main {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String year = sc.next();
		year = year.replace(2017, 2018);
		System.out.println(year);
	}

}

Compiler output:
Main.java:7: error: no suitable method found for replace(int,int)
		year = year.replace(2017, 2018);
		           ^
    method String.replace(char,char) is not applicable
      (argument mismatch; possible lossy conversion from int to char)
    method String.replace(CharSequence,CharSequence) is not applicable
      (argument mismatch; int cannot be converted to CharSequence)
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
bool SecondCompare(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.second<b.second;
}
 
bool SecondCompareDes(const pair<int,int> &a,const pair<int,int> &b)
{
       return a.second>b.second;
}
string s, ans;
int main(){
    cin >> s;
  ans += "2018"
    for(int i = 4; i < s.length(); i++){
      ans += s[i];
    }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: expected ';' before 'for'
   16 |   ans += "2018"
      |                ^
      |                ;
   17 |     for(int i = 4; i < s.length(); i++){
      |     ~~~         
a.cc:17:20: error: 'i' was not declared in this scope
   17 |     for(int i = 4; i < s.length(); i++){
      |                    ^
Language: C++

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

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

    d[3] = '7'
    cout << d << endl;
}

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

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

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

    d[3] = '7'
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected ';' before '}' token
    8 |     d[3] = '7'
      |               ^
      |               ;
    9 | }
      | ~
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:10:13: error: expected ';' before 'cout'
   10 |   s[3] = '8'
      |             ^
      |             ;
   11 | 
   12 |     cout << s << endl;
      |     ~~~~
Language: Java

import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
  int N = sc.nextInt();
  List<String> l = new ArrayList<>();
  for(int i=0;i<N;i++){
    l.add(sc.next());
  }
  List<String> m = l.stream().distinct().collect(Collectors.toList());
  System.out.println(m.size());
}}


Compiler output:
Main.java:10: error: cannot find symbol
  List<String> m = l.stream().distinct().collect(Collectors.toList());
                                                 ^
  symbol:   variable Collectors
  location: class Main
1 error
Language: Java

import java.util.*;
import java.util.stream.Collectors;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
  int N = sc.nextInt();
  List<String> l = new ArrayList<>();
  for(int i=0;i<N;i++){
    l.add(sc.next());
  }
  List<String> m = l.stream().distinct().collect(Collectors.tolist());
  System.out.println(m.size());
}}


Compiler output:
Main.java:11: error: cannot find symbol
  List<String> m = l.stream().distinct().collect(Collectors.tolist());
                                                           ^
  symbol:   method tolist()
  location: class Collectors
1 error
Language: C++

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

int main(int argc,char** argv)
{

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

	return 0;


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:15:18: error: expected '}' at end of input
   15 |         return 0;
      |                  ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
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:7:10: 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>

using namespace std;

int main()
{
	char s[10];

	cin >> s;

	s[3] = '8';

	for (int i = 0; i < 10; i++)
	{
		cout << s[i];
	}
	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:9:9: error: 'cin' was not declared in this scope
    9 |         cin >> s;
      |         ^~~
a.cc:15:17: error: 'cout' was not declared in this scope
   15 |                 cout << s[i];
      |                 ^~~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: invalid operands of types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} and 'const char [2]' to binary 'operator<<'
    8 |         s[4]<<"8";
Language: C++

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

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

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

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

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

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

#include<iostream>
#include<cstdio>
#include<cmath>
#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: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<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int main(){
  int N,H;
  vector<int> a;
  vector<int> b;
  cin >> N >> H;
  int amax=0;
  int ia, ib;
  for(int i=0;i<N;i++){
    cin >> ia >> ib;
    a.push_back(ia);
    b.push_back(ib);
    amax = max(amax, ia);
  }
  reverse(b.begin(), b.end());
  int count = 0;
  for(int i=0; i<N && b[i] => amax;i++){
    H -= b[i];
    count += 1;
    if(H<=0){
      cout << count <<endl;
      return 0;
    }
  }
  int ans = H/amax + count;
  cout << ans<< endl;
  return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:29: error: expected primary-expression before '>' token
   22 |   for(int i=0; i<N && b[i] => amax;i++){
      |                             ^
Language: C++

#include <stdio>
using namespace std;

int main()
{
    char str[11];
    cin >> str;
    str[3] = 8;
    cout << str;

    return 0;
}
    

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

#include<stdio.h>
#include<stdlib.h>
 
int main(){
  char s[10];
  scanf("%s", s);
  for(i=0;i<10;i++){
    if(i==3)printf("8");else printf("%c", s[i]);
  }
  printf("\n");
}


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

#include<stdio.h>
int main()
{
char str[15]={0};
scanf("%s",s);
s[3]='8';
printf("%s",s);
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:12: error: 's' was not declared in this scope
    5 | scanf("%s",s);
      |            ^
Language: C

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

int main(int argc,char* argv)
{
	char S;
	scanf("%c",S);
	S[3] = '8';
	printf("%c\n", S);
	return(0);
}

Compiler output:
main.c: In function 'main':
main.c:8:10: error: subscripted value is neither array nor pointer nor vector
    8 |         S[3] = '8';
      |          ^
Language: C

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

int main(int argc,char* argv)
{
	char S;
	scanf("%s",S);
	S[3] = '8';
	printf("%s\n", S);
	return(0);
}


Compiler output:
main.c: In function 'main':
main.c:8:10: error: subscripted value is neither array nor pointer nor vector
    8 |         S[3] = '8';
      |          ^
Language: C

#include<stdio.h>
#include<stdil.h>

int main(int argc,char* argv)
{
	char S;
	scanf("%s",S);
	S[3] = '8';
	printf("%s\n", S);
	return(0);
}

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

#include<stdio.h>

int main(int argc,char* argv)
{
	char S;
	scanf("%s",S);
	S[3] = '8';
	printf("%s\n", S);
	return(0);
}

Compiler output:
main.c: In function 'main':
main.c:7:10: error: subscripted value is neither array nor pointer nor vector
    7 |         S[3] = '8';
      |          ^
Language: C++

#include<iostream>
#include<cstdio>
//#include<cmath>
//#include<algorithm>
#include<cstring>
//#include<map>
using namespace std;
inline int read()
{
    int p=0,f=1;char c=getchar();
    while(c<'0'||c>'9'){if(c=='-') f=-1;c=getchar();}
    while(c>='0'&&c<='9'){p=p*10+c-'0';c=getchar();}
    return f*p;}
char s[11];
int main()
{
	gets(s);
	s[3]='8';
	cout<<s;
	return 0;
}

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

#include<iostream>
#include<cstdio>
//#include<cmath>
//#include<algorithm>
//#include<cstring>
//#include<map>
using namespace std;
inline int read()
{
    int p=0,f=1;char c=getchar();
    while(c<'0'||c>'9'){if(c=='-') f=-1;c=getchar();}
    while(c>='0'&&c<='9'){p=p*10+c-'0';c=getchar();}
    return f*p;}
char s[11];
int main()
{
	gets(s);
	s[3]='8';
	cout<<s;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   17 |         gets(s);
      |         ^~~~
      |         getw
Language: Java

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

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		int n = Integer.parseInt(str);
		str = scan.next();
		int h = Integer.parseInt(str);
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) {
			str = scan.next();
			a[i] = Integer.parseInt(str);
			str = scan.next();
			b[i] = Integer.parseInt(str);
		}
		int max = 0;

		for (int i = 1; i < n; i++) {
			if (a[i] > a[max]) {
				max = i;
			}
		}

		ArrayList<Integer> katana = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			if (b[i] > a[max]) {
				katana.add(b[i]);
			}
		}


		int answer = 0;

		for (answer = 0; h>0; answer++) {
			if (katana.size()>0) {
				int max_ = maxKatana(katana)
				h=h-katana.get(max_);
				katana.remove(max_);
			} else {
				h=h-a[max];
			}
		}

		
		System.out.println(answer);
	}

	
	public static int maxKatana(ArrayList<Integer> katana) {
		int max = 0;

		for (int i = 1; i < katana.size(); i++) {
			if (katana.get(i) > katana.get(max)) {
				max = i;
			}
		}

		return max;
	}
}

Compiler output:
Main.java:40: error: ';' expected
				int max_ = maxKatana(katana)
				                            ^
1 error
Language: Java

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

public class Katana {
	private int atk1;
	private int atk2;
	private boolean nageta;

	Katana(int atk1, int atk2) {
		this.atk1 = atk1;
		this.atk2 = atk2;
	}

	public int getAtk(boolean a) {
		if (a==false) {
			return this.atk1;
		} else {
			return this.atk2;
		}
	}

	public boolean getNageta() {
		return this.nageta;
	}
}

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String str = scan.next();
		int n = Integer.parseInt(str);
		str = scan.next();
		int h = Integer.parseInt(str);
		int[] a = new int[n];
		int[] b = new int[n];
		for (int i = 0; i < n; i++) {
			str = scan.next();
			a[i] = Integer.parseInt(str);
			str = scan.next();
			b[i] = Integer.parseInt(str);
		}
		ArrayList<Katana> katana = new ArrayList<>();
		katanaSet(katana, a, b);
		int answer = 0;
		if (n==1) {
			if (b[0] > a[0]) {
				h=h-b[0];
				for (answer = 1; ; answer++) {
					if (h<=0) {
						break;
					}
					h=h-a[0];
				}
				
			} else {
				for (answer = 0; ; answer++) {
					if (h<=0) {
						break;
					}
					h=h-a[0];
				}
			}
		} else if (katana.get(max(katana, false)).getAtk(false)>=katana.get(max(katana, true)).getAtk(true)) {
			for (answer = 1; ; answer++) {
				if (h<=0) {
					break;
				}
				h=h-a[max(katana, false)];
			}
		} else {
			int atk = max(katana, false);
			katana.remove(atk);
			while (a[atk]<katana.get(max(katana, true)).getAtk(true) ) {
				if (a[atk]>=h || b[atk]>=h) {
					break;
				}
				h=h-katana.get(max(katana, true)).getAtk(true);
				katana.remove(katana.get(max(katana, true)));
				answer=answer+1;
				if (katana.size()==0) {
					break;
				}
			}
			if (a[atk]>=b[atk]) {
				for (answer = answer; ; answer++) {
					if (h<=0) {
						break;
					}
					h=h-a[atk];
				}
			} else {
				h=h-b[atk];
				for (answer = answer+1; ; answer++) {
					if (h<=0) {
						break;
					}
					h=h-a[atk];
				}
			}
		}

		System.out.println(answer);
	}

	public static void katanaSet(ArrayList<Katana> katana, int[] a, int[] b) {
		for (int i = 0; i < a.length; i++) {
			katana.add(new Katana(a[i], b[i]));
		}
	}

	public static int max(ArrayList<Katana> katana, boolean a) {
		int max = 0;

		for (int i = 1; i < katana.size(); i++) {
			if (katana.get(i).getAtk(a) > katana.get(max).getAtk(a)) {
				max = i;
			}
		}

		return max;
	}
}

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _20180129education
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split('/');

            string S = input[0];
            string b = input[1];
            string c = input[2];

            S = "2018";

            Console.WriteLine("{0}/{1}/{2}",S, b, c);

        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:24:6: error: expected ';' after class definition
   24 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void _20180129education::Program::Main(int*)':
a.cc:13:13: error: 'string' was not declared in this scope
   13 |             string[] input = Console.ReadLine().Split('/');
      |             ^~~~~~
a.cc:13:20: error: expected primary-expression before ']' token
   13 |             string[] input = Console.ReadLine().Split('/');
      |                    ^
a.cc:15:20: error: expected ';' before 'S'
   15 |             string S = input[0];
      |                    ^
a.cc:16:20: error: expected ';' before 'b'
   16 |             string b = input[1];
      |                    ^
a.cc:17:20: error: expected ';' before 'c'
   17 |             string c = input[2];
      |                    ^
a.cc:19:13: error: 'S' was not declared in this scope
   19 |             S = "2018";
      |             ^
a.cc:21:13: error: 'Console' was not declared in this scope
   21 |             Console.WriteLine("{0}/{1}/{2}",S, b, c);
      |             ^~~~~~~
a.cc:21:48: error: 'b' was not declared in this scope
   21 |             Console.WriteLine("{0}/{1}/{2}",S, b, c);
      |                                                ^
a.cc:21:51: error: 'c' was not declared in this scope
   21 |             Console.WriteLine("{0}/{1}/{2}",S, b, c);
      |                                                   ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define vec vector<int>
#define pb push_back
#define lis list<int> lst(1000)


int main(){
	int N,Y;

	scanf("%d%d",&N&Y);

	for(int a=0;a<=N;a++){
		for(int b=0;b<=(N-a);b++){
			for(int c=0;c<=((N-a)-b);c++){
				if ((a*10000+b*5000+c*1000)==Y){
					cout << a << " " << b << " " << c << endl;
					return 0;
				}
			}
		}
	}

 cout << "-1 -1 -1" << endl;
 return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:24: error: invalid operands of types 'int*' and 'int' to binary 'operator&'
   21 |         scanf("%d%d",&N&Y);
      |                      ~~^~
      |                      |  |
      |                      |  int
      |                      int*