Language: C++

#include <bitset>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <cstring>
#include <utility>
#include <vector>
#include <complex>
#include <valarray>
#include <fstream>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <numeric>
#include <climits>
#include <random>//乱択します
#include <ctime> //時間を測ります

using namespace std;

#define TIMELIMIT 1.95
#define SA_COEFF 10000

#define START_TEMP 50
#define END_TEMP 1

inline unsigned long long rdtsc(){
#ifdef __amd64
  unsigned long long a, d;
  __asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
  return (d << 32) | a;
#else
  unsigned long long x;
  __asm__ volatile ("rdtsc" : "=A" (x));
  return x;
#endif
}
inline double gettime(){return rdtsc()/2793344000.0;}
inline double elapsed(double st){return gettime()-st;}

static unsigned long rand_x=123456789, rand_y=362436069, rand_z=521288629, rand_w=88675123;
std::random_device rnd{};
void init_randxor()
{
  unsigned long s = rnd();
  rand_w ^= s;
  rand_w ^= rand_w >> 21; rand_w ^= rand_w << 35; rand_w ^= rand_w >> 4;
  rand_w *= 2685821657736338717LL;
}
inline unsigned int randxor()
{
    unsigned int t;
    t=(rand_x^(rand_x<<11));rand_x=rand_y;rand_y=rand_z;rand_z=rand_w; return( rand_w=(rand_w^(rand_w>>19))^(t^(t>>8)) );
}

struct ANSTYPE
{
	vector<int> t;
};


// **** write variable here ****
int d;
int n=26;
vector<int> c(26);
vector<vector<int>> s;


// *****************************


void input()
{
	cin >> d;
	for(int i=0;i<26;i++)
		cin >> c[i];
	s=vector<vector<int>>(d,vector<int>(26));
	for(int i=0;i<d;i++)
		for(int j=0;j<26;j++)
			cin >> s[i][j];
}

ANSTYPE ans;

void output()
{
	for(int i=0;i<d;i++)
		cout << ans.t[i] << endl;
}


void init()
{
	//ans=
	ans.t=vector<int>(d);
	for(int i=0;i<d;i++)
		ans.t[i]=i%26+1;
}

int value(ANSTYPE& in_ans)
{
	int point=0;

	return point;
}

int next(ANSTYPE& in_ans,int bef_score)
{
	int bef=0;
	int aft=0;
	
	return bef_score+(aft-bef);
}

void SA()
{
	double st = gettime();
	double now_time;
	bool FORCE_NEXT;
	double probability;
	double temp;

	init();

	ANSTYPE now_ans = ans;
	ANSTYPE best_ans = now_ans;
	ANSTYPE next_ans;

	int best_score=value(ans);
	int next_score=0;
	int now_score=best_score;

	int cnt=0;
	int bad_cnt=0;

	while(elapsed(st) < TIMELIMIT)
	{
		cnt++;
		next_ans=now_ans;

		next_score=next(next_ans,now_score);

		now_time=elapsed(st);

		temp = START_TEMP + (END_TEMP - START_TEMP) * now_time / (TIMELIMIT); // 現在温度
		probability = exp((next_score-now_score)/temp);

		FORCE_NEXT = (probability > (double(randxor() % 100100)/100100));
//		FORCE_NEXT = false;

		if(next_score>now_score or (FORCE_NEXT and next_score>0))
		{
			if(next_score<now_score)bad_cnt++;
			now_score = next_score;
			now_ans = next_ans;
		}
		if(now_score > best_score)
		{
			best_score = now_score;
			best_ans = now_ans;
		}
//		cerr << best_score << " : " << next_score << endl;;
	}
	ans = best_ans;
//	cerr << "loop \t: " << cnt << endl;
//	cerr << "bad use\t: " << bad_cnt << endl;
//	cerr << "score \t: " << value(ans) << endl;
	
}

void solve()
{
	SA();
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	init_randxor();
	input();
	solve();
	output();
	return 0;
}



Compiler output:
a.cc: In function 'void input()':
a.cc:77:9: error: 'cin' was not declared in this scope
   77 |         cin >> d;
      |         ^~~
a.cc:21:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   20 | #include <ctime> //時間を測ります
  +++ |+#include <iostream>
   21 | 
a.cc: In function 'void output()':
a.cc:91:17: error: 'cout' was not declared in this scope
   91 |                 cout << ans.t[i] << endl;
      |                 ^~~~
a.cc:91:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc: In function 'int main()':
a.cc:181:9: error: 'cin' was not declared in this scope
  181 |         cin.tie(0);
      |         ^~~
a.cc:181:9: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'