Language: C

//#include<stdio.h>
//#include<algorithm>
//#include<string.h>
//#include<vector>
//#include<math.h>
//struct TPoint {
//	double x, y;
//};
//using namespace std;
//#define N 1100
//#define EPS 1e-6
//struct TPoint p1[N], p2[N];
//double dis(TPoint a, TPoint b) {
//	return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
//}
//double cross(TPoint a, TPoint b, TPoint c) {
//	return (c.x - a.x) * (b.y - a.y) - (c.y - a.y) * (b.x - a.x);
//}
//bool graham_cmp2(TPoint b, TPoint c) {
//	double tmp = cross(b, c, p2[0]);
//	if (tmp > EPS)
//		return true;
//	if (fabs(tmp) < EPS && (dis(b, p2[0]) < dis(c, p2[0])))
//		return true;
//	return false;
//}
//double diancheng(TPoint a,TPoint b,TPoint c){
//	return (c.x-a.x)*(b.x-a.x)+(c.y-a.y)*(b.y-a.y);
//}
//bool graham_cmp1(TPoint b, TPoint c) {
//	double tmp = cross(b, c, p1[0]);
//	if (tmp > EPS)
//		return true;
//	if (fabs(tmp) < EPS && (dis(b, p1[0]) < dis(c, p1[0])))
//		return true;
//	return false;
//}
//struct TPoint tp[N];
//double str[N << 2], cstr[N];
//int main() {
//	setvbuf(stdout,NULL,_IONBF,0);
//	int n;
//	while (scanf(" %d", &n) == 1) {
//		for (int i = 0; i < n; i++) {
//			scanf(" %lf %lf", &p1[i].x, &p1[i].y);
//		}
//		for (int i = 0; i < n; i++) {
//			scanf(" %lf %lf", &p2[i].x, &p2[i].y);
//		}
//
//		sort(p1, p1 + n, graham_cmp1);
//		for (int i = 2; i < n; i++) {
//			cstr[i - 1] = cross(p1[0], p1[i], p1[i - 1]);
//		}
//		cstr[n - 1] = cross(p1[0], p1[1], p1[n - 1]);
//
//		int ans=-1;
//		memcpy(tp,p2,sizeof(tp));
//		for (int i = 0; i < n; i++) {
//
//			swap(tp[i], tp[0]);
//			memcpy(p2,tp,sizeof(tp));
//			swap(tp[i],tp[0]);
//
//			sort(p2, p2 + n, graham_cmp2);
//			for (int j = 2; j < n; j++) {
//				str[j - 1] = cross(p2[0], p2[j], p2[j - 1]);
//			}
//			str[n - 1] = cross(p2[0], p2[1], p2[n - 1]);
//			for (int j = 1; j <= n - 1; j++) {
//				str[n + j - 1] = str[j];
//			}
//
//			for (int e = 1; ans==-1&&e <= 2 * n - 2;e++) {
//				for(int j=1;j<=n-1;){
//					if(fabs(str[e+j-1]-cstr[j])<EPS) j++;
//					else break;
//					if(j==n){
//						ans=e;
//						break;
//					}
//				}
//			}
//			if (ans != -1) {
//				double dx = p1[0].x - p2[0].x, dy = p1[0].y - p2[0].y;
//				p2[ans].x += dx;
//				p2[ans].y += dy;
//				double tmp = diancheng(p1[0], p1[1], p2[ans]), ab = sqrt(dis(p1[0],
//						p1[1]));
//
//				double ac = sqrt(dis(p1[0], p2[ans]));
//				if(ac*ab<1e-12) while(1);
//				tmp = acos(tmp / ac / ab);
//				printf("%.10lf\n", tmp);
//				break;
//			}
//		}
//	}
//	return 0;
//}
#include <iostream>
#include<stdio.h>
#include<memory.h>
#include<stdlib.h>
using namespace std;
int n, m, mapp[160][160], size[160];
int map[160][160];
int i, tim, flag, boo, u, v, a[160], x, y, cnt;
bool use[160];
void dfs(int k, int num) {
	int i;
	if (boo)
		return;
	cnt++;
	if (cnt >= 2000000)
		return;
	if (k == n + 1) {
		if (mapp[a[1]][a[n]]) {
			for (i = 1; i < n; i++)
				printf("%d ", a[i]);
			printf("%d\n", a[n]);
			boo = 1;
			return;
		}
	}
	for (i = 1; i <= size[num]; i++) {
		if (!use[map[num][i]]) {
			a[k + 1] = map[num][i];
			use[map[num][i]] = 1;
			dfs(k + 1, map[num][i]);
			use[map[num][i]] = 0;
		}
	}
}
int main() {
	while (scanf("%d%d", &n, &m) != EOF) {
		memset(map, 0, sizeof(map));
		memset(mapp, 0, sizeof(mapp));
		memset(size, 0, sizeof(size));
		while (m--) {
			scanf("%d%d", &u, &v);
			size[u]++;
			size[v]++;
			map[u][size[u]] = v;
			map[v][size[v]] = u;
			mapp[u][v] = mapp[v][u] = 1;
		}
		boo = false;
		for (i = 1; i <= n; i++) {
			if (boo)
				break;
			a[1] = i;
			cnt = 0;
			memset(use, 0, sizeof(use));
			use[i] = 1;
			dfs(1, i);
			use[i] = 0;
		}
		if (boo) {
		for (i = 1; i < n; i++)
			printf("%d ", a[i]);
		printf("%d\n", a[n]);
			} else
				printf("no solution\n");
	}
	return 0;
}

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