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

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <cstdio>
#include <ctime>
#include <assert.h>
#include <chrono>
#include <random>
using namespace std;
typedef long long int ll;
using ull = unsigned long long;


mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
    return (ull)rng() % B;
}

int last[26];
int c[26];
int s[365][26];
int a[365];

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int d; cin >> d;
    for(int i=0;i<26;i++){
    	cin >> c[i];
    }
    for(int i=0;i<d;i++){
    	for(int j=0;j<26;j++){
    		cin >> s[i][j];
    	}
    }
    for(int i=0;i<d;i++){
    	int mx=0;
    	int id=0;
    	for(int j=0;j<26;j++){
    		if(mx<(i+1-last[j])*c[j]){
    			mx=(i+1-last[j])*c[j];
    			id=j;
    		}
    	}
    	a[i]=id+1;
    }
    for(int i=0;i<26;i++){
    	rast[i]=0;
    }
    int res=0;
    for(int i=0;i<d;i++){
    	res+=s[i][a[i]-1];
    	last[a[i]-1]=i+1;
    	for(int j=0;j<26;j++){
    		res-=c[j]*(i+1-last[j]);
    	}
    }
    for(int i=0;i<1e6;i++){
    	int day,qq;
    	day=myRand(d)+1;
    	qq=myRand(26)+1;
    	int resres=res;
    	int qqq=a[day-1];
        last[qq-1]=last[qqq-1]=0;
        for(int i=0;i<d;i++){
            if(a[i]==qq){
                last[a[i]-1]=i+1;
            }
            if(a[i]==qqq){
                last[a[i]-1]=i+1;
            }
            resres+=c[qq-1]*(i+1-last[qq-1]);
            resres+=c[qqq-1]*(i+1-last[qqq-1]);
        }
        a[day-1]=qq;
        resres-=s[day-1][qqq-1];
        resres+=s[day-1][qq-1];
        last[qq-1]=last[qqq-1]=0;
        for(int i=0;i<d;i++){
            if(a[i]==qq){
                last[a[i]-1]=i+1;
            }
            if(a[i]==qqq){
                last[a[i]-1]=i+1;
            }
            resres-=c[qq-1]*(i+1-last[qq-1]);
            resres-=c[qqq-1]*(i+1-last[qqq-1]);
		}
		if(resres>=res){

		}
		else{
			a[day-1]=qqq;
		}
    }
    for(int i=0;i<d;i++){
    	printf("%d\n",a[i]);
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:50:9: error: 'rast' was not declared in this scope; did you mean 'last'?
   50 |         rast[i]=0;
      |         ^~~~
      |         last
Language: C

#include<stdio.h>

int main(void){
	int D,i,j;
    int s[5][26];
  	scanf("%d",&D);
  	for(i=0;i<D;i++){
    	for(j=0;j<26;j++){
         	scanf("%d",&s[i][j]); 
        }
    }  
	return 0;
}
  
}

Compiler output:
main.c:15:1: error: expected identifier or '(' before '}' token
   15 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
const ll MOD=1000000007;
const long double PI=3.14159265358979;
const ll MAX=0;

int main() {
  rep(i,365){
    cout<<rand()%26+1<<endl
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: expected ';' before '}' token
   11 |     cout<<rand()%26+1<<endl
      |                            ^
      |                            ;
   12 |   }
      |   ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
struct fastio { fastio () { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); } } _io;
template<class T, class U> bool chmax(T& a, const U &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T, class U> bool chmin(T& a, const U &b) { if (a > b) { a = b; return 1; } return 0; }

struct xorshift {
private :
	unsigned long long x = 88172645463325252ULL;

public :
	constexpr unsigned int rand_int() {
		x = x ^ (x << 7);
		return x = x ^ (x >> 9);
	}

	unsigned long long rand_ll() {
		x = x ^ (x << 7);
		return x = x ^ (x >> 9);
	}

	double rand_double() {
		x = x ^ (x << 7);
		x = x ^ (x >> 9);
		return (double)x * 5.42101086242752217e-20;
	}

};

struct timer {
private :
  double t = 0.0;
public :
  timer() { restart(); }
  inline void restart() { t = now(); }
  inline double time() { return now() - t; }
  inline double now() {
    unsigned long long l, h;
    __asm__ ("rdtsc" : "=a"(l), "=d"(h));
    return (double)(l | h << 32) * 3.5714285714285715e-10;
  }
};

constexpr unsigned int D = 365;
constexpr unsigned int type = 26;
constexpr int INF = (1 << 30);

array<int, type> c, last;
array<array<int, type>, D> s;
array<unsigned int, D> ans;

void input () {
	int buff;
	cin >> buff;
	for (int i = 0; i < type; i++) {
		cin >> c[i];
		last[i] = 0;
	}
	for (int i = 0; i < D; i++) {
		for (int j = 0; j < type; j++) {
			cin >> s[i][j];
		}
	}
}

/*
vector<pair<int, int>> next_contest (int day, const array<int, type> &last) {
	array<int, type + 1> l, r;
	l[0] = r[type] = 0;
	vector<pair<int, int>> score;
	for (int i = 0; i < type; i++) {
		l[i + 1] = l[i] + c[i] * (day - last[i]);
		r[type - i] = r[type - i + 1] + c[type - i] * (day - last[type - i]);
	}
	for (int i = 0; i < type; i++) {
		int val = s[day - 1][i] - (l[i] + r[i + 1]);
		score.emplace_back(val, i);
	}
	sort(score.begin(), score.end(), [](const pair<int, int> &l, const pair<int, int> &r) { return (l.first > r.first); });
	return score;
}
*/

int score (int day, int idx) {
	int ans = s[day][idx];
	for (int i = 0; i < type; i++) {
		ans -= c[i] * (day + 1 - last[i]);
	}
	return ans;
}

int main() {
	timer tim;
	xorshift rnd;
	input();
	int nax = -INF;
	
	while (tim.time() < 0.500)　{
		int val = 0;
		array<unsigned int, D> dat;
		fill(last.begin(), last.end(), 0);
		for (int day = 0; day < D; day++) {
			unsigned int &id = dat[day];
			id = rnd.rand_int() % type;
			last[id] = day + 1;
			val += score(day, id);
		}
		if (chmax(nax, val)) ans = dat;
	}
	
	for (int contest : ans) cout << contest << '\n';
	return 0;
}
	

Compiler output:
a.cc:98:35: error: extended character 　 is not valid in an identifier
   98 |         while (tim.time() < 0.500)　{
      |                                   ^
a.cc: In function 'int main()':
a.cc:98:35: error: '\U00003000' was not declared in this scope
   98 |         while (tim.time() < 0.500)　{
      |                                   ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int D;
  cin>>D;
  vector<vector<int>> vec(D, vector<int>(26));
  vector<int>ve(D);
  vector<int>v(D);
  for(int X=0;X<D;X++){
    cin>>ve.at(X);
    ve.at(X)=v.at(X);
  }
  sort(v.begin(), v.end());
  vector<int>A{v.at(0),v.at(1),v.at(2)};
  vector<int>B{v.at(3),v.at(4),v.at(5),v.at(6),v.at(7),v.at(8)};
  vector<int>C{v.at(9),v.at(10),v.at(11),v.at(12),v.at(13),v.at(14),v.at(15),v.at(16),v.at(17),v.at(18),v.at(19)};
  vector<int>D{v.at(20),v.at(21),v.at(22),v.at(23),v.at(24),v.at(25)};
  for (int i = 0; i < D; i++) {
    for (int j = 0; j < 26; j++) {
      cin>>vec.at(i).at(j);
    }
  }
  for(int X=1;X<=D;X++){
    if(X%74>0&&X%74<4){
      cout<<A.at(X-1);
    }
    if(X%74>3&&X%74<10){
      cout<<B.at(X-1);
    }
    if(X%74>9&&X%74<13){
      cout<<A.at(X-1);
    }
    if(X%74>12&&X%74<24){
      cout<<C.at(X-1);
    }
    if(X%74>23&&X%74<30){
      cout<<A.at(X-1);
    }
    if(X%74>29&&X%74<32){
      cout<<B.at(X-1);
    }
    if(X%74>31&&X%74<43){
      cout<<A.at(X-1);
    }
    if(X%74>42&&X%74<49){
      cout<<C.at(X-1);
    }
    if(X%74>48&&X%74<55){
      cout<<A.at(X-1);
    }
    if(X%74>54&&X%74<58){
      cout<<B.at(X-1);
    }
    if(X%74>57&&X%74<69){
      cout<<A.at(X-1);
    }
    if(X%74>68&&X%74<75){
      cout<<C.at(X-1);
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:14: error: conflicting declaration 'std::vector<int> D'
   18 |   vector<int>D{v.at(20),v.at(21),v.at(22),v.at(23),v.at(24),v.at(25)};
      |              ^
a.cc:5:7: note: previous declaration as 'int D'
    5 |   int D;
      |       ^
Language: Java

import java.util.*;

public class IntroHeuristics {

    static final long LIMIT = 1880L;
    static final int D = 365;
    static final int[] c = new int[27];
    static final int[][] s = new int[365][27];
    static final int[] ans = new int[365];
    static final int[] last = new int[27];
    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        Scanner sc = new Scanner(System.in);
        int d = sc.nextInt();
        int fla = 0;
        for (int i = 1; i <= 26; i++) {
            c[i] = sc.nextInt();
            fla += c[i];
        }
        for (int i = 0; i < D; i++) {
            for (int j = 1; j <= 26; j++) {
                s[i][j] = sc.nextInt();
            }
        }
        Map<Integer, TreeSet<Integer>> lastMap = new HashMap<>();
        for (int i = 1; i <= 26; i++) {
            lastMap.put(i, new TreeSet<>());
            lastMap.get(i).add(0);
            lastMap.get(i).add(D+1);
        }
        StringBuilder sb = new StringBuilder();
        int score = 0;
        for (int i = 0; i < D; i++) {
            score -= fla;
            int max = score;
            int idx = 0;
            for (int j = 1; j <= 26; j++) {
                int tmp = score + s[i][j] +  c[j] *(i - last[j] + 1);
                if(max < tmp){
                    max = tmp;
                    idx = j;
                }
            }
            score = max;
            ans[i] = idx;
            last[idx] = i+1;
            lastMap.get(idx).add(i+1);
        }

        while(System.currentTimeMillis() - start < LIMIT){
            for (int i = 0; i < D; i++) {
                int prei = ans[i];
                int idx = prei;
                int max = s[i][prei] + c[prei] * (i - lastMap.get(prei).lower(i+1) +1) * (lastMap.get(prei).higher(i+1) - i -1);
                for (int j = 1; j <= 26; j++) {
                    if(j == prei)continue;
                    int tmp = s[i][j] + c[j] * (i - lastMap.get(j).lower(i+1) +1) * (lastMap.get(j).higher(i+1) - i -1);
                    if(max < tmp){
                        idx = j;
                        max = tmp;
                    }
                }
                if(prei != idx){
                    ans[i] = idx;
                    lastMap.get(prei).remove(i+1);
                    lastMap.get(idx).add(i+1);
                }
            }
        }


        for (int i = 0; i < D; i++) {
            sb.append(ans[i] + "\n");
        }
        System.out.print(sb.toString());
        sc.close();

    }

}


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

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

int main(){  
  int D;
  cin >> D;

  vector<int> c(26);
  rep(i,26){
    cin >> c[i];
  }

  vector<vector<int>> s (D,vector<int>(26));
  rep(d, D){
    rep(i,26){
      cin >> s[d][i];
    }
  }

  vector<int> t(D);

  rep(d, D){
    vector<int>::iterator iter = max_element(s[d].begin(), s[d].end());
    t[d] = distance(s[d].begin(), iter);
    t[d] +=1
    cout << t[d] << endl;
  }
/*
  vector<int> last(26);
  vector<int> v(D);

  rep(d, D){
    last[t[d]] = d+1;

    int desc=0;
    rep(i, 26){
      desc += c[i]*(d+1-last[i]);
    }

    if(d==0){
      v[d] = s[d][t[d]] - desc;
    }else{
      v[d] = v[d-1] + s[d][t[d]] - desc;
    }
    cout << v[d] <<endl;
  }
  */
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:13: error: expected ';' before 'cout'
   26 |     t[d] +=1
      |             ^
      |             ;
   27 |     cout << t[d] << endl;
      |     ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll; //int:2*10**9
typedef long double ld;
typedef pair<ll,ll> P;
#define REP(i,n) for(ll i = 0; i<(ll)(n); i++)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define FORD(i,a,b) for(ll i=(a);i>=(b);i--)
#define vec2(name,i,j,k) vector<vector<ll>> name(i,vector<ll>(j,k))
#define vec3(name,i,j,k,l) vector<vector<vector<ll>>> name(i,vector<vector<ll>>(j,vector<ll>(k,l)))
#define pb push_back
#define MOD 1000000007 //998244353
#define PI 3.141592653
#define INF 100000000000000 //14
//cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);
int main(){
    ll d; cin >> d;
    vector<ll> ansl(365,0);
    vector<ll> c(26,0);
    vector<ll> las(26,0);
    vec2(s,d,26,0);
    REP(i,26) cin >> c[i];
    REP(i,d)REP(j,26) cin >> s[i][j];
    ll con = 0;
    REP(i,d){
        ll maxind = 0; ll maxc = s[i][0]+c[0]*(i+1-las[0]);
        FOR(j,1,25)if(maxc<s[i][j]+c[j]*(i+1-las[j])){
            maxind = j;
            maxc = s[i][j]+c[j]*(i+1-las[j];
            ansl[i]=j;
            las[j]=i+1;
        }
        cout << maxind+1 << endl;
    }
    //REP(i,d) cout << ansl[i]+1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:44: error: expected ')' before ';' token
   29 |             maxc = s[i][j]+c[j]*(i+1-las[j];
      |                                 ~          ^
      |                                            )
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i, n, x) for(int i = x;i < n;i++)
#define IN(a, x, b) (a<=x && x<b)
const long long INF = 1e18;
const long double PI = acos(-1.0L);
#define Day 26

int main()
{
  int D;
  cin>>D;
  int c[26];
  rep(i,Day) cin>>c[i];
  int s[26][Day];
  rep(i,D){
    rep(j,Day){
      cin>>map[i][j];
    }
  }
  
  rep(i,D){
    cout<<((i)%26 + 1) << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:15: error: missing template arguments before '[' token
   22 |       cin>>map[i][j];
      |               ^
Language: C++

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

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

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#define ll long long int
#define pb push_back
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
using namespace std;

int mx8[] = {0,0,1,-1,-1,1,-1,1};
int my8[] = {-1,1,0,0,-1,-1,1,1};
int mx4[] = {1,-1,0,0};
int my4[] = {0,0,-1,1};
const int MOD = 1000000007;

ll y[10000005];

int main() {
    int D; cin >> D;
    vector<int> c(26);
    rep(i,26) cin >> c[i];
    int s[D][26];
    rep(i,D) rep(j,26) cin >> s[i][j];
  rep(i,d) cout << 1 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:9: error: 'd' was not declared in this scope
   38 |   rep(i,d) cout << 1 << endl;
      |         ^
a.cc:20:33: note: in definition of macro 'rep'
   20 | #define rep(i,n) for(int i=0;i<(n);i++)
      |                                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL<<60;
const long long int Mod = 1000000007;
using ll = long long int; using ci = const int;
using vi = vector<int>;  using Vi = vector<long long int>;
using P = pair<int, int>;  using PLL = pair<ll, ll>;
using matrix = vector<vector<ll>>;
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define rp(i,N) for(ll i = 0; i < (ll)N; i++)
#define repi(i,a,b) for(ll i = ll(a); i < ll(b); ++i)
template<class T>bool chmax(T &former, const T &b) { if (former<b) { former=b; return true; } return false; }
template<class T>bool chmin(T &former, const T &b) { if (b<former) { former=b; return true; } return false; }
template<class T>T sqar(T x){ return x*x; }//sqrt(x)は平方根;
#define Sort(v) std::sort(v.begin(), v.end(), std::greater<decltype(v[0])>()) //降順でVをソート
#define p_queue(v) priority_queue<v, vector<v>, greater<v> >
template<class T> inline void princ(T x){cout<<x<<" ";}; 
template<class T> inline void print(T x){cout<<x<<"\n";};
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
///////////////////////////////////////////////////////////////////////////////////

void solve(){
    ll D;
    cin >> D;
    Vi c(26);
    matrix s(D,Vi(26));
    rp(i,26) cin >> c[i];
    rp(i,D){
        rp(j,26) cin >> s[i][j];
    }
    Vi last(26,-1);
    Vi t(D);
    rp(i,D){
        ll con;
        ll maxi=-INF;
        rp(j,26){
            if(chmax(maxi,s[i][j]+c[i]*(i-last[j]))){
                con=j;
            }
        }
        t[i]=con;
        last[con]=i;
    }
    
    rp(i,1000){
        ll store=score;
        ll d= rand()%365;
        ll q;
        do {q= rand()%26;}
        while(q==t[d]);
        ll l=-1,r=-1;
        for(ll c=d+1; c<D; c++){
            if(t[c]==t[d]) {
                r=c;
                break;
            }
        }
        if(r==-1) r=D;
        for(ll c=d-1; c>=0; c--){
            if(t[c]==t[d]){
                l=c;
                break;
            }
        } 
        score -= c[t[d]]*(d-l)*(r-d);
        l=-1; r=-1;
        for(ll c=d+1; c<D; c++){
            if(t[c]==q) {
                r=c;
                break;
            }
        }
        if(r==-1) r=D;
        for(ll c=d-1; c>=0; c--){
            if(t[c]==q){
                l=c;
                break;
            }
        }
        score += c[q]*(d-l)*(r-d);
        score += s[d][q]-s[d][t[d]];
        if(store<score)
        t[d]=q;
        else{
            score=store;
        }
    }
    for(auto i:t){
        print(i+1);
    }
    return;
}
int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    std::cout<<std::fixed<<std::setprecision(30);
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:50:18: error: 'score' was not declared in this scope; did you mean 'store'?
   50 |         ll store=score;
      |                  ^~~~~
      |                  store
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<set>
#include<map>
#include<queue>
#include<cmath>
#define REP(i,a) for (int i = 0;i < (a);++i)
#define FOR(i,a,b) for (int i = (a);i < (b); ++i)
#define FORR(i,a,b) for (int i = (a);i >= (b); --i)
#define ALL(obj) (obj).begin(),(obj).end()
#define SORT(list) sort(ALL((list)));
#define MOD 1000000007
using namespace std;
using ll = long long;
#define NUM_OF_CONTESTS 26
int main(){
     int D;
    cin >> D;
    vector<int>c(NUM_OF_CONTESTS);
    REP(i,NUM_OF_CONTESTS)cin >> c[i];

    int s[D][NUM_OF_CONTESTS];
    REP(i,D){REP(j,NUM_OF_CONTESTS){cin >> s[i][j];}}

    REP(i,D){
        int today = 0,remi;
        REP(j,NUM_OF_CONTESTS){
            if(today < s[i][j]){
                today = s[i][j];
                remi = j;
            }
        }
        cout << j+1 << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:17: error: 'j' was not declared in this scope
   35 |         cout << j+1 << endl;
      |                 ^
Language: C++

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

int main() {
    int D;
    cin>>D;
    long c[26];
    long s[365][26];
    long counter = 0;
    long temp;
    while (std::cin >> temp){
		if(counter < 26){
        	c[counter] = temp;
        }
        else{
          int i = counter/26;
          int j = counter%26;
          s[i][j] = temp;
        }
      }
  
}

for(int i= 0; i< 365 ; i++){
	cout << rand() % 26 << endl; 
}

Compiler output:
a.cc:25:1: error: expected unqualified-id before 'for'
   25 | for(int i= 0; i< 365 ; i++){
      | ^~~
a.cc:25:15: error: 'i' does not name a type
   25 | for(int i= 0; i< 365 ; i++){
      |               ^
a.cc:25:24: error: 'i' does not name a type
   25 | for(int i= 0; i< 365 ; i++){
      |                        ^
Language: C++

import numpy as np
import scipy.optimize
import copy


D = int(input())
c_arr = [int(v) for v in input().split()]
s_arr = np.zeros([366, 26])
for di in range(D):
  s_arr[di,:] = np.array([int(v) for v in input().split()])
  
def calc_score(out):
  sat = 0
  last = [0] * 26
  for d in range(D):
    j = out[d] - 1
    last[j] = d + 1
    for i in range(26):
      sat -= (d + 1 - last[i]) * c_arr[i]
    sat += s_arr[d][j]
  return sat

td = [0] * D
td_opt = copy.deepcopy(td)
for _ in range(10000):
  m = 2
  td2 = copy.deepcopy(td_opt)
  for i in range(m):
    d1 = np.random.randint(0,D)
    d2 = np.random.randint(0,25)
    td2[d1] = d2 
  sc2 = calc_score(td2)
  ss = calc_score(td_opt)
  if sc2 >= ss:
    td_opt = copy.deepcopy(td2)
if False:
  print(f"Opt t={td_opt},{calc_score(td_opt)}")
for v in td_opt:
  print(v)


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import numpy as np
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include <sys/time.h>

#include <iostream>
#include <iomanip>
#include <algorithm>
#include <utility>
#include <cmath>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <utility>
#include <cctype>

using namespace std;

using ll = long long;
using P = pair<double, double>;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define mkp(a, b) make_pair(a, b)

const double time_limit = 1.9;
double start;

unsigned rando() {
	static unsigned y = 2463534242;
    y ^= y << 13;y ^= y >> 17;y ^= y << 5;
    return y;
}


double sec() {
	struct timeval tv;
    gettimeofday(&tv, NULL);
    return tv.tv_sec + tv.tv_usec * 1e-6;
}

double pastTime() {
	return sec() - start;
}

int d;

int c[26];
int s[365][26];

int score(vector<int>& t) {
	int score = 0;
	vector<int> last(26,0);
	rep(i, d) {
		score += s[i][t[i]];
		last[t[i]] = (i + 1);

		rep(j,26) {
			score -= ((i + 1) - last[j]) * c[j];
		}
		//cout  << score << endl;

	} 


	return score;

}

void output(vector<int>& t) {
	rep(i, d) {
		cout << t[i] + 1 << endl;
	}
}


int main() {
	


	cin >> d;
	rep(i, 26) {
		cin >> c[i];
	} 
	rep(i, d) {
		rep(j,26) {
			cin >> s[i][j];
		}
	}
	start = sec();
	vector<int> t(d);

	rep(i, d) {
		t[i] = rando() % 26;
	}

	int cur = score(t);


	while(true) {
		double cur_time = pastTime();
		if (cur_time > time_limit) {
			break;
		}
		//vector<int> nt = t;

		for (loop = 0; loop < 100; loop++) {
			stack<P> cd;


			//int size = (int) (cur_time / time_limit * 5.0) + 1;
			int size = 2;
			rep(i ,size) {
				int cur_d = rando() % d;
				int cur_c = rando() % 26;
				cd.push(mkp(cur_d, t[cur_d]));

				t[cur_d] = cur_c;
			}
			int next = score(t);
			if (cur < next) {
				//t = nt;
				cur = next;
			} else {
				while(!cd.empty()) {
					auto cur = cd.top();
					t[cur.first] = cur.second;
					cd.pop();
				}

			}
		}
	}

	output(t);

	//cout << "score:" <<  << endl;

	return 0;
}


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

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

int main() {
	//parameter 定義
	int D,smax,select;
	//SFL = 0;
	vector<vector<int>> s(D, vector<int>(26));
	vector<int> c(26);
	vector<int> last(26,0);
	//D,s,c入力
	cin >> D;
	for (int i = 0; i < 26; i++) {
		cin >> c.at(i);
	}
	for (int i = 0; i < D; i++) {
		for (int j = 0; j < 26; j++) {
			cin >> s.at(i).at(j);
		}
	}
	for (int i = 0; i < 365; i++) {
		select = 1;
		smax = s.at(i).at(0);
		for (int j = 0; j < 26; j++) {
			if (smax < s.at(i).at(j)) {
				smax = s.at(i).at(j);
				select = j;
			}
		}
		cout << select << endl;
    }


Compiler output:
a.cc: In function 'int main()':
a.cc:32:6: error: expected '}' at end of input
   32 |     }
      |      ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

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

int main() {
	//parameter 定義
	int D, SFL,smax,select;
	SFL = 0;
	vector<vector<int>> s(D, vector<int>(26));
	vector<int> c(26);
	vector<int> last(26,0);
	//D,s,c入力
	cin >> D;
	for (int i = 0; i < 26; i++) {
		cin >> c.at(i);
	}
	for (int i = 0; i < D; i++) {
		for (int j = 0; j < 26; j++) {
			cin >> s.at(i).at(j);
		}
	}
	for (int i = 0; i < 365; i++) {
		select = 1;
		smax = s.at(i).at(0);
		for (int j = 0; j < 26; j++) {
			if (smax < s.at(i).at(j)) {
				smax = s.at(i).at(j);
				select = j;
			}
		}
		cout << select << endl;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:32:6: error: expected '}' at end of input
   32 |     }
      |      ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

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

int main()
{
    int d;
    cin >> d;
    vector<int> c(26);
    rep(i, 26) cin >> c[i];
    vector<vector<int>> s(d, vector<int>(26));
    rep(i, d) {
        rep(j, 26) {
            cin >> s[i][j];
        }
    }
    vector<int> t(d);
    rep(i, d) {
        int s_max = 0;
        rep(j, 26) {
            if (s_max < s[i][j]) {
                s_max = s[i][j];
                t[i] = j+1;
            }
        }
        
    }
    rep(i, d) {
        cout << i%26 << endl;
    }
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:33:14: error: expected '}' at end of input
   33 |     return 0;
      |              ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
  // 処理
  for (int i = 1; i <= D; i++) {
    cout << 1 << endl;
  }
  return 0;
}


Compiler output:
a.cc:4:3: error: expected unqualified-id before 'for'
    4 |   for (int i = 1; i <= D; i++) {
      |   ^~~
a.cc:4:19: error: 'i' does not name a type
    4 |   for (int i = 1; i <= D; i++) {
      |                   ^
a.cc:4:27: error: 'i' does not name a type
    4 |   for (int i = 1; i <= D; i++) {
      |                           ^
a.cc:7:3: error: expected unqualified-id before 'return'
    7 |   return 0;
      |   ^~~~~~
a.cc:8:1: error: expected declaration before '}' token
    8 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
  ll d; cin>>d;
  ll c[26];
  rep(i, 26) cin>>c[i];
  rep(i, d){
    ll s[26]; rep(i, 26) cin>>s[i];
    ll m=*max_element(s, s+26);
    rep(j, 26){
      bool ans=false;
      if(s[i]==m&&ans=false) {
        cout<<j+1<<endl;
        ans=true;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: lvalue required as left operand of assignment
   14 |       if(s[i]==m&&ans=false) {
      |          ~~~~~~~^~~~~
Language: C++

include <iostream>
using namespace std;


int main(){
int D;
cin>>D;
long c[26];

long s[365][26];

long counter = 0;
long temp;
while (std::cin >> temp)
{
  if(counter < 26)
    c[counter] = temp;
  else{
  	int i = counter/26;
    int j = counter%26;
    s[i][j] = temp;
  }
}
  return 0;
}





Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope
    7 | cin>>D;
      | ^~~
a.cc:14:13: error: 'cin' is not a member of 'std'
   14 | while (std::cin >> temp)
      |             ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | include <iostream>
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){おやすみ
  for(int i=0;i<365;i++){
    cout << i%26+1 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:12: error: '\U0000304a\U00003084\U00003059\U0000307f' was not declared in this scope
    3 | int main(){おやすみ
      |            ^~~~~~~~
a.cc:4:15: error: 'i' was not declared in this scope
    4 |   for(int i=0;i<365;i++){
      |               ^
Language: C++

using namespace std;
int D;
cin>>D;
long c[26];

long s[365][26];

long counter = 0;
long temp;
while (std::cin >> temp)
{
  if(counter < 26)
    c[counter] = temp;
  else{
  	int i = counter/26;
    int j = counter%26;
    s[i][j] = temp;
  }
}






Compiler output:
a.cc:3:1: error: 'cin' does not name a type
    3 | cin>>D;
      | ^~~
a.cc:10:1: error: expected unqualified-id before 'while'
   10 | while (std::cin >> temp)
      | ^~~~~
Language: C++

int D;
cin>>D;
long c[26];

long s[365][26];

long counter = 0;
long temp;
while (std::cin >> temp)
{
  if(counter < 26)
    c[counter] = temp;
  else{
  	int i = counter/26;
    int j = counter%26;
    s[i][j] = temp;
  }
}






Compiler output:
a.cc:2:1: error: 'cin' does not name a type
    2 | cin>>D;
      | ^~~
a.cc:9:1: error: expected unqualified-id before 'while'
    9 | while (std::cin >> temp)
      | ^~~~~
Language: C++

#include <bits/stdc++.h>
#define ll long long
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define repi(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define repm(i,a,b) for(ll i=(ll)(a);i>(ll)(b);i--)
#define all(v) v.begin(), v.end()
#define rall(x) (x).rbegin(),(x).rend()
#define pll pair<long long,long long>
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define vc vector<char>
#define vvc vector<vc>
using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<long long>;
using vvll = vector<vll>;
using vb =vector<bool>;
using vvb=vector<vb>;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
//snippets:tmp,cl,cvl,cs,co,coy,con,cov,setp

int main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    ll d;
    cin >> d;
    vll c(26);
    rep(i, 26) cin >> c[i];
    vvll s(d,vll(26));
    rep(i,d){
        rep(j,26) cin>>s[i][j];
    }
    ll v=0;
    vector<set<int>>set(26);
    rep(i,26) set[i].insert(0);
    rep(i,d){
        ll ma=0;
        ll key=0;;
        rep(j,26){
            if(max<c[j]*(i+1-(*(--set[j].end())))+s[i][j]){
                key=j;
                max=c[j]*(i+1-(*(--set[j].end())))+s[i][j];
            }
            v-=c[j]*(i+1-(*(--set[j].end())));
        }
        cout<<key+1<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:23: error: call to non-'constexpr' function 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = long long int; _Alloc = std::allocator<long long int>; reference = long long int&; size_type = long unsigned int]'
   43 |             if(max<c[j]*(i+1-(*(--set[j].end())))+s[i][j]){
      |                       ^
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:1128:7: note: 'std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = long long int; _Alloc = std::allocator<long long int>; reference = long long int&; size_type = long unsigned int]' declared here
 1128 |       operator[](size_type __n) _GLIBCXX_NOEXCEPT
      |       ^~~~~~~~
a.cc:43:16: error: parse error in template argument list
   43 |             if(max<c[j]*(i+1-(*(--set[j].end())))+s[i][j]){
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:43:58: error: cannot resolve overloaded function 'max' based on conversion to type 'bool'
   43 |             if(max<c[j]*(i+1-(*(--set[j].end())))+s[i][j]){
      |                                                          ^
a.cc:45:58: error: overloaded function with no contextual type information
   45 |                 max=c[j]*(i+1-(*(--set[j].end())))+s[i][j];
      |                                                          ^
Language: C++

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

int main() {
    //
    int D;
    vector<int> vec(365);

    ciN >> D;

    for (int i = 0; i < 365; i++) cin >> vec.at(i);

    for (int i = i; i <= 365; i++) { cout << i << endl; }

    //
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'ciN' was not declared in this scope
    9 |     ciN >> D;
      |     ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using Pt = pair<int, int>;


namespace
{
	class Calculater
	{
	public:
		Calculater(vi c, vvi s)
			: c_(c), s_(s), D_((int)s.size()), selection_(D_) {
			Initialize();
		}

		void Initialize()
		{
			vi ld(26, -1);
			for (int i = 0; i < D_; ++i)
			{
				vi u = s_[i];
				vi v(26);
				for (int j = 0; j < 26; ++j)
					v[j] = c_[j] * (i - ld[j]);
				int ttl = accumulate(v.cbegin(), v.cend(), 0);
				transform(v.begin(), v.end(), v.begin(), [ttl](int x) {return x - ttl; });
				for (int j = 0; j < 26; ++j)
					u[j] += v[j];
				int j = (int)distance(u.cbegin(), max_element(u.cbegin(), u.cend()));
				selection_[i] = j;
				ld[j] = i;
			}
		}
		ll CalcSatisfaction()
		{
			ll v = 0;
			vi ld(26, -1);
			for (int i = 0; i < D_; ++i)
			{
				int x = selection_[i];
				for (int j = 0; j < 26; ++j)
				{
					if (j == x)
					{
						v += s_[i][j];
						ld[j] = i;
					}
					else
						v -= c_[j] * (i - ld[j]);
				}
			}
			return v;
		}

		const vi& Selections() const
		{
			return selection_;
		}
		int Selection(int i) const
		{
			return selection_[i];
		}

	private:
		vi c_;
		vvi s_;
		int D_;
		vi selection_;
	};

}
void Heuristics_Introduction_A()
{
	int D;
	cin >> D;
	vi c(26);
	for (auto& x : c)
		cin >> x;

	vvi s(D, vi(26));
	for (int i = 0; i < D; ++i)
	{
		for (int j = 0; j < 26; ++j)
			cin >> s[i][j];
	}


	Calculater x(c, s);

	//int M;
	//cin >> M;
	//for (int i = 0; i < M; ++i)
	//{
	//	int d, q;
	//	cin >> d >> q;
	//	--d; --q;
	//	t[d] = q;

	//	cout << x.CalcSatisfaction(t) << endl;
	//}

	for (int i = 0; i < D; ++i)
	{
		cout << x.Selection(i) + 1 << endl;
	}
//	cout << x.CalcSatisfaction() << endl;
}


int main()
{
	Heuristics_Introduction_C();
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:118:9: error: 'Heuristics_Introduction_C' was not declared in this scope; did you mean 'Heuristics_Introduction_A'?
  118 |         Heuristics_Introduction_C();
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
      |         Heuristics_Introduction_A
Language: C++

D = int(input())
c = list(map(int,input().split()))
s = list(list(map(int,input().split())) for i in range(D))
t = []
score = 0
last = [0]*26
#v = [0]*D

def calc(d):
    """
    貪欲法でd日目のスコアが最も高くなるコンテストを出力
    """
    score = 0
    t = 0
    for i in range(26):
        temp = 0
        temp += s[d][i]
        for j in range(26):
            temp -= c[j]*(d+1-last[j])
        if score > temp:
            pass
        else:
            score = temp
            contest = i
    return i

for d in range(D):
    i = calc(d)
    t.append(i)
    last[i] = d+1
for i in range(D):
    print(t[i])

Compiler output:
a.cc:7:2: error: invalid preprocessing directive #v
    7 | #v = [0]*D
      |  ^
a.cc:10:7: warning: missing terminating " character
   10 |     """
      |       ^
a.cc:10:7: error: missing terminating " character
a.cc:12:7: warning: missing terminating " character
   12 |     """
      |       ^
a.cc:12:7: error: missing terminating " character
a.cc:1:1: error: 'D' does not name a type
    1 | D = int(input())
      | ^
Language: Java

import java.util.Scanner;
import java.util.Random;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int d = sc.nextInt();
        int[] c = new int[26+1];
        for(int i = 1;i<=26;i++){
            c[i] = sc.nextInt();
        }
        int[][] s = new int[d+1][26+1];
        for(int i = 1;i<=d;i++){
            int maxx = 1;
            int va = -999999;
            for(int j = 1;j<=26;j++){ 
                s[i][j] = sc.nextInt();
                if(va < s[i][j]) {
                    maxx = j;
                }
            }
            System.out.println(j);
        }
    }
}

Compiler output:
Main.java:22: error: cannot find symbol
            System.out.println(j);
                               ^
  symbol:   variable j
  location: class Main
1 error
Language: C++

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

int main(){
    int K = 26;
    int D;
    cin >> D;
    vector<ll> C(K);
    for (int i = 0; i < K; i++) cin >> C[i];
    vector<vector<ll>> s(D+1, vector<ll>(K, 0));
    for (int i = 1; i <= D; i++) {
        for (int j = 0; j < K; j++) {
            cin >> s[i][j];
        }
    }
    
    vector<int> ans(D+1, 0);
    
    vector<set<int>> day(K);
    for (int i = 0; i < K; i++) {
        day[i].insert(0);
        day[i].insert(D+1);
    }
    vector<int> cnt(K, 0);
    for (int i = 1; i <= D; i++) {
        int op = 0;
        int s_mx = 0;
        for (int j = 0; j < K; j++) {
            if (s_mx < s[i][j]) {
                s_mx = s[i][j];
                op = j;
            }
        }
        day[op].insert(i);
        ans[i] = op+1;
    }
    
    ll inf = 1e18;
    ll r = 123456789;
    ll mod = 1e9+7;
    int repmx = 300000;
    for (int rep = 0; rep < repmax; rep++) {
        r = r*r%mod;
        int a = r%D+1;
        
        int def = ans[a]-1;
        
        ll pt_max = -inf; 
        ll op = 0;
        day[def].erase(day[def].find(a));
        for (int i = 0; i < K; i++) {
            if (i == def && rep < repmax/2) continue;
            auto it = day[i].lower_bound(a);
            ll nxt = (*it);
            it--;
            ll pre = (*it);
            ll pt = ((nxt-pre)*(nxt-pre+1)/2 - ((a-pre)*(a-pre+1)/2+(nxt-a)*(nxt-a+1)/2)) * C[i] + s[a][i];
            if (pt > pt_max) {
                pt_max = pt;
                op = i;
            }
        }
        day[op].insert(a);
        ans[a] = op+1;
    }
    
    for (int i = 1; i <= D; i++) cout << ans[i] << endl;
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:29: error: 'repmax' was not declared in this scope; did you mean 'repmx'?
   43 |     for (int rep = 0; rep < repmax; rep++) {
      |                             ^~~~~~
      |                             repmx
Language: C++

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

int manzoku_kakunin()

int main(){
    int d;
    cin >> d;

    vector<int> c(26);
    rep(i,26){
        cin >> c[i];
    }

    vector<vector<int>> score(d,vector<int>(26));

    for (int i=0;i<d;i++){
        for(int j=0;j<26;j++){
            cin >> score.at(i).at(j);
        }
    }

    vector<int> kaito(d);
    rep(i,d){
        int max_type = 0;
        int max_score = 0;
        rep(j,26){
            if(score[i][j] > max_score){
                max_type = j;
                max_score = score[i][j];
            }
        }
        cout << max_type << endl;
    }

//satisfaction caluclation
/*
    int sat =0;

    vector<int> last(26);
    rep(i,26){
        last[i] = 0;
    }

    for (int i=0;i<d;i++){
        last[kaito[i]-1] = i+1;
        for (int j=0;j<26;j++){
            sat -= c[j] * (d+1 -last[j]);
        }
        sat += score[i][kaito[i]-1];
    }

*/
    return 0;
}


Compiler output:
a.cc:9:1: error: expected initializer before 'int'
    9 | int main(){
      | ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, a, b) for(ll i=(a); i<(b); i++)
#define PER(i, a, b) for(ll i=(a); i>=(b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
#define ALL(a)  (a).begin(),(a).end()
const ll INF = 1e18+18;
const ll MAX = 200000;
const ll MOD = 1000000007;
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl;
#define YES(n) cout << ((n) ? "YES" : "NO") << endl;



int main(){
  rep(i, 365){
    cout<<max((i+1)%26,1)<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:14: error: no matching function for call to 'max(ll, int)'
   19 |     cout<<max((i+1)%26,1)<<endl;
      |           ~~~^~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:19:14: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   19 |     cout<<max((i+1)%26,1)<<endl;
      |           ~~~^~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:19:14: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   19 |     cout<<max((i+1)%26,1)<<endl;
      |           ~~~^~~~~~~~~~~~
Language: C++

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

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  vector<int> c(26);
  vector<vector<int>> s(365,vector<int>(26));
  rep(i,26) cin >> c.at(i);
  rep(i,365) {
    rep(j,26){
      cin >> s.at(i).at(j);
    }
  }
  rep(i,365) {
    cout << i%26+1;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:7:11: note: to match this '{'
    7 | int main(){
      |           ^
Language: C

void main()
{
  scanf("%d", D);
  int i = 0;
  
  for(i=0; i<D; i++){
    printf("%d\n", i+1);
  }
}


Compiler output:
main.c: In function 'main':
main.c:3:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |   scanf("%d", D);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | void main()
main.c:3:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |   scanf("%d", D);
      |   ^~~~~
main.c:3:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:3:15: error: 'D' undeclared (first use in this function)
    3 |   scanf("%d", D);
      |               ^
main.c:3:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:5: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |     printf("%d\n", i+1);
      |     ^~~~~~
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:5: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:5: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef vector<long> vec;
//配列の添字ズレに注意
//=に注意
int main(){
  rep(i,365)cout<<1<<endl;
}

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

#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int day;
  int cost[30];
  int satisfied[370][30];
  int i,j;
  
  scanf("%d",&day);
  
  for(i=0;i<26;i++){
    scanf("%d ",%cost[i]);
  }
  
  for(i=0;i<day;i++){
    for(j=0;j<26;j++){
      cin>>satisfied[i][j];
    }
  }
  
  for(i=0;i<day;i++){
    printf("%d\n",i%26+1);
  }
  return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected primary-expression before '%' token
   13 |     scanf("%d ",%cost[i]);
      |                 ^
Language: C++

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

#define rep(i,n) for(ll i = 0; i < n; i++)
#define per(i,n) for(ll i = n-1; i >= 0; i--)
#define REP(i,n) for(ll i = 1; i < n; i++)
#define PER(i,n) for(ll i = n; i >= 1; i--)
#define sz(x) int(x.size())
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define YesorNo(a) printf(a ? "Yes\n" : "No\n")
#define endl '\n'
#define fi first
#define se second
using ll = long long;
using P = pair<int,int>;
using Pl = pair<ll,ll>;
using vi = vector<int>;
using vii = vector<vi>;
using vl = vector<ll>;
using vll = vector<vl>;
using vs = vector<string>;
using vb = vector<bool>;
using vc = vector<char>;
using vcc = vector<vc>;
using vP = vector<P>;
using vPP = vector<vP>;
using vPl = vector<Pl>;
const int dx[] = {0,1,0,-1,1,1,-1,-1};
const int dy[] = {1,0,-1,0,1,-1,-1,1};
const int inf = (1<<30)-1;
const ll infll = (1LL<<62)-1;
ll ceil(const ll &a, const ll &b){return ((a)+(b)-1)/b;}
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }



int main(){
  int d;
  cin >> d;
  const int k = 26;
  vi c(k);
  rep(i,n) cin >> c[i];
  vii s(d,vi(k));
  rep(i,d)rep(j,k) cin >> s[i][j];
  rep(i,d) cout << 1 << endl;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:44:9: error: 'n' was not declared in this scope
   44 |   rep(i,n) cin >> c[i];
      |         ^
a.cc:4:36: note: in definition of macro 'rep'
    4 | #define rep(i,n) for(ll i = 0; i < n; i++)
      |                                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i,s,n) for(int i = (s); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) for(int i = (n); i >= 0; i--)
#define ALL(n) (n).begin(), (n).end()
#define RALL(n) (n).rbegin(), (n).rend()
#define ATYN(n) cout << ( (n) ? "Yes":"No") << '\n';
#define CFYN(n) cout << ( (n) ? "YES":"NO") << '\n';
#define OUT(n) cout << (n) << '\n';
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;

int main(void)
{
    IOS
    const int A = 26;
    int D; cin >> D;
    vector<int> c(D);
    REP(i,D) cin >> c[i];
    vector<vector<int>> s(D,vector<int>(A));
    REP(i,D) REP(j,A) cin >> s[i][j];

    vector<int> last(A,-1);
    REP(i,D) {
        int mx = 0,a = -1;
        REP(j,D) {
            int tmp = last[j]*c[j] + s[i][j];
            if (mx < tmp) {
                mx = tmp;
                a = j;
            }
        }
        OUT(j+1)
        last[j] = i;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:37:13: error: 'j' was not declared in this scope
   37 |         OUT(j+1)
      |             ^
a.cc:11:25: note: in definition of macro 'OUT'
   11 | #define OUT(n) cout << (n) << '\n';
      |                         ^