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

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <bitset>
#include <vector>

using namespace std;

const int N = 6;
const int C = 50;

int n, c;
int l[N];
long long f[N * C][1 << (N - 1)][N * C + 1];

void solve()
{
    cin >> n >> c;
    for(int i = 0; i < n; ++ i) {
        cin >> l[i];
    }
    sort(l, l + n);
    reverse(l, l + n);

    long long ret = 0;

    vector<int> order_b;
    for(int i = 1; i < n; ++ i) {
        order_b.push_back(i);
    }
    do {
        memset(f, 0, sizeof f);
        f[0][0][l[0] * n] = 1;
        for(int i = 0; i < n * c; ++ i) {
            for(int s = 0; s < (1 << (n - 1)); ++ s) {
                for(int j = i + 1; j <= n * c; ++ j) {
                    if (f[i][s][j] == 0) continue;
                    f[i + 1][s][j] += f[i][s][j];
                    if ((i + 1) % n == 0) continue;

                    int id = order_b[(i + 1) % n - 1];
                    if (s >> (id - 1) & 1) continue;
                    f[i + 1][s + (1 << (id - 1))][min(n * c, max(j, i + 1 + l[id] * n))] += f[i][s][j];

                }
            }
        }

        ret += f[n * c][(1 << (n - 1)) - 1][n * c];

    } while(next_permutation(order_b.begin(), order_b.end()));

    long long over = 1;
    for(int i = 1; i < n; ++ i) {
        over *= i;
        over *= c;
    }

    printf("%.20f\n", (double)((long double)ret / (long double)over));

    //cout << ret << ' ' << over << endl;


}

int main()
{
    solve();
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:33:9: error: 'memset' was not declared in this scope
   33 |         memset(f, 0, sizeof f);
      |         ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <vector>
  +++ |+#include <cstring>
    7 |
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'str' was not declared in this scope; did you mean 'std'?
    5 |   str x;
      |   ^~~
      |   std
a.cc:6:10: error: 'x' was not declared in this scope
    6 |   cin >> x;
      |          ^
Language: C

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


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

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


Compiler output:
main.c: In function 'main':
main.c:6:6: error: subscripted value is neither array nor pointer nor vector
    6 |     a[i]=a[i];
      |      ^
main.c:6:11: error: subscripted value is neither array nor pointer nor vector
    6 |     a[i]=a[i];
      |           ^
main.c:8:8: error: subscripted value is neither array nor pointer nor vector
    8 |       a[i]="8";
      |        ^
main.c:12:19: error: subscripted value is neither array nor pointer nor vector
   12 |     printf("%s", a[i]);
      |                   ^
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:9: error: found ':' in nested-name-specifier, expected '::'
    6 | string s:
      |         ^
      |         ::
a.cc:6:8: error: 's' has not been declared
    6 | string s:
      |        ^
a.cc:7:7: error: qualified-id in declaration before '>>' token
    7 |   cin >> s;
      |       ^~
a.cc:8:2: 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;
  return 0;
  }


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

#include <<iostream> 
using namespace std;
int main (){
  string s;
  cin>>s;
 s{3}=8
    cout<<s;
  return 0;
  }


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

#include <<iostream> 
using namespace std;
int main (){
  string s;
  cin>>s;
  s(3)=8
    cout<<s;
  return 0;
  }

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:2: error: no match for call to '(std::string {aka std::__cxx11::basic_string<char>}) (int)'
    6 | s(4)=8;
      | ~^~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;

//定数
//円周率
const double pi = 3.141592653589793238462643383279;
//天井
const int INF = 1000000000; // = 10^9
const ll LINF = 1000000000000000; // = 10^15
//ABC文字列
const string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZABC";
const string abc = "abcdefghijklmnopqrstuvwxyzabc";
//よくあるmodくん
const ll MOD = 1000000007; // = 10^9 + 7

//データ構造
//隣接リスト用構造体（有向グラフ向け）
struct edge {
  ll to; // E.toでその辺の終点へアクセスできる
  ll cost; // e.costでその辺の重みにアクセスできる
};
//Union_Find木
struct UnionFind {
  vector<int> UF; // UF.at(i) : iの親の番号
  vector<int> SIZE; // SIZE.at(root(i)) : iと連結されてる要素の数
  UnionFind(int N) : UF(N), SIZE(N, 1) { // 最初は全てが根であるとして初期化
    for(int i = 0; i < N; i++) {
      UF.at(i) = i;
    }
  }
  int root(int x) { // データxが属する木の根を再帰で得る：root(x) = {xの木の根}
    if (UF.at(x) == x) {
      return x;
    }
    return UF.at(x) = root(UF.at(x));
  }
  void unite(int x, int y) { // xとyの木を併合
    int rx = root(x); // xの根をrx
    int ry = root(y); // yの根をry
    if (rx == ry) {
      return; // xとyの根が同じ(=同じ木にある)時はそのまま
    }
    // xとyの根が同じでない(=同じ木にない)時：小さい方の根を大きい方の根につける
    if (SIZE.at(rx) < SIZE.at(ry)) {
      UF.at(rx) = ry;
      SIZE.at(ry) += SIZE.at(rx);
      SIZE.at(rx) = 0;
    }
    else {
      UF.at(ry) = rx;
      SIZE.at(rx) += SIZE.at(ry);
      SIZE.at(ry) = 0;
    }
  }
  bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
    int rx = root(x);
    int ry = root(y);
    return rx == ry;
  }
  int size(int x) { // xと連結されてる要素の数を返す
    return SIZE.at(root(x));
  }
};

//関数 (計算量)
//ctoi (O(1))
int ctoi(char c){
  if (c == '0') return 0;
  if (c == '1') return 1;
  if (c == '2') return 2;
  if (c == '3') return 3;
  if (c == '4') return 4;
  if (c == '5') return 5; 
  if (c == '6') return 6;
  if (c == '7') return 7;
  if (c == '8') return 8;
  if (c == '9') return 9;
  return -1;  
}
//to_char (O(1))
char to_char(int i){
  if (i == 0) return '0';
  if (i == 1) return '1';
  if (i == 2) return '2';
  if (i == 3) return '3';
  if (i == 4) return '4';
  if (i == 5) return '5';
  if (i == 6) return '6';
  if (i == 7) return '7';
  if (i == 8) return '8'; 
  if (i == 9) return '9';
  return ' ';  
}
//素数判定 
//一つ一つの判定ではこっちの方が速い(一つ当たりO(√N))
//一方100までに何個あるかなどはEratosthenesの篩の方が良い（O(NlogN))
bool PN(int x) {
  if (x <= 1) return false; // 1や0,-1は素数ではない
  if (x == 2) return true; // √2 + 1 > 2 なので下でやると 2 ％ 2 = 0 となり判定できない
  for (int i = 2; i < sqrt(x) + 1; i++) {
    if (x % i == 0) return false; // 割れたら素数じゃない
  }
  return true;
}
// A^N mod M を計算する。modしたくなかったらM = LINFとかにすればよい。(O(√N))
ll modpow(ll A, ll N, ll M) {
  long long ans = 1;
  while (N > 0) {
    if (N & 1) ans = ans * A % M;
      A = A * A % M;
      N >>= 1;
   }
  return ans;
}
  
//メイン処理
int main() {
  cout << fixed << setprecision(16); //精度向上
  //ここまでテンプレ
  string S;
  cin >> S;
  S.at(3) = '8';
  cout << S << endl;

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

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

//type
#define ll long long
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007    //10^9+7:合同式の法
#define MAXR 100000       //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first      //pairの一つ目の要素
#define S second     //pairの二つ目の要素
#define Z class
// OTHER
// xの二乗を返す (関数テンプレート版)
template <typename T>
T square(T x) { return x * x; }
#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))
// loop
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= ll(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= ll(b); i--)
#define FORA(i, I) for (const auto &i : I)

// vector
#define ALL(x) x.begin(), x.end()

// output
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n", (x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ln cout << '\n'
template <Z A>
void pr(A a)
{
  cout << a;
  ln;
}
template <Z A, Z B>
void pr(A a, B b)
{
  cout << a << ' ';
}

int ans = 0;
bool check = 0;
string s, t;
int N = 3;
vector<int> v(N);
int a, b;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

int main()
{

  cin >> s;
  s[3]='8';
  rep(s);
}

Compiler output:
a.cc:66:8: error: macro "rep" requires 2 arguments, but only 1 given
   66 |   rep(s);
      |        ^
a.cc:24:9: note: macro "rep" defined here
   24 | #define rep(i, n) for (int i = 0; i < (n); i++)
      |         ^~~
a.cc: In function 'int main()':
a.cc:66:3: error: 'rep' was not declared in this scope
   66 |   rep(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:13: 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 <bits/stdc++.h>
using namespace std;

int main() {
  stirng s;
  cin >> s;
  s[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>
using namespace std;

void main(void) {
	
	long long N, Y;

	cin >> N >> Y;

	for(int i=0;i<=N;i++)
		for (int j = 0; j <= N-i; j++) {
			int k = N - i - j;
			if(k>=0){
			long long T = 10000 * i + 5000 * j + 1000 * k;
			if(T==Y){
				cout << i << " " << j << " " << k << endl;
			}
			}
		}

	cout << -1 << " " << -1 << " " << -1 << endl;
	
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main(void) {
      | ^~~~
Language: C++

#include <stdio.h>

int main(){
	char S [];
	char A [15] = "2017/01/";
	A [3] = '8';
	scanf("%s", &S);
	printf("%s%s\n", &A, &S);
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: storage size of 'S' isn't known
    4 |         char S [];
      |              ^
Language: C++

#include<stdio.h>
int main (){
	char tanggal []= "2017/01/";
	int angkanih;
	
	
	tanggal [3]= '8';
	
	scanf("%d", &angkanih);
	1<=angkanih<=31
	
	printf("%s%d", tanggal, angkanih);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: expected ';' before 'printf'
   10 |         1<=angkanih<=31
      |                        ^
      |                        ;
   11 | 
   12 |         printf("%s%d", tanggal, angkanih);
      |         ~~~~~~
Language: C++

#include <stdio.h>

int main() {
    char tanggal [] = "yyyy/mm/dd" ;
    tanggal [0] = '2' ;
    tanggal [1] = '0' ;
    tanggal [2] = '1' ;
    tanggal [3] = '8' ;
    printf("%s", tanggal) ;
    return to 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: 'to' was not declared in this scope
   10 |     return to 0 ;
      |            ^~
a.cc:10:14: error: expected ';' before numeric constant
   10 |     return to 0 ;
      |              ^~
      |              ;
Language: C++

#include <stdio.h>

int main() {
    char tanggal [] = "yyyy/mm/dd" ;
    tanggal [0] = '2' ;
    tanggal [1] = '0' ;
    tanggal [2] = '1' ;
    tanggal [3] = '8' ;
    return to 0 ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: 'to' was not declared in this scope
    9 |     return to 0 ;
      |            ^~
a.cc:9:14: error: expected ';' before numeric constant
    9 |     return to 0 ;
      |              ^~
      |              ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string A;
  cin >> A;
  A.at(0) = "2";
  A.at(1) = "0";
  A.at(2) = "1";
  A.at(3) = "8";
  cout << A << 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 |   A.at(0) = "2";
      |             ^~~
      |             |
      |             const char*
a.cc:7:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    7 |   A.at(1) = "0";
      |             ^~~
      |             |
      |             const char*
a.cc:8:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    8 |   A.at(2) = "1";
      |             ^~~
      |             |
      |             const char*
a.cc:9:13: 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 <bits/stdc++.h>
using namespace std;
int main() {
  string A, B;
  cin >> A;
  B.size() = 6;
  for(int i = 0; i < 6; i++) {
    B.at(i) = A.at(i + 4);
  }
  cout << 2018 << B << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: lvalue required as left operand of assignment
    6 |   B.size() = 6;
      |   ~~~~~~^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string A, B;
  cin >> A;
  B.size() = 6
  for(int i = 0; i < 6; i++) {
    B.at(i) = A.at(i + 4);
  }
  cout << 2018 << B << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: lvalue required as left operand of assignment
    6 |   B.size() = 6
      |   ~~~~~~^~
a.cc:7:18: error: 'i' was not declared in this scope
    7 |   for(int i = 0; i < 6; i++) {
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string A, B;
  cin >> A;
  for(int i = 0, i < 6, i++) {
    B.at(i) = A.at(i + 4);
  }
  cout << 2018 << B << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected ';' before '<' token
    6 |   for(int i = 0, i < 6, i++) {
      |                   ^~
      |                   ;
a.cc:6:20: error: expected primary-expression before '<' token
    6 |   for(int i = 0, i < 6, i++) {
      |                    ^
a.cc:6:28: error: expected ';' before ')' token
    6 |   for(int i = 0, i < 6, i++) {
      |                            ^
      |                            ;
Language: C++

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


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

#include <stdio.h>

int main(){
	char arr[10];
	scanf("%s",arr);
	arr[0] = '2'
	arr[1] = '0'
	arr[2] = '1'
    arr[3] = '8';
	for(int i=0; i<10;i++){	
	printf("%c",arr[i]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:21: error: expected ';' before 'arr'
    6 |         arr[0] = '2'
      |                     ^
      |                     ;
    7 |         arr[1] = '0'
      |         ~~~
Language: C++

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

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

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

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

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

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

#include<bits/stdc++.h>
using namespace std;
int main(void)
{
    char S[12];
    gets(S);
    cout<<"2018";
    for(int i=4;S[i];i++)
        cout<<S[i];
}


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(S);
      |     ^~~~
      |     getw
Language: C++

#include<stdio.h>

int main(){
    char date[20];
    gets(date);
    date[0]='2';
    date[0]='0';
    date[0]='1';
    date[0]='8';

    printf("%s\n",date);
return 0;
}


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

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

int main() {
  string S;
  cin >> S;
  cout "2018/01/" << S.at(8) << S.at(9) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: expected ';' before string constant
   10 |   cout "2018/01/" << S.at(8) << S.at(9) << endl;
      |       ^~~~~~~~~~~
      |       ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e16;
const ll mod = 1000000007;
#define rep(i, n) for (int i = 0; i < (ll)(n); i++)

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'stinrg' was not declared in this scope
    9 |   stinrg s; cin >> s;
      |   ^~~~~~
a.cc:9:20: error: 's' was not declared in this scope
    9 |   stinrg s; cin >> s;
      |                    ^
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    String y = s.split("/");
    System.out.printf("2018/01/%s", y[2]);
  }
}


Compiler output:
Main.java:7: error: incompatible types: String[] cannot be converted to String
    String y = s.split("/");
                      ^
Main.java:8: error: array required, but String found
    System.out.printf("2018/01/%s", y[2]);
                                     ^
2 errors
Language: C++

#include<iostream>
#include<string>
#include<cmath>
#include<bits/stdc++.h>
using namespace std;
int main() 
{ 
char arr[10];
for(int i=0;i<n;i++){
cin>>arr[i];
}
arr[3]=8;
for(int i=0;i<10;i++)
{
cout<<arr[i];
}
return 0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 'n' was not declared in this scope
    9 | for(int i=0;i<n;i++){
      |               ^
Language: C++

#include<iostream>
#include<string>
#include<cmath>
#include<bits/stdc++.h>
using namespace std;
int main() 
{ 
int a,b,c;
cin>>a;
cin>>b;
cin>>c;
if(a=="2017")
a=2018;
cout<<a<<"/"<<b<<"/"<<c;
return 0;  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 | if(a=="2017")
      |    ~^~~~~~~~
Language: C++

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


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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: expected ';' before 'cout'
    8 |   s[3]='8'
      |           ^
      |           ;
    9 |   cout << s << 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: In function 'int main()':
a.cc:9:16: error: expected ';' before 'cout'
    9 |   s.at(3) = '8'
      |                ^
      |                ;
   10 | 
   11 |   cout << s << endl;
      |   ~~~~
Language: C++

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

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

#include <iostream>
#include <algorithm>
using namespace std;
 
 int main(){
     int N;
     cin >> N;
     int a[N];
     for(int i =0; i < N; i++) {
         cin >> a[i];
     }
     
   int x = N
     sort(a, a + N);
     for (int i = 0; i < N; i++) {
         if (a[i] == a[i+1]){
             x--;
         }
     }
     cout << x << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:14:6: error: expected ',' or ';' before 'sort'
   14 |      sort(a, a + N);
      |      ^~~~
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
 
 int main(){
     int N;
     vector<int> a(N);
     cin >> N;
     for(int i =0; i < N; i++) {
         cin >> a.at(i);
     }
     
     sort(a, a + N);
     for (int i = 0; i < N - 1; i++) {
         if (a.at(i) == a.at(i+1)){
             N--;
         }
     }
     cout << N << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 'vector' was not declared in this scope
    7 |      vector<int> a(N);
      |      ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include <algorithm>
  +++ |+#include <vector>
    3 | using namespace std;
a.cc:7:13: error: expected primary-expression before 'int'
    7 |      vector<int> a(N);
      |             ^~~
a.cc:10:17: error: 'a' was not declared in this scope
   10 |          cin >> a.at(i);
      |                 ^
a.cc:13:11: error: 'a' was not declared in this scope
   13 |      sort(a, a + N);
      |           ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
 
 int main(){
     int N;
     int vector<int> a(N);
     cin >> N;
     for(int i =0; i < N; i++) {
         cin >> a.at(i);
     }
     
     sort(a, a + N);
     for (int i = 0; i < N - 1; i++) {
         if (a.at(i) == a.at(i+1){
             N--;
         }
     }
     cout << N << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected initializer before '<' token
    7 |      int vector<int> a(N);
      |                ^
a.cc:10:17: error: 'a' was not declared in this scope
   10 |          cin >> a.at(i);
      |                 ^
a.cc:13:11: error: 'a' was not declared in this scope
   13 |      sort(a, a + N);
      |           ^
a.cc:15:34: error: expected ')' before '{' token
   15 |          if (a.at(i) == a.at(i+1){
      |             ~                    ^
      |                                  )
a.cc:18:6: error: expected primary-expression before '}' token
   18 |      }
      |      ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
 
 int main(){
     int N;
     int vector<int> a;
     cin >> N;
     for(int i =0; i < N; i++) {
         cin >> a.at(i);
     }
     
     sort(a, a + N);
     for (int i = 0; i < N - 1; i++) {
         if (a.at(i) == a.at(i+1){
             N--;
         }
     }
     cout << N << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected initializer before '<' token
    7 |      int vector<int> a;
      |                ^
a.cc:10:17: error: 'a' was not declared in this scope
   10 |          cin >> a.at(i);
      |                 ^
a.cc:13:11: error: 'a' was not declared in this scope
   13 |      sort(a, a + N);
      |           ^
a.cc:15:34: error: expected ')' before '{' token
   15 |          if (a.at(i) == a.at(i+1){
      |             ~                    ^
      |                                  )
a.cc:18:6: error: expected primary-expression before '}' token
   18 |      }
      |      ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
 
 int main(){
     int N;
     int a[110];
     cin >> N;
     for(int i =0; i < N; i++) {
         cin >>a[i];
     }
     
     sort(a, a + N);
     int x = N
     for (int i = 0; i < N - 1; i++) {
         if (a[i] == a[i+1]){
             x -= 1
         }
     }
     cout << x << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:6: error: expected ',' or ';' before 'for'
   15 |      for (int i = 0; i < N - 1; i++) {
      |      ^~~
a.cc:15:22: error: 'i' was not declared in this scope
   15 |      for (int i = 0; i < N - 1; i++) {
      |                      ^
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
 
 int main(){
     int N;
     int a[110];
     cin >> N;
     for(int i =0; i < N; i++) {
         cin >>a[i];
     }
     
     sort(a, a + N);
     int x = N
     for (int i = 0; i < N - 1; i++) {
         if (a[i] == a[i+1]){
             x -= 1
         }
     }
     cout << N << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:6: error: expected ',' or ';' before 'for'
   15 |      for (int i = 0; i < N - 1; i++) {
      |      ^~~
a.cc:15:22: error: 'i' was not declared in this scope
   15 |      for (int i = 0; i < N - 1; i++) {
      |                      ^
Language: C++

#include <stdio,h>
int main(){
  char c[12];
  scanf("%s", c);
  c[3] = '8';
  printf("%s\n", c);
}

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  int Y;
  cin >> N >> Y;
  
  for(int i = 0; i <= N ; i++){
    int j = (Y-1000*N-9000*i)/4000;
    int k = N - i -j;
    if ( j >= 0 && k >= 0){
      if((10000*i + 5000*j + 1000*(N - i - j) == Y ){
        cout << i << " " << j << " " << N - i - j << endl;
        return 0;
      }
         }
  }
  cout << "-1 -1 -1" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:53: error: expected ')' before '{' token
   12 |       if((10000*i + 5000*j + 1000*(N - i - j) == Y ){
      |         ~                                           ^
      |                                                     )
a.cc:16:10: error: expected primary-expression before '}' token
   16 |          }
      |          ^
Language: C++

//#include <stdio.h>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#include <utility>
#include <iomanip>
#define input(x) cin >> x
#define print(x) cout << x << endl
#define rep(n) for(int i = a; i < n; i++)
#define ll long long int
using namespace std;

int main(){
    string s;
    input(s);
    s[3] = "8";
    //s.replace(0,4,"2018");
    print(s);
    return 0;
}


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

#include <stdio.h>
#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#include <utility>
#include <iomanip>
#define input(x) cin >> x
#define print(x) cout << x << endl
#define rep(n) for(int i = a; i < n; i++)
#define ll long long int
using namespace std;

int main(){
    string s;
    input(s);
    s[3] = "8";
    //s.replace(0,4,"2018");
    print(s);
    return 0;
}


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

#include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#include <utility>
#include <iomanip>
#define input(x) cin >> x
#define print(x) cout << x << endl
#define rep(n) for(int i = a; i < n; i++)
#define ll long long int
using namespace std;

int main(){
    string s;
    input(s);
    s.at(3) = "8";
    //s.replace(0,4,"2018");
    print(s);
    return 0;
}


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

#include <stdio.h>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>
#include <utility>
#include <iomanip>
#define input(x) cin >> x
#define print(x) cout << x << endl
#define rep(n) for(int i = a; i < n; i++)
#define ll long long int
using namespace std;

int main(){
    string s;
    input(s);
    s.at(3) = "8";
    //s.replace(0,4,"2018");
    print(s);
    
}


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

#include <stdio.h>
#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <queue>
#include <map>
#define input(x) cin >> x
#define print(x) cout << x << endl
#define rep(n) for(int i = a; i < n; i++)
#define ll long long int
using namespace std;

int main(){
    string s;
    input(s);
    s[3] = "8";
    print(s);
    
}


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

#include <bits/stdc++.h>
#define rep(i,n); for(int i = 0;i < (n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
long double pi = acos(-1);
const int INF = 1001001001;


// 最小公倍数を求める
int euqlid (int a, int b){
  int temp;
  temp = a % b;
  if(temp == 0)return b;
  return euqlid(b,temp);
}
ll conbination(ll a,ll b){
  ll u = 1;
  ll d = 1;
  while(b != 0){
    u *= a;
    d *= b;
    a--;
    b--;
  }
  return u / d;
}
int strtoint(char s){
  return (int(s-'0'));
}
int fact(int n){
  if(n == 1)return 1;
  return n * fact(n-1);
  }


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


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

#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  int64_t Y;
  cin >> N >> Y;
  int a = 0;
  int b = 0;
  int c = 0;
  a = Y / 10000;
  Y %= 10000;
  b = Y / 5000;
  Y %= 5000;
  c = Y / 1000;
  if ( (a + b + c ) > N ) cout << "-1 -1 -1" << endl;
  else cont << a << " " << b << " " << c << endl;
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:16:8: error: 'cont' was not declared in this scope; did you mean 'const'?
   16 |   else cont << a << " " << b << " " << c << endl;
      |        ^~~~
      |        const
Language: C++

#include <bits/stdc++.h>
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:11: error: expected ';' before 'cout'
    9 |   s[3] = 8
      |           ^
      |           ;
   10 |   cout << s << endl;
      |   ~~~~
Language: C

#include<stdio.h>

int main(){
    int num = 0;
    int sum = 0;
    
    int sub_man = 0;
    int sub_gosen = 0; 

    scanf("%d",&num);
    scanf("%d",&sum);
    
    // printf("man:%d gosen:%d\n",sub_man,sub_gosen);

    if(sum/10000>=num)sub_man = num/2;

    for(int num_man=0+sub_num; num_man<=num; num_man++){

        for(int num_gosen=0; num_gosen<=num; num_gosen++){

            if(sum > num_man*10000+num*5000){
                // printf("break\n");
                break;
            }

            for(int num_sen=0; num_sen<=num; num_sen++){

                if(sum > num_man*10000+num_gosen*5000+num*1000){
                    // printf("break\n");
                    break;
                }

                // printf("sum:%d 1万:%d 5千:%d 1千:%d\n",10000*num_man+5000*num_gosen+1000*num_sen,num_man,num_gosen,num_sen);

                if(10000*num_man+5000*num_gosen+1000*num_sen == sum 
                    && num_man+num_gosen+num_sen == num){
                    printf("%d %d %d\n",num_man,num_gosen,num_sen);
                    return 0;
                }
            }
        }
     }

    printf("-1 -1 -1\n");

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:23: error: 'sub_num' undeclared (first use in this function)
   17 |     for(int num_man=0+sub_num; num_man<=num; num_man++){
      |                       ^~~~~~~
main.c:17:23: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
  // ここにプログラムを追記
  string S;
  cin>>S ;
  if (S[0]!=2)S[0]==2
        if (S[1]!=0)S[1]==20
           if (S[2]!=1)S[2]==1
              if (S[3]!=8)S[3]==8
                
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:22: error: expected ';' before 'if'
    8 |   if (S[0]!=2)S[0]==2
      |                      ^
      |                      ;
    9 |         if (S[1]!=0)S[1]==20
      |         ~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: conflicting declaration 'char s [3]'
    8 |   char s[3] = 8;
      |        ^
a.cc:5:10: note: previous declaration as 'std::string s'
    5 |   string s;
      |          ^
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:10: 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.at(3)=8
  cout<<s<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected ';' before 'cout'
    6 |   s.at(3)=8
      |            ^
      |            ;
    7 |   cout<<s<<endl;}
      |   ~~~~
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:19: 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 <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;


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:13: error: expected ';' before 'cout'
   10 |   s[3] = '8'
      |             ^
      |             ;
   11 |   cout << s << endl;
      |   ~~~~
Language: C++

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

int main(){
  int N;
  cin >> N;

  vector<int> d(N+1);
  vector<int> num(N+1);

  for(int i = 0; i < N; i++){
    cin >> d.at(i);
    num.at(d.at(i))++;
  }

  int cnt = 0;

  for(int i = 0; i <= N; i++){
    if(num.at(i) > 0) cnt++;
    cout << "num.at(" << i << ")=" << num.at(i) << " "<<d.at(i)<< endl;
  }

  cout << cnt << endl;
  retrun 0;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:24:3: error: 'retrun' was not declared in this scope
   24 |   retrun 0;
      |   ^~~~~~
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:13: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    7 |   s.at(3) = "8";
      |             ^~~
      |             |
      |             const char*
Language: C++

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

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


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

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

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


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

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

int main(){
  int S=2017/01;
  int N;
  cin>>N;
  S.at(3)='8';
  cout<<S<<N<<endl;
}


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

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

int main(){
  int S=2017/01;
  int N;
  cin>>N;
  S[3]='8';
  cout<<S<<N<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: invalid types 'int[int]' for array subscript
    8 |   S[3]='8';
      |    ^
Language: C++

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

int main(){
  int S=2017/01;
  int N;
  cin>>N;
  S[3]=='8';
  cout<<S<<N<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:4: error: invalid types 'int[int]' for array subscript
    8 |   S[3]=='8';
      |    ^
Language: C++

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

int main(){
  int S=2017/01;
  int M;
  cin>>M;
  int S=2018/01;
  cout<<S<<M<<endl;
}
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: redeclaration of 'int S'
    8 |   int S=2018/01;
      |       ^
a.cc:5:7: note: 'int S' previously declared here
    5 |   int S=2017/01;
      |       ^
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:10:3: error: 'cout' does not name a type
   10 |   cout<<S<<endl;
      |   ^~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

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

int main(){
  int S;
  cin>>S;
  if(S.at(3)!=8){
    S[3]==8;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: request for member 'at' in 'S', which is of non-class type 'int'
    7 |   if(S.at(3)!=8){
      |        ^~
a.cc:8:6: error: invalid types 'int[int]' for array subscript
    8 |     S[3]==8;
      |      ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid types 'int[int]' for array subscript
    7 |   if(S[3]!=8){
      |       ^
a.cc:8:6: error: invalid types 'int[int]' for array subscript
    8 |     S[3]==8;
      |      ^
Language: C++

#include<iostream>
#include<verctor>
#include<string>
using namespace std;
int main()
{
  string s[9];
  cin >> s;
  s[0] = '2';
  s[1] = '0';
  s[2] = '1';
  s[3] = '8';
  cout << s;
  return 0;
}

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

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

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

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

import java.util.*;

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

Compiler output:
Main.java:6: error: cannot find symbol
    Stinrg S = sc.next();
    ^
  symbol:   class Stinrg
  location: class Main
1 error
Language: C++

#include<iostream>
using namespace std;
int main(){
    int A,B,C,D,E,F;
    int i,j;
    int counter=0;
    int counterr=0;
    int answer;
    priority_queue<int> bash;
    cin>>A>>B>>C>>D>>E>>F;
    int vec[],ves[],
    for(i=0;i<=F/(100*A);i++ ){
    for(j=0;j<=F/(100*B);j++ ){
    if(i*A*100+j*B*100<=F)
    {vec[counter]=i*A*100+j*B*100;
     counter++;}
    for(i=0;i<=F/C;i++ ){
    for(j=0;j<=F/D;j++ ){
    if(i*C+j*D<=F)
    {ves[counterr]=i*C+j*D;
     counter++;}
    }
    }
    for(i=0;i<sizeof(vec);i++ ){
    for(j=0;j<sizeof(ves);j++ ){
    if(vec[i]+ves[j]<=F && vec[i]*E/100>=ves[j])
    bash.push(100*ves[j]/(vec[i]+ves[j]));}}
    cout<<-1<<" "<<-1<<" "<<-1<<endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'priority_queue' was not declared in this scope
    9 |     priority_queue<int> bash;
      |     ^~~~~~~~~~~~~~
a.cc:2:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
    1 | #include<iostream>
  +++ |+#include <queue>
    2 | using namespace std;
a.cc:9:20: error: expected primary-expression before 'int'
    9 |     priority_queue<int> bash;
      |                    ^~~
a.cc:11:9: error: storage size of 'vec' isn't known
   11 |     int vec[],ves[],
      |         ^~~
a.cc:11:15: error: storage size of 'ves' isn't known
   11 |     int vec[],ves[],
      |               ^~~
a.cc:12:5: error: expected unqualified-id before 'for'
   12 |     for(i=0;i<=F/(100*A);i++ ){
      |     ^~~
a.cc:12:29: error: expected ';' before ')' token
   12 |     for(i=0;i<=F/(100*A);i++ ){
      |                             ^~
      |                             ;
a.cc:29:6: error: expected '}' at end of input
   29 |     }
      |      ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

public class Main {

	public static void main(String[] args) throws IOException {
		Main mainObj = new Main();
		mainObj.solve();
	}

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		String s = fs.next();
		System.out.println(s.replace("2017", "2018"));
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

		public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

		public void close() throws IOException {
			reader.close();
		}
	}

}


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

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

int main() {
  spring s;
  cin >> s;
  s.at(4-1)='8';
  cout << s << endl;
}

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

#include <isostream>
using namespace std;

int main(){
  string S;
  cin>>S;
  
  if(S[3]==7)S[3]=8;
  
}

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

#include<iostream>
//#include<algorithm>
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