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

#include <iostream>
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(i, d) rep(j, 26) cin >> s[i][j];
for (int i=1; i<=365; i++){
	cout<<i%26+1<<endl;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'vector' was not declared in this scope
    6 |     vector<int> c(26);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:12: error: expected primary-expression before 'int'
    6 |     vector<int> c(26);
      |            ^~~
a.cc:7:9: error: 'i' was not declared in this scope
    7 |     rep(i, 26) cin >> c[i];
      |         ^
a.cc:7:5: error: 'rep' was not declared in this scope
    7 |     rep(i, 26) cin >> c[i];
      |     ^~~
a.cc:8:19: error: expected primary-expression before 'int'
    8 |     vector<vector<int>> s(d, vector<int>(26));
      |                   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
long long calc(int n, int c1, int c2, int s1, int s2, const vector<int>& options,
               int d, int nt, int ot) {
  int b1(d-1), a1(d+1), b2(d-1), a2(d+1);
  while (b1 >= 0 && options[b1] != nt) b1--;
  while (b2 >= 0 && options[b2] != ot) b2--;
  while (a1 < n && options[a1] != nt) a1++;
  while (a2 < n && options[a2] != ot) a2++;
  int x1(d-b1-1), y1(a1-d-1), z1(a1-b1-1), x2(d-b2-1), y2(a2-d-1), z2(a2-b2-1);
  int diff1 = z1*(z1+1)/2-x1*(x1+1)/2-y1*(y1+1)/2;
  int diff2 = z2*(z2+1)/2-x2*(x2+1)/2-y2*(y2+1)/2;
  return (long long) diff1 * c1 - (long long) diff2 * c2 + s1 - s2;
}
 
int main() {
  int n;
  cin >> n;
  vector<int> c(26);
  vector<array<int, 26>> s(n);
  
  vector<int> last(26, -1);
  
  for (int i = 0; i < 26; ++i)
    cin >> c[i];
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < 26; ++j)
      cin >> s[i][j];
  
  long long total(0);
  vector<int> options(n);
  
  for (int i = 0; i < n; ++i) {
    int neg(0), test(-1);
    for (int j = 0; j < 26; ++j) {
      neg -= c[j] * (i - last[j]);
    }
    
    int max_score = -1e9;
    for (int j = 0; j < 26; ++j) {
      int ss = s[i][j] + neg + c[j] * (i - last[j]);
      if (ss > max_score) {
        max_score = ss;
        test = j;
      }
    }
    total += max_score;
    options[i] = test;
    last[test] = i;
  }
  /* reversed: 109149564 */
  /* sorted: */
  for (int t = 1; t <= 500; ++t) {
    bool entered = false;
    for (int dd = 0; dd < n; ++dd) {
      for (int tt = 0; tt < 26; ++tt) {
        if (tt == options[dd]) continue;
        int ot = options[dd];
        long long ns = calc(n, c[tt], c[ot], s[dd][tt], s[dd][ot],
                            options, dd, tt, ot);
        //cout << ns << endl;
        if (ns > 0) {
          entered = true;
          total += ns;
          options[dd] = tt;
    	}
      }
    }
    if (!entered) break;
  }
  // stochastic
  for (int t = 1; t <= 200000; ++t) {
    int dd = rand() % n;
    int tt = rand() % 26;
    int ot = options[dd];
    while (ot == tt) tt = rand() % 26;
    long long ns = calc(n, c[tt], c[ot], s[dd][tt], s[dd][ot],
                        options, dd, tt, ot);
    if (ns < 0) {
      options[dd] = ot;
    } else {
      total += dt;
    }
  }
  for (const int& i: options) cout << i + 1 << endl;
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:83:16: error: 'dt' was not declared in this scope; did you mean 'ot'?
   83 |       total += dt;
      |                ^~
      |                ot
Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (long long i = 0; i < (long long)n; i++)
//#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using Vl = vector<ll>;
using vi = vector<int>;
using Graph = vector<vi>;

vi C(26), Last(26, -1), T(365);
vector<vi> S(365, vi(26));
vector<vi> table(365, vi(26));

ll ans = 0;
int D, M;

void Query(int d, int q) {
  int prev;
  prev = T.at(d);
  T.at(d) = q;
  ll sabun = 0;
  sabun += (S.at(d).at(q) - S.at(d).at(prev));

  sabun += table.at(d).at(q);
  table.at(d).at(q) = 0;
  for (int i = d + 1; i < D && table.at(i).at(q) != 0; i++) {
    sabun += table.at(i).at(q);
    table.at(i).at(q) = table.at(i - 1).at(q) + C.at(q);
    sabun -= table.at(i).at(q);
  }
  /*
  cout << "table " << q << ": ";
  REP(i, D) cout << table.at(i).at(q) << " ";
  cout << "\n";
  */

  table.at(d).at(prev) =
      (d == 0) ? C.at(prev) : table.at(d - 1).at(prev) + C.at(prev);
  sabun -= table.at(d).at(prev);
  for (int j = d + 1; j < D && table.at(j).at(prev) != 0; j++) {
    sabun += table.at(j).at(prev);
    table.at(j).at(prev) = table.at(j - 1).at(prev) + C.at(prev);
    sabun -= table.at(j).at(prev);
  }
  /*
  cout << "table " << prev << ": ";
  REP(i, D) cout << table.at(i).at(prev) << " ";
  cout << "\n";
  cout << "sabun = " << sabun << endl;
*/
  ans += sabun;
  // cout << ans << endl;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  // std::cout << std::fixed << std::setprecision(15); //"for float-base
  // problem"

  cin >> D;
  REP(i, 26) cin >> C.at(i);
  REP(i, D) REP(j, 26) cin >> S.at(i).at(j);

  REP(i, D) { T.at(i) = i % 26; }

  for (int i = 0; i < D; i++) {
    REP(j, 26) {
      if (j == T.at(i)) {
        Last.at(j) = i;
        table.at(i).at(j) = 0;
      } else {
        table.at(i).at(j) = C.at(j) * (i - Last.at(j));
      }
    }
    // cout << count << endl;

    // cout << "T = " << T.at(i) << " S = " << S.at(i).at(T.at(i)) << endl;
    ans += S.at(i).at(T.at(i));
  }

  REP(i, D) {
    REP(j, 26) { ans -= table.at(i).at(j); }
  }

  random_device rnd;
  mt19937 mt((int)time(0));
  uniform_int_distribution<> rand365(0, 364);
  uniform_int_distribution<> rand26(0, 25);

  auto start = chrono::system_clock::now();
  int changecount = 0;

  // Query
  REP(i, 10000) {
    ll pans = ans;
    vector<vi> oldtable = table;
    int d = rand365(mt), q = rand26(mt);
    // cout << d << " " << q << endl;
    int oq = T.at(d);
    Query(d, q);
    if (ans < pans) {
      ans = pans;
      T.at(d) = oq;
      table = oldtable;
    } else {
      // debug
      /*
      changecount++;
      auto end = chrono::system_clock::now();
      cout << "count:" << changecount << "  time:"
           << chrono::duration_cast<chrono::milliseconds>(end - start).count()
           << endl;
    }
    */
    }

    REP(i, D) cout << T.at(i) + 1 << endl;
  }


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

#include <stdio.h>

int main(void){

    int d;
    scanf("%d", &d);
    int c[26];
    for(int i = 0; i < 26; i++) {
        scanf("%d", &c[i]);
    }
    int s[26][26];
    for(int i = 0; i < 26; i++) {
        for(int j = 0; j < 26; j++) {
            scanf("%d" , &s[i][j]);
        }
    }

    for(int i = 0; i < 26; i++) {
        int max = 0;
        int index = 0;
        for(int j = 0; j < 26; j++) {
            if(s[j][i] > max) {
                max = s[i][j];
                index = j;
            }
        }
        printf("%d\n", j);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:27:24: error: 'j' undeclared (first use in this function)
   27 |         printf("%d\n", j);
      |                        ^
main.c:27:24: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main void(){

    int d;
    scanf("%d", &d);
    int c[26];
    for(int i = 0; i < 26; i++) {
        scanf("%d", &c[i]);
    }
    int s[26][26];
    for(int i = 0; i < 26; i++) {
        for(int j = 0; j < 26; j++) {
            scanf("%d" , &s[i][j]);
        }
    }

    for(int i = 0; i < 26; i++) {
        int max = 0;
        int index = 0;
        for(int j = 0; j < 26; j++) {
            if(s[j][i] > max) {
                max = s[i][j];
                index = j;
            }
        }
        printf("%d\n", j);
    }

    return 0;
}

Compiler output:
main.c:3:9: error: expected ';' before 'void'
    3 | int main void(){
      |         ^~~~~
      |         ;
main.c:3:15: error: expected identifier or '(' before ')' token
    3 | int main void(){
      |               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int D;
  cin>>D;
  vector<int> c(26);
  for(int &i:c)
    cin>>i;
  vector<vector<int>> s(D,vector<int>(26));
  for(vector<int> &v:s)
    for(int &i:v)
      cin>>i;
  vector<int> t(D);
  vector<int> A(26,0);
  int mzint=0;
  for(int i=0;i<D;i++){
    int mzi=mzint,mzin=0,k;
    for(int j=0;j<26;j++)
      mzi-=(i+1-A[j])*c[j];
    for(int j=0;j<26;j++){
      int l=mzi+s[i][j]-(i+1-A[j])*c[j];
      if(l>mzin){
        k=j;
        mzin=l;
      }
    }
    A[k]=i+1;
    mzint=mzin;
    t[i]=k+1;
  }
  int M=1000000,ans=mzint;
  while(M--){
    vector<pair<int,int>> AAA={make_pair(rand()%D,rand()%26),make_pair(rand()%D,rand()%26)};
    vector<int> BBB={t[AAA[0].first],t[AAA[1].first]};
    int ans2=ans;
    for(int aaa=0;aaa<2;aaa++){
    int d=AAA[aaa].first,q=AAA[aaa].second;
    ans+=s[d][q]-s[d][t[d]-1];
    int mae=-1,ato=D;
    for(int i=d-1;i>=0;i--){
      if(t[i]==t[d]){
        mae=i;
        break;
      }
    }
    for(int i=d+1;i<D;i++){
      if(t[i]==t[d]){
        ato=i;
        break;
      }
    }
    ans-=(ato-d)*(d-mae)*c[t[d]-1];
    mae=-1,ato=D;
    for(int i=d;i>=0;i--){
      if(t[i]==q+1){
        mae=i;
        break;
      }
    }
    for(int i=d;i<D;i++){
      if(t[i]==q+1){
        ato=i;
        break;
      }
    }
    ans+=(ato-d)*(d-mae)*c[q];
    t[d]=q+1;
    }
    if(ans2>ans){
      ans=ans2;
      t[AAA[0].first]=BBB[0].second;
      t[AAA[1].first]=BBB[1].second;
    }
  }
  for(int i:t)
    cout<<i<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:72:30: error: request for member 'second' in 'BBB.std::vector<long long int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
   72 |       t[AAA[0].first]=BBB[0].second;
      |                              ^~~~~~
a.cc:73:30: error: request for member 'second' in 'BBB.std::vector<long long int>::operator[](1)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
   73 |       t[AAA[1].first]=BBB[1].second;
      |                              ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int D;
  cin>>D;
  vector<int> c(26);
  for(int &i:c)
    cin>>i;
  vector<vector<int>> s(D,vector<int>(26));
  for(vector<int> &v:s)
    for(int &i:v)
      cin>>i;
  vector<int> t(D);
  vector<int> A(26,0);
  int mzint=0;
  for(int i=0;i<D;i++){
    int mzi=mzint,mzin=0,k;
    for(int j=0;j<26;j++)
      mzi-=(i+1-A[j])*c[j];
    for(int j=0;j<26;j++){
      int l=mzi+s[i][j]-(i+1-A[j])*c[j];
      if(l>mzin){
        k=j;
        mzin=l;
      }
    }
    A[k]=i+1;
    mzint=mzin;
    t[i]=k+1;
  }
  int M=100000,ans=mzint;
  while(M--){
    vector<pair<int,int>> AAA={make_pair(rand()%D,rand()%26),make_pair(rand()%D,rand()%26)};
    vector<int> BBB={t[AAA[0].first],t[AAA[1].first]};
    int ans2=ans;
    for(int aaa=0;aaa<2;aaa++){
    int d=AAA[aaa].first,q=AAA[aaa].second;
    ans+=s[d][q]-s[d][t[d]-1];
    int mae=-1,ato=D;
    for(int i=d-1;i>=0;i--){
      if(t[i]==t[d]){
        mae=i;
        break;
      }
    }
    for(int i=d+1;i<D;i++){
      if(t[i]==t[d]){
        ato=i;
        break;
      }
    }
    ans-=(ato-d)*(d-mae)*c[t[d]-1];
    mae=-1,ato=D;
    for(int i=d;i>=0;i--){
      if(t[i]==q+1){
        mae=i;
        break;
      }
    }
    for(int i=d;i<D;i++){
      if(t[i]==q+1){
        ato=i;
        break;
      }
    }
    ans+=(ato-d)*(d-mae)*c[q];
    t[d]=q+1;
    }
    if(ans2>ans){
      ans=ans2;
      t[AAA[0].first]=BBB[0].second;
      t[AAA[1].first]=BBB[1].second;
    }
  }
  for(int i:t)
    cout<<i<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:72:30: error: request for member 'second' in 'BBB.std::vector<long long int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
   72 |       t[AAA[0].first]=BBB[0].second;
      |                              ^~~~~~
a.cc:73:30: error: request for member 'second' in 'BBB.std::vector<long long int>::operator[](1)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'}
   73 |       t[AAA[1].first]=BBB[1].second;
      |                              ^~~~~~
Language: C++

#include <algorithm>
#include <chrono>
#include <iostream>
#include <random>
#include <set>
#include <vector>
using namespace std;
typedef int Int;

#define KIND 26
//#define KIND 2
Int D;
Int c[KIND];
Int s[400][KIND];
Int last[KIND];

std::chrono::time_point<std::chrono::steady_clock> start;

random_device rd;
mt19937 generator(rd());
uniform_real_distribution<> dist_real(0.0, 1.0);
uniform_int_distribution<> dist_int(0, RAND_MAX);

Int range(Int l, Int r) {
	Int len = r - l - 1;
	return -len * (len + 1) / 2;
}

void tic() {
	start = std::chrono::steady_clock::now();
}

double toc() {
	auto now = std::chrono::steady_clock::now();
	std::chrono::duration<double> duration = now - start;
	return duration.count();
}

struct ContestInfo {
	set<Int> held[KIND];
	vector<Int> t;
	int D;
	Int score = 0;
	ContestInfo(int D) : D(D) {
		t.resize(D, -1);
		for (int i = 0; i < KIND; i++) {
			held[i].insert(-1);
			held[i].insert(D);
			score += c[i] * range(-1, D);
		}
	}

	void add(int d, int q) {
		if (t[d] != -1) {
			cout << "Add failed" << endl;
			exit(1);
		}
		t[d] = q;
		score += s[d][q];
		held[q].insert(d);
		auto it = held[q].find(d);
		auto rit = next(it);
		auto lit = prev(it);
		score -= c[q] * range(*lit, *rit);
		score += c[q] * range(*it, *rit);
		score += c[q] * range(*lit, *it);
	}

	void erase(int d) {
		if (t[d] == -1) {
			cout << "erase failed" << endl;
			exit(1);
		}
		int q = t[d];
		t[d] = -1;
		score -= s[d][q];
		auto it = held[q].find(d);
		auto rit = next(it);
		auto lit = prev(it);
		score += c[q] * range(*lit, *rit);
		score -= c[q] * range(*it, *rit);
		score -= c[q] * range(*lit, *it);
		held[q].erase(it);
	}

	void change(int d, int q) {
		erase(d);
		add(d, q);
	}

	void output() {
		for (int i = 0; i < D; i++) {
			cout << t[i] + 1 << endl;
		}
	}
};

int main() {
	tic();
	cin >> D;
	for (Int i = 0; i < KIND; i++) {
		cin >> c[i];
	}
	for (Int d = 0; d < D; d++) {
		for (Int i = 0; i < KIND; i++) {
			cin >> s[d][i];
		}
	}

	ContestInfo ci(D);

	for (int d = 0; d < D; d++) {
		Int t;
		t = dist_int(generator)() % KIND;
		ci.add(d, t);
	}
	Int current_score = ci.score;

	while (toc() < 1.9) {
		Int d, q;
		d = dist_int(generator)() % D;
		q = dist_int(generator)() % KIND;
		int old = ci.t[d];
		ci.change(d, q);
		Int new_score = ci.score;
		if (new_score < current_score) {
			ci.change(d, old);
		} else {
			current_score = new_score;
		}
	}
	ci.output();
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:114:40: error: expression cannot be used as a function
  114 |                 t = dist_int(generator)() % KIND;
      |                     ~~~~~~~~~~~~~~~~~~~^~
a.cc:121:40: error: expression cannot be used as a function
  121 |                 d = dist_int(generator)() % D;
      |                     ~~~~~~~~~~~~~~~~~~~^~
a.cc:122:40: error: expression cannot be used as a function
  122 |                 q = dist_int(generator)() % KIND;
      |                     ~~~~~~~~~~~~~~~~~~~^~
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target ("avx2")
#define io_init cin.tie(0);ios::sync_with_stdio(0);cout<<setprecision(10)
#include <bits/stdc++.h>
constexpr int INF = 2147483647;
constexpr long long int INF_LL = 9223372036854775807;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979323846;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
 
int calcScore(vector<int> &plan, vector<int> &c, vector<vector<int>> &s) {
	int D = 365;
	int score = 0;
	vector<int> last(26, -1);
	for (int i = 0; i < D; i++) {
		score += s[i][plan[i]];
		last[plan[i]] = i;
		for (int j = 0; j < 26; j++) {
			score -= c[j] * (i - last[j]);
		}
	}
	return score;
}
 
int main() {
	int D;
	cin >> D;
	vector<int> c(26);
	for (int i = 0; i < 26; i++)cin >> c[i];
	vector<vector<int>> s(365,vector<int>(26,0));
	for (int i = 0; i < D; i++) {
		for (int j = 0; j < 26; j++)cin >> s[i][j];
	}
	
	vector<int> plan(365, 0);
	for (int i = 0; i < 365; i++) {
		plan[i] = i % 26 + 1
	}
	int sc = calcScore(plan, c, s);
 
	for (int n = 0; n < 300000; n++) {
		if (rand() % 10 < 3) {
			int i = rand() % 365, j = rand() % 26, old = plan[i];
			plan[i] = j;
			int nsc = calcScore(plan, c, s);
			if (nsc > sc) {
				sc = nsc;
			}
			else {
				plan[i] = old;
			}
		}
		else {
			int k = rand() % 5;
			int i = rand() % (365 - k), j = i + k;
			swap(plan[i], plan[j]);
			int nsc = calcScore(plan, c, s);
			if (nsc > sc) {
				sc = nsc;
			}
			else {
				swap(plan[i], plan[j]);
			}
		}
	}
 
	for (int i = 0; i < 365; i++) {
		cout << plan[i] + 1 << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:37: error: expected ';' before '}' token
   40 |                 plan[i] = i % 26 + 1
      |                                     ^
      |                                     ;
   41 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < (int)(n); i++)
#define ALL(a) a.begin(), a.end()
#define MOD 1000000007
using namespace std;
using ll = long long;

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

    int D; cin >> D;
    vector<int> C(26); vector<vector<int>> S(D, vector<int>(26));
    REP(i, 0, 26) cin >> C[i];
    REP(i, 0, D) REP(j, 0, 26) cin >> S[i][j];


    vector<int> T(D);
    REP(i, 0, D) {
        int max_idx = 0;
        REP(j, 0, 26) {
            if (S[i][max_idx] < S[i][j]) max_idx = j;
        }
        T[i] = max_idx + 1;
    }

    vector<vector<int>> last(26, vector<int>(D, 0));
    vector<ll> ret(26, 0);
    REP(i, 0, D) {
        ret[T[i] - 1] += S[i][T[i] - 1];
        last[T[i] - 1][i] = i + 1;
        REP(j, 0, 26) {
            if (i > 0 && !last[j][i]) last[j][i] = last[j][i - 1];
            ret[j] -= C[j] * (i + 1 - last[j][i]);
        }
    }

    ll best = accumulate(ALL(ret), 0LL);
    mt19937_64 mt(random_device{}());
    REP(i, 0, 10000) {
        int d = mt() % D;
        int next = mt() % 26;
        int prev = T[d] - 1;
        T[d] = next + 1;
        last[prev].assign(D, 0);
        last[next].assign(D, 0);
        ret[prev] = 0;
        ret[next] = 0;
        REP(i, 0, D) {
            if (T[i] == prev + 1 || T[i] == next + 1) {
                ret[T[i] - 1] += S[i][T[i] - 1];
                last[T[i] - 1][i] = i + 1;
            }
            if (i > 0) {
                if (!last[prev][i]) last[prev][i] = last[prev][i - 1];
                if (!last[next][i]) last[next][i] = last[next][i - 1];
            }
            ret[prev] -= C[prev] * (i + 1 - last[prev][i]);
            ret[next] -= C[next] * (i + 1 - last[next][i]);
        }
        if (best >= accumulate(ALL(ret), 0LL)) {
            T[d] = prev + 1;
        } else {
            best = accumulate(ALL(ret), 0LL));
        }
    }
    
    for (auto t : T) cout << t << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:45: error: expected ';' before ')' token
   63 |             best = accumulate(ALL(ret), 0LL));
      |                                             ^
      |                                             ;
Language: C++

#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
using ld = long double;
#define repd(i,a,b) for (int i=a;i<int(b);i++)
#define rep(i,n) repd(i,0,n)
#define VARNAME(v) #v
using P = pair<int,int>;


int main() {
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int BEAM = 1000;
  int d;vector<int> c(26);cin>>d;rep(i,26)cin>>c[i];
  vector<array<int, 26>> s(d);
  rep(i,d)rep(j,26)cin>>s[i][j];
  vector<int> curs = {0};
  vector<array<int, 26>> curl(1);
  vector<vector<int>> cura(1);
  rep(i,d){
    int len = int(curs.size())s * 26, ind = 0;
    vector<P> nxs(len);
    vector<array<int, 26>> nxl(len);
    vector<vector<int>> nxa(len);
    rep(j, curs.size()){
      rep(t, 26){
        int score = curs[j];
        array<int, 26> last = curl[j];
        vector<int> ans = cura[j];
        score += s[i][t];
        last[t] = i+1;
        rep(k,26)score -= c[k]*(i+1 - last[k]);
        ans.emplace_back(t);
        nxs[ind] = P(score, ind);
        nxl[ind] = last;
        nxa[ind] = ans;
        ind++;
      }
    }
    sort(nxs.rbegin(), nxs.rend());
    len = min(len, BEAM);
    curs.resize(len);curl.resize(len);cura.resize(len);
    rep(j,len){
      curs[j] = nxs[j].first;
      curl[j] = nxl[nxs[j].second];
      cura[j] = nxa[nxs[j].second];
    }
    if(i % 73 == 0)BEAM -= 200;
  }
  int ans = 0;
  rep(i,min(int(curs.size()), BEAM)){
    if(curs[ans] < curs[i])ans = i;
  }

  for(auto x : cura[ans]){
    cout << x+1 << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:31: error: expected ',' or ';' before 's'
   25 |     int len = int(curs.size())s * 26, ind = 0;
      |                               ^
a.cc:38:13: error: 'ind' was not declared in this scope; did you mean 'int'?
   38 |         nxs[ind] = P(score, ind);
      |             ^~~
      |             int
Language: C++

#include <iostream>

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

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

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

#define long long int

const int D = 365;
vector<int> C(26), ans(D, 0);
vector<vector<int>> S(D, vector<int>(26));

void input()
{
    int tmp;
    cin >> tmp;
    if(tmp == 0)
    {
      rand_init();
      return;
    }
    rep(i,26) cin >> C[i];
    rep(i,D)rep(j,26) cin >> S[i][j];
    rep(i,D) cin >> ans[i]; rep(i,D) ans[i]--; //B,C問題用
}
void output()
{
    for(auto x : ans)
        cout << x+1 << "\n";
}
void greedy()
{
    vector<int> last(26, -1);
    rep(i,D)
    {
      int cur = 0, pt = -1e9;
      rep(j,26)
      {
        int sum = S[i][j];
        rep(k, 26)
        {
          if(j == k) continue;
          sum -= C[k] * (i - last[k]);
        }
        if(sum > pt)
        {
          cur = j;
          pt = sum;
        }
      }
      ans[i] = cur;
      last[cur] = i;
    }   
}
void solve()
{
  greedy();
}

int main()
{
    input();
    solve();
    output();
    return 0;
}

Compiler output:
a.cc: In function 'void input()':
a.cc:19:7: error: 'rand_init' was not declared in this scope
   19 |       rand_init();
      |       ^~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <random>
using namespace std;
typedef long long ll;
int D;
int v=27;
vector<int> c(v,0);
vector<vector<int>> s;
vector<int> t;
vector<int> last(v,0);

void init(){
    cin >> D;
    s.resize(D+1);
    t.resize(D+1);
    for(int i=0;i<D+1;i++){
        s[i].resize(v);
    }

    for(int i=1;i<27;i++){
        cin >> c.at(i);
    }
    for(int i=1;i<D+1;i++){
        for(int j=1;j<27;j++){
            cin >> s.at(i).at(j);
        }
    }
/*
    for(int i=1;i<D+1;i++){
        cin >> t.at(i);
    }
*/

}

void init_last(){
  for(int i=0;i<v;i++){
    last.at(i) = 0;
  }
}

ll calc(){
    ll ans=0;
    init_last();
    for(int i=1;i<D+1;i++){
        ans += s.at(i).at(t.at(i));
        last.at(t.at(i)) = i;
        for(int j=1;j<v;j++){
            ans -= c.at(j) * (i - last.at(j));
        }
    }
    return ans;
}

int main(){
    init();

    std::random_device rd;

    std::mt19937 mt(rd());

    for(int i=1;i<D+1;i++){
        t.at(i) = mt() % 26 + 1;
    }

    ll sol = calc();
    ll trial = 10;
    for(int i=0;i<trial;i++){
        int d,q;
        d = mt()%365 + 1;
        q = mt()%26 + 1;
        old = t.at(d);
        t.at(d) = q;
        if(sol > calc()){
            t.at(d) = old;
        }
    }

    for(int i=1;i<D+1;i++){
        cout << t.at(i) << endl;
    }
  
  	return(0);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:73:9: error: 'old' was not declared in this scope
   73 |         old = t.at(d);
      |         ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <cmath>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF=1001001001;
vector<pair<int64_t,int64_t>>func(int64_t x){
  vector<pair<int64_t,int64_t>>p;
  for(int64_t i=2;i*i<=x;i++){
    int cnt=0;
    if(x%i==0){
    while(x%i==0){cnt++;x/=i;}
    p.push_back(make_pair(i,cnt));
    }
  }
  if(x!=1){p.push_back(make_pair(x,1));}
  return p;
}

int main(){
  int d;
  cin>>d;
  vector<int>c(26);
  for(int i=0;i<26;i++){
    cin>>c[i];
  }
  vector<vector<int>>s(d,vector<int>(26));
  for(int i=0;i<d;i++){
    int a=0,b=0;
    for(int j=0;j<26;j++){
      cin>>s[i][j];  
      if(s[i][j]>a){a=s[i][j];b=j;}
    }cout<<b+1<<endl;
  }
  

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

#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define SP << " " 
#define LLi long long int

using namespace std;

int imax=2147483647;
long long int llimax=9223372036854775807;

//int型vectorを出力
void PV(vector<int> pvv) {
	rep(i, pvv.size()) cout << pvv[i] SP;
	cout << endl;
}

//LLi型vectorを出力
void PVL(vector<LLi> pvv) {
	rep(i, pvv.size()) cout << pvv[i] SP;
	cout << endl;
}

int main(){

	int d/*, ans=0*/;
	vector<int> c, t, ld, at;
	vector< vector<int> >s;

	cin>> d;

	c.resize(26);
	rep(i, 26) cin>> c[i];
	s.resize(d);
	rep(i, d){
		s[i].resize(26);
		rep(j, 26) cin>> s[i][j];
	}
	t.resize(d);
	at.resize(d);
	rep(i, d){
		int tmp=1, ma=-1;
		rep(j, 26){
			if(ma<s[i][j]){
				tmp=j;
				ma=s[i][j];
			}
		}
		t[i]=tmp+1;
	}

	rep(i, d){
		cout<< t[i] <<endl;
	}

	return 0;
	ld.resize(26);

	/*int m;
	vector<int> qd, qq;
	cin>> m;
	qd.resize(m);
	qq.resize(m);
	rep(i, m) cin>> qd[i] >> qq[i];*/
	
  	std::random_device seed_gen;
  	std::mt19937 engine(seed_gen());

	int ti = clock();
    while (clock() - ti < 189 * CLOCKS_PER_SEC / 100){
		//t[qd[k]-1]=qq[k]-1;
		ans=0;
		rep(i, 26) ld[i]=0;

		rep(i, d){
			ans+=s[i][t[i]];
			ld[t[i]]=i+1;
			rep(j, 26) ans-=(i-ld[j]+1)*c[j];
		}
		cout<< ans << endl;
	}
 
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:73:17: error: 'ans' was not declared in this scope; did you mean 'abs'?
   73 |                 ans=0;
      |                 ^~~
      |                 abs
Language: C++

#include <algorithm>
#include <boost/optional.hpp>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(i, n) for(int i = 0, i##_MACRO = (n); i < i##_MACRO; i++)
#define RANGE(i, a, b) for(int i = (a), i##_MACRO = (b); i < i##_MACRO; i++)
#define EACH(e, a) for(auto&& e : a)
#define ALL(a) std::begin(a), std::end(a)
#define RALL(a) std::rbegin(a), std::rend(a)
#define FILL(a, n) memset((a), n, sizeof(a))
#define FILLZ(a) FILL(a, 0)
#define INT(x) (static_cast<int>(x))
#define PRECISION(x) std::fixed << std::setprecision(x)

using namespace std;

using ll = long long;
using VI = vector<int>;
using VI2D = vector<vector<int>>;

constexpr int INF = 2e9;
constexpr double EPS = 1e-10;
constexpr double PI = acos(-1.0);

constexpr int dx[] = {-1, 0, 1, 0};
constexpr int dy[] = {0, -1, 0, 1};

template <typename T>
constexpr int sign(T x) {
	return x < 0 ? -1 : x > 0 ? 1 : 0;
}

template <>
constexpr int sign(double x) {
	return x < -EPS ? -1 : x > EPS ? 1 : 0;
}

template <typename T, typename U>
constexpr void chmax(T& m, U x) {
	m = max(m, x);
}

template <typename T, typename U>
constexpr void chmin(T& m, U x) {
	m = min(m, x);
}

template <typename T>
constexpr T square(T x) {
	return x * x;
}

const int I_MAX = 26;

int calc_point(const int& D, const VI& c, const VI2D& s, const VI& t) {
	int point = 0;
	VI last(I_MAX + 1, 0);
	REP(i, D) {
		point += s[i][t[i]];
		last[t[i]] = i + 1;
		int down = 0;
		REP(j, I_MAX) { down += c[j] * ((i + 1) - last[j]); }
		point -= down;
	}

	return point;
}

int main() {
	int D;
	cin >> D;
	VI c(I_MAX);
	REP(i, I_MAX) { cin >> c[i]; }
	VI2D s(D, VI(I_MAX));
	REP(i, D) {
		REP(j, I_MAX) { cin >> s[i][j]; }
	}
	VI t(D);
	REP(i, D) {
		int tmp;
		cin >> tmp;
		t[i] = tmp - 1;
	}

	std::chrono::system_clock::time_point start, end;
	start = std::chrono::system_clock::now();
	std::random_device seed_gen;
	std::mt19937 engine(seed_gen());

	int prev = calc_point(D, c, s, t);
	REP(i, m) {
		end = std::chrono::system_clock::now();
		double elapsed =
			std::chrono::duration_cast<std::chrono::milliseconds>(end - start)
				.count();
		if(elapsed > 1800.0) {
			break;
		}
		int d, q;
		d = engine() % D;
		q = engine() % I_MAX;

		int old = t[d];
		t[d] = q;
		int now = calc_point(D, c, s, t);
		cout << now << endl;
		if(prev > now) {
			t[d] = old;
		} else {
			prev = now;
		}
	}

	REP(i, D) { cout << t[i] << endl; }

	return 0;
}

Compiler output:
a.cc:2:10: fatal error: boost/optional.hpp: No such file or directory
    2 | #include <boost/optional.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

using std::cin;
using std::cout;
using std::endl;
using std::vector;

int main()
{
    int D{ 0 }, ret{ 0 };
    cin >> D;

    std::vector<int> c(26), last(26), test_ret(26);
    std::vector<std::vector<int>> s(D, vector<int>(26));

    for (auto& i : c)
    {
        cin >> i;
    }

    for (auto& i : s)
    {
        for (auto& j : i)
            cin >> j;
    }

    for (int day{ 1 }; day <= D; ++day)
    {
        for (int test_type{ 1 }; test_type <= 26; ++test_type)
        {
            for (int num{ 1 }; num <= 26; ++num)
            {
                if (num == test_type)
                {
                    test_ret.at(test_type) += s.at(day - 1).at(num - 1);
                    last.at(num - 1) = day;
                }
                else
                {
                    test_ret.at(test_type) -= c.at(num) * ((day + 1) - last.at(num - 1));
                }
            }
        }
        std::vector<int>::iterator max_iter = std::max_element(test_ret.begin(), test_ret.end());
        size_t index = std::distance(test_ret.begin(), iter);
        ret = test_ret.at(index);
        for ( auto& tr : test_ret ) {
          tr = ret;
        }
        cout << index + 1 << "\n";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:56: error: 'iter' was not declared in this scope
   47 |         size_t index = std::distance(test_ret.begin(), iter);
      |                                                        ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
#include<set>
#include<random>
#include<ctime>
using namespace std;
using ll = long long int;

const int C_NUM = 26;
const int D_MAX = 366;
int D;
int c[C_NUM+5];
int s[D_MAX][C_NUM+5];

int t[D_MAX];
set<int> last[C_NUM+5];


int main(){
    clock_t start = clock();
    cin >> D;
    for(int i = 1; i <= C_NUM; i++)cin >> c[i];
    for(int i = 1; i <= D; i++){
        for(int j = 1; j <= C_NUM; j++){
            cin >> s[i][j];
        }
    }

    for(int j = 1; j <= C_NUM; j++)last[j].insert(0);
    for(int i = 1; i <= D; i++){
        ll merit = 0;
        int choice = 1;
        for(int j = 1; j <= C_NUM; j++){
            ll nowm = s[i][j];
            nowm += c[j] * (i - *last[j].rbegin());
            if (nowm > merit){
                merit = nowm;
                choice = j;
            }
        }
        last[choice].insert(i);
        t[i] = choice;
    }

    for(int j = 1; j <= C_NUM; j++)last[j].insert(D+1);
    random_device rnd;
    while((double)(end - start) / CLOCKS_PER_SEC < (double)1.8){
        int sub;
        int day = (rnd() % D) + 1;
        int o = t[day];
        int nowmax = 0;
        int choice = o;
        for(int n = 1; n <= C_NUM; n++){
            if (n == o)continue;
            sub = s[day][n] - s[day][o];
            int bo = *(--last[o].find(day));
            int ao = *(++last[o].find(day));
            sub -= c[o] * (day - bo) * (ao - day);
            last[o].erase(day);
            last[n].insert(day);
            int bn = *(--last[n].find(day));
            int an = *(++last[n].find(day));
            sub += c[n] * (day - bn) * (an - day);
            if (nowmax < sub){
                nowmax = sub;
                choice = n;
            }
        }
        t[day] = choice;
        clock_t end = clock();
    }
    for(int i = 1; i <= D; i++)cout << t[i] << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:24: error: invalid operands of types '<unresolved overloaded function type>' and 'clock_t' {aka 'long int'} to binary 'operator-'
   49 |     while((double)(end - start) / CLOCKS_PER_SEC < (double)1.8){
      |                    ~~~~^~~~~~~
Language: C++

#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
using ll = long long;
using ld = long double;
#define repd(i,a,b) for (int i=a;i<int(b);i++)
#define rep(i,n) repd(i,0,n)
#define VARNAME(v) #v
using P = pair<int,int>;


int main() {
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  constexpr int BEAM = 560;
  int d;vector<int> c(26);cin>>d;rep(i,26)cin>>c[i];
  vector<array<int, 26>> s(d);
  rep(i,d)rep(j,26)cin>>s[i][j];
  vector<int> curs = {0};
  vector<array<int, 26>> curl(1);
  vector<vector<int>> cura(1);
  rep(i,d){
    int len = int(curs.size()) * 26, ind = 0;
    vector<P> nxs(len);
    vector<array<int, 26>> nxl(len);
    vector<vector<int>> nxa(len);
    rep(j, curs.size()){
      rep(t, 26){
        int score = curs[j];
        array<int, 26> last = curl[j];
        vector<int> ans = cura[j];
        score += s[i][t];
        last[t] = i+1;
        rep(k,26)score -= c[k]*(i+1 - last[k]);
        ans.emplace_back(t);
        nxs[ind] = P(score, ind);
        nxl[ind] = last;
        nxa[ind] = ans;
        ind++;
      }
    }
    sort(nxs.rbegin(), nxs.rend());
    len = min(len, BEAM);
    curs.resize(len);curl.resize(len);cura.resize(len);
    rep(j,len){
      curs[j] = nxs[j].first;
      curl[j] = nxl[nxs[j].second];
      cura[j] = nxa[nxs[j].second];
    }
  }
  int ans = 0;
  rep(i,min(int(curs.size()), BEAM)){
    if(curs[ans] < curs[i])ans = i;
  }

  for(auto x : cura[ans]){
    cout << x+1 << endl;
  }
}
CXX

Compiler output:
a.cc:62:1: error: 'CXX' does not name a type
   62 | CXX
      | ^~~
Language: C++

#pragma region
#include <bits/stdc++.h>
using namespace std;
inline void ci(void){
  return;
}
template <typename First, typename... Rest>
void ci(First& first, Rest&... rest){
  cin >> first;
  ci(rest...);
  return;
}
inline void co(void){
  cout << endl;
  return;
}
template <typename First, typename... Rest>
void co(First first, Rest... rest){
  cout << first << "";
  co(rest...);
  return;
}
#define ll long long
#define ld long double
#define st string
#define wh while
#define ve vector
#define mp make_pair
#define tp tuple
#define mt make_tuple
#define pb push_back
#define pof pop_front
#define pob pop_back
#define pf push_front
#define fr front
#define ft first
#define sc second
#define tos to_string
#define len length
#define rt return
#define br break
#define con continue
#define lcm(n, m) (n * m / __gcd(n, m))
#define np next_permutation
#define repi(i, m, n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i, n) repi(i, 0, n)
#define revi(i, m, n) for(ll i=(ll)(m) - 1;i>=(ll)(n);i--)
#define rev(i, m) revi(i, m, 0)
#define sz(v) ((int)(v).size()) 
#define each(i, n) for(auto&& i: n)
#define all(n) n.begin(), n.end()
#define allr(n) n.rbegin(), n.rend()
#define sp(n) cout << fixed << setprecision(n)
#define pi 3.14159265358979323846
#define inf 1000000007
#pragma endregion
// sqrt ルート, int 2*10^9, gcd　最大公約数
// __builtin_popcount bitの個数

ve<int> dx = {0, 0, 1, -1}, dy = {1, -1, 0, 0};

int main() {
  ci(d);
  rep(i, d){
    co(325);
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:63:6: error: 'd' was not declared in this scope; did you mean 'dy'?
   63 |   ci(d);
      |      ^
      |      dy
Language: C


 #include<iostream>
using namespace std;
int main(){
  int POIUYTREWQ,QWERTYUIOP;
  cin>>POIUYTREWQ>>QWERTYUIOP;
  for(int i=0;i<365;i++){
    int N;
    cin>>N;
    cout<<N%26+1<<endl;
  }
}

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


#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>

using namespace std;
int main(){
  int POIUYTREWQ,QWERTYUIOP;
  cin>>POIUYTREWQ>>QWERTYUIOP;
  for(int i=0;i<365;i++){
    int N;
    cin>>N;
    cout<<N%26+1<<endl;
  }
}


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

#include <iostream>
using namespace std;
int main(){
  int POIUYTREWQ,QWERTYUIOP;
  cin>>POIUYTREWQ>>QWERTYUIOP;
  for(int i=0;i<365;i++){
    int N;
    cin>>N;
    cout<<N%26+1<<endl;
  }
}


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

#include <bits/stdc++.h>
using namespace std;
using P = pair<int,int>;

int main(){
  int d;
  cin >> d;
  vector<int> c26(26);
  vector<vector<int>> si(d, vector<int>(26));
  for(int i=0; i<26; ++i) cin >> c26[i];
  for(int i=0; i<d; ++i) for(int j=0; j<26; ++j) cin >> si[i][j];
  
  vector<vector<int>> koho(d);
  for(int i=0; i<26; ++i){
    int hindo;
    else if(c26[i] <=50) hindo = 500 / c26[i];
    else hindo = 5;
    
    int j = 0;
    while(j<d-1){
      int cnt = 0;
      int mxday = min(j+hindo, d-1);
      for(int k=mxday; k>j; --k){
        if(si[k][i] >= 16000){
          koho[k].push_back(i);
          ++cnt;
          for(int l=j+1; l<=k; ++l){
            si[l][i] += (l-j) *(l-j) *c26[i];
          }
          j = k;
          break;
        }
      }
      if(cnt == 0){
        for(int l=j+1; l<=mxday; ++l){
          si[l][i] += (l-j) *(l-j) *c26[i];
        }
        if(mxday != d-1) koho[mxday].push_back(i);
        j = mxday;
      }
    }
  }
  
  vector<int> ans(d);
  for(int i=0; i<d; ++i){
    vector<P> koho2(0);
    if(koho[i].size() == 0){
      for(int j=0; j<26; ++j){
        koho2.push_back(make_pair(si[i][j], j));
      }
    }else{
      for(int n: koho[i]){
        koho2.push_back(make_pair(si[i][n], n));
      }
    }
    sort(koho2.begin(),koho2.end());
    reverse(koho2.begin(),koho2.end());
    ans[i] = koho2[0].second;
  }
  for(int i=0; i<d; ++i){
    cout << ans[i]+1 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:5: error: 'else' without a previous 'if'
   16 |     else if(c26[i] <=50) hindo = 500 / c26[i];
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int De;
  cin>>De;
  vector<vector<int>> vec(De, vector<int>(26));
  vector<int>ve(De);
  for(int X=0;X<De;X++){
    cin>>ve.at(X);
  }
  for (int i = 0; i < De; i++) {
    for (int j = 0; j < 26; j++) {
      cin>>vec.at(i).at(j);
    }
  }
  for(int X=0;X<de;X++){
    cout<<1<<endl;
  }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int De;
  cin>>De;
  vector<vector<int>> vec(De, vector<int>(26));
  vector<int>ve(De);
  vector<int>v(De);
  for(int X=0;X<De;X++){
    cin>>ve.at(X);
    ve.at(X)=v.at(X);
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < De; i++) {
    for (int j = 0; j < 26; j++) {
      cin>>vec.at(i).at(j);
    }
  }
  for(int X=0;X<De;X++){
    cout<<v.at(X%26)<<endl;
  }

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

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

#define INF 2147483647
#define LINF 9223372036854775807
#define MOD 1000000007
#define MOD2 998244353

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

#define rep(i,n) for(int i=0,_i=(n);i<_i;++i)
#define rep1(i,a,b) for(int a_=(a),b_=(b),i=a_;i<b_;++i)
#define repr(i,n) for(int _i=(n),i=_i;i>0;--i)

#define db(x) cerr<<#x<<" = "<<x<<" ";
#define db2(x,y) cerr<<"("<<#x<<", "<<#y<<") = ("<<x<<", "<<y<<") ";
#define db3(x,y,z) cerr<<"("<<#x<<", "<<#y<<", "<<#z<<") = ("<<x<<", "<<y<<", "<<z<<") ";
#define ln cout<<endl;

#define all(a)  (a).begin(),(a).end()
#define dig(n)  to_string(n).length()

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define se second
#define fi first

typedef long long ll;
typedef long double ld;

typedef pair<int,int> P;
typedef pair<int,P> iP;
typedef pair<P,P> PP;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return (a*b)/gcd(a,b);}

int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

std::chrono::system_clock::time_point start;
std::chrono::system_clock::time_point owari;

double TimeLeft(){
    owari = std::chrono::system_clock::now();
    double elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(owari-start).count();
    return elapsed;
}



int d=365;
int c[26]={};
int s[365][26]={};

ll calcScore(sl old){

    rep(i,d){
        old.score += s[i][ old.arr[i] ];
    }

    int lastheld[365]={};
    rep1(i,1,d+1){

        int today = old.arr[ i-1 ];
        int dur = i - lastheld[today];

        old.score -= sigk(dur-1)*c[today];
        lastheld[today] = i;
    }
}


struct sl{
    ll score=0;
    vector<int> arr;
    sl(){
        arr.resize(365);
    }
};

ll sigk(ll n){
    return n*(n+1)/2;
}



int main(){

    start = std::chrono::system_clock::now(); //Timer start
    std::random_device rnd;

    bool flag=false;
    ll ans=0,sum=0;

    cin>>d;

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

    sl old;
    rep(i,d){
        int Conf=0,Tp=-1;
        rep(j,26){
            cin>>s[i][j];
            if(chmax(Conf,s[i][j]))Tp=j;
        }
        old.arr[i]=Tp;
    }

    old.score = calcScore(old);

    while( TimeLeft() < 1919){
        sl nw = old;

        int cd = rnd()%d;
        int cT;
        while(nw.arr[cd] == (cT=rnd()%26))

        calcScore(nw);
        if(nw.score > old.score)old = nw;
    }


    for(int ai:old.arr)cout<< ai+1 <<endl;

    //cout <<fixed<<setprecision(16)<< << endl;

    //if(flag)cout << "Yes" <<endl;
    //else cout << "No" <<endl;

    return 0;
}


Compiler output:
a.cc:58:14: error: 'sl' was not declared in this scope; did you mean 's'?
   58 | ll calcScore(sl old){
      |              ^~
      |              s
a.cc: In function 'int main()':
a.cc:114:26: error: 'calcScore' cannot be used as a function
  114 |     old.score = calcScore(old);
      |                 ~~~~~~~~~^~~~~
a.cc:123:18: error: 'calcScore' cannot be used as a function
  123 |         calcScore(nw);
      |         ~~~~~~~~~^~~~
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%74-1)<<endl;
    }
    if(X%74>3&&X%74<10){
      cout<<B.at(X%74-1)<<endl;
    }
    if(X%74>9&&X%74<13){
      cout<<A.at(X%74-1)<<endl;
    }
    if(X%74>12&&X%74<24){
      cout<<C.at(X%74-1)<<endl;
    }
    if(X%74>23&&X%74<30){
      cout<<B.at(X%74-1)<<endl;
    }
    if(X%74>29&&X%74<32){
      cout<<A.at(X%74-1)<<endl;
    }
    if(X%74>31&&X%74<43){
      cout<<C.at(X%74-1)<<endl;
    }
    if(X%74>42&&X%74<49){
      cout<<D.at(X%74-1)<<endl;
    }
    if(X%74>48&&X%74<55){
      cout<<B.at(X%74-1)<<endl;
    }
    if(X%74>54&&X%74<58){
      cout<<A.at(X%74-1)<<endl;
    }
    if(X%74>57&&X%74<69){
      cout<<C.at(X%74-1)<<endl;
    }
    if(X%74>68&&X%74<75){
      cout<<B.at(X%74-1)<<endl;
    }
  }
}

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;
      |       ^
a.cc:47:15: error: request for member 'at' in 'D', which is of non-class type 'int'
   47 |       cout<<D.at(X%74-1)<<endl;
      |               ^~