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


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

typedef long long ll;
#define rep(i,n) for( ll (i)=0; (i)<(n); ++(i) )
#define rpv(d) for(auto& v:d)
#define co(n) cout << (n) << endl;
#define cn(n) cin >> n;
#define all(x) (x).begin(), (x).end()

int main(){
  int n,m;
  cin >> n >> m;
  string s; cn(s)
  vector<int> ans;
  int pos = n;
  bool sw = true;
  while(true){
    bool sw = true;
    for( int i=m; 0<i; --i ){
      if (i<=n&&s[n-i]=='0'){
        ans.push_back(i);
        n -= i;
        sw = false;
        break;
      }
    }
    if (n==0)break;
    if (sw){
      puts("-1");return;
    }
  }
    rep(i,ans.size()){
      cout << ans[ans.size()-i-1] << " ";
    }
    cout << endl;
}

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

#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vb = vector<bool>;
using vl = vector<long>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvb = vector<vector<bool>>;
using vvc = vector<vector<char>>;
using pii = pair<int, int>;
using pll = pair<long, long>;
using pis = pair<int,string>;
#define fix20 cout << fixed << setprecision(20);
#define rep(i,n) for(int i=0; i<(int)(n);i++)
#define MOD 1000000007

int main(){
  int n,m;
  string s;
  cin >> n >> m >> s;
  vector<int> step(n+1,1e9);
  step.at(0) = 0;
  priority_queue<pis, vector<pis>, greater<pis>> que;
  que.push(pis(0,""));
  int maxpos = 0;
  
  string ans = "";
  bool flag = false;
  while(que.size()){
    pis P = que.front();
    que.pop();
    int now = P.first;
    string path = P.second;
    int from = maxpos-now+1;
    for(int i = from;i<=m && now+i<=n;i++){
      int next = now + i;
      if(s.at(next) == '1') continue;
      string npath = path;
      bitset<18> tmp(i);
      for(int j=17;j>=0;j--){
        if(tmp.test(j)) npath.push_back('1');
        else npath.push_back('0');
      }
      //npath.push_back(' ');
      if(next == n){
        ans = npath;
        flag = true;
        break;
      }
      que.push(pis(next,npath));
    }
    if(flag) break;
    maxpos = now+m;
  }
  if(ans == "") cout << -1 << endl;
  else{
    //sort(ans.begin(),ans.end());
    for(int i=0;i<ans.size();i+=18){
      long tmp = 0;
      for(int j=0;j<=17;j++){
        if(ans.at(i+j) == '1') tmp += pow(2,17-j);
      }
      cout << tmp << " ";
    }
    cout << endl;
  }
  //cout << ans.at(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:17: error: 'class std::priority_queue<std::pair<int, std::__cxx11::basic_string<char> >, std::vector<std::pair<int, std::__cxx11::basic_string<char> > >, std::greater<std::pair<int, std::__cxx11::basic_string<char> > > >' has no member named 'front'
   30 |     pis P = que.front();
      |                 ^~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<long long> vlong;
#define vpush(a,x) a.push_back(x);
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define INF 2e9
int fact(int n){
  int m;
  if (n == 0)
      return 1;
  m = fact(n - 1);    
  return n * m;       
}
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,m;
    string s;
    cin>>n>>m>>s;
    vector<vector<int> > dp(n+1,vector<int>(7));
    REP(i,1,n+1){
        REP(j,1,7){
            dp[i][j]=-1;
        }
    }
    REP(i,1,7){
        dp[i+1][i]=1;
    }
    int flag,min;
    REP(i,1,n+1){
        flag=0;
        min=99999999;
        if(s[i-1]=='1'){
        }
        else{
            REP(j,1,7){
                if(i<j){
                    break;
                }
                if(dp[i-j][j]==-1){
                    dp[i][j]=-1;
                }
                else{
                    dp[i][j]=dp[i-j][j]+1;
                }
            }
        }
    }
    int flag2=0;
    stack<int> st;
    for(int i=n;i>0;i--){
        flag=0;
        min=99999999;
        flag2=0;
        for(int j=6;j>0;j--){
            if(dp[i][j]!=-1){
                flag=1;
                if(dp[i][j]>min){
                    min=dp[i][j];
                    flag2=j;
                }
            }
        }
        if(flag==0){
            cout<<-1<<'\n';
            return(0);
        }
        st.push_back(j);
    }
    rep(i,n){
        if(i!=n-1)
        cout<<st.top()<<' ';
        else
        cout<<st.top()<<'\n';
        st.pop();
    }
    return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:73:12: error: 'class std::stack<int>' has no member named 'push_back'
   73 |         st.push_back(j);
      |            ^~~~~~~~~
a.cc:73:22: error: 'j' was not declared in this scope
   73 |         st.push_back(j);
      |                      ^
Language: C++

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

int main() {
  int n, m, c = 1;
  string s;
  cin >> n >> m >> s;
  vector<int> v;
  for(int i = 1; i < s.size(); ++i){
    if(s.at(i-1) == s.at(i)) ++c;
    else{
      v.push_back(c);
      c = 1;
    }
  }
  v.push_back(c);
  bool b = 1;
  for(int i = 1; i < v.size(); i += 2){
    if(v.at(i) >= m){
      b = 0;
      break;
    }
  }
  if(b){
    reverse(s.begin(), s.end());
    int a = 0;
    while(a < n){
      for(int i = m; i > 0; --i){
        if(a+i > n) i = n - a + 1;
        else if(a+i == n) cout << i << endl;
        else if(s.at(a+i) == '0'){
          cout << i << ' ';
  }
  else cout << -1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:27:17: note: to match this '{'
   27 |     while(a < n){
      |                 ^
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:24:8: note: to match this '{'
   24 |   if(b){
      |        ^
a.cc:35:2: error: expected '}' at end of input
   35 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

def main():
    n, m = [int(x) for x in input().split()]
    s = input()
    c = n
    h = []
    while(True):
    	d = m
    	while d > 0:
    		if c - d >= 0:
    			if s[c - d] == '0':
    				break
    		d -= 1
    
    	if d == 0:
    		print(-1)
    		break
    	
    	c -= d
    	h.append(str(d))
    	if c == 0:
    		h.reverse()
    		print(' '.join(h))
    		break
main()

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

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

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)   FOR(i,0,n)
#define ALL(a)     (a).begin(),(a).end()
#define RALL(a)     (a).rbegin(),(a).rend()
#define PRINT(a)   cout << (a) << endl

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second

#define debug(x) cerr << x << " " << "(L:" << __LINE__ << ")" << '\n';

using ll = long long int;
using P = pair<int,int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;

template <typename T> using PQ = priority_queue<T>;
template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>;

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 (b<a) { a=b; return 1; } return 0; }

const int INF = 1001001001;
const ll LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7;

int main(){
  int score[] = {300000, 200000, 100000};
  int x,y;
  cin >> x >> y;
  x--;y--;
  int ans 0;
  if(x<3)ans+=score[x];
  if(y<3)ans+=score[y];
  cout << (ans==600000 ? ans + 400000 : ans) << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:40:11: error: expected initializer before numeric constant
   40 |   int ans 0;
      |           ^
a.cc:41:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   41 |   if(x<3)ans+=score[x];
      |          ^~~
      |          abs
a.cc:42:10: error: 'ans' was not declared in this scope; did you mean 'abs'?
   42 |   if(y<3)ans+=score[y];
      |          ^~~
      |          abs
a.cc:43:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   43 |   cout << (ans==600000 ? ans + 400000 : ans) << endl;
      |            ^~~
      |            abs
Language: C++

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

int main() {
    int x,y;
    cin >> x >> y;
    if (x == 1 && y == 1) {
        cout << 1000000 << endl;
    } else {
        cout << (max(0,4-x)+max(0,4-y))*100000 << endl;
    }
    return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incdlue; did you mean #include?
    1 | #incdlue <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> x >> y;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incdlue <bits/stdc++.h>
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout << 1000000 << endl;
      |         ^~~~
a.cc:8:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:28: error: 'endl' was not declared in this scope
    8 |         cout << 1000000 << endl;
      |                            ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incdlue <bits/stdc++.h>
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout << (max(0,4-x)+max(0,4-y))*100000 << endl;
      |         ^~~~
a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:18: error: 'max' was not declared in this scope
   10 |         cout << (max(0,4-x)+max(0,4-y))*100000 << endl;
      |                  ^~~
a.cc:10:51: error: 'endl' was not declared in this scope
   10 |         cout << (max(0,4-x)+max(0,4-y))*100000 << endl;
      |                                                   ^~~~
a.cc:10:51: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
    int x,y;
    cin >> x >> y;
    int answer = 0;
    if (x == 1 && y == 1) {
        answer+=400000;
    }

    if (x == 1) {
        answer+=300000;
    } else if (x == 2) {
        answer+=200000;
    } else if (x == 3) {
        answer+=100000;
    }

    if (y == 1) {
        answer+=300000;
    } else if (y == 2) {
        answer+=200000;
    } else if (y == 3) {
        answer+=100000;
    }

    cout << answer << endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incdlue; did you mean #include?
    1 | #incdlue <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> x >> y;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incdlue <bits/stdc++.h>
a.cc:28:5: error: 'cout' was not declared in this scope
   28 |     cout << answer << endl;
      |     ^~~~
a.cc:28:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:28:23: error: 'endl' was not declared in this scope
   28 |     cout << answer << endl;
      |                       ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #incdlue <bits/stdc++.h>
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> P;
typedef string str;
typedef vector<P> vp;
typedef vector<string> vs;
typedef vector<bool> vb;

const ll mod=1e9+7;
const ll inf=1e16;

#define rep(i,m,n) for(ll i=m;i<n;i++)
#define repr(i,m,n) for(ll i=m-1;i>=n;i--)
#define fi first
#define se second
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
#define eb(x) emplace_back(x)
#define pb(x) pop_back(x)
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define sum(x) accumulate(all(x),0)
#define pc(x) __builtin_popcount(x)
#define gll greater<ll>()

void solve(){
  ll x,y;
  cin >> x >> y;
  ans+=max(0ll,100000*(4-x));
  ans+=max(0ll,100000*(4-y));
  cout << (ans==600000?ans+400000:ans) << endl;
}

int main(){
   cin.tie(nullptr);
  ios::sync_with_stdio(false);
  solve();
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:34:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   34 |   ans+=max(0ll,100000*(4-x));
      |   ^~~
      |   abs
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define REP(i,n) for (int i = 1; i < (int)(n); i++)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define debug(var) do{cout << #var << " : "; view(var);}while(0)
template<class T> bool chmin(T &a, T b) {if(a>b) {a=b;return 1;}return 0;}
template<class T> bool chmax(T &a, T b) {if(a<b) {a=b;return 1;}return 0;}
using namespace std;
template<class T> void view(T e) {cout << e << endl;}
template<class T> void view(const vector<T> &v) {for(const auto &e : v){cout << e << " ";} cout << endl;}
template<class T> void view(const vector<vector<T>> &vv) {for(const auto &v : vv){view(v);}}
using vint = vector<int>;
using vvint = vector<vector<int>>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<int,int>;
const int inf = 1e9;
const ll inf_l = 1e18;
const int MAX = 1e5;

int main() {
    int x, y; cin >> x >> y;
    mp<int,int> mp;
    mp[1] = 300000;
    mp[2] = 200000;
    mp[3] = 100000;
    int ans = mp[x] + mp[y];
    if (x == 1 && y == 1) ans += 400000;
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'mp' was not declared in this scope
   25 |     mp<int,int> mp;
      |     ^~
a.cc:25:8: error: expected primary-expression before 'int'
   25 |     mp<int,int> mp;
      |        ^~~
Language: C++

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

int main() {
  int A, B, a, b, ans;
  cin >> A >> B;
  a=max((4-A),0);
  b=max((4-B),0);
  ans=100000*(a+b);
  if (A+B==2) {
    ans=ans+400000
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: expected ';' before '}' token
   14 |     ans=ans+400000
      |                   ^
      |                   ;
   15 |   }
      |   ~
Language: Java

public class Main {
 	public static void main(String [] args) {
     	int posCC, posR;
      	Scanner scan = new Scanner(System.in);
      	posCC = scan.nextInt();
      	posR = scan.nextInt();
      
      	int prizeMoney = 0;
      	
      	int [] prizeAmt = {300000, 200000, 100000};
      	if (posCC < 4) {
        	prizeMoney += prizeAmt[posCC - 1];
        }
      	if (posR < 4) {
        	prizeMoney += prizeAmt[posR - 1];
        }
      	if (posCC == 1 && posR == 1)
          	prizeMoney += 400000;
      
      	System.out.println(prizeMoney);
    }
}

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

#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int MOD=1e9+7;
const long double Pi=acos(-1);
int main(){
  ll A,B;
  if(A==1 && B==1){cout<<1000000<<endl;}
  else{cout<<max((ll)0,100000(4-A))+max((ll)0,100000(4-B))<<endl;}
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: expression cannot be used as a function
    9 |   else{cout<<max((ll)0,100000(4-A))+max((ll)0,100000(4-B))<<endl;}
      |                        ~~~~~~^~~~~
a.cc:9:53: error: expression cannot be used as a function
    9 |   else{cout<<max((ll)0,100000(4-A))+max((ll)0,100000(4-B))<<endl;}
      |                                               ~~~~~~^~~~~
Language: C++

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

int main() {
    int x , y;
    cin >> x >> y;
    if(x == 1 && y == 1){
        cout < 1000000 << endl;
    }
    else{
        int yen = 0;
        if(x == 1){
            yen += 300000;
        }
        if(x == 2){
            yen += 200000;
        }
        if(x == 3){
            yen += 100000;
        }
        if(y == 1){
            yen += 300000;
        }
        if(y == 2){
            yen += 200000;
        }
        if(y == 3){
            yen += 100000;
        }
        cout << yen << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   10 |         cout < 1000000 << endl;
      |                ~~~~~~~~^~~~~~~
Language: C++

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

int main(){
  int X,Y; cin >> X >> Y;
  cout << (X==1&&Y==1?400000:0)+100000*(max(4-X,0)+max(4-Y,0) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:63: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    6 |   cout << (X==1&&Y==1?400000:0)+100000*(max(4-X,0)+max(4-Y,0) << endl;
      |                                         ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
a.cc:6:70: error: expected ')' before ';' token
    6 |   cout << (X==1&&Y==1?400000:0)+100000*(max(4-X,0)+max(4-Y,0) << endl;
      |                                        ~                             ^
      |                                                                      )
Language: C++

#include "bits/stdc++.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<P,ll> Pll;
typedef pair<P,P> PP;
#define rep(i,a,n) for(ll i = a;i < n;i++)
#define repr(i,a,n) for(ll i = n-1;i >= a;i--)
#define LINF (ll)1e17
#define INF (int)1e9
#define MOD (ll)1e9+7
#define sMOD 1e5
#define fs first
#define sc second

ll gcd(ll a,ll b){
	if(!b) return a;
	return gcd(b,a%b);
	
}

signed main(){
	ll a,b;
	cin >> a >> b;
	
	ll ans = max(100000*(4-a),(ll)0);
	ll ans += max(100000*(4-b),(ll)0);
	if(ans == 600000) ans += 400000;
	
	cout << ans << endl;
	
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:16: error: expected initializer before '+=' token
   28 |         ll ans += max(100000*(4-b),(ll)0);
      |                ^~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	int a,b;
	cin>>a>>b;
	int ans=0;
	if(a==1&&b==1){
		cout<<"1000000"<<endl;
		return 0;
	}
	switch(a){
		case 1:ans+=300000;break;
		case 2:ans+=200000;break;
		caes 3:ans+=100000;break;
	}
	switch(b){
		case 1:ans+=300000;break;
		case 2:ans+=200000;break;
		caes 3:ans+=100000;break;
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'caes' was not declared in this scope
   14 |                 caes 3:ans+=100000;break;
      |                 ^~~~
a.cc:19:17: error: 'caes' was not declared in this scope
   19 |                 caes 3:ans+=100000;break;
      |                 ^~~~
Language: C++

#include<iostream>
int main()
{
  int x,y;
  int ans[4]={0,300000,200000,100000};
  std::cin>>x>>y;
  if(x==1&&y==1)
    std::cout<<1000000<<endl;
  else {
    int tot=0;
    if(x<4) tot+=ans[x];
    if(y<4) tot+=ans[y];
    std::cout<<tot<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     std::cout<<1000000<<endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:13:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |     std::cout<<tot<<endl;
      |                     ^~~~
      |                     std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mem(a, b) memset(a, b, sizeof(a))
#define f()
#define IOS() std::ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
int f(int x)
{
	if(x==1) return 300000;
	if(x==2) return 200000;
	if(x==3) return 100000;
	return 0;
}
int main()
{

	IOS();
	int a,b;
	while(cin>>a>>b)
	{
		int ans=f(a)+f(b);
		if(ans==600000) ans+=400000;
		cout<<ans<<endl;
	}
	return 0;
}

Compiler output:
a.cc:7:12: error: macro "f" passed 1 arguments, but takes just 0
    7 | int f(int x)
      |            ^
a.cc:5:9: note: macro "f" defined here
    5 | #define f()
      |         ^
a.cc:21:28: error: macro "f" passed 1 arguments, but takes just 0
   21 |                 int ans=f(a)+f(b);
      |                            ^
a.cc:5:9: note: macro "f" defined here
    5 | #define f()
      |         ^
a.cc:21:33: error: macro "f" passed 1 arguments, but takes just 0
   21 |                 int ans=f(a)+f(b);
      |                                 ^
a.cc:5:9: note: macro "f" defined here
    5 | #define f()
      |         ^
a.cc:9:9: error: expected primary-expression before 'if'
    9 |         if(x==1) return 300000;
      |         ^~
a.cc:9:9: error: expected '}' before 'if'
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
a.cc:10:9: error: expected unqualified-id before 'if'
   10 |         if(x==2) return 200000;
      |         ^~
a.cc:11:9: error: expected unqualified-id before 'if'
   11 |         if(x==3) return 100000;
      |         ^~
a.cc:12:9: error: expected unqualified-id before 'return'
   12 |         return 0;
      |         ^~~~~~
a.cc:13:1: error: expected declaration before '}' token
   13 | }
      | ^
Language: C++

#include<iostream>
#define int long long
int32_t main()
{
  int d,c;
  int M;
  cin>>M;
  int order=0,sum=0;
  for(int i=0;i<M;i++)
  {
    cin>>d>>c;
    order+=c;
    sum+=(d*c);
  }
  cout<<(order-1)+((sum-1)/9)<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>M;
      |   ^~~
      |   std::cin
In file included 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:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |   cout<<(order-1)+((sum-1)/9)<<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:15:32: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |   cout<<(order-1)+((sum-1)/9)<<endl;
      |                                ^~~~
      |                                std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include<stdio.h>
int main()
{
    int x,y,i,j;
    scanf("%d\t%d\n",&x, &y);
    if (x == 1)
        i = 300000;
    elif (x == 2)
        i = 200000;
    elif (x == 3)
        i = 100000;
    else
        i = 0;
    if ( y == 1 )
        j = 300000;
    elif ( y == 2 )
        j = 200000;
    elif ( y = 3 )
        j = 100000;
    else 
        j = 0;
    printf("%d\n",j+i);
    return 0;
}



Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'elif' [-Wimplicit-function-declaration]
    8 |     elif (x == 2)
      |     ^~~~
main.c:8:18: error: expected ';' before 'i'
    8 |     elif (x == 2)
      |                  ^
      |                  ;
    9 |         i = 200000;
      |         ~         
main.c:10:18: error: expected ';' before 'i'
   10 |     elif (x == 3)
      |                  ^
      |                  ;
   11 |         i = 100000;
      |         ~         
main.c:12:5: error: 'else' without a previous 'if'
   12 |     else
      |     ^~~~
main.c:16:20: error: expected ';' before 'j'
   16 |     elif ( y == 2 )
      |                    ^
      |                    ;
   17 |         j = 200000;
      |         ~           
main.c:18:19: error: expected ';' before 'j'
   18 |     elif ( y = 3 )
      |                   ^
      |                   ;
   19 |         j = 100000;
      |         ~          
main.c:20:5: error: 'else' without a previous 'if'
   20 |     else
      |     ^~~~
Language: C++

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

int main(){
  
  int num,sum=0;
  vector<int> m ={300000,200000,100000};
  for(int i =0; i < 2; i++){
   cin >> num
   if(num < 4)
     sum += m.at(num-1);    
  }
  
  if(sum == 600000)
    cout << 1000000;
  
  else
    cout << sum;
  
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before 'if'
    9 |    cin >> num
      |              ^
      |              ;
   10 |    if(num < 4)
      |    ~~
Language: C++

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


typedef long long ll;
typedef vector<long long> VLL;
typedef vector<pair<int,int>> VP;
typedef 0LL (ll)0
#define INF (int)(1e9)
#define MAXX 1.1529215e+18
#define inf 999999
#define EPS (1e-7)
#define MOD (1e9+7)
#define rep(i,n) for(int i=0; i<(int)(n);i++)
#define REP(i,n) for(int i=1;i<=(int)(n);i++)
#define FOR(i,k,n) for(int i=(k);i<(int)(n);i++)
#define ALL(a)  a.begin(),a.end()
#define RALL(a) a.begin(),a.end(),greater<int>()
#define ROT(a) a.begin(),a.begin()+1,a.end()
#define RROT(a) a.begin(),a.end()-1,a.end()
#define PB push_back
#define MP make_pair
#define PI acos(-1.0)
template<typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; }
template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }
/*--------------------------------------------*/
ll point(ll a){
  return max(0LL,(4-a) * 100000);
}
int main(){
 //cout.precision(10);
 cin.tie(0);
 ios::sync_with_stdio(false);

  ll x,y;
  cin >> x >> y;
  
  cout << point(x) + point(y) + (x*y==1?400000:0) << endl;
}

Compiler output:
a.cc:8:9: error: expected unqualified-id before numeric constant
    8 | typedef 0LL (ll)0
      |         ^~~
Language: C++

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


typedef long long ll;
typedef vector<long long> VLL;
typedef vector<pair<int,int>> VP;
#define 0LL (ll)0
#define INF (int)(1e9)
#define MAXX 1.1529215e+18
#define inf 999999
#define EPS (1e-7)
#define MOD (1e9+7)
#define rep(i,n) for(int i=0; i<(int)(n);i++)
#define REP(i,n) for(int i=1;i<=(int)(n);i++)
#define FOR(i,k,n) for(int i=(k);i<(int)(n);i++)
#define ALL(a)  a.begin(),a.end()
#define RALL(a) a.begin(),a.end(),greater<int>()
#define ROT(a) a.begin(),a.begin()+1,a.end()
#define RROT(a) a.begin(),a.end()-1,a.end()
#define PB push_back
#define MP make_pair
#define PI acos(-1.0)
template<typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; }
template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }
/*--------------------------------------------*/
ll point(ll a){
  return max(0LL,(4-a) * 100000);
}
int main(){
 //cout.precision(10);
 cin.tie(0);
 ios::sync_with_stdio(false);

  ll x,y;
  cin >> x >> y;
  
  cout << point(x) + point(y) + (x*y==1?400000:0) << endl;
}

Compiler output:
a.cc:8:9: error: macro names must be identifiers
    8 | #define 0LL (ll)0
      |         ^~~
Language: C++

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

int x, y;
long long ans;

int main() {
  	cin >> x >> y;
  	if (x == 3)
      	ans += 100000;
    if (x == 2)
		ans += 200000;
    if (x == 1)
    	ans += 300000;
    if (y == 3)
      	ans += 100000;
    if (y == 2)
		ans += 200000;
    if (y == 1)
    	ans += 300000;
    if (x == 1 && y == 1)
      	ans += 400000;
    cout << ans << '\n';
 	return 0; 
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namepsace'
    2 | using namepsace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    8 |         cin >> x >> y;
      |         ^~~
      |         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:23:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |     cout << ans << '\n';
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

//minamoto
#include<bits/stdc++.h>
#define R register
#define fp(i,a,b) for(R int i=(a),I=(b)+1;i<I;++i)
#define fd(i,a,b) for(R int i=(a),I=(b)-1;i>I;--i)
#define go(u) for(int i=head[u],v=e[i].v;i;i=e[i].nx,v=e[i].v)
template<class T>inline bool cmax(T&a,const T&b){return a<b?a=b,1:0;}
template<class T>inline bool cmin(T&a,const T&b){return a>b?a=b,1:0;}
using namespace std;
int x,y;
int c[4]={0,3e5,2e5,1e5};
int res;
int main(){
	cin>>x>>y;
	if(x<=3)res+=c[x];
	if(y<=3)res+=c[y];
	if(x==1&&y==1)res+=4e5;
	cout<<res<<endl;
	return 0;
}

Compiler output:
a.cc:11:13: error: narrowing conversion of '3.0e+5' from 'double' to 'int' [-Wnarrowing]
   11 | int c[4]={0,3e5,2e5,1e5};
      |             ^~~
a.cc:11:17: error: narrowing conversion of '2.0e+5' from 'double' to 'int' [-Wnarrowing]
   11 | int c[4]={0,3e5,2e5,1e5};
      |                 ^~~
a.cc:11:21: error: narrowing conversion of '1.0e+5' from 'double' to 'int' [-Wnarrowing]
   11 | int c[4]={0,3e5,2e5,1e5};
      |                     ^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
inline ll in() { ll x; cin >> x; return x; }

#define INIT (-1)
#define move(a,b) ((a == INIT && b != INIT) ? a = b : a = a)
int main() {
  int h = in(), w = in(), k = in(), c = 0;
  vvi ans(h, vi(w, INIT));
  rep(i,h) {
    string s;
    cin >> s;
    rep(j,w) if (s[j] == '#') c++, ans[i][j] = c;
  }
 
  rep(i,h-1)rep(j,w) move(ans[i+1][j], ans[i][j]); // 下へ
  drep(i,h-1)rep(j,w) move(ans[i][j], ans[i+1][j]); // 上へ
  rep(i,h)rep(j,w-1) move(ans[i][j+1], ans[i][j]); // 右へ
  rep(i,h)drep(j,w-1) move(ans[i][j], ans[i][j+1]); // left

  rep(i,h)rep(j,w) cout << ans[i][j] << (j==w-1 ? "\n" : " ");
}


Compiler output:
a.cc:9:8: error: 'll' does not name a type
    9 | inline ll in() { ll x; cin >> x; return x; }
      |        ^~
a.cc: In function 'int main()':
a.cc:14:11: error: 'in' was not declared in this scope; did you mean 'yn'?
   14 |   int h = in(), w = in(), k = in(), c = 0;
      |           ^~
      |           yn
a.cc:15:17: error: 'w' was not declared in this scope
   15 |   vvi ans(h, vi(w, INIT));
      |                 ^
a.cc:19:31: error: 'c' was not declared in this scope
   19 |     rep(j,w) if (s[j] == '#') c++, ans[i][j] = c;
      |                               ^
Language: C++

include<iostream>
using namespace std;
int main(){
  int x, y;int a = 0;
  cin >> x >> y;
  if(x == 3)
    a += 100000;
  if(x == 2)
    a += 200000;
  if(x == 1)
    a += 300000;
  if(y == 3)
    a += 100000;
  if(y == 2)
    a += 200000;
  if(y == 1)
    a += 300000;
  if(x == 1 && y == 1)
    a += 400000
    cout << a << endl;

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> x >> y;
      |   ^~~
a.cc:19:16: error: expected ';' before 'cout'
   19 |     a += 400000
      |                ^
      |                ;
   20 |     cout << a << endl;
      |     ~~~~        
a.cc:20:23: error: expected '}' at end of input
   20 |     cout << a << endl;
      |                       ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int x,y;
  cin>>x>>y;
  ll p[4]={0,300000,200000,100000};
  ll ans=0;
  if(x<4)
    ans+=p[x];
  if(y<4)
    ans+=p[y];
  if(x==1 && y==1)
    ans+=400000;
  cout<<ans;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'll' was not declared in this scope
    7 |   ll p[4]={0,300000,200000,100000};
      |   ^~
a.cc:8:5: error: expected ';' before 'ans'
    8 |   ll ans=0;
      |     ^~~~
      |     ;
a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |     ans+=p[x];
      |     ^~~
      |     abs
a.cc:10:10: error: 'p' was not declared in this scope
   10 |     ans+=p[x];
      |          ^
a.cc:12:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 |     ans+=p[y];
      |     ^~~
      |     abs
a.cc:12:10: error: 'p' was not declared in this scope
   12 |     ans+=p[y];
      |          ^
a.cc:14:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   14 |     ans+=400000;
      |     ^~~
      |     abs
a.cc:15:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |   cout<<ans;
      |         ^~~
      |         abs
Language: C++

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

int main()
{
int a,b; cin>>a>>b;
 
int arr[]={0,300000, 200000,100000};
sum=0;
  if(a>3) a=0;
  if(b>3) b=0;
  sum+=(arr[a]+arr[b]);
  if(a==1 and b==1) sum+=400000;
  cout<<sum;
  

return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i,N) for(int i=0,i##_max=(N);i<i##_max;++i)
#define repp(i,l,r) for(int i=(l),i##_max=(r);i<i##_max;++i)
#define per(i,N) for(int i=(N)-1;i>=0;--i)
#define perr(i,l,r) for(int i=r-1,i##_min(l);i>=i##_min;--i)
#define all(arr) (arr).begin(), (arr).end()
#define SP << " " <<
#define SPF << " "
#define SPEEDUP cin.tie(0);ios::sync_with_stdio(false);
#define MAX_I INT_MAX //1e9
#define MIN_I INT_MIN //-1e9
#define MAX_UI UINT_MAX //1e9
#define MAX_LL LLONG_MAX //1e18
#define MIN_LL LLONG_MIN //-1e18
#define MAX_ULL ULLONG_MAX //1e19
  typedef long long ll;
  typedef pair<int,int> PII;
  typedef pair<char,char> PCC;
  typedef pair<ll,ll> PLL;
  typedef pair<char,int> PCI;
  typedef pair<int,char> PIC;
  typedef pair<ll,int> PLI;
  typedef pair<int,ll> PIL; 
  typedef pair<ll,char> PLC; 
  typedef pair<char,ll> PCL; 

inline void YesNo(bool b){ cout << (b?"Yes" : "No") << endl;}
inline void YESNO(bool b){ cout << (b?"YES" : "NO") << endl;}
inline void Yay(bool b){ cout << (b?"Yay!" : ":(") << endl;}

int main(void){
  SPEEDUP
  cout << setprecision(15);
  int X,Y;cin >> X >> Y;
  int ans = 0;
  if(X==1 && Y==1) ans += 400000;
  map<int,int> mp;
  mp[1] = 300000;
  mp[2] = 200000;
  mp[3] = 100000;
  ans += mp[X]
  ans += mp[Y]
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:15: error: expected ';' before 'ans'
   42 |   ans += mp[X]
      |               ^
      |               ;
   43 |   ans += mp[Y]
      |   ~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define fs first
#define sc second
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<tuple<ll,ll>> vtl;
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e12)
#define PI (acos(-1))


void solve(){
    ll n;

    cin>>n;
    vl a(n+1);
    rep(i,n)cin>>a[i];
    ll summ=0,sum=0;
    rep(i,n)summ+=a[i];
    ll ans=summ-sum
    rep(i,n){
        summ-=a[i];
        sum+=a[i];
        ans=min(ans,abs(summ-sum));
    }
   cout<<ans<<endl;
}

int main(){
    cout<<std::fixed<<std::setprecision(10);
    ios::sync_with_stdio(false);
    cin.tie(0);
    solve();
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:4:18: error: expected ',' or ';' before 'for'
    4 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
      |                  ^~~
a.cc:28:5: note: in expansion of macro 'rep'
   28 |     rep(i,n){
      |     ^~~
a.cc:28:9: error: 'i' was not declared in this scope
   28 |     rep(i,n){
      |         ^
a.cc:4:30: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(int i=0;i<(int)(n);i++)
      |                              ^
Language: C++

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


/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/

void Solve(){
  int n,m;
  	scanf("%d%d",&n,&m);
  int ans=max(0,(4-n)*100000)+max(0,(4-m)*100000);
  if(n==1&&m==1){
    ans+=400000;
  }
  printf("%d\n",ans);
}

Compiler output:
a.cc: In function 'void Solve()':
a.cc:14:11: error: 'max' was not declared in this scope; did you mean 'std::max'?
   14 |   int ans=max(0,(4-n)*100000)+max(0,(4-m)*100000);
      |           ^~~
      |           std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
Language: C++

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


/****************************************\
| Thank you for viewing my code:)        |
| Written by RedSpica a.k.a. RanseMirage |
| Twitter:@asakaakasaka                  | 
\****************************************/

void Solve(){
  int n,m;
  	scanf("%d%d",&n,&m);
  int ans=max(0,(4-n)*100000)+max(0,(4-m)*100000);
  if(n==1&&m==1){
    ans+=400000;
  }
  printf("%d\n",ans)
}

Compiler output:
a.cc: In function 'void Solve()':
a.cc:14:11: error: 'max' was not declared in this scope; did you mean 'std::max'?
   14 |   int ans=max(0,(4-n)*100000)+max(0,(4-m)*100000);
      |           ^~~
      |           std::max
In file included from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: 'std::max' declared here
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
a.cc:18:21: error: expected ';' before '}' token
   18 |   printf("%d\n",ans)
      |                     ^
      |                     ;
   19 | }
      | ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int x,y;                                    
  cin >> x >> y;                         ;
  int ans = 0;                               
  if(x == 3){
    ans += 100000;
  }else if(x == 2){
    ans += 200000;
  }else if(x == 1){
    ans += 300000;
  }
  if(y == 3){
    ans += 100000;
  }else if(y == 2){
    ans += 200000;
  }else if(y == 1){
    ans += 300000;
  }
  if(x==1 && y==1){
    ans += 400000;

Compiler output:
a.cc: In function 'int main()':
a.cc:22:19: error: expected '}' at end of input
   22 |     ans += 400000;
      |                   ^
a.cc:21:19: note: to match this '{'
   21 |   if(x==1 && y==1){
      |                   ^
a.cc:22:19: error: expected '}' at end of input
   22 |     ans += 400000;
      |                   ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int x,y;                                    
  cin >> x >> y;                         ;
  int ans = 0;                               
  if(x == 3)
  {
    ans += 100000;
  }else if(x == 2){
    ans += 200000;
  }else if(x == 1){
    ans += 300000;
  }
  if(y == 3)
  {
    ans += 100000;
  }else if(y == 2){
    ans += 200000;
  }else if(y == 1){
    ans += 300000;
  }
  if(x==1 && y==1){
    ans += 400000;

Compiler output:
a.cc: In function 'int main()':
a.cc:24:19: error: expected '}' at end of input
   24 |     ans += 400000;
      |                   ^
a.cc:23:19: note: to match this '{'
   23 |   if(x==1 && y==1){
      |                   ^
a.cc:24:19: error: expected '}' at end of input
   24 |     ans += 400000;
      |                   ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include <iostream>
using namespace std;
int main(){
  int a,b;
  cin >> a >> b;
  int f=0;
  if(a==1){
    f=f+300000;
  }elsif(a==2){
    f=f+200000;
  }elsif(a==3){
    f=f+100000;
  }
  if(b==1){
    f=f+300000;
  }elsif(b==2){
    f=f+200000;
  }elsif(b==3){
    f=f+100000;
  }
  if(a==1&&b==1){
    f=f+400000;
  }
  cout << f <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:4: error: 'elsif' was not declared in this scope
    9 |   }elsif(a==2){
      |    ^~~~~
Language: C++

    #include<iostream>
    using namespace std;
    int main()
    {
        // 整数の入力
        int X,Y,Z;
        cin >> X >> Y;
        switch (X){
          case 1:
            z += 300000;
            if (Y == 1){
              Z += 400000;
            }
            break;
          case 2:
            Z += 200000;
            break;
          case 3:
            Z += 100000;
            break;
          default:
            break;
        }
        switch (Y){
          case 1:
            z += 300000;
            break;
          case 2:
            Z += 200000;
            break;
          case 3:
            Z += 100000;
            break;
          default:
            break;
        }
        // 出力
        cout << Z << endl;
        return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'z' was not declared in this scope
   10 |             z += 300000;
      |             ^
a.cc:26:13: error: 'z' was not declared in this scope
   26 |             z += 300000;
      |             ^
Language: C++

if _name_ == '_main_':
    x, y = input().split()
    priceX = priceY = 0
    if(x >= 1 and x <= 205 and y >= 1 and < 205):
        if(x == 1):
            priceX = 300000
        elif(x == 2):
            priceX = 200000
        elif(x == 3):
            priceX = 100000
        else:
            priceX = 0

        if(y == 1):
            priceY = 300000
        elif(y == 2):
            priceY = 200000
        elif(y == 3):
            priceY = 100000
        else:
            priceY = 0
        
        if(x == 1 and y == 1):
            print(400000 + priceX + priceY)
        else:
            print(priceX + priceY)


Compiler output:
a.cc:1:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    1 | if _name_ == '_main_':
      |              ^~~~~~~~
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if _name_ == '_main_':
      | ^~
Language: C++

if _name_ == '_main_':
    x, y = input().split()
    priceX = priceY = 0
    if(x >= 1 and x <= 205 and y >= 1 and < 205):
        if(x == 1):
            priceX = 300000
        elif(x == 2):
            priceX = 200000
        elif(x == 3):
            priceX = 100000
        else:
            priceX = 0

        if(y == 1):
            priceY = 300000
        elif(y == 2):
            priceY = 200000
        elif(y == 3):
            priceY = 100000
        else:
            priceY = 0
        
        if(x == 1 and y == 1):
            print(400000 + priceX + priceY)
        else:
            print(priceX + priceY)

Compiler output:
a.cc:1:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    1 | if _name_ == '_main_':
      |              ^~~~~~~~
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if _name_ == '_main_':
      | ^~
Language: C++

if _name_ == '_main_':
  x, y = input().split()
  priceX = priceY = 0
  if(x >= 1 and x <= 205 and y >= 1 and < 205):
    if(x == 1):
      priceX = 300000
    elif(x == 2):
      priceX = 200000
    elif(x == 3):
      priceX = 100000
    else:
      priceX = 0

    if(y == 1):
   	  priceY = 300000
    elif(y == 2):
      priceY = 200000
    elif(y == 3):
      priceY = 100000
    else:
      priceY = 0

    if(x == 1 and y == 1):
      print(400000 + priceX + priceY)
    else:
      print(priceX + priceY)

Compiler output:
a.cc:1:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    1 | if _name_ == '_main_':
      |              ^~~~~~~~
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if _name_ == '_main_':
      | ^~