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

#include<bits/stdc++.h>

int main(){
int r,g;  cin >> r >> g;
cout << g*2 - r << endl;
}

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

#include <stdio.h>  
#include <algorithm>  
#include <assert.h>
#include <bitset>
#include <cmath>  
#include <complex>  
#include <deque>  
#include <functional>  
#include <iostream>  
#include <limits.h>  
#include <map>  
#include <math.h>  
#include <queue>  
#include <set>  
#include <stdlib.h>  
#include <string.h>  
#include <string>  
#include <time.h>  
#include <unordered_map>  
#include <unordered_set>  
#include <vector>
 
#pragma warning(disable:4996)  
#pragma comment(linker, "/STACK:336777216")  
using namespace std;
 
#define pb(x) push_back(x)  
#define rep(n) for(int i=0;i<n;i++)  
#define all(x) (x).begin(), (x).end()  
#define len(p) (sizeof(p)/sizeof(*p))
#define debug(x) cerr << #x << ": " << x << '\n'; 
#define int long long
 
typedef tuple<int, int, int> t3;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
typedef pair <ll, int> pli;
typedef pair <db, db> pdd;
template <class T> void print(T x){ cout << x << '\n'; }
template <class T> void print(T *x, size_t l){ rep(l){cout << *(x+i) << ' ';} cout << '\n'; }
template<typename T1, typename T2> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {return s << "(" << p.first << ", " << p.second << ")";}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& v) { int len = v.size(); for (int i = 0; i < len; ++i) { s << v[i]; if (i < len - 1) s << " "; } return s; }
 
signed main(void){
    float r, g;
    cin >> r >> g;
    cout << 2*g - r << enld;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:24: error: 'enld' was not declared in this scope
   51 |     cout << 2*g - r << enld;
      |                        ^~~~
Language: C++

#include <iostream>
using namespace std;
int main()
{
int n,k;
cin>>n>>k;
in sum=1;
for(int i=1;i<=n;i++)
{
if(sum*2<(sum+k))
sum*=2;
else
sum+=k;
}
cout<<sum;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:1: error: 'in' was not declared in this scope; did you mean 'n'?
    7 | in sum=1;
      | ^~
      | n
a.cc:10:4: error: 'sum' was not declared in this scope
   10 | if(sum*2<(sum+k))
      |    ^~~
a.cc:15:7: error: 'sum' was not declared in this scope
   15 | cout<<sum;
      |       ^~~
Language: C++

#import <iostream>
using namespace std;
void main()
{
int r,g;
cin>>r>>g;
int req=0;
req=g*2-r;
cout<<req;
}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import <iostream>
      |  ^~~~~~
a.cc:3:1: error: '::main' must return 'int'
    3 | void main()
      | ^~~~
Language: C

#include <stdio.h>
int main(){
int x = 1;
int k,n;
scanf(“%d”,&n);
scanf(“%d”,&k);
for(int i = 0; i < n; i++){
if(x < k){
x = 2*x;
}else{
x += k;
}
}
printf(“%d\n”,x);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:7: error: stray '\342' in program
    5 | scanf(<U+201C>%d<U+201D>,&n);
      |       ^~~~~~~~
main.c:5:8: error: expected expression before '%' token
    5 | scanf(“%d”,&n);
      |        ^
main.c:5:10: error: stray '\342' in program
    5 | scanf(<U+201C>%d<U+201D>,&n);
      |                 ^~~~~~~~
main.c:6:7: error: stray '\342' in program
    6 | scanf(<U+201C>%d<U+201D>,&k);
      |       ^~~~~~~~
main.c:6:8: error: expected expression before '%' token
    6 | scanf(“%d”,&k);
      |        ^
main.c:6:10: error: stray '\342' in program
    6 | scanf(<U+201C>%d<U+201D>,&k);
      |                 ^~~~~~~~
main.c:14:8: error: stray '\342' in program
   14 | printf(<U+201C>%d\n<U+201D>,x);
      |        ^~~~~~~~
main.c:14:9: error: expected expression before '%' token
   14 | printf(“%d\n”,x);
      |         ^
main.c:14:11: error: stray '\' in program
   14 | printf(“%d\n”,x);
      |           ^
main.c:14:13: error: stray '\342' in program
   14 | printf(<U+201C>%d\n<U+201D>,x);
      |                    ^~~~~~~~
Language: C

#include <stdio.h>
int main(){
int x = 1;
int k,n;
scanf(“%d”,$n);
scanf(“%d”,$k);
for(int i = 0; i < n; i++){
if(x < k){
x = 2*x;
}else{
x += k;
}
}
printf(“%d”,x);
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:7: error: stray '\342' in program
    5 | scanf(<U+201C>%d<U+201D>,$n);
      |       ^~~~~~~~
main.c:5:8: error: expected expression before '%' token
    5 | scanf(“%d”,$n);
      |        ^
main.c:5:10: error: stray '\342' in program
    5 | scanf(<U+201C>%d<U+201D>,$n);
      |                 ^~~~~~~~
main.c:6:7: error: stray '\342' in program
    6 | scanf(<U+201C>%d<U+201D>,$k);
      |       ^~~~~~~~
main.c:6:8: error: expected expression before '%' token
    6 | scanf(“%d”,$k);
      |        ^
main.c:6:10: error: stray '\342' in program
    6 | scanf(<U+201C>%d<U+201D>,$k);
      |                 ^~~~~~~~
main.c:14:8: error: stray '\342' in program
   14 | printf(<U+201C>%d<U+201D>,x);
      |        ^~~~~~~~
main.c:14:9: error: expected expression before '%' token
   14 | printf(“%d”,x);
      |         ^
main.c:14:11: error: stray '\342' in program
   14 | printf(<U+201C>%d<U+201D>,x);
      |                  ^~~~~~~~
Language: C++

#include <stdio.h>
int main(){
int r,g;
scanf(“%d”,r);
scanf(“%d”,g);
int n = 2*g - r;
printf(“%d”,n);
}

Compiler output:
a.cc:4:7: error: extended character “ is not valid in an identifier
    4 | scanf(“%d”,r);
      |       ^
a.cc:4:9: error: extended character ” is not valid in an identifier
    4 | scanf(“%d”,r);
      |         ^
a.cc:5:7: error: extended character “ is not valid in an identifier
    5 | scanf(“%d”,g);
      |       ^
a.cc:5:9: error: extended character ” is not valid in an identifier
    5 | scanf(“%d”,g);
      |         ^
a.cc:7:8: error: extended character “ is not valid in an identifier
    7 | printf(“%d”,n);
      |        ^
a.cc:7:10: error: extended character ” is not valid in an identifier
    7 | printf(“%d”,n);
      |          ^
a.cc: In function 'int main()':
a.cc:4:7: error: '\U0000201c' was not declared in this scope
    4 | scanf(“%d”,r);
      |       ^
a.cc:4:9: error: 'd\U0000201d' was not declared in this scope
    4 | scanf(“%d”,r);
      |         ^~
Language: Java

import java.util.*;

public class Demo14 {
	public static void main(String[] args) {
	
				Scanner sc = new Scanner(System.in);
				// 整数の入力
				int a = sc.nextInt();
				// スペース区切りの整数の入力
				int b = sc.nextInt();
				
				
				int c = 2*b -a;
				// 出力
				System.out.println(c);
	
	}
}


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

public class Main{
	public static void main(String[] args) {
	
				Scanner sc = new Scanner(System.in);
				// 整数の入力
				int a = sc.nextInt();
				// スペース区切りの整数の入力
				int b = sc.nextInt();
				
				
				int c = 2*b -a;
				// 出力
				System.out.println(c);
	
	}
}

Compiler output:
Main.java:4: error: cannot find symbol
				Scanner sc = new Scanner(System.in);
				^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
				Scanner sc = new Scanner(System.in);
				                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

//ABC076-1
#include<stdio.h>
int main()
{
	int r, g;
	scanf("%d %d”, &r, &g);
	printf("%d\n", r+(g-r)*2);
	return 0;
}


Compiler output:
a.cc:6:15: warning: missing terminating " character
    6 |         scanf("%d %d”, &r, &g);
      |               ^
a.cc:6:15: error: missing terminating " character
    6 |         scanf("%d %d”, &r, &g);
      |               ^~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:34: error: expected ')' before ';' token
    7 |         printf("%d\n", r+(g-r)*2);
      |                                  ^
      |                                  )
a.cc:6:14: note: to match this '('
    6 |         scanf("%d %d”, &r, &g);
      |              ^
Language: Java

 public class Main {
import java.util.Scanner;
  public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);

    float R = stdIn.nextFloat();
    float G = stdIn.nextFloat();

    float answer = 2 * G - R;

    System.out.println(answer);

  }

}


Compiler output:
Main.java:2: error: illegal start of type
import java.util.Scanner;
^
Main.java:2: error: <identifier> expected
import java.util.Scanner;
                        ^
2 errors
Language: Java

 import java.util.Scanner;
public class Rating {

  public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);

    float R = stdIn.nextFloat();
    float G = stdIn.nextFloat();

    float answer = 2 * G - R;

    System.out.println(answer);

  }

}


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

public class Rating {
  import java.util.Scanner;

  public static void main(String[] args){
    Scanner stdIn = new Scanner(System.in);

    float R = stdIn.nextFloat();
    float G = stdIn.nextFloat();

    float answer = 2 * G - R;

    System.out.println(answer);

  }

}


Compiler output:
Main.java:2: error: illegal start of type
  import java.util.Scanner;
  ^
Main.java:2: error: <identifier> expected
  import java.util.Scanner;
                          ^
2 errors
Language: C

#include <stdio.h>

int main() {
	int a, b, c;
	scanf_s("%d", &a);
	scanf_s("%d", &b);

	c = (2*b) - a;

	printf("%d", c);

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d", &a);
      |         ^~~~~~~
      |         scanf
Language: C++

#include <stdio.h>

int main() {
	int a, b, c;
	scanf_s("%d", &a);
	scanf_s("%d", &b);

	c = (2*b) - a;

	printf("%d", c);

	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    5 |         scanf_s("%d", &a);
      |         ^~~~~~~
      |         scanf
Language: Java

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      int first = scan.nextInt();
      int heikin = scan.nextInt();
      int plus = heikin-first;
      System.out.println((heikin+plus));
  }

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

import java.util.Scanner;

public class Main{
  public static void main(String[] args){
      Scanner scan = new Scanner(System.in);
      int first = scan.nextInt();
      int heikin = scan.nextInt();
      int plus = heikin-first;
      System.out.println((heikin+plus));
  }

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

#include<stdio.h>

int main(){
    int R, G;
    double ans
    scanf("%d", &R);
    scanf("%d", &G);
    ans = (G - R) * 2 + R;
    printf("%f.1", ans);

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'scanf'
    6 |     scanf("%d", &R);
      |     ^~~~~
main.c:8:5: error: 'ans' undeclared (first use in this function)
    8 |     ans = (G - R) * 2 + R;
      |     ^~~
main.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

using System;
public class Hello{
    public static void Main(){
        int a = int.Parse(Console.ReadLine());
        int b = int.Parse(Console.ReadLine());
        int ans = b*2 - a;
        Console.WriteLine(ans);
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:1: error: expected unqualified-id before 'public'
    2 | public class Hello{
      | ^~~~~~
Language: C++

int main() {
    int a, G;
    cin >> a >> G;
    cout << 2 * G - a << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'cin' was not declared in this scope
    3 |     cin >> a >> G;
      |     ^~~
a.cc:4:5: error: 'cout' was not declared in this scope
    4 |     cout << 2 * G - a << endl;
      |     ^~~~
a.cc:4:26: error: 'endl' was not declared in this scope
    4 |     cout << 2 * G - a << endl;
      |                          ^~~~
Language: C++

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

const int MAX_N=131072;

int n;
int dat[MAX_N*2-1];

void init(){
	for(int i=0;i<2*n-1;i++)dat[i]=INT_MAX;
}

void update(int i,int x){
	i+=n-1;
	dat[i]=x;
	while(i>0){
		i=(i-1)/2;
		dat[i]=min(dat[i*2+1],dat[i*2+2]);
	}
}

int query(int a,int b,int k,int l,int r){
	if(r<=a||b<=l)return INT_MAX;
	if(a<=l&&r<=b) return dat[k];
	else{
		int vl=query(a,b,k*2+1,l,(l+r)/2);
		int vr=query(a,b,k*2+2,(l+r)/2,r);
	}
}


Compiler output:
a.cc: In function 'int query(int, int, int, int, int)':
a.cc:27:29: warning: control reaches end of non-void function [-Wreturn-type]
   27 |                 int vr=query(a,b,k*2+2,(l+r)/2,r);
      |                        ~~~~~^~~~~~~~~~~~~~~~~~~~~
/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: Java

import java.util.*;
class Main{

int n;
int t[102];
int v[101];
int a[20100];
int b[20100];
int s;
double ans;
 
public static void  main(String args[]){
Scanner in = new Scanner (System.in);	
n = Integer.parseInt(in.next());
	for(int i=1; i<=n; ++i){
		t[i]=Integer.parseInt(in.next());
		s += t[i];
		t[i] += t[i-1];
	}
	++t[n+1];
	t[n+1] += t[n];
//	for(int i=0; i<=n+1; ++i) printf("%d\t", t[i]);
//	printf("\n");
	for(int i=1; i<=n; ++i){
		v[i]=Integer.parseInt(in.next());
		for(int j=t[i-1]; j<t[i]; ++j) b[j] = v[i];
	}
	for(int i=0; i<=s; ++i) a[i] = Math.min(i, s-i);
//	for(int i=0; i<=s; ++i) printf("%d\t", a[i]);
//	printf("\n");
	for(int i=1; i<=n; ++i){
		for(int j=t[i-1]; j<=t[i]; ++j) a[j] = Math.min(a[j], v[i]);
		for(int j=t[i-1]; j>=0; --j) a[j] = Math.min(a[j], v[i]+t[i-1]-j);
		for(int j=t[i]; j<=s; ++j) a[j] = Math.min(a[j], v[i]+j-t[i]);
	}
//	for(int i=0; i<=s; ++i) printf("%d\t", a[i]);
//	printf("\n");
	for(int i=1; i<s; ++i) ans += (float)a[i];
	for(int i=1; i+3<s; ++i){
		if(a[i]+1==a[i+1] && a[i+1]==a[i+2] && a[i+2]-1==a[i+3] && b[i+1]>a[i+1] && b[i+2]>a[i+2])
			ans += 0.25;
	}
	Sytem.out.println(ans);
//	for(int i=1; i<s; ++i) printf("%d %d\n", a[i], b[i]);
}}

Compiler output:
Main.java:5: error: ']' expected
int t[102];
      ^
Main.java:6: error: ']' expected
int v[101];
      ^
Main.java:7: error: ']' expected
int a[20100];
      ^
Main.java:8: error: ']' expected
int b[20100];
      ^
4 errors
Language: C++

//#include <bits/stdc++.h>
#include "stdafx.h"

#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include <queue>
#include <functional>
#include <sys/timeb.h>
#include <fstream>

using namespace std;

#define repr(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repr(i,0,n)
#define reprrev(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--)
#define reprev(i,n) reprrev(i,0,n)
#define repi(itr,ds) for(auto itr=ds.begin();itr!=ds.end();itr++)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define mp make_pair
#define mt make_tuple
#define INF 1050000000
#define INFL 1100000000000000000LL
#define EPS (1e-10)
#define MOD 1000000007
#define PI 3.1415926536
#define RMAX 4294967295

typedef long long ll;
typedef pair<int, int> Pi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<Pi> vPi;
typedef vector<vector<int> > vvi;
typedef vector<vector<bool> > vvb;
typedef vector<vector<ll> > vvll;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<double> > vvd;
typedef vector<vector<Pi> > vvPi;
typedef priority_queue<int, vector<int>, greater<int> > pqli;
typedef priority_queue<ll, vector<ll>, greater<ll> > pqlll;
typedef priority_queue<Pi, vector<Pi>, greater<Pi> > pqlP;
struct Edge {
	int from, to, cost;
	bool operator<(Edge e) {
		return cost < e.cost;
	}
};
typedef vector<Edge> Edges;
typedef vector<Edges> Graph;
template <class T>
using vec = vector<T>;
template<class T>
using pql = priority_queue<T, vector<T>, greater<T>>;
string debug_show(Pi a) {
	return "(" + to_string(a.first) + "," + to_string(a.second) + ")";
}

template<class T>
struct augEdge {
	T from, to;
	int cost;
	bool operator<(augEdge e) { return cost < e.cost; }
	bool operator>(augEdge e) { return cost > e.cost; }
};
template<class T>
using augGraph = vector<augEdge<T>>;



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

	int r, g;
	cin >> r >> g;
	int ans = g * 2 - r;
	cout << ans << endl;
	
	return 0;
}




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

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

R = int(input())
G = int(input())

print(2 * G - R)


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #!/usr/bin/env python3
      |  ^
a.cc:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding: utf-8 -*-
      |   ^
a.cc:4:1: error: 'R' does not name a type
    4 | R = int(input())
      | ^
Language: C

#include<stdio.h>

int main(void)
{
  int R,G;

  scanf("%d",&R);
  scanf("%d",&G);
  printf("%d"G*2 - R);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:14: error: expected ')' before 'G'
    9 |   printf("%d"G*2 - R);
      |         ~    ^
      |              )
Language: C++

#include <iostream>
using namespace std;

int main{

int R,G;
cin>>R>>G;
cout<<2*G-R<<endl;

return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:6:1: error: expected primary-expression before 'int'
    6 | int R,G;
      | ^~~
a.cc:6:1: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:7:1: error: 'cin' does not name a type
    7 | cin>>R>>G;
      | ^~~
a.cc:8:1: error: 'cout' does not name a type
    8 | cout<<2*G-R<<endl;
      | ^~~~
a.cc:10:1: error: expected unqualified-id before 'return'
   10 | return 0;
      | ^~~~~~
a.cc:11:1: error: expected declaration before '}' token
   11 | }
      | ^
Language: C++

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

namespace A_RatingGoal
{
    class Program
    {
        static void Main(string[] args)
        {
            int intR = int.Parse(Console.ReadLine());

            int intG = int.Parse(Console.ReadLine());

            int intX = 2 * intG - intR;

            Console.WriteLine(intX);

        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:10:26: error: 'string' has not been declared
   10 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:10:35: error: expected ',' or '...' before 'args'
   10 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:21:6: error: expected ';' after class definition
   21 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void A_RatingGoal::Program::Main(int*)':
a.cc:12:24: error: expected primary-expression before 'int'
   12 |             int intR = int.Parse(Console.ReadLine());
      |                        ^~~
a.cc:14:24: error: expected primary-expression before 'int'
   14 |             int intG = int.Parse(Console.ReadLine());
      |                        ^~~
a.cc:18:13: error: 'Console' was not declared in this scope
   18 |             Console.WriteLine(intX);
      |             ^~~~~~~
Language: Java

import java.util.Scanner;

public class ABC076A_RatingGoal {
	int r, g;

	public static void main(String[] args) {
		ABC076A_RatingGoal a = new ABC076A_RatingGoal();
		a.read();
		a.solve();
	}

	public void read() {
		Scanner sc = new Scanner(System.in);
		r = sc.nextInt();
		g = sc.nextInt();
	}

	public void solve() {
		int target = 0;
		target = 2*g - r;
		System.out.println(target);
	}
}


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

#include <iostream>
#define in std::cin
#define out std::cout
#define rep(i,N) for(int i=0;i<N;++i)
typedef long long int LL;
 
int N;
long double t[112], v[112];
long double sp, ans;
 
int main()
{
	in >> N;
	rep(i, N) { in >> t[i]; }
	rep(i, N) { in >> v[i]; }
 
	rep(i, N)
	{
		if (v[i] <= v[i + 1])
		{
			long double plus;
			auto sp_ = sp;
			if (v[i] - sp <= t[i])
			{
				plus = v[i] - sp;
				sp = v[i];
				ans += sp*(t[i] - plus);
			}
			else
			{
				sp += t[i];
				plus = t[i];
			}
			ans += sp_*plus + plus*plus / 2;
		}
		else
		{
			long double plus, minu;
			if (sp <= v[i + 1])
			{
				auto dis = t[i] - (v[i + 1] - sp);
				if ((v[i] - sp) + (v[i] - v[i + 1]) <= t[i])
				{
					ans += v[i] * ((t[i]) - ((v[i] - sp) + (v[i] - v[i + 1])));
					dis -= (t[i]) - ((v[i] - sp) + (v[i] - v[i + 1]));
				}
				plus = dis / 2 + (v[i + 1] - sp);
				minu = dis / 2;
				ans += sp*plus + plus*plus / 2 + v[i + 1] * minu + minu*minu / 2;
			}
			else
			{
				auto dis = t[i] - (sp - v[i + 1]);
				if ((v[i] - sp) + (v[i] - v[i + 1]) <= t[i])
				{
					ans += v[i] * ((t[i]) - ((v[i] - sp) + (v[i] - v[i + 1])));
					dis -= (t[i]) - ((v[i] - sp) + (v[i] - v[i + 1]));
				}
				plus = dis / 2;
				minu = dis / 2 + (sp - v[i + 1]);
				ans += sp*plus + plus*plus / 2 + v[i + 1] * minu + minu*minu / 2;
			}
			sp = v[i + 1];
		}
	}
 
	out << std::fixed << std::setprecision(15);
	out << ans << std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:67:35: error: 'setprecision' is not a member of 'std'
   67 |         out << std::fixed << std::setprecision(15);
      |                                   ^~~~~~~~~~~~
a.cc:2:1: note: 'std::setprecision' is defined in header '<iomanip>'; this is probably fixable by adding '#include <iomanip>'
    1 | #include <iostream>
  +++ |+#include <iomanip>
    2 | #define in std::cin
Language: C++

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

int main()
{
	itn r,g;
	cin>>r>>g;
	int diff=g-r;
	int ans=g+diff;
	cout<<ans<<"\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: 'itn' was not declared in this scope; did you mean 'int'?
    6 |         itn r,g;
      |         ^~~
      |         int
a.cc:7:14: error: 'r' was not declared in this scope
    7 |         cin>>r>>g;
      |              ^
a.cc:7:17: error: 'g' was not declared in this scope
    7 |         cin>>r>>g;
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 int main()
 {
 	int a,b;
 	cin>>a>>>b;
 	cout<<2*a-b;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected primary-expression before '>' token
    6 |         cin>>a>>>b;
      |                 ^
Language: C

#include 
int main(){
      int R,G;
      
      scanf("%d %d",&R,&G);
 
      printf("%d", 2*G-R);
      
       return 0;
}

Compiler output:
main.c:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include
      |          ^
main.c: In function 'main':
main.c:5:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |       scanf("%d %d",&R,&G);
      |       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #include
main.c:5:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |       scanf("%d %d",&R,&G);
      |       ^~~~~
main.c:5:7: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:7:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |       printf("%d", 2*G-R);
      |       ^~~~~~
main.c:7:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:7: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int r,g;
int main(){
    cin>>r>>g;
cout<<2g-r<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: unable to find numeric literal operator 'operator""g'
    7 | cout<<2g-r<<endl;
      |       ^~
Language: C++

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

int r,g;
int main(){
    cin>>r>>g;
cout<<2g-x<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: unable to find numeric literal operator 'operator""g'
    7 | cout<<2g-x<<endl;
      |       ^~
a.cc:7:10: error: 'x' was not declared in this scope
    7 | cout<<2g-x<<endl;
      |          ^
Language: Java

import java.util.Scanner;

public class Main{
  static Scanner s=new Scanner(System.in);
  static int gInt(){return Integer.parseInt(s.next());}

  public static void main(String[] $){
     String a=s.next().replaceAll("\\?","."),b=s.next();
     for(int i=a.length()-b.length();i>=0;--i) {
        String regex=a.substring(i,i+b.length());
        if(b.matches(regex)) {
           //System.out.println(regex);
           System.out.println(a.replaceFirst(a.substring(0,i)+regex,a.substring(0,i)+b).replaceAll("\\.","a"));
           return;
        }
     }
     System.out.println("UNRESTORABLE");
  }  public static void main(String[] $){
     String a=s.next().replaceAll("\\?","."),b=s.next();
     for(int i=a.length()-b.length();i>=0;--i) {
        String regex=a.substring(i,i+b.length());
        if(b.matches(regex)) {
           //System.out.println(regex);
           System.out.println(a.replaceFirst(a.substring(0,i)+regex,a.substring(0,i)+b).replaceAll("\\.","a"));
           return;
        }
     }
     System.out.println("UNRESTORABLE");
  }
}

Compiler output:
Main.java:18: error: method main(String[]) is already defined in class Main
  }  public static void main(String[] $){
                        ^
1 error
Language: C

#include<stdio.h>
int main()
{
	float a,b,ans;
	scanf("%d%d", &a, &b);
	ans = 2 * b - a;
	pritnf("%d", ans);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    7 |         pritnf("%d", ans);
      |         ^~~~~~
      |         printf
Language: C++

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctime)
int R>=0,G<=4500

int main()
{
    int R,G;
    float sum;
	printf("Input R:");
	printf("Input G;");
	sum=2*G-R;
    printf("%d\n",sum);
}

Compiler output:
a.cc:12:17: error: missing terminating > character
   12 | #include <ctime)
      |                 ^
a.cc:12:10: fatal error: ctime): No such file or directory
   12 | #include <ctime)
      |          ^
compilation terminated.
Language: C++

#include <stdio.h>

int mian()
{
	int R,G;&&R>=0,G<=4500;
	float sum;
	printf("R
	G");
	sum=2*G-R;
	printf("%d",sum);
}


Compiler output:
a.cc:7:16: warning: missing terminating " character
    7 |         printf("R
      |                ^
a.cc:7:16: error: missing terminating " character
    7 |         printf("R
      |                ^~
a.cc:8:10: warning: missing terminating " character
    8 |         G");
      |          ^
a.cc:8:10: error: missing terminating " character
    8 |         G");
      |          ^~~
a.cc: In function 'int mian()':
a.cc:5:20: error: ordered comparison of pointer with integer zero ('void*' and 'int')
    5 |         int R,G;&&R>=0,G<=4500;
      |                 ~~~^~~
a.cc:8:10: error: expected ')' before 'sum'
    8 |         G");
      |          ^
      |          )
    9 |         sum=2*G-R;
      |         ~~~
a.cc:7:15: note: to match this '('
    7 |         printf("R
      |               ^
a.cc:5:19: error: label 'R' used but not defined
    5 |         int R,G;&&R>=0,G<=4500;
      |                   ^
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
Language: C++

#include <stdio.h>

mian()
{
	int R,G,sum;
	printf("R");
	printf("G");
	sum=2*G-R;
	printf("%d",sum);
}


Compiler output:
a.cc:3:1: error: ISO C++ forbids declaration of 'mian' with no type [-fpermissive]
    3 | mian()
      | ^~~~
a.cc: In function 'int mian()':
a.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type]
   10 | }
      | ^
Language: C++

#include <stdio.h>

mian()
{
	int R,G;
	float sum;
	printf("R");
	printf("G");
	sum=2*G-R;
	printf("%d",sum);
}


Compiler output:
a.cc:3:1: error: ISO C++ forbids declaration of 'mian' with no type [-fpermissive]
    3 | mian()
      | ^~~~
a.cc: In function 'int mian()':
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
Language: C++

#include<iostream>
#include<cstdio>
#include<string.h>
using namespace std;
int main()
{
char S[50],T[50];
 int i,j,p,q;
 int flag=0;
 gets(S);
 p=strlen(S);
 cin.get();
 gets(T);
 q=strlen(T);
 for(i=0;i<=p-q;i++)
{
 if(S[i]==T[0])
 if(p-i+1>=q)
 for(j=i+1;j<i+q;j++)
  if(S[j]!='?')break;
  if(j==i+q)
   {
   flag=1;
    for(j=i+1;j<i+q;j++)
    S[j]=T[j-i];
   }
   }
   for(i=0;i<p;i++)
   if(S[i]=='?')S[i]='A';
   if(flag)puts(S);
   else cout<<"UNRESTORABLE";
   return 0;
}

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

#include <stdio.h>

mian()
{
	int R,G;
	printf("R");
	printf("G");
	sum=2*G-R;
	printf("%d",sum);
}


Compiler output:
a.cc:3:1: error: ISO C++ forbids declaration of 'mian' with no type [-fpermissive]
    3 | mian()
      | ^~~~
a.cc: In function 'int mian()':
a.cc:8:9: error: 'sum' was not declared in this scope
    8 |         sum=2*G-R;
      |         ^~~
a.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type]
   10 | }
      | ^
Language: C++

#include <stdio.h>

mian()
{
	int R,G;
	R>=0,G<=4500;
	printf("R");
	printf("G");
	sum=2*G-R;
	printf("%d",sum);
}


Compiler output:
a.cc:3:1: error: ISO C++ forbids declaration of 'mian' with no type [-fpermissive]
    3 | mian()
      | ^~~~
a.cc: In function 'int mian()':
a.cc:9:9: error: 'sum' was not declared in this scope
    9 |         sum=2*G-R;
      |         ^~~
a.cc:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
Language: C++

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctime>

main()
{
	int R,G;
	printf("Input R:");
	printf("Input G:");
	sum=2*G-R;
	printf("%f\n",sum);
}

Compiler output:
a.cc:14:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   14 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:19:9: error: 'sum' was not declared in this scope
   19 |         sum=2*G-R;
      |         ^~~
Language: C

#include<cstdio>
#include<cstdiob>
#include<cmath>

int main()
{
	scanf("%a %b",&a,&b);
	c=b*2-a;
    printf("%d\n",c);
rutern 0;
}


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

#include<cstdio>
#include<cstdiob>
#include<cmath>
int R,G;
int main()
{
	printf(" please Input two numbers\n");
	scanf("%a %b",&a,&b);
	c=b*2-a;
    printf("Output c:%d\n",c);
}


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

#include<stdio>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
	int G,R;
	while(~scanf("%d%d",&R,&G));
	{
	printf("%d\n",2*G-R);
	}
}

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

#include<stdio>
#include<cmath>
#include<cstring>
#include<algorithm>
using namespace std;
int main()
{
	int G,R;
	while(~scanf("%d%d",&R,&G));
	{
	printf("%d\n",2*G-R);
	}
	return 0;
}

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

#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<string>
#include<iostream>

use namespace std;

int main（）
{
	int r,g,a;
	printf("r\n");
	scanf("%d",r);
	printf("g\n");
	scanf("%d",g);
	a=2*g-r;
	printf("%d\n",a);
}


Compiler output:
a.cc:8:1: error: 'use' does not name a type
    8 | use namespace std;
      | ^~~
a.cc:12:9: error: expected primary-expression before 'int'
   12 |         int r,g,a;
      |         ^~~
a.cc:12:9: error: expected '}' before 'int'
a.cc:11:1: note: to match this '{'
   11 | {
      | ^
a.cc:13:15: error: expected constructor, destructor, or type conversion before '(' token
   13 |         printf("r\n");
      |               ^
a.cc:14:14: error: expected constructor, destructor, or type conversion before '(' token
   14 |         scanf("%d",r);
      |              ^
a.cc:15:15: error: expected constructor, destructor, or type conversion before '(' token
   15 |         printf("g\n");
      |               ^
a.cc:16:14: error: expected constructor, destructor, or type conversion before '(' token
   16 |         scanf("%d",g);
      |              ^
a.cc:17:9: error: 'a' does not name a type
   17 |         a=2*g-r;
      |         ^
a.cc:18:15: error: expected constructor, destructor, or type conversion before '(' token
   18 |         printf("%d\n",a);
      |               ^
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<string>

use namespace std;

int main（）
{
	int r,g,a;
	printf("r\n");
	scanf("%d",r);
	printf("%d",g);
	scanf("%d",g);
	a=2*g-r;
	printf("%d",a);
}
     



Compiler output:
a.cc:7:1: error: 'use' does not name a type
    7 | use namespace std;
      | ^~~
a.cc:11:9: error: expected primary-expression before 'int'
   11 |         int r,g,a;
      |         ^~~
a.cc:11:9: error: expected '}' before 'int'
a.cc:10:1: note: to match this '{'
   10 | {
      | ^
a.cc:12:15: error: expected constructor, destructor, or type conversion before '(' token
   12 |         printf("r\n");
      |               ^
a.cc:13:14: error: expected constructor, destructor, or type conversion before '(' token
   13 |         scanf("%d",r);
      |              ^
a.cc:14:15: error: expected constructor, destructor, or type conversion before '(' token
   14 |         printf("%d",g);
      |               ^
a.cc:15:14: error: expected constructor, destructor, or type conversion before '(' token
   15 |         scanf("%d",g);
      |              ^
a.cc:16:9: error: 'a' does not name a type
   16 |         a=2*g-r;
      |         ^
a.cc:17:15: error: expected constructor, destructor, or type conversion before '(' token
   17 |         printf("%d",a);
      |               ^
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>

using namespace std;
int main()
{
	int a, b, c;
	
    while(scanf("%f%f%f", &a, &b, &c)
    	c = 2*b - a)
	printf("%f\n",c);

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:38: error: expected ')' before 'c'
   11 |     while(scanf("%f%f%f", &a, &b, &c)
      |          ~                           ^
      |                                      )
   12 |         c = 2*b - a)
      |         ~                             
a.cc:12:20: error: expected ';' before ')' token
   12 |         c = 2*b - a)
      |                    ^
      |                    ;
Language: C++

#include <cstdio>

int main(){
	
	scanf("%d %d" ,&R,&G);
	
	int g = G*2
	int a = 0;
	
	if(g==0){
		a = R*-1;
	}else{
		a= g-R;
	}
	
	scanf("%d",a);
	
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:25: error: 'R' was not declared in this scope
    5 |         scanf("%d %d" ,&R,&G);
      |                         ^
a.cc:5:28: error: 'G' was not declared in this scope
    5 |         scanf("%d %d" ,&R,&G);
      |                            ^
a.cc:11:17: error: 'a' was not declared in this scope
   11 |                 a = R*-1;
      |                 ^
a.cc:13:17: error: 'a' was not declared in this scope
   13 |                 a= g-R;
      |                 ^
a.cc:16:20: error: 'a' was not declared in this scope
   16 |         scanf("%d",a);
      |                    ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int t[n]; int v[n];
for(int i = 0; i<n ;i++)cin>>t[i];
for(int i = 0; i<n ;i++)cin>>v[i];


Compiler output:
a.cc: In function 'int main()':
a.cc:8:35: error: expected '}' at end of input
    8 | for(int i = 0; i<n ;i++)cin>>v[i];
      |                                   ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctume>

main()
{
	int R>=0,G<=4500;
	float sum;
	printf("Input R:");
	printf("Input G:");
	sum=2*G-R;
	printf("%f\n",sum);
}

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

#include <stdio.h>
#include <string>

int main()
{
	char a[51] = { 0 };
	char b[51] = { 0 };
	char c[51] = { 0 };
	scanf("%s", a);
	scanf("%s", b);
	int sa = strlen(a);
	int sb = strlen(b);
	bool flag = false;
	bool right = false;
	int f = 0;
	for (int i = 0;i < sa;i++)
	{
		if (a[i] == '?')
			c[i] = 'a';
		else
			c[i] = a[i];

	}
	printf("%s\n", c);
	for (int i = 0;i <= sa-sb;i++)
	{
		for (int j = i;j < i+sb;j++)
		{
			if (a[j] == '?' || a[j] == b[f])
			{
				flag = true;
				f += 1;
			}
			else
			{
				f = 0;
				flag = false;
				break;
			}
		}
		f = 0;
		if (flag)
		{
			for (int j = i;j < i + sb;j++)
			{
				c[j] = b[f];
				f++;
			}
			right = true;
		}
	}
	if (right)
		printf("%s\n", c);
	else
		printf("UNRESTORABLE\n");
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: 'strlen' was not declared in this scope
   11 |         int sa = strlen(a);
      |                  ^~~~~~
a.cc:3:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <string>
  +++ |+#include <cstring>
    3 |
Language: C++


#include "stdio.h"
#include <string>

int main()
{
	char a[51] = { 0 };
	char b[51] = { 0 };
	char c[51] = { 0 };
	scanf("%s", a);
	scanf("%s", b);
	int sa = strlen(a);
	int sb = strlen(b);
	bool flag = false;
	bool right = false;
	int f = 0;
	for (int i = 0;i < sa;i++)
	{
		if (a[i] == '?')
			c[i] = 'a';
		else
			c[i] = a[i];

	}
	printf("%s\n", c);
	for (int i = 0;i <= sa-sb;i++)
	{
		for (int j = i;j < i+sb;j++)
		{
			if (a[j] == '?' || a[j] == b[f])
			{
				flag = true;
				f += 1;
			}
			else
			{
				f = 0;
				flag = false;
				break;
			}
		}
		f = 0;
		if (flag)
		{
			for (int j = i;j < i + sb;j++)
			{
				c[j] = b[f];
				f++;
			}
			right = true;
		}
	}
	if (right)
		printf("%s\n", c);
	else
		printf("UNRESTORABLE\n");
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:18: error: 'strlen' was not declared in this scope
   12 |         int sa = strlen(a);
      |                  ^~~~~~
a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <string>
  +++ |+#include <cstring>
    4 |
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<string>

use namespace std;

int main（）
{
	int g;
	float a;
	long long r;
	printf("g\n");
	scanf("%d",&g);
	printf("r\n");
	scanf("%d",&r);
	sum=(r+g)/2.0;
	printf("%f",a);

}


Compiler output:
a.cc:7:1: error: 'use' does not name a type
    7 | use namespace std;
      | ^~~
a.cc:11:9: error: expected primary-expression before 'int'
   11 |         int g;
      |         ^~~
a.cc:11:9: error: expected '}' before 'int'
a.cc:10:1: note: to match this '{'
   10 | {
      | ^
a.cc:14:15: error: expected constructor, destructor, or type conversion before '(' token
   14 |         printf("g\n");
      |               ^
a.cc:15:14: error: expected constructor, destructor, or type conversion before '(' token
   15 |         scanf("%d",&g);
      |              ^
a.cc:16:15: error: expected constructor, destructor, or type conversion before '(' token
   16 |         printf("r\n");
      |               ^
a.cc:17:14: error: expected constructor, destructor, or type conversion before '(' token
   17 |         scanf("%d",&r);
      |              ^
a.cc:18:9: error: 'sum' does not name a type
   18 |         sum=(r+g)/2.0;
      |         ^~~
a.cc:19:15: error: expected constructor, destructor, or type conversion before '(' token
   19 |         printf("%f",a);
      |               ^
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C

#include<cstdio>
#include<cstdiob>
#include<cmath>
int a,b,c;
int main()
{
	printf(" please Input two numbers\n");
	scanf("%a,%b",&a,&b);
	c=b*2-a;
    printf("Output c:%d\n",c);
}


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

#include<cstido>
main()
{
	int R,G;
	float c,d;
	scanf("%d%d",&R,&G);
	if(R<0||G>4500)
		printf("cuowu");
	d=2;
	c=G*d-R;
	printf("%.1f",c);
}

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

#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<string>

use namespace std;

int main（）
{
	int g;
	float a;
	long long r;
	printf("g\n");
	scanf("%d",&g);
	printf("r\n");
	scanf("%d",&r);
	sum=(r+g)/2.0;
	printf("%f",sun);

}


Compiler output:
a.cc:7:1: error: 'use' does not name a type
    7 | use namespace std;
      | ^~~
a.cc:11:9: error: expected primary-expression before 'int'
   11 |         int g;
      |         ^~~
a.cc:11:9: error: expected '}' before 'int'
a.cc:10:1: note: to match this '{'
   10 | {
      | ^
a.cc:14:15: error: expected constructor, destructor, or type conversion before '(' token
   14 |         printf("g\n");
      |               ^
a.cc:15:14: error: expected constructor, destructor, or type conversion before '(' token
   15 |         scanf("%d",&g);
      |              ^
a.cc:16:15: error: expected constructor, destructor, or type conversion before '(' token
   16 |         printf("r\n");
      |               ^
a.cc:17:14: error: expected constructor, destructor, or type conversion before '(' token
   17 |         scanf("%d",&r);
      |              ^
a.cc:18:9: error: 'sum' does not name a type
   18 |         sum=(r+g)/2.0;
      |         ^~~
a.cc:19:15: error: expected constructor, destructor, or type conversion before '(' token
   19 |         printf("%f",sun);
      |               ^
a.cc:21:1: error: expected declaration before '}' token
   21 | }
      | ^
Language: C++

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cstdlib>
#include <ctume>

main()
{
	int R>=0,G<=4500;
	printf("Input R:");
	printf("Input G:");
	if(G>0);
	sum=(2*G-R);
	printf("%d\n",sum);
	else
		sum=-(R+G);
		printf("%d\n",sum);
}

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

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
 
int main(void){
 
 int a,c;
 scanf("%d",&a);
 scanf("%d",&c);
 
 int b;
 b=2*c-a;
 printf("%d",b);
 
 return 0;
}

Compiler output:
a.cc:3:1: error: extended character   is not valid in an identifier
    3 |  
      | ^
a.cc:5:1: error: extended character   is not valid in an identifier
    5 |  
      | ^
a.cc:9:1: error: extended character   is not valid in an identifier
    9 |  
      | ^
a.cc:3:1: error: '\U000000a0' does not name a type
    3 |  
      | ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <string>
main()
{
	int R,G,x;
	R>=0,G<=4500;
	printf("input R,x");
	scanf("%d%d",&R&x);
	G=2*x-R;
	printf("G=%d\n",G);
}




Compiler output:
a.cc:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    8 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:13:24: error: invalid operands of types 'int*' and 'int' to binary 'operator&'
   13 |         scanf("%d%d",&R&x);
      |                      ~~^~
      |                      |  |
      |                      |  int
      |                      int*
Language: C++

#include <bits/stdc+.h>

using namespace std;

int main() {
    int a;
    int b;
    scanf("%d%d", &a, &b);
    printf("%d\n", (b - a) + b);
    return 0;
}

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

#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main()
{
	int R,G,A;
	while(~scanf("%d %d",&S,&G))
	{
		A=(G*2)-R;
		printf("%d\n",A);
	}
}
    

Compiler output:
a.cc: In function 'int main()':
a.cc:11:31: error: 'S' was not declared in this scope
   11 |         while(~scanf("%d %d",&S,&G))
      |                               ^