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

#include<iostream>
#include<sstream>
#include<vector>
#include<deque>
#include<cstdio>
#include<map>
#include<set>
#include<cassert>
#include<algorithm>

#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)

using namespace std;
typedef long long ll;

#define MAX 600
typedef pair<ll,ll> ii;
int N;
ll A,B,x[MAX],y[MAX];
int t[MAX];

vector<ii> vec[6];

int main() {
  cin >> N >> A >> B;
  rep(i,N) {
    cin >> t[i] >> x[i] >> y[i];
    --t[i];
    vec[t[i]].push_back(ii(x[i],y[i]));
  }
  set<ii> S;
  rep(i,3) vec[i].push_back(ii(0,0));
  rep(i,(int)vec[0].size()) {
    ii v1 = vec[0][i];
    rep(j,(int)vec[1].size()) {
      ii v2 = vec[1][j];
      rep(k,(int)vec[2].size()) {
	ii v3 = vec[2][k];
	ii v = ii(v1.first+v2.first+v3.first,
		  v1.second+v2.second+v3.second);
	S.insert(v);
      }
    }
  }

  vector<ii> T;
 rep(i,2) vec[3+i].push_back(ii(0,0));
 rep(i,(int)vec[3].size()) {
   ii v1 = vec[3][i];
   rep(j,(int)vec[4].size()) {
      ii v2 = vec[4][j];
      ii v = ii(v1.first+v2.first,
		v1.second+v2.second);
      T.push_back(v);
    }
  }
 sort(T.begin(),T.end());
 T.erase(unique(T.begin(),T.end()),T.end());
 for(auto v : S) {
   ii aaa = ii(v.first,-LLONG_MAX);
   int ptr = lower_bound(T.begin(),T.end(),aaa) - T.begin();
   REP(i,ptr,(int)T.size()) {
     if( v.first+T[i].first < A ) continue;
     if( v.first+T[i].first > B ) break;
     if( A <= v.second + T[i].second && v.second + T[i].second <= B ) {
       puts("Yes");
       return 0;
     }
   }
 }
 puts("No");
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:25: error: 'LLONG_MAX' was not declared in this scope
   61 |    ii aaa = ii(v.first,-LLONG_MAX);
      |                         ^~~~~~~~~
a.cc:10:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    9 | #include<algorithm>
  +++ |+#include <climits>
   10 |
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
 
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb emplace_back
#define INF (1e9+1)
 
 
#define MAX_V 200000
vector<int> G[MAX_V];
vector<int> rG[MAX_V];
vector<string> str;
 
void add_edge(int from, int to){
    G[from].push_back(to);
    rG[to].push_back(from);
}
 
void dfs(int v,bool used[MAX_V], vector<int> &vs){
    used[v] = true;
    rep(i,G[v].size()){
        if(!used[G[v][i]])dfs(G[v][i],used,vs);
    }
    vs.push_back(v);
}
 
void rdfs(int v,int k,vector<int> &sccs, vector<int> &cmp, bool used[MAX_V]){
    used[v] = true;
    sccs.push_back(v);
    cmp[v]=k;
    rep(i,rG[v].size()){
        if(!used[rG[v][i]])rdfs(rG[v][i],k,sccs,cmp,used);
    }
}
 
int scc(int V, vector< vector<int> > &each_scc, vector<int> &cmp){
    vector<int> vs;
    bool used[MAX_V];
    rep(i,MAX_V)used[i] = false;
    vs.clear();
    rep(v,V){
        if(!used[v])dfs(v,used, vs);
    }
    rep(i,MAX_V)used[i]=false;
    int k=0;
    for(int i=vs.size()-1;i>=0;i--){
        vector<int> sccs;
        if(!used[vs[i]]){
            rdfs(vs[i],k++,sccs,cmp,used);
            each_scc.push_back(sccs);
        }
    }
    return k;
}
 
 
vector<int> nG[MAX_V];
 
 
inline int dfs(int cur,int prev,vector<int> &cost){
    int ret = cost[cur];
    int add=0;
    for(auto e:nG[cur]){
        if(e==prev)continue;
        add = max(add,dfs(e,cur,cost));
    }
    return ret+add;
}
 
 
int main(){
    int v,e;
    cin>>v>>e;
    vector<int> c(v);
    rep(i,v)cin>>c[i];
    rep(i,e){
        int a,b;
        cin>>a>>b;
        add_edge(a,v+b);
        add_edge(v+a,b);
    }
     
    vector<vector<int>> each_scc;
    vector<int> cmp(MAX_V);
    int k = scc(2*v,each_scc,cmp);
     
//    set<pii> st;
     
    rep(i,k){
        set<int> st;
        for(auto &e:each_scc[i]){
            for(auto &to:G[e]){
                if(st.count(cmp[to])!=0)continue;
//                if(st.count(pii(i,cmp[to]))!=0)continue;
                if(i==cmp[to])continue;
//                st.insert(pii(i,cmp[to]));
                st.insert(cmp[to]);
                nG[i].pb(cmp[to]);
            }
        }
    }
     
    const auto f = [](vector<int> &list, vector<int> &cost ){
        int ret = 0;
        for(auto &e:list){
            if(e>=v)continue;
            ret += cost[e];
        }
        return ret;
    };
     
    vector<int> nc(k);
    rep(i,k){
        nc[i] = f(each_scc[i],c);
    }
    cout<<dfs(cmp[0],-1,nc)<<endl;
}

Compiler output:
a.cc: In lambda function:
a.cc:109:19: error: 'v' is not captured
  109 |             if(e>=v)continue;
      |                   ^
a.cc:106:21: note: the lambda has no capture-default
  106 |     const auto f = [](vector<int> &list, vector<int> &cost ){
      |                     ^
a.cc:75:9: note: 'int v' declared here
   75 |     int v,e;
      |         ^
Language: C++

#include<iostream>
#include<vector>
#include<string>

using namespace std;

int main(){
    int n,l;
    cin >> n >> l;
    vector<string> in(n);
    for(int i=0;i<n;i++)cin >> in[i];

    string ans;
    vector<int> frg(n);

    sort(in.begin(),in.end());
    for(int i=0;i<n;i++){
       if(frg[i]==1)continue;
        for(int j=i+1;j<n;j++){
            if(frg[j]==1)continue;

            string tmp=in[j];
            reverse(tmp.begin(),tmp.end());
            if(in[i]==tmp){
                ans+=in[i];
                frg[i]=frg[j]=1;
            }
        }
    }

    string a;
    for(int i=0;i<n;i++){
        if(frg[i]==1)continue;
        string tmp=in[i];
        reverse(tmp.begin(),tmp.end());
        if(tmp==in[i]){
            a=in[i];
            break;
        }
    }
    string ansb = ans;
    reverse(ansb.begin(),ansb.end()); 

    ans += a;
    ans += ansb;
    cout << ans << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   16 |     sort(in.begin(),in.end());
      |     ^~~~
      |     short
a.cc:23:13: error: 'reverse' was not declared in this scope
   23 |             reverse(tmp.begin(),tmp.end());
      |             ^~~~~~~
a.cc:35:9: error: 'reverse' was not declared in this scope
   35 |         reverse(tmp.begin(),tmp.end());
      |         ^~~~~~~
a.cc:42:5: error: 'reverse' was not declared in this scope
   42 |     reverse(ansb.begin(),ansb.end());
      |     ^~~~~~~
Language: C++

#include<vector>
#include<string>
#include<cstring>
#include<iostream>
using namespace std;

vector<string> pa;
vector<string> lp;
vector<string> str;
#define pb push_back

bool kaibun(string s)
{
  int i;
  int len=s.length();
  for(i=0;i<len/2;i++)
    if(s[i]!=s[len-i-1])
      return false;
  return true;
}

string rev(string s)
{
  reverse(s.begin(),s.end());
  return s;
}

int main()
{
  int n;
  int i;
  cin>>n>>i;
  string s,r;
  //  cin>>s;
  //cout<<kaibun(s)<<endl;

  for(i=0;i<n;i++)
    {
      cin>>s;
      r=rev(s);
      if(s>r)
	str.pb(r);
      else
	str.pb(s);
    }
  sort(str.begin(),str.end());
  str.pb("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
  for(i=0;i<n;i++)
    {
      if(str[i]==str[i+1])
	{
	  pa.pb(str[i]);
	  i++;
	  continue;
	}
      else if(kaibun(str[i]))
	{
	  lp.pb(str[i]);
	  continue;
	}
    }

  //  printf("pa=%d,lp=%d\n",pa.size(),lp.size());
  if(pa.size()==0 && lp.size()==0)
    {
      puts("");
      return 0;
    }
  
  //  printf("aiu");
  sort(lp.begin(),lp.end());
  sort(pa.begin(),pa.end());

  string ans="";
  for(i=0;i<(int)pa.size();i++)
    ans+=pa[i];

  if(lp.size()!=0)
    cout<<ans<<lp[0]<<rev(ans)<<endl;
  else
    cout<<ans<<rev(ans)<<endl;
  return 0;
}

Compiler output:
a.cc: In function 'std::string rev(std::string)':
a.cc:24:3: error: 'reverse' was not declared in this scope
   24 |   reverse(s.begin(),s.end());
      |   ^~~~~~~
a.cc: In function 'int main()':
a.cc:46:3: error: 'sort' was not declared in this scope; did you mean 'short'?
   46 |   sort(str.begin(),str.end());
      |   ^~~~
      |   short
Language: C++

#include <iostream>
#include <algorithm>
#include <map>
#include <string>
#include <vector>
#include <set>
using namespace std;
typedef long long ll;

//D
int N;

bool in(int x, int y) {
	return 0 <= x && x < N && 0 <= y && y < N;
}

string A[127];
string B[64];
int dp[64][64][64][64];
int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 };

vector<int> cross[64];

int f(int x1, int y1, int x2, int y2) {
	if(x2 < x1 || y2 < y1) return 0;
	if(dp[x1][y1][x2][y2] >= 0) return dp[x1][y1][x2][y2];
	int& d = dp[x1][y1][x2][y2];
	d = 1000;
	for(int y = y1; y <= y2; y++) {
		for(auto x : cross[y]) {
			if(x1 <= x && x <= x2) {
				int sum = 1;
				sum += f(x1, y1, x, y);
				sum += f(x, y1, x2, y);
				sum += f(x1, y, x, y2);
				sum += f(x, y, x2, y2);
				d = min(d, sum);
			}
		}
	}
	if(d == 1000) d = 0;
	return d;
}

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

	cin >> N;
	for(int i = 0; i < N; i++) {
		cin >> A[i];
		if(i % 2 == 0) continue;
		for(int j = 0; j < N; j++) {
			if(j % 2 == 0) continue;
			B[i / 2] += A[i][j];
		}
	}
	for(int y = 0; y < N; y++) {
		for(int x = 0; x < N; x++) {
			if(A[y][x] == 'o') continue;
			bool ok = true;
			for(int k = 0; k < 4; k++) {
				int nx = x + dx[k], ny = y + dy[k];
				if(in(nx, ny) && A[ny][nx] == 'o') {
					ok = false;
					break;
				}
			}
			if(ok) cross[y / 2].push_back(x / 2);
		}
	}
	memset(dp, -1, sizeof dp);
	cout << f(0, 0, (N - 1) / 2, (N - 1) / 2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:72:9: error: 'memset' was not declared in this scope
   72 |         memset(dp, -1, sizeof dp);
      |         ^~~~~~
a.cc:7:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    6 | #include <set>
  +++ |+#include <cstring>
    7 | using namespace std;
Language: C++

#include <iostream>
#include <algorithm>
#include <map>
#include <string>
#include <vector>
#include <set>
#include <cstdlib>
using namespace std;
typedef long long ll;

//D
int N;

bool in(int x, int y) {
	return 0 <= x && x < N && 0 <= y && y < N;
}

string A[127];
string B[64];
int dp[64][64][64][64];
int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 };

vector<int> cross[64];

int f(int x1, int y1, int x2, int y2) {
	if(x2 < x1 || y2 < y1) return 0;
	if(dp[x1][y1][x2][y2] >= 0) return dp[x1][y1][x2][y2];
	int& d = dp[x1][y1][x2][y2];
	d = 1000;
	for(int y = y1; y <= y2; y++) {
		for(auto x : cross[y]) {
			if(x1 <= x && x <= x2) {
				int sum = 1;
				sum += f(x1, y1, x, y);
				sum += f(x, y1, x2, y);
				sum += f(x1, y, x, y2);
				sum += f(x, y, x2, y2);
				d = min(d, sum);
			}
		}
	}
	if(d == 1000) d = 0;
	return d;
}

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

	cin >> N;
	for(int i = 0; i < N; i++) {
		cin >> A[i];
		if(i % 2 == 0) continue;
		for(int j = 0; j < N; j++) {
			if(j % 2 == 0) continue;
			B[i / 2] += A[i][j];
		}
	}
	for(int y = 0; y < N; y++) {
		for(int x = 0; x < N; x++) {
			if(A[y][x] == 'o') continue;
			bool ok = true;
			for(int k = 0; k < 4; k++) {
				int nx = x + dx[k], ny = y + dy[k];
				if(in(nx, ny) && A[ny][nx] == 'o') {
					ok = false;
					break;
				}
			}
			if(ok) cross[y / 2].push_back(x / 2);
		}
	}
	memset(dp, -1, sizeof dp);
	cout << f(0, 0, (N - 1) / 2, (N - 1) / 2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:73:9: error: 'memset' was not declared in this scope
   73 |         memset(dp, -1, sizeof dp);
      |         ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <cstdlib>
  +++ |+#include <cstring>
    8 | using namespace std;
Language: C++

#include <iostream>
#include <algorithm>
#include <map>
#include <string>
#include <vector>
#include <set>
#include <cstdlib>
//#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

struct Sum2D {
	vector<vector<ll>> b;
	Sum2D() {};
	Sum2D(const vector<vector<ll>>& a) {
		int H = a.size(), W = a[0].size();
		b = a;
		for(int i = 0; i < H; i++)
		for(int j = 0; j < W - 1; j++) b[i][j + 1] += b[i][j];
		for(int j = 0; j < W; j++)
		for(int i = 0; i < H - 1; i++) b[i + 1][j] += b[i][j];
	}
	// ?????????
	ll sum(int x1, int y1, int x2, int y2) {
		ll ret = b[y2][x2];
		if(y1 - 1 >= 0) ret -= b[y1 - 1][x2];
		if(x1 - 1 >= 0) ret -= b[y2][x1 - 1];
		if(y1 - 1 >= 0 && x1 - 1 >= 0) ret += b[y1 - 1][x1 - 1];
		return ret;
	}
};
Sum2D S;

//D
int N;

bool in(int x, int y) {
	return 0 <= x && x < N && 0 <= y && y < N;
}

string A[128];
int dp[64][64][64][64];
int dx[4] = { 1, 0, -1, 0 }, dy[4] = { 0, 1, 0, -1 };

vector<int> cross[128];

int conv(int x1, int y1, int x2, int y2) {
	int ret = x1;
	ret = ret * 128 + y1;
	ret = ret * 128 + x2;
	ret = ret * 128 + y2;
	return ret;
}

map<int, int> dpm;

int f(int x1, int y1, int x2, int y2) {
	if(x2 < x1 || y2 < y1) return 0;
	int hash = conv(x1, y1, x2, y2);
	if(dpm.count(hash)) return dpm[hash];
	//if(dp[x1][y1][x2][y2] >= 0) return dp[x1][y1][x2][y2];
	//int& d = dp[x1][y1][x2][y2];
	int H = y2 - y1 + 1, W = x2 - x1 + 1;
	int d = 1000;
	bool exist = false;
	for(int y = y1; y <= y2; y++) {
		for(auto x : cross[y]) {
			if(x1 <= x && x <= x2) {
				if(S.sum(x1, y, x2, y) != W) continue;
				if(S.sum(x, y1, x, y2) != H) continue;
				int sum = 1;
				sum += f(x1, y1, x - 1, y - 1);
				sum += f(x + 1, y1, x2, y - 1);
				sum += f(x1, y - 1, x - 1, y2);
				sum += f(x + 1, y + 1, x2, y2);
				d = min(d, sum);
				exist = true;
			}
		}
	}
	if(!exist) d = 0;
	return dpm[hash] = d;
}

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

	cin >> N;
	vector<vector<ll>> b(N);
	for(int i = 0; i < N; i++) {
		cin >> A[i];
		for(int j = 0; j < N; j++) {
			b[i].push_back(A[i][j] == 'x');
		}
	}
	S = Sum2D(b);
	for(int y = 0; y < N; y++) {
		for(int x = 0; x < N; x++) {
			if(A[y][x] == 'o') continue;
			bool ok = true;
			for(int k = 0; k < 4; k++) {
				int nx = x + dx[k], ny = y + dy[k];
				if(in(nx, ny) && A[ny][nx] == 'o') {
					ok = false;
					break;
				}
			}
			if(ok) cross[y].push_back(x);
		}
	}
	memset(dp, -1, sizeof dp);
	cout << f(0, 0, (N - 1), (N - 1)) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:112:9: error: 'memset' was not declared in this scope
  112 |         memset(dp, -1, sizeof dp);
      |         ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <cstdlib>
  +++ |+#include <cstring>
    8 | //#include <bits/stdc++.h>
Language: C++

#include<bits/stdc++.h>
using namespace std;
??
#define int long long
#define pb push_back 
#define pf push_front 
#define mp make_pair
#define fr first
#define sc second
#define Rep(i, n) for ( int i = 0 ; i < (n); i++ )
#define All(v) v.begin(), v.end()
??
typedef pair<int, int> Pii; typedef pair<int, Pii> Pip;
const int INF = 1107110711071107;
int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
??
int N;
char data[130][130];
bool used[130][130];
??
void bfs(int y, int x) {
????if ( used[y][x] ) return;
????used[y][x] = true;
????Rep(k, 4) {
????????int ny = y+dy[k], nx = x+dx[k];?????? 
????????if ( ny < 0 || nx < 0 || ny >= N || nx >= N || data[ny][nx] == 'x' ) continue;
????????bfs(ny, nx);
????}
}
??
signed main() {
????cin >> N;
????Rep(i, N) Rep(j, N) cin >> data[i][j];
??
????int ans = 0;
????Rep(i, N) Rep(j, N) {
????????if ( data[i][j] == 'o' && !used[i][j] ) {
????????????bfs(i, j);
????????????ans++;
????????}
????}
??
????cout << ans/3 << endl;
}

Compiler output:
a.cc:3:1: error: expected unqualified-id before '?' token
    3 | ??
      | ^
a.cc:13:47: error: 'Pii' was not declared in this scope
   13 | typedef pair<int, int> Pii; typedef pair<int, Pii> Pip;
      |                                               ^~~
a.cc:13:50: error: template argument 2 is invalid
   13 | typedef pair<int, int> Pii; typedef pair<int, Pii> Pip;
      |                                                  ^
a.cc:16:1: error: expected unqualified-id before '?' token
   16 | ??
      | ^
a.cc:20:1: error: expected unqualified-id before '?' token
   20 | ??
      | ^
a.cc:30:1: error: expected unqualified-id before '?' token
   30 | ??
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
long long n;
cin>>n;
n++;
cout<<n&-n<<endl;
return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
#define all(x) x.begin(),x.end()

vector<i64> A,B;
vector<i64> Ab,Bb;
vector<int> lazy;
const int Interval = 512;

int N;

const i64 INF = 1e18;

void LAZY(int s){
  if(lazy[s] == 1){Ab[s] = Bb[s];}
  if(lazy[s] == -1){Bb[s] = Ab[s];}
  for(int i = s * Interval;i < (s + 1) * Interval;i++){
    if(lazy[s] == 1){A[i] = B[i];}
    if(lazy[s] == -1){B[i] = A[i];}
  }
  lazy[s] = 0;
}

int main(){
  cin >> N;
  A.resize(N + Interval,INF);
  B.resize(N + Interval,INF);
  Ab.resize(N / Interval + 1,INF);
  Bb.resize(N / Interval + 1,INF);
  lazy.resize(N / Interval + 10,0);
  rep(i,0,N - 1) cin >> A[i];
  rep(i,0,N - 1) cin >> B[i];
  rep(i,0,N - 1) Ab[i/ Interval] = min(Ab[i / Interval] , A[i]);
  rep(i,0,N - 1) Bb[i/ Interval] = min(Bb[i / Interval] , B[i]);

  int Q;
  cin >> Q;
  rep(q,0,Q - 1){
    int x,y,z;
    cin >> x >> y >> z;
    if(x == 1){
      y--;
      LAZY(y / Interval);
      A[y] = z;
      int start = y - y % Interval;
      int end = start + Interval;
      end = min(end,N);
      Ab[y / Interval] = INF;
      for(int i = start;i < end;i++){
        Ab[y / Interval] = min(Ab[Interval],A[i]);
      }
    }
    if(x == 2){
      y--;
      LAZY(y / Interval);
      B[y] = z;
      int start = y - y % Interval;
      int end = start + Interval;
      end = min(end,N);
      Bb[y / Interval] = INF;
      for(int i = start;i < end;i++){
        Bb[y / Interval] = min(Bb[Interval],B[i]);
      }
    }
    if(x == 3){
      y--;
      i64 ans = A[y];
      while(y < z){
        if(y % Interval == 0 && y + Interval <= z){
          ans = min(ans , Ab[y / Interval]);
          y += Interval;
        }
        else{
          LAZY(y / Interval);
          ans = min(ans , A[y]);
          y++;
        }
      }
      cout << ans << endl;
    }
    if(x == 4){
      y--;
      i64 ans = B[y];
        if(y % Interval == 0 && y + Interval <= z){
          ans = min(ans , Bb[y / Interval]);
          y += Interval;
        }
        else{
          LAZY(y / Interval);
          ans = min(ans , B[y]);
          y++;
        }
      }
      cout << ans << endl;
    }
    if(x == 5){
      for(int i = 0;i < N / Interval + 1;i++){
        if(lazy[i] != -1) lazy[i] = 1;
      }
    }
    if(x == 6){
      for(int i = 0;i < N / Interval + 1;i++){
        if(lazy[i] != 1) lazy[i] = -1;
      }
    }
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:96:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   96 |       cout << ans << endl;
      |               ^~~
      |               abs
a.cc:98:8: error: 'x' was not declared in this scope
   98 |     if(x == 5){
      |        ^
a.cc:103:8: error: 'x' was not declared in this scope
  103 |     if(x == 6){
      |        ^
a.cc: At global scope:
a.cc:109:1: error: expected declaration before '}' token
  109 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
#define all(x) x.begin(),x.end()

vector<i64> A(202020,1e18),B(202020,1e18);
vector<i64> Ab(512,1e18),Bb(512,1e18);
vector<int> lazy(512,0);
const int Interval = 512;

int N;

const i64 INF = 1e18;

void LAZY(int s){
  if(lazt[s] == 0) return;
  if(lazy[s] == 1){Ab[s] = Bb[s];}
  if(lazy[s] == -1){Bb[s] = Ab[s];}
  for(int i = s * Interval;i < (s + 1) * Interval;i++){
    if(lazy[s] == 1){A[i] = B[i];}
    if(lazy[s] == -1){B[i] = A[i];}
  }
  lazy[s] = 0;
}

int main(){
  cin >> N;
  rep(i,0,N - 1) cin >> A[i];
  rep(i,0,N - 1) cin >> B[i];
  rep(i,0,N - 1) Ab[i/ Interval] = min(Ab[i / Interval] , A[i]);
  rep(i,0,N - 1) Bb[i/ Interval] = min(Bb[i / Interval] , B[i]);

  int Q;
  cin >> Q;
  rep(q,0,Q - 1){
    int x,y,z;
    cin >> x >> y >> z;
    if(x == 1){
      y--;
      LAZY(y / Interval);
      A[y] = z;
      int start = y - y % Interval;
      int end = start + Interval;
      end = min(end,N);
      Ab[y / Interval] = INF;
      for(int i = start;i < end;i++){
        Ab[y / Interval] = min(Ab[Interval],A[i]);
      }
    }
    if(x == 2){
      y--;
      LAZY(y / Interval);
      B[y] = z;
      int start = y - y % Interval;
      int end = start + Interval;
      end = min(end,N);
      Bb[y / Interval] = INF;
      for(int i = start;i < end;i++){
        Bb[y / Interval] = min(Bb[Interval],B[i]);
      }
    }
    if(x == 3){
      y--;
      i64 ans = A[y];
      while(y < z){
        if(y % Interval == 0 && y + Interval <= z){
          ans = min(ans , Ab[y / Interval]);
          y += Interval;
        }
        else{
          LAZY(y / Interval);
          ans = min(ans , A[y]);
          y++;
        }
      }
      cout << ans << endl;
    }
    if(x == 4){
      y--;
      i64 ans = B[y];
      while(y < z){
        if(y % Interval == 0 && y + Interval <= z){
          ans = min(ans , Bb[y / Interval]);
          y += Interval;
        }
        else{
          LAZY(y / Interval);
          ans = min(ans , B[y]);
          y++;
        }
      }
      cout << ans << endl;
    }
    if(x == 5){
      for(int i = 0;i < N / Interval + 1;i++){
        if(lazy[i] != -1) lazy[i] = 1;
      }
    }
    if(x == 6){
      for(int i = 0;i < N / Interval + 1;i++){
        if(lazy[i] != 1) lazy[i] = -1;
      }
    }
  }
}



Compiler output:
a.cc: In function 'void LAZY(int)':
a.cc:17:6: error: 'lazt' was not declared in this scope; did you mean 'lazy'?
   17 |   if(lazt[s] == 0) return;
      |      ^~~~
      |      lazy
Language: C++

##### Start Min0.txt
-1 -1 2 1
-1 -1 3 2
##### return=0 time=6ms
##### Start Min1.txt
3 2 3 1
3 2 4 2
3 2 5 3
##### return=0 time=7ms


Compiler output:
a.cc:1:1: error: stray '##' in program
    1 | ##### Start Min0.txt
      | ^~
a.cc:1:3: error: stray '##' in program
    1 | ##### Start Min0.txt
      |   ^~
a.cc:1:5: error: stray '#' in program
    1 | ##### Start Min0.txt
      |     ^
a.cc:4:1: error: stray '##' in program
    4 | ##### return=0 time=6ms
      | ^~
a.cc:4:3: error: stray '##' in program
    4 | ##### return=0 time=6ms
      |   ^~
a.cc:4:5: error: stray '#' in program
    4 | ##### return=0 time=6ms
      |     ^
a.cc:5:1: error: stray '##' in program
    5 | ##### Start Min1.txt
      | ^~
a.cc:5:3: error: stray '##' in program
    5 | ##### Start Min1.txt
      |   ^~
a.cc:5:5: error: stray '#' in program
    5 | ##### Start Min1.txt
      |     ^
a.cc:9:1: error: stray '##' in program
    9 | ##### return=0 time=7ms
      | ^~
a.cc:9:3: error: stray '##' in program
    9 | ##### return=0 time=7ms
      |   ^~
a.cc:9:5: error: stray '#' in program
    9 | ##### return=0 time=7ms
      |     ^
a.cc:1:7: error: 'Start' does not name a type
    1 | ##### Start Min0.txt
      |       ^~~~~
Language: C++

##### Start Min0.txt
1 1 1 1
-1 -1 3 2
##### return=0 time=6ms
##### Start Min1.txt
3 2 1 1
1 -4 4 2
4 -1 4 4
##### return=0 time=4ms


Compiler output:
a.cc:1:1: error: stray '##' in program
    1 | ##### Start Min0.txt
      | ^~
a.cc:1:3: error: stray '##' in program
    1 | ##### Start Min0.txt
      |   ^~
a.cc:1:5: error: stray '#' in program
    1 | ##### Start Min0.txt
      |     ^
a.cc:4:1: error: stray '##' in program
    4 | ##### return=0 time=6ms
      | ^~
a.cc:4:3: error: stray '##' in program
    4 | ##### return=0 time=6ms
      |   ^~
a.cc:4:5: error: stray '#' in program
    4 | ##### return=0 time=6ms
      |     ^
a.cc:5:1: error: stray '##' in program
    5 | ##### Start Min1.txt
      | ^~
a.cc:5:3: error: stray '##' in program
    5 | ##### Start Min1.txt
      |   ^~
a.cc:5:5: error: stray '#' in program
    5 | ##### Start Min1.txt
      |     ^
a.cc:9:1: error: stray '##' in program
    9 | ##### return=0 time=4ms
      | ^~
a.cc:9:3: error: stray '##' in program
    9 | ##### return=0 time=4ms
      |   ^~
a.cc:9:5: error: stray '#' in program
    9 | ##### return=0 time=4ms
      |     ^
a.cc:1:7: error: 'Start' does not name a type
    1 | ##### Start Min0.txt
      |       ^~~~~
Language: C++

##### Start Min0.txt
1 1 0 1
-1 -1 0 2
##### return=0 time=8ms
##### Start Min1.txt
3 2 0 1
1 -4 1 0
4 -1 2 1
##### return=0 time=5ms


Compiler output:
a.cc:1:1: error: stray '##' in program
    1 | ##### Start Min0.txt
      | ^~
a.cc:1:3: error: stray '##' in program
    1 | ##### Start Min0.txt
      |   ^~
a.cc:1:5: error: stray '#' in program
    1 | ##### Start Min0.txt
      |     ^
a.cc:4:1: error: stray '##' in program
    4 | ##### return=0 time=8ms
      | ^~
a.cc:4:3: error: stray '##' in program
    4 | ##### return=0 time=8ms
      |   ^~
a.cc:4:5: error: stray '#' in program
    4 | ##### return=0 time=8ms
      |     ^
a.cc:5:1: error: stray '##' in program
    5 | ##### Start Min1.txt
      | ^~
a.cc:5:3: error: stray '##' in program
    5 | ##### Start Min1.txt
      |   ^~
a.cc:5:5: error: stray '#' in program
    5 | ##### Start Min1.txt
      |     ^
a.cc:9:1: error: stray '##' in program
    9 | ##### return=0 time=5ms
      | ^~
a.cc:9:3: error: stray '##' in program
    9 | ##### return=0 time=5ms
      |   ^~
a.cc:9:5: error: stray '#' in program
    9 | ##### return=0 time=5ms
      |     ^
a.cc:1:7: error: 'Start' does not name a type
    1 | ##### Start Min0.txt
      |       ^~~~~
Language: C++

難しすぎるだろ　えーん


Compiler output:
a.cc:1:1: error: extended character 　 is not valid in an identifier
    1 | 難しすぎるだろ　えーん
      | ^
a.cc:1:1: error: '\U000096e3\U00003057\U00003059\U0000304e\U0000308b\U00003060\U0000308d\U00003000\U00003048\U000030fc\U00003093' does not name a type
    1 | 難しすぎるだろ　えーん
      | ^~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sys/time.h>
#include <cmath>
#include <tuple>
#include <queue>
#include <bitset>

using namespace std;

stirng s;
stirng ns;

void solve(string S, string T) {
    s = T;
    int ans = 0;
    while (s.size() <= S.size()) {
        bool flag = false;
        int i = 0;
        for (char c : S) {
            if (s[i] == c) {
                i++;
                if (i >= s.size()) {
                    flag = true;
                    break;
                }
            }
        }
        if (flag == false) {
            std::cout << ans << std::endl;
            return;
        }
        ans++;
        ns = "";
        for (int i = 0; i < T.size(); i++) {
            for (char c : s) {
                ns.push_back(c);
            }
            ns.push_back(s[i]);
        }
        for (char c : s) {
            ns.push_back(c);
        }
        s = ns;
    }
    std::cout << ans << std::endl;
}

int main() {

    string S, T;

    std::cin >> S >> T;
    solve(S, T);

    return 0;
}



Compiler output:
a.cc:16:1: error: 'stirng' does not name a type
   16 | stirng s;
      | ^~~~~~
a.cc:17:1: error: 'stirng' does not name a type
   17 | stirng ns;
      | ^~~~~~
a.cc: In function 'void solve(std::string, std::string)':
a.cc:20:5: error: 's' was not declared in this scope
   20 |     s = T;
      |     ^
a.cc:39:9: error: 'ns' was not declared in this scope; did you mean 'ans'?
   39 |         ns = "";
      |         ^~
      |         ans
Language: C++

うそじゃん　やめてえ


Compiler output:
a.cc:1:1: error: extended character 　 is not valid in an identifier
    1 | うそじゃん　やめてえ
      | ^
a.cc:1:1: error: '\U00003046\U0000305d\U00003058\U00003083\U00003093\U00003000\U00003084\U00003081\U00003066\U00003048' does not name a type
    1 | うそじゃん　やめてえ
      | ^~~~~~~~~~~~~~~~~~~~
Language: C++

おいびーとデバッグ


Compiler output:
a.cc:1:1: error: '\U0000304a\U00003044\U00003073\U000030fc\U00003068\U000030c7\U000030d0\U000030c3\U000030b0' does not name a type
    1 | おいびーとデバッグ
      | ^~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>

using namespace std;

using int64 = long long;
const int64 INF = 1LL << 60;

#define int long long
int W, H, N, X[100], Y[100];
int64 v[100][1005];

signed main() {
  cin >> W >> H >> N;

  for(int i = 0; i < N; i++) {
    cin >> X[i] >> Y[i];
  }
  fill_n(*v, 100 * 1005, INF);
  using Tuplis = tuple< int64, int, int >;

  priority_queue< Tuplis, vector< Tuplis >, greater< Tuplis > > que;


  for(int i = 0; i < N; i++) {
    v[i][abs(X[i] - 1) + abs(Y[i] - 1)] = abs(X[i] - 1) + abs(Y[i] - 1);
    que.emplace(abs(X[i] - 1) + abs(Y[i] - 1), abs(X[i] - 1) + abs(Y[i] - 1), i);
  }
  while(que.size()) {
    int64 cost;
    int l, idx;
    tie(cost, l, idx) = que.top();
    que.pop();

    for(int k = 0; k < N; k++) {
      if(idx == k) continue;
      int64 distance = abs(X[k] - X[idx]) + abs(Y[k] - Y[idx]);
//      if(distance > l) { // 距離のほうが遠い
        int64 add_cost = cost + max(0LL, distance - l); // 追加で掛かるア
        if(add_cost < v[k][max(0LL, distance - l)]) {
          v[k][max(0LL, distance - l)] = add_cost;
          que.emplace(add_cost, max(0LL, distance - l), k);
        }
      //}
    }

    if(l < 1003) {
      if(v[j][l] + 1 < v[j][l + 1]) {
        v[j][l + 1] = v[j][l] + 1;
        que.emplace(v[j][l + 1], l + 1, j);
      }
    }
  }
  int64 ret = INF;
  for(int i = 0; i < N; i++) {
    for(int j = 0; j <= 1003; j++) {
      int64 cost = abs(X[i] - W) + abs(Y[i] - H);
      ret = min(ret, v[i][j] + max(0LL, cost - j));
    }
  }
  cout << ret << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:47:12: error: 'j' was not declared in this scope
   47 |       if(v[j][l] + 1 < v[j][l + 1]) {
      |            ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

using int64 = long long;
const int64 INF = 1LL << 60;

#define int long long
int W, H, N, X[100], Y[100];
int64 v[100][1005];

signed main() {
  cin >> W >> H >> N;

  for(int i = 0; i < N; i++) {
    cin >> X[i] >> Y[i];
  }
  fill_n(*v, 100 * 1005, INF);
  using Tuplis = tuple< int64, int, int >;

  priority_queue< Tuplis, vector< Tuplis >, greater< Tuplis > > que;


  for(int i = 0; i < N; i++) {
    v[i][abs(X[i] - 1) + abs(Y[i] - 1)] = abs(X[i] - 1) + abs(Y[i] - 1);
    que.emplace(abs(X[i] - 1) + abs(Y[i] - 1), abs(X[i] - 1) + abs(Y[i] - 1), i);
  }
  while(que.size()) {
    int64 cost;
    int l, idx;
    tie(cost, l, idx) = que.top();
    que.pop();

    for(int k = 0; k < N; k++) {
      if(idx == k) continue;
      int64 distance = abs(X[k] - X[idx]) + abs(Y[k] - Y[idx]);
      if(distance > l) { // 距離のほうが遠い
        int64 add_cost = cost + max(0LL, distance - l); // 追加で掛かるア
        if(add_cost < v[k][max(0LL, distance - l)]) {
          v[k][max(0LL, distance - l)] = add_cost;
          que.emplace(add_cost, max(0LL, distance - l), k);
        }
      }
    }

    if(l < 1003) {
      if(v[j][l] + 1 < v[j][l + 1]) {
        v[j][l + 1] = v[j][l] + 1;
        que.emplace(v[j][l + 1], l + 1, j);
      }
    }
  }
  int64 ret = INF;
  for(int i = 0; i < N; i++) {
    for(int j = 0; j <= 1003; j++) {
      int64 cost = abs(X[i] - W) + abs(Y[i] - H);
      ret = min(ret, v[i][j] + max(0LL, cost - j));
    }
  }
  cout << ret << endl;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:47:12: error: 'j' was not declared in this scope
   47 |       if(v[j][l] + 1 < v[j][l + 1]) {
      |            ^
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdlib>
#define int long long
#define rep(i, n) for(i = 0; i < n; i++)
using namespace std;

int n, h;
string s;
int cnts[100001];		//cnts[i] = i桁(no leading 0)の数がいくつあるか. "0"や"00"は0桁としてカウント.
int begin_cnts[100001];

vector<int> construct_sa(string &s) {
	vector<int> SA;
    SA.resize(s.size());
    iota(begin(SA), end(SA), 0);
    sort(begin(SA), end(SA), [&](int a, int b) {
      return s[a] == s[b] ? a > b : s[a] < s[b];
    });
    vector< int > classes(s.size()), c(s.begin(), s.end()), cnt(s.size());
    for(int len = 1; len < s.size(); len <<= 1) {
      for(int i = 0; i < s.size(); i++) {
        if(i > 0 && c[SA[i - 1]] == c[SA[i]] && SA[i - 1] + len < s.size() && c[SA[i - 1] + len / 2] == c[SA[i] + len / 2]) {
          classes[SA[i]] = classes[SA[i - 1]];
        } else {
          classes[SA[i]] = i;
        }
      }
      iota(begin(cnt), end(cnt), 0);
      copy(begin(SA), end(SA), begin(c));
      for(int i = 0; i < s.size(); i++) {
        int s1 = c[i] - len;
        if(s1 >= 0) SA[cnt[classes[s1]]++] = s1;
      }
      classes.swap(c);
    }
    return SA;
}

/*vector<int> construct_sa(string &s) {
	vector<string> vs;
	int i, j;
	
	rep(i, s.length() + 1) {
		string suf;
		for (j = i; j < s.length(); j++) suf += s[j];
		vs.push_back(suf);
	}
	sort(vs.begin(), vs.end());
	
	vector<int> sa;
	rep(i, vs.size()) sa.push_back(s.length() - vs[i].length());
	return sa;
}*/

signed main() {
	int i, j;
	
	cin >> n >> h >> s;
	
	j = 0;
	rep(i, n) {
		if (j < i) j = i;
		for (; j < n; j++) if (s[j] != '0') break;
		
		cnts[0] += j - i;
		cnts[1] -= j - i;
		cnts[1] += 1;
		cnts[n - j + 1] -= 1;
	}
	rep(i, n) cnts[i + 1] += cnts[i];
	
	int cnt = 0;
	rep(i, n + 1) {
		cnt += cnts[i];
		if (cnt >= h) break;
	}
	
	int keta = i;
	if (keta == 0) { cout << 0 << endl; return 0; }
	
	cnt = 0;
	rep(i, keta) { cnt += cnts[i]; }
	h = h - cnt;
	
	j = n - keta;
	for (i = n - keta; i >= 0; i--) {
		if (s[i] == '0') continue;
		if (j >= i) j = i - 1;
		for (; j >= 0; j--) if (s[j] != '0') break;
		begin_cnts[i] = i - j;
	}
	
	vector<int> sa = construct_sa(s);
	
	rep(i, sa.size()) cout << "sa[" << i << "] = " << sa[i] << endl;
	
	rep(i, sa.size()) {
		if (sa[i] == s.length()) continue;	//空文字列
		if (s[sa[i]] == '0') continue;		//先頭が0のものは無視
		h -= begin_cnts[sa[i]];				//[0…0], s[sa[i]], …であって、桁数= ketaになるパターン数
		if (h <= 0) break;
	}
	
	int offset = sa[i];
	string ans;
	rep(i, keta) ans += s[offset + i];
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'std::vector<long long int> construct_sa(std::string&)':
a.cc:18:5: error: 'iota' was not declared in this scope
   18 |     iota(begin(SA), end(SA), 0);
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
#define REP(i, a, n) for(ll i ((ll) a); i < ((ll) n); i++)
using namespace std;
typedef long long ll;

vector<ll> suffix_array(const string &S) {
  ll n = S.length(), k = 1;
  vector<ll> sa(n + 1), rnk(n + 1), tmp(n + 1);

  function<const bool& (const ll &, const ll &)> compare_sa = [&](const ll& i, const ll& j) {
    if(rnk[i] != rnk[j]) return rnk[i] < rnk[j];
    ll ri = i + k <= n ? rnk[i + k] : -1;
    ll rj = j + k <= n ? rnk[j + k] : -1;
    return ri < rj;
  };

  REP(i, 0, n + 1) sa[i] = i;
  REP(i, 0, n + 1) rnk[i] = i < n ? S[i] : -1;

  for(; k <= n; k *= 2) {
    sort(sa.begin(), sa.end(), compare_sa);
    tmp[sa[0]] = 0;
    REP(i, 1, n + 1) tmp[sa[i]] = tmp[sa[i - 1]] + (compare_sa(sa[i - 1], sa[i]) ? 1 : 0);
    REP(i, 0, n + 1) rnk[i] = tmp[i];
  }

  return sa;
}

int main(void) {
  ll N, H;
  string S;
  cin >> N >> H >> S;

  vector<ll> a(N, 0);
  REP(i, 0, N - 1) if(S[i] == '0') a[i + 1] += a[i] + 1;

  vector<ll> imos(N + 2, 0);
  REP(i, 0, N) {
    if(S[i] != '0') {
      imos[1] += a[i] + 1;
      imos[N - i + 1] -= a[i] + 1;
    } else {
      imos[1] += a[i] + 1;
      imos[2] -= a[i] + 1;
    }
  }
  REP(i, 0, N + 1) imos[i + 1] += imos[i];

  ll x = 1, cnt = 1;
  while(1) {
    if(cnt <= H && H < cnt + imos[x]) break;
    cnt += imos[x];
    x++;
  }

  vector<ll> sa = suffix_array(S);
  REP(i, 1, N + 1) {
    ll j = sa[i];
    if((x == 1 || S[j] != '0') && j + x <= N) {
      if(cnt <= H && H < cnt + a[j] + 1) {
        cout << S.substr(j, x) << endl;
        break;
      }
      cnt += a[j] + 1;
    }
  }
}



Compiler output:
a.cc: In function 'std::vector<long long int> suffix_array(const std::string&)':
a.cc:10:63: error: conversion from 'suffix_array(const std::string&)::<lambda(const ll&, const ll&)>' to non-scalar type 'std::function<const bool&(const long long int&, const long long int&)>' requested
   10 |   function<const bool& (const ll &, const ll &)> compare_sa = [&](const ll& i, const ll& j) {
      |                                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   11 |     if(rnk[i] != rnk[j]) return rnk[i] < rnk[j];
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~               
   12 |     ll ri = i + k <= n ? rnk[i + k] : -1;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                      
   13 |     ll rj = j + k <= n ? rnk[j + k] : -1;
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                      
   14 |     return ri < rj;
      |     ~~~~~~~~~~~~~~~                                            
   15 |   };
      |   ~
Language: C++

スタートとゴールからの距離を事前に幅優先で求めておきます．

一度力を入れて止まる部分を決めたら上で求めた距離を使って答えが求められるので，
これをセグ木を背負って平面を走るいつものやつをすると答えが求められるはずです．



Compiler output:
a.cc:1:1: error: '\U000030b9\U000030bf\U000030fc\U000030c8\U00003068\U000030b4\U000030fc\U000030eb\U0000304b\U00003089\U0000306e\U00008ddd\U000096e2\U00003092\U00004e8b\U0000524d\U0000306b\U00005e45\U0000512a\U00005148\U00003067\U00006c42\U00003081\U00003066\U0000304a\U0000304d\U0000307e\U00003059\U0000ff0e' does not name a type
    1 | スタートとゴールからの距離を事前に幅優先で求めておきます．
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

5
1 1 ←これ制約無理してるだろ
2 7
6 10
1 15
3 4



Compiler output:
a.cc:2:5: error: extended character ← is not valid in an identifier
    2 | 1 1 ←これ制約無理してるだろ
      |     ^
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 5
      | ^
Language: C++

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

#define int long long

#define rep(i,n) for(int i=0;i<(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}



int L;

inline int T(pint p){
    if(p.fi==L)return 0;
    if(p.fi==-L)return 2;
    if(p.se==L)return 1;
    return 3;
}

bool comp(const pint &a,const pint &b){
    if(T(a)!=T(b))return T(a)<T(b);
    if(T(a)==0){
        return a.se<b.se;
    }
    else if(T(a)==1){
        a.fi<b.fi;
    }
    else if(T(a)==2){
        a.se>b.se;
    }
    else{
        a.fi>b.fi;
    }
}

int dist(pint p,pint q){
    return max(abs(p.fi-q.fi),abs(p.se-q.se));
}

int N;
int X[222222],Y[222222],R[222222];


int L[222222],R[222222];

signed main(){
    /*
    
    まず、45度回転をします。
    次に、各爆弾について、その爆弾が爆発するとどの範囲が爆発するか二分探索などで調べます。
    そして、セグ木でDAGを表現するテクで、適切なDAGを構築します。
    最後に、DAG上をトポロジカル順序に沿ってdpして、最終的な範囲を求めます。
    この解法だと、処理がO(N logN)で、実装が(1333^1333)なので、TLEします
    */
    
    
    cin>>N;
    rep(i,N){
        cin>>X[i]>>Y[i]>>R[i];
        L=abs(X[i])+abs(Y[i]);
        int x=X[i]+Y[i];
        int y=X[i]-Y[i];
        X[i]=x;
        Y[i]=y;
    }

    vpint ps;
    rep(i,N)ps.pb({X[i],Y[i]});
    sort(all(ps),comp);

    rep(i,ps.size())ps.pb(ps[i]);
    
    rep(i,N){
        int lb=0,ub=
    }
    return 0;
}



Compiler output:
a.cc:53:5: error: conflicting declaration 'long long int L [222222]'
   53 | int L[222222],R[222222];
      |     ^
a.cc:20:5: note: previous declaration as 'long long int L'
   20 | int L;
      |     ^
a.cc:53:15: error: redefinition of 'long long int R [222222]'
   53 | int L[222222],R[222222];
      |               ^
a.cc:50:25: note: 'long long int R [222222]' previously declared here
   50 | int X[222222],Y[222222],R[222222];
      |                         ^
a.cc: In function 'int main()':
a.cc:84:5: error: expected primary-expression before '}' token
   84 |     }
      |     ^
a.cc: In function 'bool comp(const pint&, const pint&)':
a.cc:43:1: warning: control reaches end of non-void function [-Wreturn-type]
   43 | }
      | ^
Language: Java

#include <stdio.h>
int fib(int);

int main(){
    int n = 0;
    scanf("%d", &n);
    printf("%d\n", fib(n) );
    return 0;
}

int fib( int n ){
    int ans = 1;
    if( n > 0 ){
        ans = fib(n - 1) + fib(n - 2);
    }
    return ans;
}



Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
int main(){
^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: illegal start of expression
    scanf("%d", &n);
                ^
4 errors
Language: Java

import java.util.Scanner;

class fibonacci{
    private int num;
    private int n1 = 1;
    private int n2 = 1;
    private int temp = 1;
    
    public fibonacci(int num){
	this.num = num;
    }
    
    public int cal(int num){
	for (int i=1; i<num; i++){
	    temp = n1 + n2;
	    n1 = n2;
	    n2 = temp;
	}
	return temp;
    }
}

public class Fibo{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);
	int n = scan.nextInt();
	fibonacci f = new fibonacci(n);
	System.out.println(f.cal(n));
    }
}



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

import java.util.Scanner;

class fibonacci{
    private int num;
    private int n1 = 1;
    private int n2 = 1;
    private int temp = 1;
    
    public fibonacci(int num){
	this.num = num;
    }
    
    public int cal(int num){
	for (int i=1; i<num; i++){
	    temp = n1 + n2;
	    n1 = n2;
	    n2 = temp;
	}
	return temp;
    }
}

public class A{
    public static void main(String[] args){
	Scanner scan = new Scanner(System.in);
	int n = scan.nextInt();
	fibonacci f = new fibonacci(n);
	System.out.println(f.cal(n));
    }
}



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

package com.example.alds1.ten;

import java.util.NoSuchElementException;
import java.util.Scanner;

public class FibonacciNumber {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        try {
            int n = Integer.parseInt(sc.nextLine());
            if (n < 0 || n > 45) {
                System.out.println("Condition is invalid.");
                return;
            }
            System.out.println(fibonacci(n));
        } catch (NoSuchElementException
                | NumberFormatException e) {
            System.out.println(e);
        }
    }

    private static int fibonacci(int n) {
        if (n == 0 || n == 1) {
            return 1;
        }
        return fibonacci(n - 1) + fibonacci(n - 2);
    }
}



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

import java.util.Scanner;
public class Main{
    public static int fib(int n, int num[], boolean data[]){
        if(!(data[n])){
            data[n] = true;
            num[n] = fib(n-1,num,data) + fib(n-2,num,data);
        }
        else
            return num[n];
    }
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int num[] = new int[n];
        boolean data[] = new boolean[n];
        num[0] = num[1] = 1;
        data[0] = data[1] = true;
        System.out.println(fib(n,num,data));
    }
}


Compiler output:
Main.java:10: error: missing return statement
    }
    ^
1 error
Language: Java

import java.util.Scanner;

public class FibonacciNumberApp {
	static int[] dp = new int[50];
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		for(int i=0;i<n;i++){
			dp[i] = -1;
		}
		System.out.println(fib(n));
	}
	
	public static int fib(int n){
		if(n==0) 
			return dp[n]=1;
		else if(n==1) 
			return dp[n]=1;
		else
			return dp[n]=fib(n-1)+fib(n-2);
	}
}

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

import java.util.Scanner;

public class Fibonacci {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int num = Integer.parseInt(s.next());
		if(num == 1 || num == 0){
			System.out.println(1);
		}else{
			int fib = 1;
			int sub = 0;
			int sub2;
			for(int i = 0; i < num; i++){
				sub2 = fib;
				fib += sub;
				sub = sub2;
			}
			
			System.out.println(fib);
			
		}
	}

}

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

import java.util.Scanner;

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

        // int ????????????????????????
        int a = sc.nextInt();
        int result = calc(a);
        System.out.println(result);
    
    }
    int calc(int n){
    if (n == 0 || n == 1){
        return 1
     }else{
        return calc(n - 2) + calc(n - 1)
     }
}
}

Compiler output:
Main.java:15: error: ';' expected
        return 1
                ^
Main.java:17: error: ';' expected
        return calc(n - 2) + calc(n - 1)
                                        ^
2 errors
Language: Java

import java.util.*;

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

		int n = scan.nextInt();
		long[] f = new long[n+1];

		System.out.println(Fib(n, f));

		scan.close();
		System.exit(0);
	}

	private static long Fib(int n, long[] f){
		if(n == 0 || n == 1)
			f[n] = 1;
		else if(f[n] != 0){
			for(int i = 2; i <= n; i++)
				f[n] = Fib(n-2, f) + Fib(n-1, f);
		}
		return f[n];
	}

Compiler output:
Main.java:24: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.*;

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

		int n = scan.nextInt();
		long[] f = new long[n+1];

		System.out.println(Fib(n, f));

		scan.close();
		System.exit(0);
	}

	private static long Fib(int n, long[] f){
		if(n <= 1)
			return 1;
		if(f[n] != 0)
			return f[n];
		f[n] = fib(n-2, f) + fib(n-1, f);
		return f[n];
	}
}

Compiler output:
Main.java:21: error: cannot find symbol
		f[n] = fib(n-2, f) + fib(n-1, f);
		       ^
  symbol:   method fib(int,long[])
  location: class Main
Main.java:21: error: cannot find symbol
		f[n] = fib(n-2, f) + fib(n-1, f);
		                     ^
  symbol:   method fib(int,long[])
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

public class FibonacciNumber {
    
    public static int Fibonacci(int n) {
        int result;
        if(n < 2) {
            result = 1;
        } else {
            result = Fibonacci(n-1) + Fibonacci(n-2); 
        }
        return result;
    }
 
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        
        int result = Fibonacci(n);
        
        System.out.println(result);
    }
    
}

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

import java.util.*;
public class Fibonacci {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(fab(n));
	}
	//recursive 
	public static int  fib(int n){
		if(n==1) return 1; 
		if(n==0) return 1; 
		return fib(n-1)+fib(n-2);
	}
	public static int fab(int n){
		int dp[] = new int[n+1];
		dp[0]=1;
		dp[1] =1;
		for(int i=2;i<=n;i++){
			dp[i] = dp[i-1]+dp[i-2];
		}
		return dp[n];
	}
	
}

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