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

#include <iostream>
#include <string>
#include <cstring>
#include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
	int n,m,d;
	cin>>n>>m>>d;
	double s=m*1.0/n;
	for(int i=2;i<=d;i++)
	s=s*(m-n)
	printf("%.10f\n",s);
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:13:18: error: expected ';' before 'printf'
   13 |         s=s*(m-n)
      |                  ^
      |                  ;
   14 |         printf("%.10f\n",s);
      |         ~~~~~~
Language: Java

	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		n = scan.nextInt();
		m = scan.nextInt();
		d = scan.nextInt();
	
		int num[] = new int[m];
		array(num,0);
		System.out.println(count / Math.pow(n, m));
		scan.close();
	
	}
	
	public static Object array(int[] num,int s) {
		if(s == m) {
			for(int k = 0;k < m-1;k++) {
				if(Math.abs(num[k] - num[k+1]) == d) {
					count++;
				}
			}
		}else {
			for(int i = 0;i < n;i++) {
				num[s] = i+1;
				array(num,s+1);
			}
		}
		
		return null;
	}
}

Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:31: error: class, interface, enum, or record expected
}
^
2 errors
Language: C++

#include <iostream>
#include <string>
#include <math.h>
#include<algorithm>
using namespace std;

int main(){
  double n,m,d;
  cin >> n >> m >> d;
  if(n>2*d){
   cout << 2*(m-1)/n/n*(n-d) << endl;
  }
  else{
   cout << 2*(m-1)*/n/n*(n-d+1) << endl; 
  }
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected primary-expression before '/' token
   14 |    cout << 2*(m-1)*/n/n*(n-d+1) << endl;
      |                    ^
Language: C++

#include <iostream>
#include <string>
#include <math.h>
#include<algorithm>
using namespace std;

int main(){
  double n,m,d;
  cin >> n >> m >> d;
  if(n>2*d){
   cout << (m-1)/n/n*(n-2*d) << endl;
  }
  else{
   cout << 2*(m-1)*/n/n*(n-d+1) << endl; 
  }
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:20: error: expected primary-expression before '/' token
   14 |    cout << 2*(m-1)*/n/n*(n-d+1) << endl;
      |                    ^
Language: Java

import java.io.InputStream;
import java.util.Scanner;

public class Main {


	public static void main(String args[]) {
        InputStream inputStream = System.in;
        Scanner sc = new Scanner(inputStream);
        String out;
        long A = sc.nextInt();
        long B = sc.nextInt();
        int C=sc.nextInt();
        long tmp=0;
        //int[] tmp=new int[A];
       /*
        for(int i=0;i<A;i++) {

        	tmp[i]=-999999999;
        }*/
        long check=0;
        for(int i=1;i<=A;i++) {
        	if(A-i>C||i-1>C) {check++;}
        }

        for (int i=0;i<B-1;i++) {
        	tmp+=Math.pow(B, i);
        }
        long tmp2=(long)Math.pow(A, B);
        System.out.println(tmp2);

        System.out.println((double)tmp*check/(double)tmp2);
	}

Compiler output:
Main.java:33: error: reached end of file while parsing
	}
	 ^
1 error
Language: C++

using namespace std;
int main(void){
  long int n,m,d;
  float ans,a,b;
  cin >> n>>m>>d;
  a = (float)n;
  b = (float)m;
  if (d == 0){
    ans = (b-1)/a;
  }
  else{
    if (2*d <= n){
      ans = (b-1)*(2*d/(a*a)+(a-2*d)*2/(a*a));
    }
    else{
      ans = (b-1)*2*(a-d)/(a*a);
    }
  }
  cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n>>m>>d;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:19:3: error: 'cout' was not declared in this scope
   19 |   cout << ans << endl;
      |   ^~~~
a.cc:19:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:18: error: 'endl' was not declared in this scope
   19 |   cout << ans << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<cmath>
#include <iomanip>
using namespace std;
typedef long long ll;
#define rep(i,a,n)	for(int i=a;i<n;i++)
#define rrep(i,a,n) for(int i=(a-1);i>=n;i--)
 
ll gcd(ll a,ll b){
	if(b==0)return a;
	return gcd(b,a%b);
}
ll lcm(ll a,ll b){
	ll g=gcd(a,b);
	return a/g*b;
}
 
ll digitsum(ll a){
	ll x=0;
	while(a>0){
		x+=a%10;
		a/=10;
	}
	return x;
}
int main(){
	long double n,m,d;
	cin>>n>>m>>d;
	if(d==1||d==0){
	
		long double x=(n*m)-((m-1)*d);
	}
	else{
		long double x=(n*m)-((m-1)*1);
	}
	long double ans=x/(n*n);
	cout<< fixed << setprecision(10) <<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:25: error: 'x' was not declared in this scope
   42 |         long double ans=x/(n*n);
      |                         ^
Language: C++

#include <iostream>
#include <math.h>
using namespace std;

int n, m, d;
int a[1000000010];
double ans;

void check() {
    for (int i = 1; i < m; ++i) {
        if (abs(a[i] - a[i - 1]) == d) ans++;
    }
}

int main() {
    cin >> n >> m >> d;
    ans = 0;
    for (int i = 0; i < m; ++i) {
        a[i] = 1;
    }

    check();
    for (int i = 0; i < pow(n, m); ++i) {
        for (int k = 0; k < m; ++k) {
            if (a[k] != n) {
                a[k]++;
                if (k > 0) {
                    for (int j = 0; j < k; ++j) {
                        a[j] = 1;
                    }
                }
                check();
                break;
            }
        }
    }

    cout << ans / pow(n, m) << endl;
    return 0;
}

Compiler output:
/tmp/cchQ5Bac.o: in function `check()':
a.cc:(.text+0x56): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cchQ5Bac.o
a.cc:(.text+0x6a): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cchQ5Bac.o
/tmp/cchQ5Bac.o: in function `main':
a.cc:(.text+0xd4): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cchQ5Bac.o
a.cc:(.text+0x20f): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/cchQ5Bac.o
collect2: error: ld returned 1 exit status
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	scanf("%d%d%d",&n,&m,&d);
	if(d>m-1)
	{
		printf("0.0000000000");
		return 0;
	}
	printf("%.10lf",2/n);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:25: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |         scanf("%d%d%d",&n,&m,&d);
      |                         ^
      |                         yn
a.cc:5:28: error: 'm' was not declared in this scope; did you mean 'tm'?
    5 |         scanf("%d%d%d",&n,&m,&d);
      |                            ^
      |                            tm
a.cc:5:31: error: 'd' was not declared in this scope
    5 |         scanf("%d%d%d",&n,&m,&d);
      |                               ^
Language: C++

#include <iostream>
#include <math.h>
using namespace std;

int n, m, d;
int a[1000000010];
double ans = 0;

void check() {
    for (int i = 1; i < m; ++i) {
        if (abs(a[i] - a[i - 1]) == d) ans++;
    }
}

int main() {
    cin >> n >> m >> d;

    for (int i = 0; i < m; ++i) {
        a[i] = 1;
    }

    check();
    for (int i = 0; i < pow(n, m); ++i) {
        for (int k = 0; k < m; ++k) {
            if (a[k] != n) {
                a[k]++;
                if (k > 0) {
                    for (int j = 0; j < k; ++j) {
                        a[j] = 1;
                    }
                }
                check();
                break;
            }
        }
    }

    cout << ans / pow(n, m) << endl;
    return 0;
}

Compiler output:
/tmp/ccotgfyA.o: in function `check()':
a.cc:(.text+0x56): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccotgfyA.o
a.cc:(.text+0x6a): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccotgfyA.o
/tmp/ccotgfyA.o: in function `main':
a.cc:(.text+0x203): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccotgfyA.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <math.h>
using namespace std;

int n, m, d;
int a[1000000010];
double ans = 0;

void check() {
    for (int i = 1; i < m; ++i) {
        if (abs(a[i] - a[i - 1]) == d) ans++;
    }
}

int main() {
    cin >> n >> m >> d;

    for (int i = 0; i < m; ++i) {
        a[i] = 1;
    }

    check();
    for (int i = 0; i < pow(n, m); ++i) {
        for (int k = 0; k < m; ++k) {
            if (a[k] != n) {
                a[k]++;
                if (k > 0) {
                    for (int j = 0; j < k; ++j) {
                        a[j] = 1;
                    }
                }
                check();
                break;
            }
        }
    }

    cout << ans / pow(n, m) << endl;
    return 0;
}

Compiler output:
/tmp/ccVTWXTX.o: in function `check()':
a.cc:(.text+0x56): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccVTWXTX.o
a.cc:(.text+0x6a): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccVTWXTX.o
/tmp/ccVTWXTX.o: in function `main':
a.cc:(.text+0x203): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccVTWXTX.o
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <math.h>
using namespace std;

int n, m, d;
int a[1000000010];
double ans = 0;

void check() {
    for (int i = 1; i < m; ++i) {
        if (abs(a[i] - a[i - 1]) == d) ans++;
    }
}

int main() {
    cin >> n >> m >> d;

    for (int i = 0; i < m; ++i) {
        a[i] = 1;
    }

    check();
    for (int i = 0; i < pow(n, m); ++i) {
        for (int k = 0; k < m; ++k) {
            if (a[k] != n) {
                a[k]++;
                if (k > 0) {
                    for (int j = 0; j < k; ++j) {
                        a[j] = 1;
                    }
                }
                check();
                break;
            }
        }
    }

    cout << ans / pow(n, m) << endl;
    return 0;
}

Compiler output:
/tmp/ccJbBYVh.o: in function `check()':
a.cc:(.text+0x56): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccJbBYVh.o
a.cc:(.text+0x6a): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccJbBYVh.o
/tmp/ccJbBYVh.o: in function `main':
a.cc:(.text+0x203): relocation truncated to fit: R_X86_64_PC32 against symbol `ans' defined in .bss section in /tmp/ccJbBYVh.o
collect2: error: ld returned 1 exit status
Language: Java

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;

public class ELR {
	
	public static void main(String[]args) throws Throwable {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		long n = sc.nextLong(), m = sc.nextLong(), d = sc.nextLong();
		System.out.printf("%.12f",(1.0) / (n) * (m - Math.max(1, d)));
		
		out.flush();
		out.close();

	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String s) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(new File(s)));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

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

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

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}


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

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

char c[1010];
long double n,m,d;

int main()
{
	cin>>n>>m>>d;
	cout<<(long double)(m-1)/(n-2*d;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:40: error: expected ')' before ';' token
   12 |         cout<<(long double)(m-1)/(n-2*d;
      |                                  ~     ^
      |                                        )
Language: C++

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

int main(void){
    double n,m,d;
    cin >> n >> m >> d;
    double ans = 2*(n-d)/n*(m-1)/n;
    if(d== 0)ans/=2;
    cout << fixed << std::setprecision(10)　<< ans <<endl;
    return 0;
}


Compiler output:
a.cc:10:43: error: extended character 　 is not valid in an identifier
   10 |     cout << fixed << std::setprecision(10)　<< ans <<endl;
      |                                           ^
a.cc: In function 'int main()':
a.cc:10:43: error: expected ';' before '\U00003000'
   10 |     cout << fixed << std::setprecision(10)　<< ans <<endl;
      |                                           ^~
      |                                           ;
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  double n,m,d;
  cin >> n >> m >> d;
  int a=0;
  if((n-d-1)%2!=0){
    for(int i=d+1;i<=n-1;i=i+2){
      a+=(m-1)/((n-d)*i)+(m-1)/((n-d)*(i+1));}
  else{
    for(int i=d+1;i<=n-2;i=i+2){
      a+=(m-1)/((n-d)*i)+(m-1)/((n-d)*(i+1));}
    a+=(m-1)/((n-d)*n);}
  cout << a << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   if((n-d-1)%2!=0){
      |      ~~~~~~~^~
      |          |   |
      |          |   int
      |          double
a.cc:11:3: error: expected '}' before 'else'
   11 |   else{
      |   ^~~~
a.cc:8:19: note: to match this '{'
    8 |   if((n-d-1)%2!=0){
      |                   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  double n,m,d;
  cin >> n >> m >> d;
  int a=0;
  if((n-d-1)%2==1){
    for(int i=d+1;i<=n-1;i=i+2){
      a+=(m-1)/((n-d)*i)+(m-1)/((n-d)*(i+1));}
  else{
    for(int i=d+1;i<=n-2;i=i+2){
      a+=(m-1)/((n-d)*i)+(m-1)/((n-d)*(i+1));}
    a+=(m-1)/((n-d)*n);}
  cout << a << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: invalid operands of types 'double' and 'int' to binary 'operator%'
    8 |   if((n-d-1)%2==1){
      |      ~~~~~~~^~
      |          |   |
      |          |   int
      |          double
a.cc:11:3: error: expected '}' before 'else'
   11 |   else{
      |   ^~~~
a.cc:8:19: note: to match this '{'
    8 |   if((n-d-1)%2==1){
      |                   ^
Language: C

#include <stdio.h>
 
int main ()
{
char S[1000];
int w;
int n;
char result [1000];
int r = 0;
 
scanf("%s", S);
scanf("%d", &w);
 
for (r=0;  r*(w+1)>=999 ; r++){
result [r] = S [r*w] 
}

printf ("%c", result);

return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:21: error: expected ';' before '}' token
   15 | result [r] = S [r*w]
      |                     ^
      |                     ;
   16 | }
      | ~
Language: C++

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

int main() {
        long  double n, m, d;
        cin >> n >> m >> d;
        if (n == 0) {
                cout << 0 << endl;
        }
        if (d == 0) {
                cout << ((m - 1.0) / n) << endl;
        }
        else {
                cout << 2.0*(((n - d)*((m - 1.0) / n))/n) << endl;
        }
        return 0;

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

#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <algorithm>
#include <set>
#include <vector>
#include <queue>
#define pb push_back
using namespace std;
typedef pair<int,int> pii;
typedef long long ll;


int main(){
  long long int n,m,d;
  cin>>n>>m>>d;

  double t=(n-(d));
  double res=0.0;

  res=t*((double)m-1.0)/pow(n,2);


  printf("%.10f\n",res);

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: 'pow' was not declared in this scope
   22 |   res=t*((double)m-1.0)/pow(n,2);
      |                         ^~~
Language: C++

#include <iostream>
#include <cstdint>
int main() {
    int_64_t n,m,d;
    double pattern;
    double beautiful;
    double output;
    std::cin >> n;
    std::cin >> m;
    std::cin >> d;
    pattern = n * n;
    beautiful = (n - d) * 2;
    for(int x=3;x <= m;x++){
       pattern *= n;
       beautiful *= (x+1);
    }
    std::cout << beautiful/pattern << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'int_64_t' was not declared in this scope; did you mean 'int64_t'?
    4 |     int_64_t n,m,d;
      |     ^~~~~~~~
      |     int64_t
a.cc:8:17: error: 'n' was not declared in this scope
    8 |     std::cin >> n;
      |                 ^
a.cc:9:17: error: 'm' was not declared in this scope; did you mean 'tm'?
    9 |     std::cin >> m;
      |                 ^
      |                 tm
a.cc:10:17: error: 'd' was not declared in this scope
   10 |     std::cin >> d;
      |                 ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>

#include <cstdio>

using namespace std;


int main(void) {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n, m, d;
	cin >> n >> m >> d;

	long double c, a;
	if (d == 0) {
		c = 1 / long double(n);
	}
	else if (d * 2 == n) {
		c = 1 / long double(n);
	}
	else if (d * 2 > n) {
		c = 2 * d / long double(n);
	}
	else {
		c = 2 * (n - 2 * d) / long double(n) + 2 * d / long double(n);
	}



	a = (m - 1) * c;


	cout << a << '\n';

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: expected primary-expression before 'long'
   22 |                 c = 1 / long double(n);
      |                         ^~~~
a.cc:25:25: error: expected primary-expression before 'long'
   25 |                 c = 1 / long double(n);
      |                         ^~~~
a.cc:28:29: error: expected primary-expression before 'long'
   28 |                 c = 2 * d / long double(n);
      |                             ^~~~
a.cc:31:39: error: expected primary-expression before 'long'
   31 |                 c = 2 * (n - 2 * d) / long double(n) + 2 * d / long double(n);
      |                                       ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>

#include <cstdio>

using namespace std;


int main(void) {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n, m, d;
	cin >> n >> m >> d;

	long double c, a;
	if (d == 0) {
		c = 1 / long double(n);
	}
	else if (d * 2 == n) {
		c = 1 / long double(n);
	}
	else if (d * 2 > n) {
		c = 2 * d / long double(n);
	}
	else {
		c = 2 * (n - 2 * d) / long double(n) + 2 * d / long double(n);
	}



	a = (m - 1) * c;


	cout << a << '\n';

	cin >> n >> m >> d;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: expected primary-expression before 'long'
   22 |                 c = 1 / long double(n);
      |                         ^~~~
a.cc:25:25: error: expected primary-expression before 'long'
   25 |                 c = 1 / long double(n);
      |                         ^~~~
a.cc:28:29: error: expected primary-expression before 'long'
   28 |                 c = 2 * d / long double(n);
      |                             ^~~~
a.cc:31:39: error: expected primary-expression before 'long'
   31 |                 c = 2 * (n - 2 * d) / long double(n) + 2 * d / long double(n);
      |                                       ^~~~
Language: C++

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

char c[1010];
int n;

int main()
{
	cin>>n>>m>>d;
	cout<<(m-d)/n;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'm' was not declared in this scope; did you mean 'tm'?
   11 |         cin>>n>>m>>d;
      |                 ^
      |                 tm
a.cc:11:20: error: 'd' was not declared in this scope
   11 |         cin>>n>>m>>d;
      |                    ^
Language: C++

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

char c[1010];
int n;

int main()
{
	cin>>n>>m>>d;
	cout<<(m-d)/n;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'cin' was not declared in this scope
   10 |         cin>>n>>m>>d;
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<cstring>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:10:17: error: 'm' was not declared in this scope
   10 |         cin>>n>>m>>d;
      |                 ^
a.cc:10:20: error: 'd' was not declared in this scope
   10 |         cin>>n>>m>>d;
      |                    ^
a.cc:11:9: error: 'cout' was not declared in this scope
   11 |         cout<<(m-d)/n;
      |         ^~~~
a.cc:11:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include "bits/stdc++.h"

#define REP(i,n) for(ll i=0;i<ll(n);++i)
#define RREP(i,n) for(ll i=ll(n)-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<ll(n);++i)
#define RFOR(i,m,n) for(ll i=ll(n)-1;i>=ll(m);--i)
#define ALL(v) (v).begin(),(v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define DUMP(v) REP(aa, (v).size()) { cout << v[aa]; if (aa != v.size() - 1)cout << " "; else cout << endl; }
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9

const int dx[8] = { 1,1,0,-1,-1,-1,0,1 };
const int dy[8] = { 0,1,1,1,0,-1,-1,-1 };


using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
ll max(ll a, int b) { return max(a, ll(b)); }
ll max(int a, ll b) { return max(ll(a), b); }
ll min(ll a, int b) { return min(a, ll(b)); }
ll min(int a, ll b) { return min(ll(a), b); }

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll n, m, d;
	cin >> n >> m >> d;
	ll l = n - d, r = d;
	ll dif = max(0, r - l);
	cout << fixed << setprecision(20) << long double(m - 1) / n * (n - dif) / n << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:46: error: expected primary-expression before 'long'
   38 |         cout << fixed << setprecision(20) << long double(m - 1) / n * (n - dif) / n << endl;
      |                                              ^~~~
Language: C++

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

#define int long long
const double PI = 3.14159265358979323846;
typedef vector<int> vint;
typedef pair<int, int> pint;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

int n, m, d;

signed main() {
    cin >> n >> m >> d;
    if (d == 0) {
        cout << setprecision(10) << (double)(m - 1) / n << endl;
        return;
    }
    int but, nbut;
    if (d * 2 > n) {
        but = n - (d * 2 - n);
        nbut = 0;
    } else {
        but = d * 2;
        nbut = n - but;
    }
    cout << setprecision(10) << (double)(but + 2 * nbut) / n * (m - 1) / n << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   17 |         return;
      |         ^~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <queue>

#define REP(i, N) for(int i = 0; i< N; i++)
using namespace std;

int main(int argc, const char * argv[]) {
   
    //printf("\n");
    double heikinutukusisa;
    int n,m,d;
    cin >> n >> m >> d;
    heikinutukusisa = (m - d) / n;
    cout << heikinutukusisa;

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:15:29: error: expected '}' at end of input
   15 |     cout << heikinutukusisa;
      |                             ^
a.cc:8:41: note: to match this '{'
    8 | int main(int argc, const char * argv[]) {
      |                                         ^
Language: C++

#include<iostream>

using namespace std;

int main() {
	int n, m, d;

	cin >> n >> m >> d;

	cout << (double)m / n - pow(n, -1);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: 'pow' was not declared in this scope
   10 |         cout << (double)m / n - pow(n, -1);
      |                                 ^~~
Language: C++

#include<iostream>

using namespace std;

int main() {
	int n, m, d;

	cin >> n >> m >> d;

	cout << (double)m / n - pow(n, -1);

	cin >> n;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:33: error: 'pow' was not declared in this scope
   10 |         cout << (double)m / n - pow(n, -1);
      |                                 ^~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <list>
#include <queue>
#include <algorithm>
#define rep(i, n) for(i = 0; i < (n); i++)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define MOD 1000000007
#define PI 3.14159265358979323846
#define INF 1ll << 60

using namespace std;
typedef long long ll;
typedef pair<ll, int> pp;

typedef struct {
	int to;
	ll cost;
} edge;

void Dijk(int s, vector<vector<edge>> &d, vector<ll> &ans) {
	int i;
	priority_queue<pp, vector<pp>, greater<pp>> que;
	que.push(pp(0, s));
	while (!que.empty()) {
		int n = que.top().second;
		ll c = que.top().first;
		que.pop();
		if (ans[n] == INF) {
			ans[n] = c;
			vector<edge>& e = d[n];
			rep(i, e.size()) {
				if (ans[e[i].to] == INF) {
					que.push(pp(e[i].cost + c, e[i].to));
				}
			}
		}
	}
}

int main(void) {
	int num, i, m, s, g, x, y, c, d;
	ll sum = 1e15;
	cin >> num >> m >> s >> g;
	vector<vector<edge>> a(num + 1), b(num + 1);
	vector<ll> fir(num + 1, INF), lat(num + 1, INF), ans(num + 1);
	priority_queue<ll> que;
	rep(i, m) {
		scanf_s("%d%d%d%d", &x, &y, &c, &d);
		a[x].push_back({ y, c });
		a[y].push_back({ x, c });
		b[x].push_back({ y, d });
		b[y].push_back({ x, d });
	}
	Dijk(s, a, fir);
	Dijk(g, b, lat);
	for (i = num; i > 0; i--) {
		que.push(sum - fir[i] - lat[i]);
		ans[i] = que.top();
	}
	for (i = 1; i <= num; i++)
		cout << ans[i] << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   51 |                 scanf_s("%d%d%d%d", &x, &y, &c, &d);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n);i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<ll, int> PL;
constexpr ll INF = (1LL << 60);
int main() {
  int n, m, s, t;
  cin >> n >> m >> s >> t;
  s--; t--;
  vector<vector<P>> g1(n), g2(n);
  rep(i,m) {
    int u, v, a, b;
    cin >> u >> v >> a >> b;
    u--; v--;
    g1[u].emplace_back(make_pair(v, a));
    g1[v].emplace_back(make_pair(u, a));
    g2[u].emplace_back(make_pair(v, b));
    g2[v].emplace_back(make_pair(u, b));
  }

  auto dijkstra = [&](int f, vector<vector<P>> &g) {
    vector<ll> dp(n, INF);
    priority_queue<PL, vector<PL>, greater<PL>> que;
    dp[f] = 0;
    que.push(make_pair(0LL, f));
    while (!que.empty()) {
      auto p = que.top(); que.pop();
      int u = p.second;
      if (dp[u] < p.first) continue;
      for (auto e : g[u]) {
        int v = e.first;
        if (dp[v] > dp[u] + e.second) {
          dp[v] = dp[u] + e.second;
          que.push(make_pair(dp[v], v));
        }
      }
    }
    return dp;
  };

  ll mx = 1e15;
  auto ds = dijkstra(s, g1);
  auto dt = dijkstra(t, g2);
  vector<ll> res;
  ll cur = INF;
  for (int i = n - 1; i >= 0; i--) {
    cur = min(tmp, ds[i] + dt[i]);
    cout << mx - cur << "\n";
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:15: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   51 |     cur = min(tmp, ds[i] + dt[i]);
      |               ^~~
      |               tm
Language: C++

#include <iostream>
#include <queue>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;

const ll INF = 100000000000000000;

template <typename T>
struct Edge
{
    int to;
    T cost;
};

template <typename T>
struct WeightedGraph
{
    int n;
    vector<vector<Edge<T>>> g;
    
    WeightedGraph(int n) : n(n){
        g.resize(n);
    }
    
    void init(int n_){
        n = n_;
        g.resize(n_);
    }
    
    void add_edge(int from, int to, T cost){
        g[from].push_back((Edge<T>){to, cost});
    }
};

template <typename T>
vector<T> Dijkstra(WeightedGraph<T> &g, int s){
    typedef pair<T, int> P;
    int n = g.n;
    vector<T> d(n);
    fill(d.begin(), d.end(), INF);
    priority_queue<P, vector<P>, greater<P>> que;
    d[s] = 0;
    que.push(P(0, s));
    while(que.size()){
        P nowp = que.top();
        que.pop();
        if(d[nowp.second] < nowp.first) continue;
        for(Edge<T> e : g.g[nowp.second]){
            if(d[e.to] > d[nowp.second] + e.cost){
                d[e.to] = d[nowp.second] + e.cost;
                que.push(P(d[e.to], e.to));
            }
        }
    }
    return d;
}

int main()
{
    int n, m, s, t;
    cin >> n >> m >> s >> t;
    s--; t--;
    WeightedGraph<ll> g(n), h(n);
    for(int i = 0; i < m; i++){
        int u, v;
        ll a, b;
        cin >> u >> v >> a >> b;
        u--; v--;
        g.add_edge(u, v, a);
        g.add_edge(v, u, a);
        h.add_edge(u, v, b);
        h.add_edge(v, u, b);
    }
    vector<ll> d = Dijkstra(g, s);
    vector<ll> e = Dijkstra(h, t);
    P p[100005];
    for(int i = 0; i < n; i++) p[i] = P(1000000000000000 - d[i] - e[i], i);
    sort(p, p + n, greater<P>());
    int j = 0;
    for(int i = 0; i < n; i++){
        while(p[j].second < i) j++;
        cout << p[j].first << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:79:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   79 |     sort(p, p + n, greater<P>());
      |     ^~~~
      |     short
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#define INFLL (1LL << 60)
#define INF (1 << 30)
using namespace std;
typedef long long ll;

template<class T> inline void chmin(T& a, T b) { if (a > b) a = b; }
template<class T> inline void chmax(T& a, T b) { if (a < b) a = b; }

namespace Dijkstra
{
	struct Edge {
		int to, weight;
		Edge(int t, int w) {
			to = t; weight = w;
		}
	};
	using Graph = vector<vector<Edge>>;
	using Vtx = pair<int, int>;
	vector<ll> dijkstra(int s, const Graph& graph) {
		const int N = graph.size();
		priority_queue<Vtx, vector<Vtx>, greater<Vtx>> pq;	//コスト、頂点
		pq.push(make_pair(0, s));
		vector<ll> cost(N, INFLL);
		cost[s] = 0;
		while (!pq.empty()) {
			auto t = pq.top(); pq.pop();
			int c = t.first;
			int v = t.second;
			if (c > cost[v]) continue;	//より低いコストがすでにあるとき、探索省略
			for (auto e : graph[v]) {
				int nc = cost[v] + e.weight;
				if (nc >= cost[e.to]) continue;	//探索済みよりコストが大きいなら、探索省略
				pq.push(make_pair(nc, e.to));
				cost[e.to] = nc;
			}
		}
		return cost;
	}
	void exec()
	{
		const ll have = 1000000000000000;
		int N, M, S, T; cin >> N >> M >> S >> T; --S; --T;
		Graph yen(N), snk(N);
		for (int i = 0; i < M; ++i) {
			int u, v, a, b; cin >> u >> v >> a >> b; --u, --v;
			yen[u].push_back(Edge(v, a));
			yen[v].push_back(Edge(u, a));
			snk[u].push_back(Edge(v, b));
			snk[v].push_back(Edge(u, b));
		}
		auto c1 = dijkstra(S, yen);
		auto c2 = dijkstra(T, snk);
		vector<ll> used(N);
		ll mu = INFLL;
		for (int year = N - 1; year >= 0; --year) {
			chmin(mu, c1[year] + c2[year]);
			used[year] = mu;
		}
		for (int year = 0; year < N; ++year) {
			cout << have - used[year] << endl;
		}

	}
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#define INFLL (1LL << 60)
#define INF (1 << 30)
using namespace std;
typedef long long ll;

namespace Dijkstra
{
	struct Edge {
		int to, weight;
		Edge(int t, int w) {
			to = t; weight = w;
		}
	};
	using Graph = vector<vector<Edge>>;
	vector<ll> dijkstra(int s, const Graph& graph) {
		const int N = graph.size();
		priority_queue<pair<int, int>> pq;	//コスト、頂点
		pq.push(make_pair(0, s));
		vector<ll> cost(N, INFLL);
		cost[s] = 0;
		while (!pq.empty()) {
			auto t = pq.top(); pq.pop();
			int c = t.first;
			int v = t.second;
			if (c > cost[v]) continue;
			for (auto e : graph[v]) {
				int nc = cost[v] + e.weight;
				if (nc >= cost[e.to]) continue;	//探索済み以上のコストのとき、探索省略
				pq.push(make_pair(nc, e.to));
				cost[e.to] = nc;
			}
		}
		return cost;
	}
	void exec()
	{
		const ll have = 1000000000000000;
		int N, M, S, T; cin >> N >> M >> S >> T; --S; --T;
		Graph yen(N), snk(N);
		for (int i = 0; i < M; ++i) {
			int u, v, a, b; cin >> u >> v >> a >> b; --u, --v;
			yen[u].push_back(Edge(v, a));
			yen[v].push_back(Edge(u, a));
			snk[u].push_back(Edge(v, b));
			snk[v].push_back(Edge(u, b));
		}
		auto c1 = dijkstra(S, yen);
		auto c2 = dijkstra(T, snk);
		for (int year = 0; year < N; ++year) {
			ll used = INFLL;
			for (int i = year; i < N; ++i) {
				ll r = c1[i] + c2[i];
				used = min(used, r);
			}
			cout << used << endl;
		}
	}
}


Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <queue>
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<=n;++i)
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if(a < b){ a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if(a > b){ a = b; return 1; } return 0; }
typedef long long ll;
template <typename X>
struct Edge{
  int from;
  int to;
  X cost;

  Edge() = default;

  Edge(int from, int to, X cost = 1) : from(from), to(to), cost(cost) {}
};

template <typename X>
class Graph{
private:
  int n;
  int m;
  vector<vector<Edge<X>>> edge;
  vector<vector<X>> d;
  X inf = 1e+17;
  
public:
  Graph(int n) : n(n) {
    edge.resize(n);
  }

  Graph(int n, int m, vector<int> a, vector<int> b, vector<X> c) : n(n), m(m){
    edge.resize(n);
    rep(i,m) {
      add_edge(a[i], b[i], c[i]);
      add_edge(b[i], a[i], c[i]);
    }
  }

  void add_edge(int from, int to, X cost = 1) {
    edge[from].emplace_back(from, to, cost);
  }

  void dijkstra(int s) {
    d.resize(n);
    d[s].resize(n ,inf);
    d[s][s] = 0;
    using pi = pair<int, X>;
    //auto compare = [](const pi& a, const pi& b) -> bool { return a.second < b.second; };
    priority_queue<pi, vector<pi>, Compare<X>> pq;
    pq.emplace(s, 0);
    while( !pq.empty() ) {
      pi p = pq.top(); pq.pop();
      int v = p.first; // 頂点
      X dist = p.second; // s->vの最短距離
      if(d[s][v] < p.second) continue;
      for(auto w: edge[v]) {
	if(chmin(d[s][w.to], d[s][v] + w.cost)) {
	  pq.emplace(w.to, d[s][w.to]);
	}
      }
    }
  }

  X get_d(int u, int v) { return d[u][v]; }
  X get_inf() { return inf; }
  
};

template <typename X>
class Compare {
using pi = pair<int, X>;
public:
bool operator()(const pi& a, const pi& b) {
return a.second < b.second;
};
};

int main()
{
  int n,m,s,t;cin >> n >> m >> s >> t;
  s--; t--;
  vector<int> u(m), v(m);
  vector<ll> a(m), b(m);
  rep(i,m) {
    cin >> u[i] >> v[i] >> a[i] >> b[i];
    u[i]--; v[i]--;
  }

  Graph<ll> gpen(n, m, u, v, a);
  Graph<ll> gpsn(n, m, u, v, b);

  gpen.dijkstra(s);
  gpsn.dijkstra(t);

  vector<ll> res(n);
  rep(i,n) {
    res[i] = gpen.get_d(s, i) + gpsn.get_d(t, i);
  }

  ll M = 1e+15;
  ll tmp = M;
  vector<ll> ans(n);
  for(int i = n - 1;i >= 0;--i) {
    tmp = min(tmp, res[i]);
    ans[i] = M - tmp;
  }

  rep(i,n) cout << ans[i] << "\n";
  
  
  return 0;
}


Compiler output:
a.cc: In member function 'void Graph<X>::dijkstra(int)':
a.cc:55:36: error: 'Compare' was not declared in this scope
   55 |     priority_queue<pi, vector<pi>, Compare<X>> pq;
      |                                    ^~~~~~~
a.cc:55:44: error: template argument 3 is invalid
   55 |     priority_queue<pi, vector<pi>, Compare<X>> pq;
      |                                            ^
a.cc:55:45: error: expected unqualified-id before '>' token
   55 |     priority_queue<pi, vector<pi>, Compare<X>> pq;
      |                                             ^~
a.cc:56:5: error: 'pq' was not declared in this scope; did you mean 'pi'?
   56 |     pq.emplace(s, 0);
      |     ^~
      |     pi
Language: C++

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

const ll INF = 987654321;

ll main() {
  ll n, m, s, t;
  cin >> n >> m >> s >> t;
  s--, t--;

  vector<vector<pair<ll, ll>>> costS(n), costY(n);
  vector<ll> toS(n), toY(n);

  for (ll i = 0; i < m; i++) {
    ll u, v, a, b;
    cin >> u >> v >> a >> b;
    u--, v--;
    costY[u].push_back(make_pair(a, v));
    costY[v].push_back(make_pair(a, u));
    costS[u].push_back(make_pair(b, v));
    costS[v].push_back(make_pair(b, u));
  }

  for (ll i = 0; i < n; i++) {
    toS[i] = toY[i] = INF;
  }

  priority_queue<pair<ll, ll>, vector<pair<ll, ll>>,
                 greater<pair<ll, ll>>>
      que;
  que.push(make_pair(0, s));
  toY[s] = 0;
  while (!que.empty()) {
    pair<ll, ll> tmp = que.top();
    que.pop();
    if (toY[tmp.second] < tmp.first) continue;
    for (ll i = 0; i < costY[tmp.second].size(); i++) {
      if (toY[costY[tmp.second][i].second] >
          tmp.first + costY[tmp.second][i].first) {
        toY[costY[tmp.second][i].second] =
            tmp.first + costY[tmp.second][i].first;
        que.push(make_pair(toY[costY[tmp.second][i].second],
                           costY[tmp.second][i].second));
      }
    }
  }

  que.push(make_pair(0, t));
  toS[t] = 0;
  while (!que.empty()) {
    pair<ll, ll> tmp = que.top();
    que.pop();
    if (toS[tmp.second] < tmp.first) continue;
    for (ll i = 0; i < costS[tmp.second].size(); i++) {
      if (toS[costS[tmp.second][i].second] >
          tmp.first + costS[tmp.second][i].first) {
        toS[costS[tmp.second][i].second] =
            tmp.first + costS[tmp.second][i].first;
        que.push(make_pair(toS[costS[tmp.second][i].second],
                           costS[tmp.second][i].second));
      }
    }
  }

  vector<ll> ans(n);
  for (ll i = 0; i < n; i++) {
    ans[i] = 1e15 - toY[i] - toS[i];
  }
  for (ll i = n - 2; i >= 0; i--) {
    ans[i] = max(ans[i + 1], ans[i]);
  }
  for (ll i = 0; i < n; i++) cout << ans[i] << endl;
}

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

#include<bits/stdc++.h>
#include<queue>
using namespace std;
vector<long long>di_s;
vector<long long>di_y;
int main () {
  int N, m, s, t;
  cin >> N >> m >> s >> t;
  vector<queue<int>>snu(N);
  vector<queue<int>>yen(N);
  vector<int>si(N, 0);
  vector<queue<long long>>cost_s(N);
  vector<queue<long long>>cost_y(N);
  for (int i = 0; i < m; i ++) {
    int u, v;
    long long a, b;
    cin >> u >> v >> a >> b;
    v --;
    u --;
    snu[u].push(v);
    snu[v].push(u);
    yen[u].push(v);
    yen[v].push(u);
    cost_s[u].push(b);
    cost_s[v].push(b);
    cost_y[u].push(b);
    cost_y[v].push(a);
    si[u] ++;
    si[v] ++;
  }
  auto c_s = [](int a, int b) { return di_s[a] > di_s[b];};
  auto c_y = [](int a, int b) { return di_y[a] > di_y[b];};
  di_s.assign(N, 1e16);
  di_y.assign(N, 1e16);
  di_y[s] = 0;
  di_s[t] = 0;
  priority_queue<int, vector<int>, decltype(c_s)>q_s(c_s);
  priority_queue<int, vector<int>, decltype(c_y)>q_y(c_y);
  for (int i = 0; i < n; i ++) {
    q_s.push(i);
    q_y.push(i);
  }
  while (!q_s.empty()) {
    int u = q_s.top();
    for (int i = 0; i < si[u]; i ++) {
      int v = snu[u].front();
      snu[u].pop();
      snu[u].push(v);
      long long c = cost_s[u].front();
      cost_s[u].pop();
      cost_s[u].push(c);
      if (di_s[v] > di_s[u] + c) di_s[v] = di_s[u] + c;
    }
    q_s.pop();
  }
  while (!q_y.empty()) {
    int u = q_y.top();
    for (int i = 0; i < si[u]; i ++) {
      int v = yen[u].front();
      yen[u].pop();
      yen[u].push(v);
      long long c = cost_s[u].front();
      cost_y[u].pop();
      cost_y[u].push(c);
      if (di_y[v] > di_y[u] + c) di_y[v] = di_y[u] + c;
    }
    q_y.pop();
  }
  long long ans[100003];
  ans[N] = 1e16;
  for (int i = N - 1; i >= 0; i --) {
    ans[i] = min(ans[i + 1], di_s[i] + di_y[i]);
  }
  for (int i = 0; i < N; i ++) {
    cout << 1e15 - ans[i] << endl;
  }
}

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

#include<bits/stdc++.h>
#include<queue>
using namespace std;
vector<long long>di_s;
vector<long long>di_y;
int main () {
  int N, m, s, t;
  cin >> N >> m >> s >> t;
  vector<queue<int>>snu(N);
  vector<queue<int>>yen(N);
  vector<int>si(N, 0);
  vector<queue<long long>>cost_s(N);
  vector<queue<long long>>cost_y(N);
  for (int i = 0; i < m; i ++) {
    int u, v;
    long long a, b;
    cin >> u >> v >> a >> b;
    v --;
    u --;
    snu[u].push(v);
    snu[v].push(u);
    yen[u].push(v);
    yen[v].push(u);
    cost_s[u].push(b);
    cost_s[v].push(b);
    cost_y[u].push(b);
    cost_y[v].push(a);
    si[u] ++;
    si[v] ++;
  }
  auto c_s = [](int a, int b) { return di_s[a] > di_s[b];};
  auto c_y = [](int a, int b) { return di_y[a] > di_y[b];};
  di_s.assign(N, 1e16);
  di_y.assign(N, 1e16);
  di_y[s] = 0;
  di_s[t] = 0;
  priority_queue<int, vector<int>, decltype(c_s)>q_s(c_s);
  priority_queue<int, vector<int>, decltype(c_y)>q_s(c_y);
  for (int i = 0; i < n; i ++) {
    q_s.push(i);
    q_y.push(i);
  }
  while (!q_s.empty()) {
    int u = q_s.top();
    for (int i = 0; i < si[u]; i ++) {
      int v = snu[u].front();
      snu[u].pop();
      snu[u].push(v);
      long long c = cost_s[u].front();
      cost_s[u].pop();
      cost_s[u].push(c);
      if (di_s[v] > di_s[u] + c) di_s[v] = di_s[u] + c;
    }
    q_s.pop();
  }
  while (!q_y.empty()) {
    int u = q_y.top();
    for (int i = 0; i < si[u]; i ++) {
      int v = yen[u].front();
      yen[u].pop();
      yen[u].push(v);
      long long c = cost_s[u].front();
      cost_y[u].pop();
      cost_y[u].push(c);
      if (di_y[v] > di_y[u] + c) di_y[v] = di_y[u] + c;
    }
    q_y.pop();
  }
  long long ans[100003];
  ans[N] = 1e16;
  for (int i = N - 1; i >= 0; i --) {
    ans[i] = min(ans[i + 1], di_s[i] + di_y[i]);
  }
  for (int i = 0; i < N; i ++) {
    cout << 1e15 - ans[i] << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:38:50: error: conflicting declaration 'std::priority_queue<int, std::vector<int>, main()::<lambda(int, int)> > q_s'
   38 |   priority_queue<int, vector<int>, decltype(c_y)>q_s(c_y);
      |                                                  ^~~
a.cc:37:50: note: previous declaration as 'std::priority_queue<int, std::vector<int>, main()::<lambda(int, int)> > q_s'
   37 |   priority_queue<int, vector<int>, decltype(c_s)>q_s(c_s);
      |                                                  ^~~
a.cc:39:23: error: 'n' was not declared in this scope
   39 |   for (int i = 0; i < n; i ++) {
      |                       ^
a.cc:41:5: error: 'q_y' was not declared in this scope; did you mean 'q_s'?
   41 |     q_y.push(i);
      |     ^~~
      |     q_s
a.cc:56:11: error: 'q_y' was not declared in this scope; did you mean 'q_s'?
   56 |   while (!q_y.empty()) {
      |           ^~~
      |           q_s
a.cc:76:4: error: expected '}' at end of input
   76 |   }
      |    ^
a.cc:6:13: note: to match this '{'
    6 | int main () {
      |             ^
Language: C++

//INCLUDE
//------------------------------------------
#include <bits/stdc++.h>
//DEFINE
//------------------------------------------
#define ll long long
#define ld long double
#define ALLv(a)  (a).begin(),(a).end()
#define ALL(a,n)  (a),(a)+n
#define vi vector<long long>
#define vd vector<long double>
#define vs vector<string>
#define dcml(n) fixed<<setprecision(n)
//CONST
//------------------------------------------
const ll INF=1010000000000000017LL;
const ll MOD=1000000007LL;
const ld EPS=1e-12;
const ld PI=3.14159265358979323846;
//REPEAT
//------------------------------------------
#define   FOR(i,m,n) for(ll (i)=(m);   (i)<(n);  (i)++)
#define  FORS(i,m,n) for(ll (i)=(m);   (i)<=(n); (i)++)
#define  RFOR(i,m,n) for(ll (i)=(n)-1; (i)>=(n); (i)--)
#define RFORS(i,m,n) for(ll (i)=(n);   (i)>(n);  (i)--)
#define   REP(i,n)   for(ll (i)=0;     (i)<(n);  (i)++)
#define  REPS(i,x)   for(ll (i)=1;     (i)<=(x); (i)++)
#define  RREP(i,x)   for(ll (i)=(x)-1; (i)>=0;   (i)--)
#define RREPS(i,x)   for(ll (i)=(x);   (i)> 0;   (i)--)
#define  WREP(i,in,j,jn) REP(i,in)REP(j,jn)
#define WREPS(i,in,j,jn) REPS(i,in)REPS(j,jn)
//-----------------------------------------
//namespace
using namespace std;
//ライブラリはここに
//↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
typedef pair<ll,ll> P;
struct Edge{ll to,yen,snuke;};
ll N; ll dy[101000],ds[101000];
vector<Edge> G[101000];

void dijkstra(ll u,ll d[],int k=0){
    REP(i,N)d[i]=INF;
    priority_queue<P,vector<P>,greater<P>> que;
    que.push({0,u});
    while(!que.empty()){
        auto r=que.top();que.pop();
        if(r.first>=d[r.second])continue;//更新不可
        d[r.second]=r.first;//更新

        for(Edge& e: G[r.second]){
            ll dist;
            if(k==1)dist=d[r.second]+e.snuke;
            else dist=d[r.second]+e.yen;
            if(dist>=d[e.to])continue;//更新不可
            que.push({dist,e.to});//更新
        }
    }
}
//-----------------------------------------
int main(void){
    ll N,M;cin>>N>>M;
    ll s,t;cin>>s>>t;
    REP(i,M){
        ll u,v,a,b;cin>>u>>v>>a>>b;
        u--;v--;
        G[u].push_back({v,a,b});
    }

    dijkstra(s,dy);
    dijkstra(t,ds,1);
    /*  s-> K -> t
        s->Kは円
        K->tはすぬーくを消費
        円+すぬーくが最小なら解
        */
    //i年後を考える　すべて使える---i番目が使えない
    ll ans[N+1];ans[N]=INF;//消費した金額
    //n-i年後はn-1しか使えない
    REP(i,N){
        ans[N-1-i]=min(ans[N-i],dy[N-1-i]+ds[N-1-i]);
    }
    REP(i,N)
    ll a=1e15-ans[i];
        cout<<a<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:85:15: error: 'a' was not declared in this scope
   85 |         cout<<a<<"\n";
      |               ^