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

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
 
#define rng(i, a, b) for(int i = int(a); i < int(b); i++)
#define rep(i, b) rng(i, 0, b)
#define pb push_back
#define eb emplace_back
#define bg begin()
#define ed end()
#define all(x) x.bg,x.ed

void query1(string& s){
  int i;
  char c;
  cin >> i >> c;
  s.at(i - 1) = c;
}

void query2(string& s){
  int l, r, cnt;
  cin >> l >> r;
  string alp;
  alp.pb(s.at(l - 1));
  for(int i = l; i < r; i++){
    cnt = 1;
    if(alp.size() != 26) rep(j, alp.size()){
      if(s.at(i) == alp.at(j)) cnt = 0;
    }
    if(cnt && alp.size != 26) alp.pb(s.at(i));
  }
  cout << alp.size() << endl;
}

int main() {
  int n, q, query, ans = 0;
  string s;
  cin >> n >> s >> q;
  rep(i, q) {
    cin >> query;
    if(query == 1) query1(s);
    else query2(s);
  }
}

Compiler output:
a.cc: In function 'void query2(std::string&)':
a.cc:30:19: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   30 |     if(cnt && alp.size != 26) alp.pb(s.at(i));
      |               ~~~~^~~~
      |                       ()
Language: Java

import java.util.*;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
	    int length = in.nextInt();
      	String str = in.next();
		int input = in.nextInt(); 
      	char[] charArray = str.toCharArray(); 
      	int[] countMore = new int[26];
		for (int i = 0; i < input; i++) {
          	int type = in.nextInt();  
          	if (type == 1) {
               	int pos = in.nextInt();
              	String c = in.next();
              	charArray[pos - 1] = c.charAt(0);              
            } else if (type == 2) {
				int start = in.nextInt() - 1;
              	int end = in.nextInt() - 1;       
              	if (start == end) {
	              	System.out.println(1);  
                } else {
					countMore = new int[26];                  	
                    for (int j = start; j <= end; j++) {
                      	int minus = 0;
                      	if (countMore[charArray[j] - 'a'] > 0) {
                          	minus++;
                        } else countMore[charArray[j] - 'a']++;
                    }
                    System.out.println(end-start+1-minus);
                }
            }
        }      
      
    }
 
}

Compiler output:
Main.java:31: error: cannot find symbol
                    System.out.println(end-start+1-minus);
                                                   ^
  symbol:   variable minus
  location: class Main
1 error
Language: C++

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

int count_type(string s, int index_s, int index_g){
    map<char, int> freq;
    for(int i = index_s; i <= index_g; i++){
        freq[s[i]]++;
        if(freq.size == 26){
            break;
        }
    }
    return freq.size();
}

int main() {
    int n, q;
    string s;
    cin >> n >> s >> q;
    vector<int> output(q, -1);
    int index = 0;

    rep(i, q){
        int query;
        cin >> query;
        if(query == 1){
            int index;
            char change;
            cin >> index >> change;
            s[index-1] = change;
        }

        else{
            int start, end;
            cin >> start >> end;
            output[index] = count_type(s, start-1, end-1);
            index++;
        }
    }

    rep(i, q){
        if(output[i] == -1){
            break;
        }
        cout << output[i] << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int count_type(std::string, int, int)':
a.cc:9:17: error: invalid use of member function 'std::map<_Key, _Tp, _Compare, _Alloc>::size_type std::map<_Key, _Tp, _Compare, _Alloc>::size() const [with _Key = char; _Tp = int; _Compare = std::less<char>; _Alloc = std::allocator<std::pair<const char, int> >; size_type = long unsigned int]' (did you forget the '()' ?)
    9 |         if(freq.size == 26){
      |            ~~~~~^~~~
      |                     ()
Language: C++

#include <bits/stdc++.h>


#define rep2(x,fr,to) for(int (x)=(fr);(x)<(to);(x)++)
#define rep(x,to) for(int (x)=0;(x)<(to);(x)++)
#define repr(x,fr,to) for(int (x)=(fr);(x)>=(to);(x)--)
#define all(c) (c).begin(),(c).end()
#define sz(v) (int)(v).size()

using namespace std;
typedef long long ll; typedef vector<int> VI; typedef pair<int,int> pii;
const int MD = (int)1e9 + 7; typedef vector<ll> VL;
void dbg(){ cerr << "\n"; }  template <class T, class ...T2>
void dbg(const T& fst, const T2&...rst){ cerr << fst << ": "; dbg(rst...); }
template <class T, class T2> void amin(T& a,T2 b){ if(a > b) a = b;}


int main()
{
	cin.tie(0); ios_base::sync_with_stdio(false);
	int n, q;
	string s;
	cin >>n >>s >>q;
	
	vector<VI> zt(26);
	rep(i, n) zt[s[i]-'a'].push_back(i);
	
	rep(zq,q){
		int x; cin >>x;
		if(x=-1){
			int y; char z; cin >>y >>z;
			y--;
			if(s[y]==z) continue;
			auto it = lower_bound(all(dt[s[y]-'a']), y);
			dt[s[y]-'a'].erase(it);
			auto it2 = lower_bound(all(dt[z-'a']), y);
			dt[z-'a'].insert(it, y);
		}else{
			int l,r; cin >>l >>r;
			l--; r--;
			ll ans = 0;
			rep(j ,26){
				int sm = upper_boundall(all(dt[i]), l) -lower_bound(all(dt[i]), l);
				if (sm > 0) ans++;
			}
			cout << ans <<"\n";
		}
	
	
	
	}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:51: error: 'dt' was not declared in this scope; did you mean 'it'?
   34 |                         auto it = lower_bound(all(dt[s[y]-'a']), y);
      |                                                   ^~
a.cc:7:17: note: in definition of macro 'all'
    7 | #define all(c) (c).begin(),(c).end()
      |                 ^
a.cc:43:61: error: 'dt' was not declared in this scope; did you mean 'zt'?
   43 |                                 int sm = upper_boundall(all(dt[i]), l) -lower_bound(all(dt[i]), l);
      |                                                             ^~
a.cc:7:17: note: in definition of macro 'all'
    7 | #define all(c) (c).begin(),(c).end()
      |                 ^
a.cc:43:64: error: 'i' was not declared in this scope
   43 |                                 int sm = upper_boundall(all(dt[i]), l) -lower_bound(all(dt[i]), l);
      |                                                                ^
a.cc:7:17: note: in definition of macro 'all'
    7 | #define all(c) (c).begin(),(c).end()
      |                 ^
a.cc:43:42: error: 'upper_boundall' was not declared in this scope
   43 |                                 int sm = upper_boundall(all(dt[i]), l) -lower_bound(all(dt[i]), l);
      |                                          ^~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n) ; ++i)
#define FOR(i,a,b) for(int i = (a); i < (b); ++i)
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define emb emplace_back

using namespace std;
using ll = long long;
using P = pair<int,int>;

template<typename T> void pv(vector<T> vec) {
  cout << "[";
  for(auto& v : vec) { cout << v << ","; }
  cout << "]" << endl;
}

template<>
void pv(vector<P> vec) {
  cout << "[";
  for(auto& v : vec) {
    cout << "<" << v.fi << ","<< v.se << ">" << ",";
  }
  cout << "]" << endl;
}

int counta(string s) {
  set<char> st;
  int j = 0;
  rep(i,s.size()) {
    st.insert(s.at(i));
    j++;
    if(j%10000 == 0) {
      if ( st.size == 26) break;
    }
  }
  return st.size();
}

int main() {
  int n,q;
  string s;
  cin >> n >> s >> q;
  vector<int> ans;
  rep(i,q) {
    int type;
    cin >> type;
    if(type == 1) {
      int p;cin >> p;
      char t;cin >> t;
      s.at(p-1) = t;
    } else {
      int l,r; cin >> l >> r;
      string t = s.substr(l-1,r-l+1);
      ans.emb(counta(t));
    }
  }
  rep(i,ans.size()) cout << ans.at(i) <<endl;

  return 0;
}


Compiler output:
a.cc: In function 'int counta(std::string)':
a.cc:35:15: error: invalid use of member function 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::size() const [with _Key = char; _Compare = std::less<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
   35 |       if ( st.size == 26) break;
      |            ~~~^~~~
      |                   ()
Language: C++

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

int GetCount(string str){
    int c = 0;

    map<string, int> data;

    str.erase(unique(str.begin(), str.end()), str.end());

    for (int i = 0; i < str.size(); i++){
        data[str.at(i)] = 1;
    }

    return data.size();
}

int main() {
    int n, q;
    cin >> n;
    string str;
    cin >> str;
    cin >> q;

    for ( int i = 0; i < q; i++){
        int num;
        cin >> num;
        if (num == 1){
            int pos;
            cin >> pos;
            char c;
            cin >> c;
            str.at(pos - 1) = c;
        }
        else{
            int l, r;
            cin >> l >> r;
            string ss = str.substr(l - 1, r - l + 1);
            cout << GetCount(ss) << endl;
        }
    }
}

Compiler output:
a.cc: In function 'int GetCount(std::string)':
a.cc:12:13: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'})
   12 |         data[str.at(i)] = 1;
      |             ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const std::map<std::__cxx11::basic_string<char>, int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'std::map<std::__cxx11::basic_string<char>, int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
Language: Java

import java.util.*;
 
public class Main {
 
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
	    int length = in.nextInt();
      	String str = in.next();
		int input = in.nextInt(); 
      	char[] charArray = str.toCharArray();
      
		for (int i = 0; i < inputs; i++) {
          	int type = in.nextInt();  
          	if (type == 1) {
               	int pos = in.nextInt();
              	String c = in.next();
              	charArray[pos - 1] = (char) c;              
            } else if (type == 2) {
				int start = in.nextInt() - 1;
              	int end = in.nextInt() - 1;         
             	Set<Character> testCount = new HashSet<>();
              	for (int j = start; j <= end; j++) {
              		testCount.add(charArray[j]);
                }
              	System.out.println(testCount.size());
            }
        }      
      
    }
 
}

Compiler output:
Main.java:12: error: cannot find symbol
		for (int i = 0; i < inputs; i++) {
		                    ^
  symbol:   variable inputs
  location: class Main
Main.java:17: error: incompatible types: String cannot be converted to char
              	charArray[pos - 1] = (char) c;              
              	                            ^
2 errors
Language: C++

#include <bits/stdc++.h>

const int maxn = 5e5 + 5;
char str[maxn];
int cnt[maxn][26];
int rt[maxn], lc[maxn << 1], rc[maxn << 1], val[maxn << 1], tot = 0;
int n, q;
inline int newnode(){
	val[++tot] = 0;
	lc[tot] = rc[tot] = 0;
	return tot;
}
inline void pushup(int p){
	val[p] = val[lc[p]] + val[rc[p]];
}
void change(int p, int l, int r, int v){
	if(l == r){
		val[p] += v;
	}
	else{
		int mid = (l + r) >> 1;
		if(p <= mid){
			if(!lc[p]) lc[p] = newnode();
			change(lc[p], l, mid, v);
		}
		else{
			if(!rc[p]) rc[p] = newnode();
			change(rc[p], mid+1, r, v);
		}
		pushup(p);
	}
}
int query(int p, int l, int r, int l0, int r0){
	if(!p) return 0;
	if(l > r0 || r < l0) return 0;
	if(l >= l0 && r <= r0) return val[p];
	int mid = (l + r) >> 1;
	return query(lc[p], l, mid, l0, r0) + query(rc[p], mid+1, r, l0, r0);
}
int main(){
	scanf("%d",&n);
	scanf("%s", str+1);
	for(int i=1;i<=n;i++){
		for(int j=0;j<26;j++) cnt[i][j] = cnt[i-1][j];
		cnt[i][str[i] - 'a'] ++;
	}
	scanf("%d",&q);
	for(int i=0;i<26;i++) rt[i] = newnode();
	for(int i=1;i<=q;i++){
		int op, a;
		scanf("%d%d",&op,&x);
		if(op == 1){
			char y;
			y = getchar();
			while(y < 'a' || y > 'z') y = getchar();
			change(rt[str[x] - 'a'], 1, n, -1);
			change(rt[y - 'a'], 1, n, 1);
			str[x] = y;
		}
		else{
			int y;
			scanf("%d",&y);
			int ret = 0;
			for(int j=0;j<26;j++){
				int tmp = query(rt[j], 1, n, x, y) + cnt[x][j] - cnt[y-1][j];
				if(tmp) ret++;
			}
			printf("%d\n", ret);
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:35: error: 'x' was not declared in this scope
   51 |                 scanf("%d%d",&op,&x);
      |                                   ^
Language: C++

#include <bits/stdc++.h>
#include "../lib/segmenttree/segtree_update_add.hpp"

using namespace std;

#define SZ(x) (int)(x.size())

using ll = long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const double eps = 1e-10;
const ll MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll<<50;

template<typename T>
void printv(const vector<T>& s) {
  for(int i=0;i<(int)(s.size());++i) {
    cout << s[i];
    if(i == (int)(s.size())-1) cout << endl;
    else cout << " ";
  }
}

template<typename T1, typename T2>
ostream& operator<<(ostream &os, const pair<T1, T2> p) {
  os << p.first << ":" << p.second;
  return os;
}

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

  int n, q; string s; cin >> n >> s >> q;
  vector<SegmentTreeUpdAdd<int>> v;
  for(int i=0;i<26;++i) {
    vi tmp(n, 0);
    v.emplace_back(SegmentTreeUpdAdd<int>(tmp));
  }

  for(int i=0;i<n;++i) {
    int val = s[i]-'a';
    v[val].update(i, 1);
  }

  while(q) {
    q--;
    int ty; cin >> ty;
    if(ty == 1) {
      int idx; char c; cin >> idx >> c;
      idx--;
      int prev = s[idx] - 'a';
      int nxt = c - 'a';
      v[prev].update(idx, v[prev].node[v[prev].n-1+idx]-1);
      v[nxt].update(idx, v[nxt].node[v[nxt].n-1+idx]+1);
      s[idx] = c;
    } else {
      int l, r; cin >> l >> r;
      l--;
      int cnt = 0;
      for(int i=0;i<26;++i) {
        int res = v[i].query(l, r);
        //cout << q << ":" << i << ":" << res << endl;
        if(res > 0) cnt++;
      }
      cout << cnt << endl;
    }
  }


}


Compiler output:
a.cc:2:10: fatal error: ../lib/segmenttree/segtree_update_add.hpp: No such file or directory
    2 | #include "../lib/segmenttree/segtree_update_add.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#include "../lib/segmenttree/segtree_update_add.hpp"

using namespace std;

#define SZ(x) (int)(x.size())

using ll = long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const double eps = 1e-10;
const ll MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll<<50;

template<typename T>
void printv(const vector<T>& s) {
  for(int i=0;i<(int)(s.size());++i) {
    cout << s[i];
    if(i == (int)(s.size())-1) cout << endl;
    else cout << " ";
  }
}

template<typename T1, typename T2>
ostream& operator<<(ostream &os, const pair<T1, T2> p) {
  os << p.first << ":" << p.second;
  return os;
}

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

  int n, q; string s; cin >> n >> s >> q;
  vector<SegmentTreeUpdAdd<int>> v;
  for(int i=0;i<26;++i) {
    vi tmp(n, 0);
    v.emplace_back(SegmentTreeUpdAdd<int>(tmp));
  }

  for(int i=0;i<n;++i) {
    int val = s[i]-'a';
    v[val].update(i, 1);
  }

  while(q) {
    q--;
    int ty; cin >> ty;
    if(ty == 1) {
      int idx; char c; cin >> idx >> c;
      idx--;
      int prev = s[idx] - 'a';
      int nxt = c - 'a';
      v[prev].update(idx, v[prev].node[v[prev].n-1+idx]-1);
      v[nxt].update(idx, v[nxt].node[v[nxt].n-1+idx]+1);
    } else {
      int l, r; cin >> l >> r;
      l--;
      int cnt = 0;
      for(int i=0;i<26;++i) {
        int res = v[i].query(l, r);
        //cout << q << ":" << i << ":" << res << endl;
        if(res > 0) cnt++;
      }
      cout << cnt << endl;
    }
  }


}


Compiler output:
a.cc:2:10: fatal error: ../lib/segmenttree/segtree_update_add.hpp: No such file or directory
    2 | #include "../lib/segmenttree/segtree_update_add.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

import math

n, k = map(int, input().split())

xyc = []
for _ in range(n):
    x, y, c = map(int, input().split())
    xyc.append((x, y, c))


def get_intersecs(x0, y0, r0, x1, y1, r1):
    # circle 1: (x0, y0), radius r0
    # circle 2: (x1, y1), radius r1

    d=math.sqrt((x1-x0)**2 + (y1-y0)**2)

    # non intersecting
    if d > r0 + r1 :
        return []
    # One circle within other
    if d < abs(r0-r1):
        return []
    # coincident circles
    if d == 0 and r0 == r1:
        return []
    else:
        a=(r0**2-r1**2+d**2)/(2*d)
        if r0 < a:
            return []
        h=math.sqrt(r0**2-a**2)
        x2=x0+a*(x1-x0)/d
        y2=y0+a*(y1-y0)/d
        x3=x2+h*(y1-y0)/d
        y3=y2-h*(x1-x0)/d

        x4=x2-h*(y1-y0)/d
        y4=y2+h*(x1-x0)/d

        return [(x3, y3), (x4, y4)]


def calc(x1, y1, x2, y2, c2):
    return c2 * math.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)


def count(x, y, t):
    cnt = 0
    for i in range(n):
        xi, yi, ci = xyc[i]
        if calc(x, y, xi, yi, ci) < t + 0.0000001:
            cnt += 1
            if cnt >= k:
                return cnt
    return cnt


def check(t):
    # 円の中心
    for i in range(n):
        x, y, _ = xyc[i]
        if count(x, y, t) >= k:
            return True
    # 円の交点
    for i in range(n - 1):
        for j in range(i + 1, n):
            x1, y1, c1 = xyc[i]
            x2, y2, c2 = xyc[j]
            intersecs = get_intersecs(x1, y1, t/c1, x2, y2, t/c2)
            for (x, y) in intersecs:
                # print(x, y)
                if count(x, y, t) >= k:
                    return True
    return False


low = 0
high = 10 ** 5
for _ in range(100):
    mid = (high + low) / 2
    if check(mid):
        high = mid
    else:
        low = mid
print((high + low) / 2)


Compiler output:
a.cc:12:7: error: invalid preprocessing directive #circle
   12 |     # circle 1: (x0, y0), radius r0
      |       ^~~~~~
a.cc:13:7: error: invalid preprocessing directive #circle
   13 |     # circle 2: (x1, y1), radius r1
      |       ^~~~~~
a.cc:17:7: error: invalid preprocessing directive #non
   17 |     # non intersecting
      |       ^~~
a.cc:20:7: error: invalid preprocessing directive #One
   20 |     # One circle within other
      |       ^~~
a.cc:23:7: error: invalid preprocessing directive #coincident
   23 |     # coincident circles
      |       ^~~~~~~~~~
a.cc:58:7: error: invalid preprocessing directive #\U00005186\U0000306e\U00004e2d\U00005fc3
   58 |     # 円の中心
      |       ^~~~~~~~
a.cc:63:7: error: invalid preprocessing directive #\U00005186\U0000306e\U00004ea4\U000070b9
   63 |     # 円の交点
      |       ^~~~~~~~
a.cc:70:19: error: invalid preprocessing directive #print
   70 |                 # print(x, y)
      |                   ^~~~~
a.cc:1:1: error: 'import' does not name a type
    1 | import math
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>

using namespace std;

struct point {
    double x, y, c;
};

using vp = vector<point>;

const int M = 40;
const double EPS = 1e-8;

double dis(point a, point b) {
    double dx = a.x - b.x;
    double dy = a.y - b.y;
    return sqrt(dx * dx + dy * dy);
}

vp cyc_intersec(point a, point b) {
    double d = dis(a, b);
    if (d > a.c + b.c + EPS || d < abs(a.c - b.c) - EPS) {
        return {};
    }

    double p = acos(max(0.0, min(1.0, (a.c * a.c + d * d - b.c * b.c) / (2 * a.c * d)));
    double t = atan2(b.y - a.y, b.x - a.x);

    point p1, p2;
    p1.x = a.x + a.c * cos(t + p);
    p1.y = a.y + a.c * sin(t + p);
    p2.x = a.x + a.c * cos(t - p);
    p2.y = a.y + a.c * sin(t - p);

    return {p1, p2};
}

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

    int n, k;
    cin >> n >> k;
    vp p(n);
    for (int i = 0; i < n; i++) {
        cin >> p.at(i).x >> p.at(i).y >> p.at(i).c;
    }

    double l = 0, r = 2e5;
    for (int q = 0; q < M; q++) {
        double mid = (l + r) / 2;

        vp cyc(n);
        for (int i = 0; i < n; i++) {
            cyc.at(i).x = p.at(i).x;
            cyc.at(i).y = p.at(i).y;
            cyc.at(i).c = mid / p.at(i).c;
        }

        bool f = false;
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                vp t = cyc_intersec(cyc.at(i), cyc.at(j));
                for (point x : t) {
                    int cur = 0;
                    for (int y = 0; y < n; y++) {
                        if (dis(x, cyc.at(y)) < cyc.at(y).c + EPS) {
                            cur++;
                        }
                    }

                    if (cur >= k) {
                        f = true;
                    }
                }
            }
        }

        if (f) {
            r = mid;
        } else {
            l = mid;
        }
    }

    cout << fixed << setprecision(7) << r << endl;

    return 0;
}


Compiler output:
a.cc: In function 'vp cyc_intersec(point, point)':
a.cc:29:88: error: expected ')' before ';' token
   29 |     double p = acos(max(0.0, min(1.0, (a.c * a.c + d * d - b.c * b.c) / (2 * a.c * d)));
      |                    ~                                                                   ^
      |                                                                                        )
Language: C++

#include <algorithm>
#include <string.h>
#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;
const int N = 65;
const double EPS = 1e-9;
int n, k;
double xx[N], yy[N], c[N], r[N];

typedef pair<double, double> PDD;
typedef vector<PDD> VPDD;
typedef double DB;
#define x first
#define y second

DB distance(PDD a, PDD b) {
	return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}

VPDD cal(DB x1, DB y1, DB r1, DB x2, DB y2, DB r2) {
	x1 -= x2, y1 -= y2;
	DB S = x1 * x1 + y1 * y1;
	DB a = (S + r2 * r2 - r1 * r1) / 2;
	DB D = S * r2*r2 - a * a;
	if (D < 0) return {};
	DB A1 = a * x1, B1 = y1 * sqrt(D);
	DB A2 = a * y1, B2 = x1 * sqrt(D);
	return { {(A1 + B1) / S + x2,(A2 - B2) / S + y2},{(A1 - B1) / S + x2,(A2 + B2) / S + y2} };
}

bool check(DB t) {
	for (int i = 0; i < n; i++)
		r[i] = t / c[i];
	VPDD vec;
	for (int i = 0; i < n; i++) {
		vec.push_back({ xx[i],yy[i] });
		for (int j = i + 1; j < n; j++) {
			VPDD v = cal(xx[i], yy[i], r[i], xx[j], yy[j], r[j]);
			for (auto it : v)
				vec.push_back(it);
		}
	}
	for (auto it : vec) {
		int cnt = 0;
		for (int i = 0; i < n; i++)
			if (r[i] + EPS >= distance(it, { xx[i],yy[i] }))
				cnt++;
		if (cnt >= k)
			return true;
	}
	return false;
}

int main() {
	cin >> n >> k;
	for (int i = 0; i < n; i++)
		cin >> xx[i] >> yy[i] >> c[i];
	
	DB left = 0, right = 1e9;
	for (int i = 0; i < 100; i++) {
		DB mid = (left + right) / 2;
		if (check(mid)) right = mid;
		else left = mid;
	}

	printf("%.12f\n", right);

	return 0;
}

Compiler output:
a.cc: In function 'DB distance(PDD, PDD)':
a.cc:19:16: error: 'sqrt' was not declared in this scope
   19 |         return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
      |                ^~~~
a.cc: In function 'VPDD cal(DB, DB, DB, DB, DB, DB)':
a.cc:28:35: error: 'sqrt' was not declared in this scope
   28 |         DB A1 = a * x1, B1 = y1 * sqrt(D);
      |                                   ^~~~
Language: C++

#include <bits/stdc++.h>
using i64 = long long;

int main() {
    constexpr double eps = 1e-7;
    int n, k;
    std::cin >> n >> k;

    std::vector<std::pair<int, int>> vs;
    std::vector<int> cs;
    for (int i = 0; i < n; i++) {
        int x, y, c;
        std::cin >> x >> y >> c;
        vs.emplace_back(x, y);
        cs.push_back(c);
    }

    if (n == 1) {
        std::cout << 0 << std::endl;
        return 0;
    }

    double l = -eps, r = 200000000.0;
    while (r - l > eps) {
        const double mid = (l + r) / 2;
        std::vector<std::pair<double, double>> cands;
        for (int i = 0; i < n; i++) cands.emplace_back(vs[i].first, vs[i].second);
        for (int i = 1; i < n; i++) for (int j = 0; j < i; j++) {
            double ri = mid / cs[i], rj = mid / cs[j];
            int dx = vs[j].first - vs[i].first, dy = vs[j].second - vs[i].second;
            const double len = std::sqrt(dx * dx + dy * dy);
            if (ri + rj < len + eps || len + ri < rj + eps || len + rj < ri + eps) continue;
            if (ri > len || rj > len) {
                if (ri > rj) {
                    std::swap(ri, rj);
                    dx = -dx;
                    dy = -dy;
                }
                const double x = (rj * rj - ri * ri - len * len) / (2 * len);
                const double h = std::sqrt(ri * ri - x * x);
                const double mx = vs[i].first - x / len * dx, my = vs[i].second - x / len * dy;
                cands.emplace_back(mx - h * dy / len, my + h * dx / len);
                cands.emplace_back(mx + h * dy / len, my - h * dx / len);
            } else {
                const double x = (ri * ri - rj * rj + len * len) / (2 * len);
                const double h = std::sqrt(ri * ri - x * x);
                const double mx = vs[i].first + x / len * dx, my = vs[i].second + x / len * dy;
                cands.emplace_back(mx - h * dy / len, my + h * dx / len);
                cands.emplace_back(mx + h * dy / len, my - h * dx / len);
            }
        }

        const bool ok = std::any_of(cands.begin(), cands.end(), [&](const auto &e) {
            int cnt = 0;
            for (int i = 0; i < n; i++) {
                const double dx = vs[i].first - e.first, dy = vs[i].second - e.second;
                if (cs[i] * std::sqrt(dx * dx + dy * dy) <= mid + eps) cnt++;
            }
            return cnt >= k;
        });

        if (ok) r = mid;
        else l = mid;
    }

    std::cout << std::fixed << std::setprecision(10) <<　r << std::endl;

    return 0;
}


Compiler output:
a.cc:66:56: error: extended character 　 is not valid in an identifier
   66 |     std::cout << std::fixed << std::setprecision(10) <<　r << std::endl;
      |                                                        ^
a.cc: In function 'int main()':
a.cc:66:56: error: '\U00003000r' was not declared in this scope
   66 |     std::cout << std::fixed << std::setprecision(10) <<　r << std::endl;
      |                                                        ^~~
Language: C++

//#include<bits/stdc++.h>
#include<iostream>
#include<iomanip>
#include<ctime> 
#include<cstring>
#include<string>
#include<cctype>
#include<cstdio>
#include<utility>
#include<queue>
#include<stack>
#include<deque>
#include<map>
#include<set>
#include<bitset>
#include<vector>
#include<algorithm>
#include<cstdlib>
#define ll long long
#define pii pair<ll,ll> 
#define mk make_pair
#define pb push_back
#define mod 1000000007
#define P 13331ll
#define INF 1000000000
#define EPS 1e-8
#define db double
using namespace std;
char buf[1<<15],*fs,*ft;
inline char getc()
{
	return (fs==ft&&(ft=(fs=buf)+fread(buf,1,1<<15,stdin),fs==ft))?0:*fs++;
}
inline ll read()
{
	ll x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}
const int MAXN=66;
int n,k,flag;
struct wy
{
	db x,y,c;
}t[MAXN];
db r[MAXN];
db s1,s2,s3,s4;
inline void get_cross(db x,db y,db r1,db xx,db yy,db r2)
{
	flag=0;
	x-=xx;y-=yy;
	db S=x*x+y*y;
	db a=(S+r2*r2-r1*r1)/2;
	db D=S*r2*r2-a*a;
	if(D<0){flag=1;return;}
	db A1=a*x;
	db B1=y*sqrt(D*1.0);
	db A2=a*y;
	db B2=x*sqrt(D*1.0);
	s1=(A1+B1)/S+xx;s2=(A2-B2)/S+yy;
	s3=(A1-B1)/S+xx;s4=(A2+B2)/S+yy;
	return;
}
inline db dis(db x,db y,db xx,db yy)
{
	return sqrt((x-xx)*(x-xx)+(y-yy)*(y-yy));
}
inline int check(db x)
{
	for(int i=1;i<=n;++i)r[i]=x/t[i].c;
	for(int i=1;i<=n;++i)
	{
		for(int j=i+1;j<=n;++j)
		{
			int cnt=0;
			get_cross(t[i].x,t[i].y,r[i],t[j].x,t[j].y,r[j]);
			if(flag)continue;
			for(int w=1;w<=n;++w)
			if(dis(t[w].x,t[w].y,s1,s2)<=r[w]+EPS)++cnt;
			if(cnt>=k)return 1;
			cnt=0;
			for(int w=1;w<=n;++w)
			if(dis(t[w].x,t[w].y,s3,s4)<=r[w]+EPS)++cnt;
			if(cnt>=k)return 1;
		}
	}
	return 0;
}
int main()
{
	//freopen("1.in","r",stdin);
	n=read();k=read();
	if(n==1){puts("0.000");return 0;}
	for(int i=1;i<=n;++i)
	{
		int x,y,z;
		x=read();y=read();z=read();
		t[i]=(wy){x,y,z};
	}
	db l=0,r=200000;
	while(l+EPS<r)
	{
		db mid=(l+r)/2;
		if(check(mid))r=mid;
		else l=mid;
	}
	//cout<<check(2.4)<<endl;
	printf("%.7lf",r);
	return 0;
}


Compiler output:
a.cc: In function 'void get_cross(double, double, double, double, double, double)':
a.cc:58:17: error: 'sqrt' was not declared in this scope
   58 |         db B1=y*sqrt(D*1.0);
      |                 ^~~~
a.cc: In function 'double dis(double, double, double, double)':
a.cc:67:16: error: 'sqrt' was not declared in this scope
   67 |         return sqrt((x-xx)*(x-xx)+(y-yy)*(y-yy));
      |                ^~~~
a.cc: In function 'int main()':
a.cc:99:27: warning: narrowing conversion of 'x' from 'int' to 'double' [-Wnarrowing]
   99 |                 t[i]=(wy){x,y,z};
      |                           ^
a.cc:99:29: warning: narrowing conversion of 'y' from 'int' to 'double' [-Wnarrowing]
   99 |                 t[i]=(wy){x,y,z};
      |                             ^
a.cc:99:31: warning: narrowing conversion of 'z' from 'int' to 'double' [-Wnarrowing]
   99 |                 t[i]=(wy){x,y,z};
      |                               ^
Language: C++

//#include<bits/stdc++.h>
#include<iostream>
#include<iomanip>
#include<ctime> 
#include<cstring>
#include<string>
#include<cctype>
#include<cstdio>
#include<utility>
#include<queue>
#include<stack>
#include<deque>
#include<map>
#include<set>
#include<bitset>
#include<vector>
#include<algorithm>
#include<cstdlib>
#define ll long long
#define pii pair<ll,ll> 
#define mk make_pair
#define pb push_back
#define mod 1000000007
#define P 13331ll
#define INF 1000000000
#define EPS 1e-8
#define db double
using namespace std;
char buf[1<<15],*fs,*ft;
inline char getc()
{
	return (fs==ft&&(ft=(fs=buf)+fread(buf,1,1<<15,stdin),fs==ft))?0:*fs++;
}
inline ll read()
{
	ll x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}
const int MAXN=66;
int n,k,flag;
struct wy
{
	db x,y,c;
}t[MAXN];
db r[MAXN];
db s1,s2,s3,s4;
inline void get_cross(db x,db y,db r1,db xx,db yy,db r2)
{
	flag=0;
	x-=xx;y-=yy;
	db S=x*x+y*y;
	db a=(S+r2*r2-r1*r1)/2;
	db D=S*r2*r2-a*a;
	if(D<0){flag=1;return;}
	db A1=a*x;
	db B1=y*sqrt(D);
	db A2=a*y;
	db B2=x*sqrt(D);
	s1=(A1+B1)/S+xx;s2=(A2-B2)/S+yy;
	s3=(A1-B1)/S+xx;s4=(A2+B2)/S+yy;
	return;
}
inline db dis(db x,db y,db xx,db yy)
{
	return sqrt((x-xx)*(x-xx)+(y-yy)*(y-yy));
}
inline int check(db x)
{
	for(int i=1;i<=n;++i)r[i]=x/t[i].c;
	for(int i=1;i<=n;++i)
	{
		for(int j=i+1;j<=n;++j)
		{
			int cnt=0;
			get_cross(t[i].x,t[i].y,r[i],t[j].x,t[j].y,r[j]);
			if(flag)continue;
			for(int w=1;w<=n;++w)
			if(dis(t[w].x,t[w].y,s1,s2)<=r[w]+EPS)++cnt;
			if(cnt>=k)return 1;
			cnt=0;
			for(int w=1;w<=n;++w)
			if(dis(t[w].x,t[w].y,s3,s4)<=r[w]+EPS)++cnt;
			if(cnt>=k)return 1;
		}
	}
	return 0;
}
int main()
{
	//freopen("1.in","r",stdin);
	n=read();k=read();
	if(n==1){puts("0.000");return 0;}
	for(int i=1;i<=n;++i)
	{
		int x,y,z;
		x=read();y=read();z=read();
		t[i]=(wy){x,y,z};
	}
	db l=0,r=200000;
	while(l+EPS<r)
	{
		db mid=(l+r)/2;
		if(check(mid))r=mid;
		else l=mid;
	}
	//cout<<check(2.4)<<endl;
	printf("%.7lf",r);
	return 0;
}


Compiler output:
a.cc: In function 'void get_cross(double, double, double, double, double, double)':
a.cc:58:17: error: 'sqrt' was not declared in this scope
   58 |         db B1=y*sqrt(D);
      |                 ^~~~
a.cc: In function 'double dis(double, double, double, double)':
a.cc:67:16: error: 'sqrt' was not declared in this scope
   67 |         return sqrt((x-xx)*(x-xx)+(y-yy)*(y-yy));
      |                ^~~~
a.cc: In function 'int main()':
a.cc:99:27: warning: narrowing conversion of 'x' from 'int' to 'double' [-Wnarrowing]
   99 |                 t[i]=(wy){x,y,z};
      |                           ^
a.cc:99:29: warning: narrowing conversion of 'y' from 'int' to 'double' [-Wnarrowing]
   99 |                 t[i]=(wy){x,y,z};
      |                             ^
a.cc:99:31: warning: narrowing conversion of 'z' from 'int' to 'double' [-Wnarrowing]
   99 |                 t[i]=(wy){x,y,z};
      |                               ^
Language: C++

// F.

#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>

using namespace std;

int n, k;
vector<double> x, y, c;

double cost(double cx, double cy) {
	vector<double> t(n);
	for (int i = 0; i < n; ++i) {
		double dx = x[i] - cx, dy = y[i] - cy;
		t[i] = c[i] * sqrt(dx * dx + dy * dy);
	}
	sort(t.begin(), t.end());
	return t[k - 1];
}

double cost2(double x, double sy, double ey, double& cy) {
	double left = sy, right = ey;
	for (int t = 0; t < 100; ++t) {
		if (cost(x, (left * 2 + right) / 3) < cost(x, (left + right * 2) / 3)) {
			right = (left + right * 2) / 3;
			cy = right;
		} else {
			left = (left * 2 + right) / 3;
		}
	}
	return cost(x, left);
}

void cost3(double sx, double ex, double sy, double ey, double& cx, double& cy) {
	double left = sx, right = ex;
	for (int t = 0; t < 100; ++t) {
		double y;
		if (cost2((left * 2 + right) / 3, sy, ey, y) < cost2((left + right * 2) / 3, sy, ey, y)) {
			right = (left + right * 2) / 3;
			cx = right;
			cy = y;
		} else {
			left = (left * 2 + right) / 3;
		}
	}
}

int main(int argc, char* argv[]) {
	cout.precision(20);
#ifdef _MSC_VER
	while (true)
#endif
	{
		n = -1;
		cin >> n >> k;
		if (n < 0) return 0;
		x.resize(n);
		y.resize(n);
		c.resize(n);
		for (int i = 0; i < n; ++i) {
			cin >> x[i] >> y[i] >> c[i];
		}
		double ans;
		if (n == 1) {
			ans = cost(x[0], y[0]);
		} else {
			ans = 1e9;
			vector<double> sx = x, sy = y;
			sort(sx.begin(), sx.end());
			sort(sy.begin(), sy.end());
			for (int i = 1; i < n; ++i) {
				for (int j = 1; j < n; ++j) {
					double cx, cy;
					cost3(sx[i - 1], sx[i], sy[j - 1], sy[j], cx, cy);
					ans = min(ans, cost(cx, cy));
				}
			}
		}
		cout << ans << endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'double cost(double, double)':
a.cc:17:31: error: 'sqrt' was not declared in this scope
   17 |                 t[i] = c[i] * sqrt(dx * dx + dy * dy);
      |                               ^~~~
Language: C++

#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define EPS (1e-9)
#define INF (1e17)
#define PI (acos(-1))
//const double PI = acos(-1);
//const double EPS = 1e-15;
//long long INF=(long long)1E17;
#define i_7 (long long)(1e9+7)
//#define i_7 998'244'353
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
long long po(long a, long b){
    if(b==0){
        return 1;
    }
    
    long long z = po(a,b/2);
    z = mod(z*z);
    if(b%2!=0){
        z = mod(a*z);
    }
    return z;
}
 
bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=std::sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}
 
long long gcd_(long long a, long long b){
  if(a<b){
    std::swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}
 
//using namespace std;
//using namespace boost::multiprecision;
//using namespace __gnu_pbds;
 
int main(){
  using namespace std;
  int n, k;
  cin>>n>>k;
  double x[n], y[n], c[n];
  REP(i, n){
    cin>>x[i]>>y[i]>>c[i];
  }
  double ans = 1010010;
  for(double X = -1000; X<=1000; x+= 1){
    for(double Y = -1000; Y<=1000; Y+= 1){
      vector<double> t(n);
      REP(i, n){
        t[i] = c[i] * hypot(X - x[i], Y - y[i]);
      }
      sort(ALL(t));
      ans = min(ans, t[k-1]);
    }
  }
  cout<<fixed<<setprecision(7)<<ans<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:78:35: error: incompatible types in assignment of 'int' to 'double [n]'
   78 |   for(double X = -1000; X<=1000; x+= 1){
      |                                  ~^~~~
Language: C++

int main using namespace;
4 3
-1 0 3
0 0 3
1 0 2
1 1 40

Compiler output:
a.cc:1:10: error: expected initializer before 'using'
    1 | int main using namespace;
      |          ^~~~~
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 4 3
      | ^
Language: C++

#include<bits/stdc++.H>
using namespace std;
int main()
{
   int n,r;
   cin>>n>>r;
   if(n<10)
   cout<<r+100*(10-n);
   else
   {cout<<r;
   }

}


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

#include <stdio.h>

int main()
{
    int N,R,hasil;

    scanf("%d %d", &N, &R);
    if (N<10){
        hasil += R + 100 * (10 - N)
    }
    else{
        hasil= R;
    }
    printf("%d",hasil);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:36: error: expected ';' before '}' token
    9 |         hasil += R + 100 * (10 - N)
      |                                    ^
      |                                    ;
   10 |     }
      |     ~
Language: C++

#include <stdio.h>

int main()
{
    int N,R,hasil;

    scanf("%d %d", &N, &R);
    if (N<10){
        hasil  100*(10-N);
        hasil - R + hasil;
    }
    else{
        hasil= R;
    }
    printf("%d",hasil);

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:14: error: expected ';' before numeric constant
    9 |         hasil  100*(10-N);
      |              ^ ~~~
      |              ;
Language: C

#include<stdio.h>

int main(){
int N;
scanf ("%d",&N);
long long int A[N]{};
long long int B = 1;
long long int x = 1000000000000000000;
for (int i = 0; i < N; i++ ){
scanf ("%lld",&A[i]);
if (A[i]==0){
	printf ("0\n");
	return 0;
}
}

for (int i = 0; i< N; i++){
	x= x/ A[i];
	if (x==0){
		printf ("-1\n");
		return 0;
}
	else{
	B= B * A[i];
}
}
printf ("%lld",B);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    6 | long long int A[N]{};
      |                   ^
main.c:10:16: error: 'A' undeclared (first use in this function)
   10 | scanf ("%lld",&A[i]);
      |                ^
main.c:10:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(){
	    int N,R;

    scanf("%d %d", &N, &R);
    
    if (N<10){
    	 printf("%d", R+(100*(10-N)));
	}
    if (N>=10){
    	printf("%d", R);
	}

    
	return 0;

Compiler output:
main.c: In function 'main':
main.c:15:9: error: expected declaration or statement at end of input
   15 |         return 0;
      |         ^~~~~~
Language: C

#include <stdio.h>
int main(){
	    int N,R;

    scanf("%d %d", &N, &R);
    
    if (N<10){
    	 printf("%d", R+(100*(10-N)));
	}
    if (N>10){
    	printf("%d", R=R);
	}

    
	return 0;

Compiler output:
main.c: In function 'main':
main.c:15:9: error: expected declaration or statement at end of input
   15 |         return 0;
      |         ^~~~~~
Language: C

#include <stdio.h>
int main(){
 int K, R;
 scanf("%d %d", &K, &R);
 if(K<=10){
  printf("%d", (100*(10-K)+R));
 {else if(K>10)}
  printf("%d", R);
 }
 return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:3: error: 'else' without a previous 'if'
    7 |  {else if(K>10)}
      |   ^~~~
main.c:7:16: error: expected expression before '}' token
    7 |  {else if(K>10)}
      |                ^
Language: C++

#include <stdio.h>

int main(){
	int N,R;
	scanf("%d%d",&N,&R);
	if (N < 10){
		printf("%d",(100*(10-2))+R);
	}
	else if(N => 10){
		printf("%d",R);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected primary-expression before '>' token
    9 |         else if(N => 10){
      |                    ^
Language: C++

#include <stdio.h>



int main ()
{
int N,R,;

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

if (N>=10){
	printf("%d", R);
}
else {

	printf("%d",N+100*(10-N););
}

	return 0;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected unqualified-id before ';' token
    7 | int N,R,;
      |         ^
a.cc:16:33: error: expected ')' before ';' token
   16 |         printf("%d",N+100*(10-N););
      |               ~                 ^
      |                                 )
a.cc:16:34: error: expected primary-expression before ')' token
   16 |         printf("%d",N+100*(10-N););
      |                                  ^
Language: C

#include <stdio.h>
int main (){
	int a,b,inner,total;
	scanf ("%d",&a);
	scanf ("%d",&b);
	if (a<=10){
		inner = 100 * (10-a);
		total = b + inner;
		printf ("%d",total);
	}
	else{
		printf ("%d",b)
	}
	
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:32: error: expected ';' before '}' token
   12 |                 printf ("%d",b)
      |                                ^
      |                                ;
   13 |         }
      |         ~
Language: C++

#include<iostream>

using namespace std;

int main()
{
  cin >> n >> r ;
  
  if(n>=10)
    cout << r ;
  else
    cout << 100*(10-n) ;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'n' was not declared in this scope
    7 |   cin >> n >> r ;
      |          ^
a.cc:7:15: error: 'r' was not declared in this scope
    7 |   cin >> n >> r ;
      |               ^
Language: C++

#include <iostream>

using namespace std;

int main()
{
    int n, r;
    cin >> n >> r;

    if(n >= 10) {
        cout << r << endl;
    } else {
        cout << r - (100*(10-k)) << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:30: error: 'k' was not declared in this scope
   13 |         cout << r - (100*(10-k)) << endl;
      |                              ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) for (int i = (int)(n-1); i >= 0; i--)
#define sz(x) int(x.size())
#define bitsz(x) int(__builtin_popcount(x))
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define INF 2e9
#define LINF 1e18
#define mod 1000000007
template<class T> inline bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; }
typedef long long ll;
typedef pair<int, int> P;
int dx[4] = {1,0,-1,0};
int dy[4] = {0,1,0,-1};

int main() {
    int n,r; cin >> n >> r;
    if (n>=10) cout << r << endl;
    else cout << r-100*(10-k) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:28: error: 'k' was not declared in this scope
   23 |     else cout << r-100*(10-k) << endl;
      |                            ^
Language: C++

#include<bits/stdc++.h>
#include<vector>
#include<string>
#include<stack>
#include<iostream>
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define MOD 1000000007
#define vec(a) vector<int>a
using namespace std;


int main()
{
#ifndef ONLINE_JUDGE
	freopen("output.txt", "w", stdout);
	freopen("input.txt", "r", stdin);
#endif
	fastio
	ll n,r,i,j;
	cin>>n>>r;
	if(n<10)
		r=r+100(10-n);
	cout<<r<<"\n";

	return 0;
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:23:24: error: expression cannot be used as a function
   23 |                 r=r+100(10-n);
      |                     ~~~^~~~~~
Language: C++

#include <iostream>
using namespace std;
int Rates(int A){
     if (A>=10){
          return 0;
     }else{
          return 100*(10-A);
     }
}
int main(){
     int N,R;
     cin >>N>>R;
     cout <<R+Rates(A)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'A' was not declared in this scope
   13 |      cout <<R+Rates(A)<<endl;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n,r;
  cin >> n>>r;
if(n >=10) cout << r << endl;
int ans =0;
ans= r-100 *(10-n);
else  cout <<    ans << endl; 
  return 0;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:10:1: error: 'else' without a previous 'if'
   10 | else  cout <<    ans << endl;
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
   int k,r;
   cin>>k>>r;
   if(k=>10){
     cout<<r<<'\n';
   }
   if(k<10){
     cout<<r-(100*(10-k))<<'\n';
   }
   return(0);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected primary-expression before '>' token
    6 |    if(k=>10){
      |         ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
   int k,r;
   cin>>k>>r;
   if(k=>10){
     cout<<r<<'\n';
   }
   if(k<10){
     cout<<r-(100*(10−k))<<'\n';
   }
   return(0);
}


Compiler output:
a.cc:10:20: error: extended character − is not valid in an identifier
   10 |      cout<<r-(100*(10−k))<<'\n';
      |                    ^
a.cc: In function 'int main()':
a.cc:6:9: error: expected primary-expression before '>' token
    6 |    if(k=>10){
      |         ^
a.cc:10:20: error: unable to find numeric literal operator 'operator""\U00002212k'
   10 |      cout<<r-(100*(10−k))<<'\n';
      |                    ^~~~