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

#include <cmath>
#include <iostream>
#include <complex>
#include <utility>
#include <vector>
using namespace std;
using P = complex<double>;
using L = pair<P,P>;
using C = pair<P,double>;
using Poly = vector<P>;
#define X real()
#define Y imag()
const double EPS = 1e-7, pi = acos(-1.0);

double dot(P a, P b){ return a.X*b.X + a.Y*b.Y; }
double cross(P a, P b){ return a.X*b.Y - a.Y*b.X; }
P projection(P a, P b) {return dot(a,b)/norm(b)*b;}

int ccw(P a, P b, P c){
  b -= a, c -= a;
  if(cross(b,c) > EPS) return +1;
  if(cross(b,c) < -EPS) return -1;
  if(dot(b,c) < 0) return +2;
  if(norm(b) + EPS < norm(c)) return -2;
  return 0;
}

double ps_dist(P a, L s){
  P sf = s.first, ss = s.second;
  if(dot(ss-sf,a-sf) >= 0 and dot(sf-ss,a-ss) >= 0)
    return abs(cross(sf-ss,a-ss))/abs(sf-ss);
  return min(abs(a-sf),abs(a-ss));
}

double pl_dist(P a, L s){
  P sf = s.first, ss = s.second;
  return abs(cross(sf-ss,a-ss))/abs(sf-ss);
}

vector<P> cpcl(C c, L l){
  double d = pl_dist(c.first,l), r = c.second;
  P lf = l.first, ls = l.second;
  P m = lf + projection(c.first-lf,ls-lf);
  P x = sqrt(r*r-d*d)/abs(ls-lf)*(ls-lf);
  vector<P> cp(2,m);
  cp[0] -= x;
  cp[1] += x;
  return cp;
}

double common_area_cp(C c, Poly p){
  double ret = 0, r = c.second;
  int n = p.size();
  for(int i = 0; i < n; ++i) p[i] -= c.first;
  for(int i = 0; i < n; ++i){
    P cur = p[i], nex = p[(i+1)%n];
    if(abs(cur*nex) < EPS) continue;
    double d = arg(nex/cur);
    ret += r*r*r/2.;
    if(ps_dist(P(0,0),L(cur,nex)) < r -EPS){
      vector<P> cps = cpcl(C(P(0,0),r),L(cur,nex));
      P a, b;
      if(ccw(cur,nex,cps[0]) == 0 and
         ccw(cur,nex,cps[1]) == 0)
        a = cps[0], b = cps[1];
      else if(!ccw(cur,nex,cps[0]))
        a = cps[0], b = nex;
      else if(!ccw(cur,nex,cps[1]))
        a = cur, b = cps[1];
      else
        a = cur, b = nex;
      if(abs(a*b) < EPS) continue;
      d = arg(b/a);
      ret += cross(a,b)*0.5 - r*r*d*0.5;
    }
  }
  return ret;
}

int main(){
  int N;
  double R;
  cin >> N >> R;
  vector<P> pol;
  for(int i = 0; i < N; ++i){
    double x, y;
    cin >> x >> y;
    pol.emplace_back(x,y);
  }
  double ans = 0;
  for(int i = 0; i < R; ++i){
    C c(P(0,0),i+1);
    double a = (i+1)*(i+1)*pi;
    if(i%2) ans += a - common_area_cp(c,pol);
    else ans -= a - common_area_cp(c,pol);
    if(i > 0){
      
    }
  }
  printf("%.12f\n",ans);
}
#error "true"


Compiler output:
a.cc:102:2: error: #error "true"
  102 | #error "true"
      |  ^~~~~
Language: C++

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

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

 
inline double f(double a,double p,double q,double x){
    return a*(x-p)*(x-p)+q;
} 

inline double f(double a, double p, double x){
  return sqrt(1.0 + 4.0*a*a*x*x - 8.0*a*a*p*x + 4.0*a*a*p*p);
}
inline double s(double a, double p, double x1, double x2){
  double N = 10000000.0;
  double h, p1=0.0, p2=0.0;
  h = (x2 - x1)/ N;
  for(int n = 1; n <= N/2; n++){
      if(n == N/2) p2 += f(a, p, x1+2.0*n*h-h);
      else{
      p1 += f(a, p, x1+2.0*n*h);
      p2 += f(a, p, x1+2.0*n*h-h);
      }
  }
  p = f(a, p, x1) + 2.0*p1 + 4.0*p2 + f(a, p, x2);
  return p*h/3.0;
}
 
int main(){
    int W,H,n; cin >> W >> H >> n;
    double a[50],p[50],q[50];
    rep(i, n) cin >> a[i] >> p[i] >> q[i];
 
    vector<double> X;
    X.push_back(0);
    X.push_back(W);
    rep(i, n){
        if(0<=p[i]-sqrt(-(q[i]/a[i])) && p[i]-sqrt(-(q[i]/a[i]))<=W) X.push_back(p[i]-sqrt(-(q[i]/a[i]))); 
        if(0<=p[i]+sqrt(-(q[i]/a[i])) && p[i]+sqrt(-(q[i]/a[i]))<=W) X.push_back(p[i]+sqrt(-(q[i]/a[i]))); 
 
        rep(j, i){ 
            double A=a[i]-a[j];
            double B=-2*a[i]*p[i]+2*a[j]*p[j];
            double C=a[i]*p[i]*p[i]+q[i]-a[j]*p[j]*p[j]-q[j];
 
            if(A!=0){
                if(B*B-4*A*C>=0){
                    double x;
                    x=(-B-sqrt(B*B-4*A*C))/(2*A);
                    if(0<=x && x<=W) X.push_back(x);
                    x=(-B+sqrt(B*B-4*A*C))/(2*A);
                    if(0<=x && x<=W) X.push_back(x);
                }
            }
            else if(B!=0){ 
                double x=-1.0*C/B;
                if(0<=x && x<=W) X.push_back(x);
            }
        }
    }
 
    sort(X.begin(),X.end()); 
 
    double ans=0;
    rep(i, (int)X.size()-1){
        double x1=X[i],x2=X[i+1];
 
        int jmax=-1;
        rep(j, n)){
            if(f(a[j],p[j],q[j],(x1+x2)/2)>0
            && (jmax==-1 || f(a[jmax],p[jmax],q[jmax],(x1+x2)/2)<f(a[j],p[j],q[j],(x1+x2)/2))){
                jmax=j;
            }
        }
 
        if(jmax != -1)ans+=s(a[jmax], p[jmax], x1, x2);
        
    }
 
    cout << fixed;
    cout << setprecision(9) << ans << endl;
 
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:73:18: error: expected primary-expression before ')' token
   73 |         rep(j, n)){
      |                  ^
Language: C++

#include <cstdlib>
#include <iostream>
#include <queue>
#include <utility>
#include <vector>
using namespace std;

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

void calc_dp(vector<int>& dp, vector<int>& degree, const vector<vector<int> >& edge) {
	const int n = dp.size();
	queue<int> que;
	for(int i = 0; i < n; ++i)
		if(!degree[i])
			que.push(i);

	while(!que.empty()) {
		const int v = que.front();
		que.pop();

		for(int i = 0; i < edge[v].size(); ++i) {
			chmax(dp[edge[v][i]], dp[v] + 1);
			if(!(--degree[edge[v][i]]))
				que.push(edge[v][i]);
		}
	}
}

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

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

	vector<int> in(n, 0), out(n, 0);
	vector<vector<int> > es(n), rev(n);
	vector<pair<int, int> > assoc;
	assoc.reserve(m);
	for(int i = 0; i < m; ++i) {
		int a, b;
		cin >> a >> b;
		--a;
		--b;

		es[a].push_back(b);
		rev[b].push_back(a);
		++out[a];
		++in[b];
		assoc.push_back(make_pair(a, b));
	}

	vector<int> dp_source(n, 0), dp_sink(n, 0);
	calc_dp(dp_source, in, es);
	calc_dp(dp_sink, out, rev);

	vector<int> cnt(n, 0);
	for(int i = 0; i < m; ++i)
		++cnt[dp_source[assoc[i].first]];

	int length = *max_element(dp_source.begin(), dp_source.end());
	bool exist = false;
	for(int i = 0; i < m; ++i) {
		if(dp_source[assoc[i].first] + 1 + dp_sink[assoc[i].second] == length
			&& cnt[dp_source[assoc[i].first]] == 1) {
			cout << i + 1 << endl;
			exist = true;
		}
	}

	if(!exist)
		cout << -1 << endl;

	return EXIT_SUCCESS;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:23: error: 'max_element' was not declared in this scope
   61 |         int length = *max_element(dp_source.begin(), dp_source.end());
      |                       ^~~~~~~~~~~
Language: C++

#include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;

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

inline int dist(int a, int b, int w) {
	return abs(a % w - b % w) + abs(a / w - b / w);
}

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

	int n, a, b, c, d;
	cin >> n >> a >> b >> c >> d;
	--a; --b; --c; --d;

	int ans = INT_MAX;
	for(int i = 1; i <= n; ++i)
		chmin(ans, dist(a, b, i) + dist(c, d, i));

	cout << ans << endl;

	return EXIT_SUCCESS;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:16: error: no matching function for call to 'std::basic_istream<char>::tie(bool)'
   13 |         cin.tie(false);
      |         ~~~~~~~^~~~~~~
In file included from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:3:
/usr/include/c++/14/bits/basic_ios.h:299:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>* std::basic_ios<_CharT, _Traits>::tie() const [with _CharT = char; _Traits = std::char_traits<char>]'
  299 |       tie() const
      |       ^~~
/usr/include/c++/14/bits/basic_ios.h:299:7: note:   candidate expects 0 arguments, 1 provided
/usr/include/c++/14/bits/basic_ios.h:311:7: note: candidate: 'std::basic_ostream<_CharT, _Traits>* std::basic_ios<_CharT, _Traits>::tie(std::basic_ostream<_CharT, _Traits>*) [with _CharT = char; _Traits = std::char_traits<char>]'
  311 |       tie(basic_ostream<_CharT, _Traits>* __tiestr)
      |       ^~~
/usr/include/c++/14/bits/basic_ios.h:311:43: note:   no known conversion for argument 1 from 'bool' to 'std::basic_ostream<char>*'
  311 |       tie(basic_ostream<_CharT, _Traits>* __tiestr)
      |           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
a.cc:20:19: error: 'INT_MAX' was not declared in this scope
   20 |         int ans = INT_MAX;
      |                   ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <iostream>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

#include <cstdlib>
#include <iostream>
using namespace std;

int dist(int x1, int x2, int y1, int y2) {
    return abs(x1 - x2) + abs(y1 - y2);
}

int main() {
    int n, a, b, c, d;
    cin >> n;
    cin >> a >> b >> c >> d;

    int res = 500;
    for (int i = 1; i <= n; i++) {
        res = min(res, dist(a % i, b % i, a / i, b / i) + dist(c % i, d % i, c / i, dm   / i));
    }
    cout << res << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:85: error: 'dm' was not declared in this scope; did you mean 'd'?
   16 |         res = min(res, dist(a % i, b % i, a / i, b / i) + dist(c % i, d % i, c / i, dm   / i));
      |                                                                                     ^~
      |                                                                                     d
Language: C

#include <stdio.h>

#define MAX_PHRASES 393
#define MAX_MELODIES 393
#define MAX_LENGTH 394

typedef struct {
	int minimum;
	int maximum;
	int point;
} phrase_t;

typedef struct {
	int score;
} melody_t;

int phrase_num;
phrase_t phrases[MAX_PHRASES];

int score_mem[MAX_LENGTH][MAX_LENGTH];

int get_max_score(int length, int margin)
{
	int i, max_score;

	if(score_mem[length][margin] >= 0) {
		return score_mem[length][margin];
	}

	max_score = 0;

	for(i = 0; i < phrase_num; i++) {
		if(length < phrases[i].minimum) break;

		int partial_score = phrases[i].point + get_max_score(length - phrases[i].minimum, margin + (phrases[i].maximum - phrases[i].minimum));

		if(partial_score > max_score) {
			max_score = partial_score;
		}
	}

	score_mem[length][margin] = max_score;

	return max_score;
}

int main(void)
{
	{
		int i, j, melody_num;
		melody_t melodies[MAX_MELODIES];

		for(i = 0; i < MAX_LENGTH; i++) {
			for(j = 0; j < MAX_LENGTH; j++) {
				score_mem[i][j] = -1;
			}
		}

		scanf("%d", &phrase_num);

		for(i = 0; i < phrase_num; i++) {
			scanf("%d%d%d", &(phrases[i].minimum), &(phrases[i].maximum), &(phrases[i].point));
		}

		int flag = 0;

		do {
			flag = 0;
			for(i = 0; i < phrase_num - 1; i++) {
				if(phrases[i].minimum > phrases[i+1].minimum) {
					phrase_t temp = phrases[i];
					phrases[i] = phrases[i+1];
					phrases[i+1] = temp;
					flag = 1;
				}
			}
		} while(flag);

		scanf("%d", &melody_num);

		for(i = 0; i < melody_num; i++) {
			int melody_length;

			scanf("%d", &melody_length);

			if((melodies[i].score = get_max_score(melody_length, 0, 0)) == 0) {
				printf("-1\n");
				return 0;
			}
		}

		for(i = 0; i < melody_num; i++) {
			printf("%d\n", melodies[i].score);
		}
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:86:49: error: too many arguments to function 'get_max_score'
   86 |                         if((melodies[i].score = get_max_score(melody_length, 0, 0)) == 0) {
      |                                                 ^~~~~~~~~~~~~
main.c:22:5: note: declared here
   22 | int get_max_score(int length, int margin)
      |     ^~~~~~~~~~~~~
Language: C++

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

int n;
int lo[400], hi[400], score[400];
int dp[1000];

void calcDP(){
  memset(dp, -1, sizeof(dp));
  dp[0] = 0;

  for(int i = 0; i < 393; i++){
    if(dp[i] == -1) continue;

    for(int j = 0; j < n; j++){
      for(int k = lo[j]; k <= hi[j]; k++){
        if(i + k > 393) continue;
        dp[i + k] = max(dp[i + k], dp[i] + score[j]);
      }
    }
  }
}

int main(){
  while(cin >> n){
    for(int i = 0; i < n; i++){
      cin >> lo[i] >> hi[i] >> score[i];
    }

    calcDP();

    vector<int> v;
    int m;
    cin >> m;

    for(int i = 0; i < m; i++){
      int len;
      cin >> len;
      if(dp[len] != -1){
        v.push_back(dp[len]);
      }
    }

    if(v.size() != m){
      cout << -1 << endl;
      continue;
    }

    for(int i = 0; i < m; i++){
      cout << v[i] << endl;
    }
  }
}

Compiler output:
a.cc: In function 'void calcDP()':
a.cc:10:3: error: 'memset' was not declared in this scope
   10 |   memset(dp, -1, sizeof(dp));
      |   ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <vector>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include<iostream>
#include<set>
#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

class Phrase {
    public:
    int s,l,p;
    Phrase(int s,int l,int p) {

        this->s = s;
        this->l = l;
        this->p = p;
    }
    Phrase() {
        s=l=p=0;
    }

};

int n;
Phrase phra[400];
int m;
int w[400];
int dp[400];

int main() {

    cin>>n;
    rep(i,n) {
        int s,l,p;
        cin>>s>>l>>p;
        phra[i] = Phrase(s,l,p);
    }
    cin>>m;
    rep(i,m) cin>>w[i];

for(int k=0;k<400;k+=j) {
    rep(i,n) {
        for(int j=phra[i].s;j<=phra[i].l;j++) {
            
                dp[k+j] = max(dp[k+j],dp[k]+phra[i].p);
            }
        }
    }

    multiset<int> ans;
    
    rep(i,m) ans.insert(dp[w[i]]);    
    if(ans.find(0) != ans.end()) {
        cout<<"-1"<<endl;
        return 0;
    }

    multiset<int>::iterator it = ans.begin();
    while(it != ans.end()) {
        cout<<(*it)<<endl;
        it++;
    }




    return 0;
}

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

#include<iostream>
#include<set>
#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

class Phrase {
    public:
    int s,l,p;
    Phrase(int s,int l,int p) {

        this->s = s;
        this->l = l;
        this->p = p;
    }
    Phrase() {
        s=l=p=0;
    }

};

int n;
Phrase phra[400];
int m;
int w[400];
int dp[400];

int main() {

    cin>>n;
    rep(i,n) {
        int s,l,p;
        cin>>s>>l>>p;
        phra[i] = Phrase(s,l,p);
    }
    cin>>m;
    rep(i,m) cin>>w[i];

for(int k=0;k<400;k++) {
    rep(i,n) {
        for(int j=phra[i].s;j<=phra[i].l;j++) {
            
                dp[k+j] = max(dp[k+j],dp[k]+phra[i].p);
            }
        }
    }

    multiset<int> ans;
    
    rep(i,m) ans.insert(dp[w[i]]);    
    if(ans.find(0) != ans.end()) {
        cout<<"-1"<<endl;
        return 0;
    }

    multiset<int>::iterator it = ans.begin();
    while(it != ans.end()) {
        cout<<(*it)<<endl;
        it++;
    }




    return 0;
}
tt

Compiler output:
a.cc:67:1: error: 'tt' does not name a type; did you mean 'tm'?
   67 | tt
      | ^~
      | tm
Language: C

#include <cstdio>
#include <map>
using namespace std;
typedef map<int,int>mii;
int d[999],n,m,a,b,i,x;
map<int,mii>z;
int D(int c){
	if(d[c]>=0)return d[c];
	int i=0,x=0,y;
	mii::iterator it=z[c].begin();
	for(;it!=z[c].end();it++){
		y=D(it->first)+it->second;
		if(x<y)x=y;
	}
	return d[n]=x;
}
main(){
	for(scanf("%d%d",&n,&m);i<m;i++)scanf("%d%d%d",&a,&b,&x),z[b][a]=x;
	for(i=1;i<n;i++)d[i]=-1;
	printf("%d\n",D(n-1));
}

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

//============================================================================
// Name        : aoj2503.cpp
// Author      : afterCmidday
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <algorithm>
#include <cstdlib>
using namespace std;

int main() {
	int n, m, a, b, c, cost[400][400], d[400];
	bool used[400];
	fill(used,used + 400,false);
	memset(cost,-1,sizeof(cost));
	cin >> n >> m;
	for(int i = 0;i < m;i++){
		cin >> a >> b >> c;
		cost[a][b] = c;
	}
	fill(d,d + 400,-1);
	d[0] = 0;
	for(int i = 0;i < n - 1;i++){
		int t = -1;
		for(int j = 0;j < n - 1;j++){
			if(!used[j] && d[j] != -1 && (t == -1 || d[j] > d[t])){
				t = j;
			}
		}
		used[t] = true;
		for (int i = 0; i < n; i++) {
			if (cost[t][i] != -1) {
				d[i] = max(d[i], d[t] + cost[t][i]);
			}
		}

	}
	cout << d[n - 1] << endl;
	return 0;
}

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

#include<algorithm>
#include<vector>
#include<cstring>
#include<queue>
using namespace std;

vector<pair<int, int> > edge[401];
int dp[401];
int n;

int main()
{
  int m;
  for(;cin>>n>>m;)
    {
      // node[i][0]=in,[1]=max
      int node[n+1][2];
      vector<pair<int,int> > edge[n+1];

      memset(node,0,sizeof(node));
      int a,b,c;
      for (int i=0; i < m; i++) {
        cin>>a>>b>>c;
        node[b][0]++;
        edge[a].push_back(make_pair(b,c));
      }
      queue<int> qu;

      /*      for (int i=0; i < edge[0].size(); i++) {
        node[edge[0][i].first][0]--;
        if(node[edge[0][i].first][0]<=0)
          qu.push(edge[0][i].first);
        node[edge[0][i].first][1]=max(node[edge[0][i].first][1],
                                      edge[0][i].second);
                                      }*/
      qu.push(0);

      for(;!qu.empty();)
        {
          int now=qu.front();
          qu.pop();

          for (int i=0; i < edge[now].size(); i++) {
            int next = edge[now][i].first;
            node[next][0]--;
            if(node[next][0]<=0)
              qu.push(next);
            node[next][1]=max(node[next][1],
                              node[now][1]+edge[now][i].second);
          }
        }
      cout<<node[n-1][1]<<endl;

    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:8: error: 'cin' was not declared in this scope
   14 |   for(;cin>>n>>m;)
      |        ^~~
a.cc:5:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    4 | #include<queue>
  +++ |+#include <iostream>
    5 | using namespace std;
a.cc:52:7: error: 'cout' was not declared in this scope
   52 |       cout<<node[n-1][1]<<endl;
      |       ^~~~
a.cc:52:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:52:27: error: 'endl' was not declared in this scope
   52 |       cout<<node[n-1][1]<<endl;
      |                           ^~~~
a.cc:5:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    4 | #include<queue>
  +++ |+#include <ostream>
    5 | using namespace std;
Language: C++

#include<algorithm>
#include<vector>

#define INF 100000000

using namespace std;

int graph[400][400],n,dp[400];
bool visit[400];
vector<int>L;

void Tsort(int v){
  visit[v]=true;
  for(int i=0;i<n;i++)
    if(graph[v][i]>0 && !visit[i])Tsort(i);
  L.push_back(v);
}

int main(void){

  int m,a,b,c;

  cin >> n >> m;

  for(int i=0;i<m;i++){
    cin >> a >> b >> c;
    graph[a][b]=c;
  }
  
  Tsort(0);
  reverse(L.begin(),L.end());

  for(int i=1;i<L.size();i++)
    for(int j=0;j<L.size();j++)
      if(graph[L[j]][L[i]]>0)
	dp[L[i]]=max(dp[L[i]],dp[L[j]]+graph[L[j]][L[i]]);
  
  cout << dp[n-1] << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: 'cin' was not declared in this scope
   23 |   cin >> n >> m;
      |   ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<vector>
  +++ |+#include <iostream>
    3 | 
a.cc:38:3: error: 'cout' was not declared in this scope
   38 |   cout << dp[n-1] << endl;
      |   ^~~~
a.cc:38:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:38:22: error: 'endl' was not declared in this scope
   38 |   cout << dp[n-1] << endl;
      |                      ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<vector>
  +++ |+#include <ostream>
    3 |
Language: C++

using namespace std;
static const int MAX = 500;

class E{
public:
  int t, c;
  E(){}
  E(int t, int c):t(t), c(c){}
};

int N;
vector<E> G[MAX];
int dp[MAX];

int dfs(int u){
  if ( dp[u] != -1 ) return dp[u];
  int maxv = 0;
  for ( int i = 0; i < G[u].size(); i++ ){
    maxv = max(maxv, dfs(G[u][i].t) + G[u][i].c);
  }
  return dp[u] = maxv;
}

main(){
  int m, s, t, c;
  cin >> N >> m;
  for ( int i = 0; i < N; i++ ) dp[i] = -1;
  for ( int i = 0; i < m; i++ ){
    cin >> s >> t >> c;
    G[t].push_back(E(s, c));
  }
  cout << dfs(N-1) << endl;
}

Compiler output:
a.cc:12:1: error: 'vector' does not name a type
   12 | vector<E> G[MAX];
      | ^~~~~~
a.cc: In function 'int dfs(int)':
a.cc:18:24: error: 'G' was not declared in this scope
   18 |   for ( int i = 0; i < G[u].size(); i++ ){
      |                        ^
a.cc:19:12: error: 'max' was not declared in this scope; did you mean 'maxv'?
   19 |     maxv = max(maxv, dfs(G[u][i].t) + G[u][i].c);
      |            ^~~
      |            maxv
a.cc: At global scope:
a.cc:24:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   24 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:26:3: error: 'cin' was not declared in this scope
   26 |   cin >> N >> m;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:30:5: error: 'G' was not declared in this scope
   30 |     G[t].push_back(E(s, c));
      |     ^
a.cc:32:3: error: 'cout' was not declared in this scope
   32 |   cout << dfs(N-1) << endl;
      |   ^~~~
a.cc:32:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:23: error: 'endl' was not declared in this scope
   32 |   cout << dfs(N-1) << endl;
      |                       ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <iostream>
#include <vector>

using namespace std;

vector<char> tag[2];
vector< vector<int> > e[2];

int v[100][100];
bool f[100][100] = {0};

bool dp(int a, int b, int score) {
	if (tag[0][a] == tag[1][b]) ++score;

	if (score <= v[a][b]) return;
	if (f[a][b]) return true;
	v[a][b] = score;

	f[a][b] = true;
	if (tag[0][a] != tag[1][b]) {
		for (int i = 0; i < e[0][a].size(); ++i) {
			if ( dp(e[0][a][i], b, score) ) return true;
		}
		for (int i = 0; i < e[1][b].size(); ++i) {
			if ( dp(a, e[1][b][i], score) ) return true;
		}
	}
	for (int i = 0; i < e[0][a].size(); ++i) {
		for (int j = 0; j < e[1][b].size(); ++j) {
			if ( dp(e[0][a][i], e[1][b][j], score) ) return true;
		}
	}
	f[a][b] = false;
	return false;
}

int main() {
	fill(&v[0][0], &v[0][0]+100*100, -1);

	for (int t = 0; t < 2; ++t) {
		int N, M; cin >> N >> M;
		tag[t].resize(N);
		for (int i = 0; i < N; ++i) {
			cin >> tag[t][i];
		}
		e[t].resize(N);
		for (int i = 0; i < M; ++i) {
			int a, b; cin >> a >> b; --a, --b;
			e[t][a].push_back(b);
		}
	}

	for (int a = 0; a < tag[0].size(); ++a) for (int b = 0; b < tag[1].size(); ++b) {
		if ( dp(a, b, 0) ) {
			cout << -1 << endl;
			return 0;
		}
	}
	int ans = 0;
	for (int a = 0; a < tag[0].size(); ++a) for (int b = 0; b < tag[1].size(); ++b) {
		ans = max(ans, v[a][b]);
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'bool dp(int, int, int)':
a.cc:15:31: error: return-statement with no value, in function returning 'bool' [-fpermissive]
   15 |         if (score <= v[a][b]) return;
      |                               ^~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <queue>
#include <utility>
#include <tuple>
using namespace std;

using Graph = vector< vector<int> >;

void read_field(vector<char> &board, Graph &G) {
  int N, M; cin >> N >> M;
  board.resize(N);
  G.resize(N);

  for(int i=0; i<N; i++) {
    cin >> board[i];
  }

  for(int i=0; i<M; i++) {
    int u, v; cin >> u >> v;
    u--; v--;

    // directed !!!
    G[u].push_back(v);
  }
}

int rec[110][110];

int main() {
  vector<char> A_char, B_char;
  Graph A_Graph, B_Graph;
  read_field(A_char, A_Graph);
  read_field(B_char, B_Graph);

  bool operate_inf = false;
  int N1 = A_char.size(), N2 = B_char.size();

  queue< pair<int, int> > que;

  // equal
  for(int i=0; i<N1; i++) {
    for(int j=0; j<N2; j++) {
      if(A_char[i] == B_char[j]) {
        rec[i][j] = 1;
        que.push(make_pair(i, j));
      }
    }
  }

  while(que.size()) {
    int u1, u2; tie(u1, u2) = que.front(); que.pop();
    if(rec[u1][u2] > N1 + N2) {
      operate_inf = true;
    }
    else {
      // move (both)
      for(auto v1 : A_Graph[u1]) {
        for(auto v2 : B_Graph[u2]) {
          char c1 = A_char[v1], c2 = B_char[v2];

          int cost = 0;
          if(c1 == c2) {
            cost = rec[u1][u2] + 1;
          }
          else {
            cost = rec[u1][u2];
          }

          if(rec[v1][v2] < cost) {
            rec[v1][v2] = cost;
            que.push(make_pair(v1, v2));
          }
        }
      }

      // move (A)
      for(auto v1 : A_Graph[u1]) {
        int v2 = u2;
        char c1 = A_char[v1], c2 = B_char[v2];

        int cost = 0;
        if(c1 == c2) {
          cost = rec[u1][u2] + 1;
        }
        else {
          cost = rec[u1][u2];
        }

        if(rec[v1][v2] < cost) {
          rec[v1][v2] = cost;
          que.push(make_pair(v1, v2));
        }
      }

      // move (B)
      for(auto v2 : B_Graph[u2]) {
        int v1 = u1;
        char c1 = A_char[v1], c2 = B_char[v2];

        int cost = 0;
        if(c1 == c2) {
          cost = rec[u1][u2] + 1;
        }
        else {
          cost = rec[u1][u2];
        }

        if(rec[v1][v2] < cost) {
          rec[v1][v2] = cost;
          que.push(make_pair(v1, v2));
        }
      }
    }
  }

  if(operate_inf) {
    cout << -1 << endl;
    return 0;
  }
  
  int ans = 0;
  for(int i=0; i<N1; i++) {
    for(int j=0; j<N2; j++) {
      printf("%d ", rec[i][j]);
      ans = max(ans, rec[i][j]);
    }
    cout << endl;
  }
  cout << ans << endl;
  return 0;
}

0 1 1 1
0 1 2 3
1 1 2 3
1 1 3 4
1 2 2 3


Compiler output:
a.cc:135:1: error: expected unqualified-id before numeric constant
  135 | 0 1 1 1
      | ^
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <queue>
#include <utility>
#include <tuple>
using namespace std;

using Graph = vector< vector<int> >;

void read_field(vector<char> &board, Graph &G) {
  int N, M; cin >> N >> M;
  board.resize(N);
  G.resize(N);

  for(int i=0; i<N; i++) {
    cin >> board[i];
  }

  for(int i=0; i<M; i++) {
    int u, v; cin >> u >> v;
    u--; v--;

    // directed !!!
    G[u].push_back(v);
  }
}

int rec[110][110];
struct Elem {
  int u1, u2, cost;
};

int main() {
  vector<char> A_char, B_char;
  Graph A_Graph, B_Graph;
  read_field(A_char, A_Graph);
  read_field(B_char, B_Graph);

  bool operate_inf = false;
  int N1 = A_char.size(), N2 = B_char.size();

  queue< Elem > que;

  // equal
  for(int i=0; i<N1; i++) {
    for(int j=0; j<N2; j++) {
      if(A_char[i] == B_char[j]) {
        rec[i][j] = 1;
        que.push(Elem{i, j, 1});
      }
    }
  }

  while(que.size()) {
    int u1, u2, p_cost;

    u1 = que.front().u1;
    u2 = que.front().u2;
    p_cost = que.front().cost;
    que.pop();
    
    if(rec[u1][u2] > N1 + N2) {
      operate_inf = true;
    }
    else {
      // move (both)
      for(auto v1 : A_Graph[u1]) {
        for(auto v2 : B_Graph[u2]) {
          char c1 = A_char[v1], c2 = B_char[v2];

          int cost = 0;
          if(c1 == c2) {
            cost = p_cost + 1;
          }
          else {
            cost = p_cost;
          }

          if(rec[v1][v2] < cost) {
            rec[v1][v2] = cost;
            que.push(Elem{v1, v2, cost});
          }
        }
      }

      // move (A)
      for(auto v1 : A_Graph[u1]) {
        int v2 = u2;

        char c1 = A_char[v1], c2 = B_char[v2];

        int cost = 0;
        if(c1 == c2) {
          cost = p_cost + 1;
        }
        else {
          cost = p_cost;
        }

        if(rec[v1][v2] < cost) {
          rec[v1][v2] = cost;
          que.push(Elem{v1, v2, cost});
        }
      }

      // move (B)
      for(auto v2 : B_Graph[u2]) {
        int v1 = u1;

        char c1 = A_char[v1], c2 = B_char[v2];

        int cost = 0;
        if(c1 == c2) {
          cost = p_cost + 1;
        }
        else {
          cost = p_cost;
        }

        if(rec[v1][v2] < cost) {
          rec[v1][v2] = cost;
          que.push(Elem{v1, v2, cost});
        }
      }
    }
  }

  if(operate_inf) {
    cout << -1 << endl;
    return 0;
  }
  
  int ans = 0;
  for(int i=0; i<N1; i++) {
    for(int j=0; j<N2; j++) {
      printf("%d ", rec[i][j]);
      ans = max(ans, rec[i][j]);
    }
    cout << endl;
  }
  cout << ans << endl;
  return 0;
}


0 1 1 1
0 1 2 3
1 1 2 3
1 1 3 4
1 2 2 3



Compiler output:
a.cc:147:1: error: expected unqualified-id before numeric constant
  147 | 0 1 1 1
      | ^
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <queue>
#include <utility>
#include <tuple>
using namespace std;

using Graph = vector< vector<int> >;

void read_field(vector<char> &board, Graph &G) {
  int N, M; cin >> N >> M;
  board.resize(N);
  G.resize(N);

  for(int i=0; i<N; i++) {
    cin >> board[i];
  }

  for(int i=0; i<M; i++) {
    int u, v; cin >> u >> v;
    u--; v--;

    // directed !!!
    G[u].push_back(v);
  }
}

int rec[110][110];
struct Elem {
  int u1, u2, cost;
};

int main() {
  vector<char> A_char, B_char;
  Graph A_Graph, B_Graph;
  read_field(A_char, A_Graph);
  read_field(B_char, B_Graph);

  bool operate_inf = false;
  int N1 = A_char.size(), N2 = B_char.size();

  queue< Elem > que;

  // equal
  for(int i=0; i<N1; i++) {
    for(int j=0; j<N2; j++) {
      if(A_char[i] == B_char[j]) {
        rec[i][j] = 1;
        que.push(Elem{i, j, 1});
      }
    }
  }

  while(que.size()) {
    int u1, u2, p_cost;

    u1 = que.front().u1;
    u2 = que.front().u2;
    p_cost = que.front().cost;
    que.pop();
    
    if(cost < rec[u1][u2]) continue;
    if(rec[u1][u2] > N1 + N2) {
      operate_inf = true;
      break;
    }
    else {
      // move (both)
      for(auto v1 : A_Graph[u1]) {
        for(auto v2 : B_Graph[u2]) {
          char c1 = A_char[v1], c2 = B_char[v2];

          int cost = 0;
          if(c1 == c2) {
            cost = p_cost + 1;
          }
          else {
            cost = p_cost;
          }

          if(rec[v1][v2] < cost) {
            rec[v1][v2] = cost;
            que.push(Elem{v1, v2, cost});
          }
        }
      }

      if(A_char[u1] != B_char[u2]) {  
        // move (A)
        for(auto v1 : A_Graph[u1]) {
          int v2 = u2;

          char c1 = A_char[v1], c2 = B_char[v2];

          int cost = 0;
          if(c1 == c2) {
            cost = p_cost + 1;
          }
          else {
            cost = p_cost;
          }

          if(rec[v1][v2] < cost) {
            rec[v1][v2] = cost;
            que.push(Elem{v1, v2, cost});
          }
        }

        // move (B)
        for(auto v2 : B_Graph[u2]) {
          int v1 = u1;

          char c1 = A_char[v1], c2 = B_char[v2];

          int cost = 0;
          if(c1 == c2) {
            cost = p_cost + 1;
          }
          else {
            cost = p_cost;
          }

          if(rec[v1][v2] < cost) {
            rec[v1][v2] = cost;
            que.push(Elem{v1, v2, cost});
          }
        }
      }
    }
  }

  if(operate_inf) {
    cout << -1 << endl;
    return 0;
  }
  
  int ans = 0;
  for(int i=0; i<N1; i++) {
    for(int j=0; j<N2; j++) {
      // printf("%d ", rec[i][j]);
      ans = max(ans, rec[i][j]);
    }
    // cout << endl;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:63:8: error: 'cost' was not declared in this scope; did you mean 'const'?
   63 |     if(cost < rec[u1][u2]) continue;
      |        ^~~~
      |        const
Language: Java

import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int p = 1000000
        if(m==1){
          System.out.println(((int)(Math.pow(2, n)))%p);
        }
        else{
          int[][] dp = new int[n][5];
          dp[0][0] = 3;
          dp[0][1] = 3;
          dp[0][2] = 2;
          dp[0][3] = 1;
          dp[0][4] = 4;
          for(int i=1; i<n; i++){
            dp[i][0] = (((dp[i-1][0] + dp[i-1][1])%p + dp[i-1][3])%p + dp[i-1][4])%p;
            dp[i][1] = ((dp[i-1][0] + dp[i-1][1])%p +  dp[i-1][4])%p;
            dp[i][2] = (dp[i-1][0] + dp[i-1][2])%p;
            dp[i][3] = (dp[i-1][3] + dp[i-1][4])%p;
            dp[i][4] = (((dp[i-1][0] + dp[i-1][1])%p + dp[i-1][2])%p + dp[i-1][4])%p;
          }
          System.out.println(dp[n-1][4]%p);
        }
      }
  }


Compiler output:
Main.java:7: error: ';' expected
        int p = 1000000
                       ^
1 error
Language: C++

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

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef long long ll;
#define mod 1000000
int main() {
	int n, m;
	cin >> n >> m;
	ll rui[101];
	int r = 1;
	for (int i = 0; i < 101; i++)rui[i] = r, r = (r * 2) % mod;

	if (m == 2) {
		ll dp[101][101];
		memset(dp, 0, sizeof(dp));
		for (int j = 0; j <= n; j++)dp[0][j] += 1;
		for (int i = 1; i <= n; i++) {
			dp[i][i] += rui[i];
			for (int j = i + 1; j <= n; j++) {
				dp[i][j] += (rui[i - 1]);
			}
		}
		for (int i = 0; i <= n; i++) {
			for (int j = 0; j <= n; j++) {
				ll x = dp[i][j];
				dp[i + 1][j] += x;
				if (j < i) {
					for (int k = i + 1; k <= n; k++) {
						dp[k][k] = (dp[k][k] + (x*(ll)(i - j)*rui[k - i]) % mod) % mod;
					}
				}
			}
		}
		/*for (int i = 0; i <= n; i++) {
			for (int j = 0; j <= n; j++) {
				cout << dp[i][j] << " ";
			}
			cout << endl;
		}cout << endl;*/
		ll ans = 0;
		for (int j = 0; j <= n; j++) {
			ans += dp[n][j];
		}
		cout << ans % mod << endl; return 0;
	}
	else {
		cout << rui[n] << endl; return 0;
	}
	
}

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



#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <fstream>
 
using namespace std;
 
typedef long long ll;
int H,W;
 
int dp[110][5][110];
const int mod=1000000;
 
int dfs(int cy,int cx,int cdepth){
  if(dp[cy][cx][cdepth]>=0)return dp[cy][cx][cdepth];
  ll res=0;
  if(cy==H&&cx==W)return 1;
  // ???????§????????????´?????¨???????§????????????´?????§??´?????????
  if(cx==1){
    if(cy==H)return 1;
    else{
      res=(res+dfs(cy,cx+1,cdepth))%mod;
      res=(res+dfs(cy,cx-1,cdepth))%mod;
      res=(res+dfs(cy+1,cx,cy+2))%mod;
    }
  }
  // ??????????????´????????????????????????????????????
  // ???????????£??????????????????
  // ???????????£??????????????£??????????????£??????????????????(????????§????????????????????§??´?????????)
  else if(cx==0){
    // ???
    if(cy+1<=H)res=(res+dfs(cy+1,cx,cdepth))%mod;
    // ???????????£??????
    if(cy+1<=H&&cdepth<=cy)res=(res+dfs(cy+1,cx+1,cy+2))%mod;
    // ???????????£??????????????????????????£??????????????£????????????????????§??´?????????
    res=(res+(ll)(cy-cdepth+1)*dfs(min(H,cy+1),cx+2,cy+1))%mod;
  }
  else if(cx==2){
    // ???
    if(cy+1<=H)res=(res+dfs(cy+1,cx,cdepth))%mod;
    // ???????????£??????
    if(cy+1<=H&&cdepth<=cy)res=(res+dfs(cy+1,cx-1,cy+2))%mod;
    // ???????????£??????????????????????????£??????????????£????????????????????§??´?????????
    res=(res+(ll)(cy-cdepth+1)*dfs(min(H,cy+1),cx-2,cy+1))%mod;
  }
  return dp[cy][cx][cdepth]=res;
}
 
int dp2[3][110][3];
 
int dfs2(int px,int cy,int cx){
  if(dp2[px][cy][cx]>=0)return dp2[px][cy][cx];
  if(cy==H&&cx==W)return 1;
  ll res=0;
  if(cy+1<=H)res=res+dfs2(cx,cy+1,cx);
  if(cx+1<=W&&cx+1!=px)res=(res+dfs2(cx,cy,cx+1))%mod;
  if(cx-1>=0&&cx-1!=px)res=(res+dfs2(cx,cy,cx-1))%mod;
  return dp2[px][cy][cx]=res;
}
 
int main(){
  cin>>H>>W;
  memset(dp,-1,sizeof(dp));
  memset(dp2,-1,sizeof(dp2));
  if(W==2)cout<<dfs(0,0,0)<<endl;
  else cout<<dfs2(2,0,0)<<endl;
   
  return 0;
}
 
Case #24:  

Compiler output:
a.cc:75:6: error: stray '#' in program
   75 | Case #24:
      |      ^
a.cc:75:1: error: 'Case' does not name a type
   75 | Case #24:
      | ^~~~
Language: Java

import java.io.InputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;
import java.util.NoSuchElementException;
import java.math.BigInteger;

public class Main{

static PrintWriter out;
static InputReader ir;

static void solve(){
 for(;;){
  int n=ir.nextInt();
  int[] a=ir.nextIntArray(n);
  for(int i=0;i<n;i++) a[i]%=26;
  char[] s=ir.next().toCharArray();
  for(int i=0;i<s.length;i++){
   int t=s[i]-'a';
   t-=a[i%n];
   while(t<0) t+=26;
   s[i]=(char)('a'+t);
  }
  out.println(Strng.valueOf(s));
 }
}

public static void main(String[] args) throws Exception{
 ir=new InputReader(System.in);
 out=new PrintWriter(System.out);
 solve();
 out.flush();
}

static class InputReader {
 private InputStream in;
 private byte[] buffer=new byte[1024];
 private int curbuf;
 private int lenbuf;

 public InputReader(InputStream in) {this.in=in; this.curbuf=this.lenbuf=0;}
 
 public boolean hasNextByte() {
  if(curbuf>=lenbuf){
   curbuf= 0;
   try{
    lenbuf=in.read(buffer);
   }catch(IOException e) {
    throw new InputMismatchException();
   }
   if(lenbuf<=0) return false;
  }
  return true;
 }

 private int readByte(){if(hasNextByte()) return buffer[curbuf++]; else return -1;}
 
 private boolean isSpaceChar(int c){return !(c>=33&&c<=126);}
 
 private void skip(){while(hasNextByte()&&isSpaceChar(buffer[curbuf])) curbuf++;}
 
 public boolean hasNext(){skip(); return hasNextByte();}
 
 public String next(){
  if(!hasNext()) throw new NoSuchElementException();
  StringBuilder sb=new StringBuilder();
  int b=readByte();
  while(!isSpaceChar(b)){
   sb.appendCodePoint(b);
   b=readByte();
  }
  return sb.toString();
 }
 
 public int nextInt() {
  if(!hasNext()) throw new NoSuchElementException();
  int c=readByte();
  while (isSpaceChar(c)) c=readByte();
  boolean minus=false;
  if (c=='-') {
   minus=true;
   c=readByte();
  }
  int res=0;
  do{
   if(c<'0'||c>'9') throw new InputMismatchException();
   res=res*10+c-'0';
   c=readByte();
  }while(!isSpaceChar(c));
  return (minus)?-res:res;
 }
 
 public long nextLong() {
  if(!hasNext()) throw new NoSuchElementException();
  int c=readByte();
  while (isSpaceChar(c)) c=readByte();
  boolean minus=false;
  if (c=='-') {
   minus=true;
   c=readByte();
  }
  long res = 0;
  do{
   if(c<'0'||c>'9') throw new InputMismatchException();
   res=res*10+c-'0';
   c=readByte();
  }while(!isSpaceChar(c));
  return (minus)?-res:res;
 }

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

 public int[] nextIntArray(int n){
  int[] a=new int[n];
  for(int i=0;i<n;i++) a[i]=nextInt();
  return a;
 }

 public long[] nextLongArray(int n){
  long[] a=new long[n];
  for(int i=0;i<n;i++) a[i]=nextLong();
  return a;
 }

 public char[][] nextCharMap(int n,int m){
  char[][] map=new char[n][m];
  for(int i=0;i<n;i++) map[i]=next().toCharArray();
  return map;
 }
}
}

Compiler output:
Main.java:28: error: cannot find symbol
  out.println(Strng.valueOf(s));
              ^
  symbol:   variable Strng
  location: class Main
1 error
Language: C

#include<stdio.h>
#include<String.h>
int main()
{
  int n,i,key[100],lenS,keyi=0,j,m=0;
  char S[100],an[100][100];
  while(1){
    scanf("%d",&n);
    if(n==0)break;
    for(i=0;i<n;i++){
      scanf("%d",&key[i]);
    }
    scanf("%s",S);
    lenS=strlen(S);
    for(i=0;i<lenS;i++){
      for(j=0;j<key[keyi];j++){
        if(S[i]=='A')S[i]='z';
        else if(S[i]=='a')S[i]='Z';
        else S[i]--;
      }
      keyi++;
      if(keyi==n)keyi=0;
    }
    printf("%s\n",S);
    //strcpy(an[m],S);
    m++;
    keyi=0;
  }
  /* for(i=0;i<m;i++){
    printf("%s\n",an[m]);
    }*/
  return 0;
}

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

#include<stdio.h>
#include<String.h>
int main()
{
  int n,i,key[100],lenS,keyi=0,j,m=0;
  char S[1000],an[100][100];
  while(1){
    scanf("%d",&n);
    if(n==0)break;
    for(i=0;i<n;i++){
      scanf("%d",&key[i]);
    }
    scanf("%s",S);
    lenS=strlen(S);
    for(i=0;i<lenS;i++){
      for(j=0;j<key[keyi];j++){
        if(S[i]=='A')S[i]='z';
        else if(S[i]=='a')S[i]='Z';
        else S[i]--;
      }
      keyi++;
      if(keyi==n)keyi=0;
    }
    printf("%s\n",S);
    //strcpy(an[m],S);
    m++;
    keyi=0;
  }
  /* for(i=0;i<m;i++){
    printf("%s\n",an[m]);
    }*/
  return 0;
}

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

#include<stdio.h>
#include<String.h>
int main()
{
  int n,i,key[100],lenS,keyi=0,j,m=0;
  char S[100][100];
  while(1){
    scanf("%d",&n);
    if(n==0)break;
    for(i=0;i<n;i++){
      scanf("%d",&key[i]);
    }
    scanf("%s",S[m]);
    lenS=strlen(S[m]);
    for(i=0;i<lenS;i++){
      for(j=0;j<key[keyi];j++){
        if(S[m][i]=='A')S[m][i]='z';
        else if(S[m][i]=='a')S[m][i]='Z';
        else S[m][i]--;
      }
      keyi++;
      if(keyi==n)keyi=0;
    }
    m++;
    keyi=0;
  }
  for(i=0;i<m;i++){
    printf("%s\n",S[m]);
  }
  return 0;
}

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

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
	int n,i,j;
	int *key;
	char code[100],str[100];

	scanf("%d",&n);
	key=(int *)calloc(n,sizeof(int));
	for(i=0;i<n;i++)scanf("%d",&key[i]);
	scanf("%s",code);
	i=0;
	while(1){
		if(code[i]='\0'){
			str[i]=code[i];
			break;
		}
		(int)str[i]=(int)code[i]-key[(n+1)%(i+1)];
		i++;
	}
	printf("%s",str);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:28: error: lvalue required as left operand of assignment
   20 |                 (int)str[i]=(int)code[i]-key[(n+1)%(i+1)];
      |                            ^
Language: C

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

void main()
{
	int i;
	int n;
	int k[52];
	char buf[100],ans[100];
	unsigned int buf_length;
//initialize
	for(i=0;i<100;i++){
		buf[i] = '\n';
		ans[i] = '\n';
	}
	while(1){
		scanf("%d",&n);
		if(n == 0) break;
		for(i=0;i<n;i++) scanf("%d",k[i]);
		scanf("%s",buf);
		buf_length = strlen( buf );
		for( i=0; i < buf_length; i++){
			ans[i] = str[i] - (char)k[i%n];
		}
		printf("%s",ans);
	}
}
	


Compiler output:
main.c: In function 'main':
main.c:23:34: error: 'str' undeclared (first use in this function)
   23 |                         ans[i] = str[i] - (char)k[i%n];
      |                                  ^~~
main.c:23:34: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

import os
import sys
import itertools
import math
from collections import Counter, defaultdict

class Main(object):
    
    def __init__(self):
        self.chars = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']

    def solve(self):
        '''
        insert your code
        '''
        while True:
            n = input()
            if n == 0:
                break
            k = map(int, raw_input().split())
            s = raw_input()
            ans = ''
            for i in range(len(s)):
                ans += self.chars[self.chars.index(s[i]) - k[i % len(k)]]
            print ans
        return None

if __name__ == '__main__':
    m = Main()
    m.solve()

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #!
    1 | #! /usr/bin/env python
      |  ^
a.cc:2:3: error: invalid preprocessing directive #-
    2 | # -*- coding: utf-8 -*-
      |   ^
a.cc:16:9: error: empty character constant
   16 |         '''
      |         ^~
a.cc:16:11: warning: missing terminating ' character
   16 |         '''
      |           ^
a.cc:16:11: error: missing terminating ' character
a.cc:18:9: error: empty character constant
   18 |         '''
      |         ^~
a.cc:18:11: warning: missing terminating ' character
   18 |         '''
      |           ^
a.cc:18:11: error: missing terminating ' character
a.cc:25:19: error: empty character constant
   25 |             ans = ''
      |                   ^~
a.cc:31:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
   31 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:4:1: error: 'import' does not name a type
    4 | import os
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'