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

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

struct place{
	int id;
	int weight;
};

const int unseen = -INT_MAX;

int update(vector<place>& vi, int k, int w){
	vector<place>::iterator iter = vi.begin();
	while(iter != vi.end() && (*iter).id != k) iter++;
	if(iter == vi.end()){
		place p;
		p.id = k;
		p.weight = w;
		vi.push_back(p);
		return 1;
	}else{
		if((*iter).weight == w){
			return 0;
		}else{
			if(w < (*iter).weight){
				(*iter).weight = w;
				return 1;
			}else return 0;
		}
	}
}

void swap(vector<place>& vp, int i, int j){
	place p;
	p.id = vp[i].id; p.weight = vp[i].weight;
	vp[i].id = vp[j].id; vp[i].weight = vp[j].weight;
	vp[j].id = p.id; vp[j].weight = p.weight;
}

place remove(vector<place>& vp){
	int min = 0;
	for(int i = 0; i < vp.size(); i++){
		if(vp[i].weight < vp[min].weight)
			min = i;
	}
	swap(vp, min, vp.size() - 1);
	place p = vp[vp.size() - 1];
	vp.pop_back();
	return p;
}

int visit(int route[100][100], int k, int n){
	int weight = 0;
	int val [100];
	for(int i = 0; i < 100; i++) val[i] = unseen;
	vector<place> vp;
	update(vp, k, -unseen);
	while(!vp.empty()){
		place p = remove(vp);
		k = p.id;
		val[k] =-val[k];
		if(val[k] == -unseen) val[k] = 0;
		weight += val[k];
		for(int i = 0; i < n; i++){
			if(route[k][i] != 0)
				if(val[i] < 0)
					if(update(vp, i, route[k][i]))
					{
						val[i] = -route[k][i];
					}
		}
	}
	return weight;
}

int main(){
	const int nmax = 100;
	int n;
	int m;
	int route[nmax][nmax];
	int a, b;
	int dis;
	char c;
	while(cin >> n){
		for(int i = 0;i < nmax; i++){
			for(int j = 0; j < nmax; j++){
				route[i][j] = 0;
			}
		}
		if(n == 0) break;
		cin >> m;
		for(int i = 0; i < m; i++){
			cin >> a >> c >> b >> c >> dis;
			dis = dis / 100 - 1;
			route[a][b] = dis;
			route[b][a] = dis;
		}
		cout << visit(route, 0, n) << endl;
	}
	return 0;
}

Compiler output:
a.cc:11:21: error: 'INT_MAX' was not declared in this scope
   11 | const int unseen = -INT_MAX;
      |                     ^~~~~~~
a.cc:4:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    3 | #include <cstdlib>
  +++ |+#include <climits>
    4 | using namespace std;
Language: C++

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <list>
#include <iostream>
#include <climits>
#include <cfloat>

using namespace std;

//int main()
//{
//	int n, m;
//	int pos[100][100];
//
//	while (true)
//	{
//		scanf("%d", &n);
//		if (n == 0)
//			break;
//		scanf("%d", &m);
//		memset(pos, -1, sizeof(pos));
//		int a, b, c;
//		for (int i = 0; i < m; ++i)
//			scanf("%d,%d,%d", &a, &b, &c);
//		pos[a-1][b-1] = c;
//	}
//
//	return 0;
//}

typedef pair<int, int> edge;

int main()
{
	while (true)
	{
		int n, m;
		scanf("%d", &n);
		if (n == 0)
			break;

		vector<edge> edges[100];
		bool inTree[100];
		fill(inTree, inTree+100, false);

		scanf("%d", &m);
		for (int i = 0; i < m; ++i)
		{
			int a, b, c;
			scanf("%d,%d,%d", &a, &b, &c);
			edges[a].push_back(edge(c, b));
			edges[b].push_back(edge(c, a));
		}

		int res = 0;

		priority_queue<int, vector<edge>, greater<edge>> q;
		inTree[0] = true;
		for (int i = 0; i < edges[0].size(); ++i)
			q.push(edges[0][i]);

		while (!q.empty())
		{
			edge e = q.top();
			q.pop();
			if (inTree[e.second])
				continue;

			inTree[e.second] = true;
			res += e.first / 100 - 1;
			for (int i = 0; i < edges[e.second].size(); ++i)
				q.push(edges[e.second][i]);
		}

		printf("%d\n", res);
	}

	return 0;
}

Compiler output:
In file included from /usr/include/c++/14/queue:66,
                 from a.cc:10:
/usr/include/c++/14/bits/stl_queue.h: In instantiation of 'class std::priority_queue<int, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >':
a.cc:65:52:   required from here
   65 |                 priority_queue<int, vector<edge>, greater<edge>> q;
      |                                                                  ^
/usr/include/c++/14/bits/stl_queue.h:520:67: error: static assertion failed: value_type must be the same as the underlying container
  520 |       static_assert(is_same<_Tp, typename _Sequence::value_type>::value,
      |                                                                   ^~~~~
/usr/include/c++/14/bits/stl_queue.h:520:67: note: 'std::integral_constant<bool, false>::value' evaluates to false
Language: C++

#include <iostream>
using namespace std;

#define SAFE_DELETE( x ) { if ( x ){ delete x; x = NULL; } }

struct tCell{
	tCell() : x( 0 ), prev( NULL ), next( NULL ){}
	int x;
	tCell *prev, *next;
};


class MyArray{
public:
	MyArray() : mSize( 0 ), head( NULL ), tail( NULL ){
		head = new tCell;
		tail = new tCell;
		head->next = tail;
		tail->prev = head;
	}
	~MyArray(){
		init();
		SAFE_DELETE( head );
		SAFE_DELETE( tail );
	}

	void init(){
		for ( int i = mSize; i > 0; --i ){
			tCell* it = tail->prev;
			it->prev->next = it->next;
			it->next->prev = it->prev;
			SAFE_DELETE( it );
		}
		mSize = 0;
	}

	void pushBack( int x ){
		tCell* it = new tCell;
		it->x = x;
		it->prev = tail->prev;
		it->next = tail;
		it->prev->next = it;
		it->next->prev = it;
		++mSize;
	}
	void pushAsc( int x ){
		
	}
	int size(){ return mSize; }

	tCell operator[]( int index ){
		tCell* it = head->next;
		for ( int i = 0; i < index; ++i ){
			it = it->next;
		}
		return *it;
	}

private:
	int mSize;
	tCell *head, *tail;
};

struct tData{
	tData() : done( false ){}

	bool done;
	MyArray to;
	MyArray dis;
};


class Route{
public:
	Route( int m ) : list( NULL ), mSize( m ){
		list = new tData[ mSize ];
	}
	~Route(){
		delete[] list;
	}

	int calc(){
		bool end;
		int ret = 0;
		list[ 0 ].done = true;
		do{
			end = true;
			int nextTo, nextDis = INT_MAX;
			for ( int i = 0; i < mSize; ++i ){
				if ( list[ i ].done ){
					for ( int j = 0; j < list[ i ].to.size(); ++j ){
						int to = list[ i ].to[ j ].x;
						if ( !list[ to ].done && list[ i ].dis[ j ].x < nextDis ){
							nextTo = to;
							nextDis = list[ i ].dis[ j ].x;
							end = false;
						}
					}
				}
			}
			if ( !end ){
				ret += nextDis / 100 - 1;
				list[ nextTo ].done = true;
			}
		}while ( !end );

		return ret;
	}

	int mSize;
	tData* list;
};

int main(){
	int n, m, p1, p2, d;
	char c;

	while ( cin >> n && n ){
		cin >> m;
		Route* route = new Route( m );
		for ( int i = 0; i < m; ++i ){
			cin >> p1 >> c >> p2 >> c >> d;
			route->list[ p1 ].to.pushBack( p2 );
			route->list[ p1 ].dis.pushBack( d );
			route->list[ p2 ].to.pushBack( p1 );
			route->list[ p2 ].dis.pushBack( d );
		}

		cout << route->calc() << endl;


		SAFE_DELETE( route );
	}
	return 0;
}

Compiler output:
a.cc: In member function 'int Route::calc()':
a.cc:88:47: error: 'INT_MAX' was not declared in this scope
   88 |                         int nextTo, nextDis = INT_MAX;
      |                                               ^~~~~~~
a.cc:2:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    1 | #include <iostream>
  +++ |+#include <climits>
    2 | using namespace std;
Language: C++

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

using namespace std;

typedef int Weight;
struct Edge {
  int src, dest;
  Weight weight;
  Edge(int src, int dest, Weight weight): src(src), dest(dest), weight(weight) {;}
  bool operator<(const Edge &rhs) const {
    return weight < rhs.weight;
  }
};

struct UnionFind {
  int parent[100];
  UnionFind() {
    memset(parent, -1, sizeof(parent));
  }

  bool unite(int x, int y) 
  {
    x = root(x); y = root(y);
    if (x == y) return false;
    if (parent[y] < parent[x]) { swap(x, y); }
    parent[x] += parent[y];
    parent[y] = x;
    return true;
  }

  bool find(int x, int y) 
  {
    return root(x) == root(y);
  }

  int root(int x) 
  {
    return parent[x] < 0 ? x : parent[x] = root(parent[x]);
  }
};

int M, N;
vector<Edge> es;
void Solve() 
{
  sort(es.begin(), es.end());
  UnionFind uf;
  int res = 0;
  for (int i = 0; i < M; i++) {
    Edge e = es[i];
    if (!uf.find(e.src, e.dest)) {
      uf.unite(e.src, e.dest);
      res += (int)(e.weight / 100) - 1;
    }
  
  }
  cout << res << endl;
}

int main() 
{
  int u, v, w;
  while (cin >> N && N) {
    cin >> M;
    es.clear();
    for (int i = 0; i < M; i++) {
      scanf("%d,%d,%d", &u, &v, &w);
      es.push_back(Edge(u, v, w));
    }

    Solve();
  }
}

Compiler output:
a.cc: In constructor 'UnionFind::UnionFind()':
a.cc:20:5: error: 'memset' was not declared in this scope
   20 |     memset(parent, -1, sizeof(parent));
      |     ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <algorithm>
  +++ |+#include <cstring>
    4 |
Language: C++

#include<iostream>
#include<vector>
#include<cstdio>
#include<map>
#include<vector>
using namespace std;
int main(){
  int n;
  while(cin >>n,n){
    int m,ans = 0;
    vector<pair<int,pair<int,int> > > P;
    bool done[100]={false};
    cin >>m;
    for(int i=0,a,b,c; i<m; i++){
      scanf("%d,%d,%d",&a,&b,&c);
      P.push_back(make_pair(c,make_pair(a,b)));
    }
    sort(P.begin(),P.end());
    ans+=(P[0].first/100)-1;
    done[P[0].second.first] = done[P[0].second.second] = true;
    for(int i=0; i<n-1; i++){
      for(int j=0; j<m; j++){
	if(done[P[j].second.first]^done[P[j].second.second]){
	  ans+=(P[j].first/100)-1;
	  done[P[j].second.first] = done[P[j].second.second] = true;
	  break;
	}
      }
    }
    cout <<ans<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |     sort(P.begin(),P.end());
      |     ^~~~
      |     short
Language: C++

#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int e[100][100];
int main()
{
	int n;
	while(cin>>n,n)
	{
		int m;
		int ans=0;
		cin>>m;
		for(int i = 0; i < n; ++i)
		{
			for(int j = 0; j < n; ++j)
			{
				e[i][j]=-1;
			}
		}
		while(m--) 
		{
			int l,r,c;
			scanf("%d,%d,%d",&l,&r,&c);
			e[l][r]=e[r][l]=c;
		}

		bool f[n];
		fill(f,f+n,0);

		int cnt=1;
		f[0]=true;
		while(cnt<n)
		{
			int mn=INT_MAX,num;
			for(int i = 0; i < n; ++i)
			{
				if (f[i])
				{
					for(int j = 0; j < n; ++j)
					{
						if(!f[j]&&e[i][j]!=-1&&e[i][j]<mn)
						{
							mn=e[i][j];
							num=j;
						}
					}
				}
			}
			cnt++;
			ans+=mn-100;
			f[num]=true;
		}
		cout<<ans/100<<endl;
	}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:32: error: 'INT_MAX' was not declared in this scope
   36 |                         int mn=INT_MAX,num;
      |                                ^~~~~~~
a.cc:5:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    4 | #include<algorithm>
  +++ |+#include <climits>
    5 | using namespace std;
a.cc:46:57: error: 'num' was not declared in this scope; did you mean 'enum'?
   46 |                                                         num=j;
      |                                                         ^~~
      |                                                         enum
a.cc:53:27: error: 'num' was not declared in this scope; did you mean 'enum'?
   53 |                         f[num]=true;
      |                           ^~~
      |                           enum
Language: C++

#include<cstdio.txt>
#include<cctype>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<stack>
#include<queue>
#include<deque>
#include<vector>
#include<list>
#include<bitset>
#include<set>

using namespace std;

#define MAX_N 100
#define INF 1 << 20

int n, m, a, b, c, d[MAX_N][MAX_N], i, j, min[3], cnt, ans;
bool array[MAX_N];

int main(){
	while (true){
		scanf("%d", &n);
		if (n == 0) return 0;
		scanf("%d", &m);
		cnt = 1;
		ans = 0;
		for (i = 0; i < n; i++){
			for (j = 0; j < n; j++){
				if (i == j){
					d[i][j] = 0;
					continue;
				}
				d[i][j] = INF;
			}
			array[i] = false;
		}
		array[0] = true;
		for (i = 0; i < m; i++){
			scanf("%d,%d,%d", &a, &b, &c);
			d[a][b] = c / 100 - 1;
			d[b][a] = c / 100 - 1;
		}
		for (cnt = 1; cnt < n; cnt++){
			c = INF;
			for (i = 0; i < n; i++){
				for (j = 0; j < n; j++){
					if (array[i] && !array[j] && c > d[i][j]){
						c = d[i][j];
						b = j;
					}
				}
			}
			ans += c;
			array[b] = true;
		}
		printf("%d\n", ans);
	}
}

Compiler output:
a.cc:1:9: fatal error: cstdio.txt: No such file or directory
    1 | #include<cstdio.txt>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C++

#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
#define REP(i,n) for(i=0;i<n;i++)
struct branch{
	int n1, n2, w;
};
bool greater(branch i, branch j){
	return (i.w > j.w);
}
int main(){
	while (1){
		int n,i;
		char c;
		cin >> n;
		if (n == 0) break;
		vector <int> T(n);
		REP(i,n) T[i] = i;

		int m;
		cin >> m;
		vector <branch> S(m);
		REP(i,m) cin >> S[i].n1 >> c>>S[i].n2 >> c>>S[i].w;

		sort(S.begin(), S.end(),greater);

		int a = 0;
		while (S.size()){
			branch tmp = S.back();
			S.pop_back();
			int b = T[tmp.n1], c = T[tmp.n2];
			if (b != c){
				REP(i,n)
					if (T[i] == c) T[i] = b;
				a += tmp.w / 100 - 1;
			}
		}
		cout << a << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:26:41: error: reference to 'greater' is ambiguous
   26 |                 sort(S.begin(), S.end(),greater);
      |                                         ^~~~~~~
In file included from /usr/include/c++/14/string:49,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_function.h:353:12: note: candidates are: 'template<class _Tp> struct std::greater'
  353 |     struct greater;
      |            ^~~~~~~
a.cc:9:6: note:                 'bool greater(branch, branch)'
    9 | bool greater(branch i, branch j){
      |      ^~~~~~~
Language: Java

import java.util.Scanner;

public class aoj0218 {
	public static void main(String args[]){
		Scanner in = new Scanner(System.in);
		while(true){
			int x = in.nextInt();
			int h = in.nextInt();
			if(x + h == 0)break;
			double S = x*x+2*x*Math.sqrt((x/2)*(x/2)+h*h);
			System.out.println(S);
		}
	}
}

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

import java.util.Scanner;

public class AOJ0073 {
    public static void main(String[] args) {
	Scanner stdIn = new Scanner(System.in);

	double x, h;
	double s, t1, t2;
	while (true) {
	    x = stdIn.nextInt();
	    h = stdIn.nextInt();
	    if (x == 0 && h == 0) break;

	    t1 = h * h + x * x / 4;
	    t2 = Math.sqrt(t1);
	    s = x * x + 2 * x * t2;
	    System.out.println(s);
	}
    }
}

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

import java.io.*;

public class Main0073{
	public static void main(String[] args){
		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		try{
			String s,t;
			while((s=reader.readLine()) !=null &&(t=reader.readLine()) !=null){
				double n=Integer.parseInt(s);
				double m=Integer.parseInt(t);
				if(n ==0 &&m==0){
					break;
				}
				double x=n*n;
				double l=Math.sqrt(m*m+n*n/4);
				double y=2*n*l;
				System.out.println(x+y);
			}
		}catch(IOException e){
			System.exit(0);
		}
	}
}

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

#include<stdio.h>
#include<math.h>
int main()
{
	int n;
	int x,h;
	double sei;
	double s,san,tai,hen;
do{
	scanf("%d%d",&x,&h);
	if(x==0 && h==0)break;
	sei=x*x;
	tai=(double)x/2;
	hen=tai*tai+h*h;
	hen=sqrt(hen);
	san=(double)hen*x/2;
	S=4*san+sei;
	printf("%0.6f",s);
}while(n);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:9: error: 'S' undeclared (first use in this function)
   17 |         S=4*san+sei;
      |         ^
main.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#include <math.h>

int main(void) {
  int x,h;
double ans;
while(1) {
  scanf("%d%d",&x,&h);
  if(x==0 &&h==0) {
   return(0);
}
ans = sprt(x*x+h*h);
printf("%ls\n",ans*x*2+x*x);
}}

Compiler output:
main.c: In function 'main':
main.c:12:7: error: implicit declaration of function 'sprt'; did you mean 'sqrt'? [-Wimplicit-function-declaration]
   12 | ans = sprt(x*x+h*h);
      |       ^~~~
      |       sqrt
Language: C

#include <stdio.h>
#include <math.c>
main(){
  double x,h,s,a;
  while(1){
    scanf("%lf%lf",&x,&h);
    if(x==0&&h==0) break;
    a=(x/2)*(x/2)+h*h;
    a=sqrt(a);
    s=x*x+a*x*2;
    printf("%f\n",s);
  }

  return 0; 
}

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

#include<stdio.h>
#include<math.h>
int main(){
int x.h;
double k;
while(1){
scanf("%d",&x);
scanf("%d",&h);
if(x==0&&h==0)break;
k=sqrt(h*h+x*x/4);
printf("%lf\n",2*x*k+x*x);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    4 | int x.h;
      |      ^
main.c:4:6: error: expected expression before '.' token
main.c:7:13: error: 'x' undeclared (first use in this function)
    7 | scanf("%d",&x);
      |             ^
main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:13: error: 'h' undeclared (first use in this function)
    8 | scanf("%d",&h);
      |             ^
main.c:13:1: error: expected declaration or statement at end of input
   13 | }
      | ^
Language: C

#include<stdio.h>
#include<math.h>
int main(){
int x,h;
double k;
while(1){
scanf("%d",&x);
scanf("%d",&h);
if(x==0&&h==0)break;
k=sqrt(h*h+x*x/4);
printf("%lf\n",2*x*k+x*x);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:1: error: expected declaration or statement at end of input
   13 | }
      | ^
Language: C

#include <stdio.h>
#include <math.h>

int main(int argc,char* argv[]){
  
  for(;;){
    int x,h;
    double S,len,side;

    scanf("%d",&x);
    scanf("%d",&h);

    if(x == 0 && h == 0){
      break;
    }

    S = x*x;
    len = sqrt((double)(x*x)/4 + h*h);
    side = len*x*2;
    printf("%.6lf\n",S + side);
    
  }
  
  return 0;
  

Compiler output:
main.c: In function 'main':
main.c:24:3: error: expected declaration or statement at end of input
   24 |   return 0;
      |   ^~~~~~
Language: C

#inlude <stdio.h>

#include <math.h>

int main(void)
{
	double x,h,a;
	
	
	while(scanf("%lf %lf",%x,&h)){
		if(x==0&&h==0) break;
	
		printf("%.6f\n",(x*sqrt((4*h*h)+(x*x)))+(x*x));
	}
	return 0;
}

Compiler output:
main.c:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
    1 | #inlude <stdio.h>
      |  ^~~~~~
      |  include
main.c: In function 'main':
main.c:10:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   10 |         while(scanf("%lf %lf",%x,&h)){
      |               ^~~~~
main.c:4:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
    3 | #include <math.h>
  +++ |+#include <stdio.h>
    4 | 
main.c:10:15: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   10 |         while(scanf("%lf %lf",%x,&h)){
      |               ^~~~~
main.c:10:15: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:10:31: error: expected expression before '%' token
   10 |         while(scanf("%lf %lf",%x,&h)){
      |                               ^
main.c:13:17: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   13 |                 printf("%.6f\n",(x*sqrt((4*h*h)+(x*x)))+(x*x));
      |                 ^~~~~~
main.c:13:17: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:13:17: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:13:17: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>
#include<math.h>

int main(void)
{
  double x,h,a;/*テ、ツクツ?ィツセツコ*//*テゥツォツ佚」ツ??/
  double S; /*ティツ。ツィテゥツ敖「テァツゥツ?/

  while(1){
    scanf("%lf",&x);
    scanf("%lf",&h);

    if(x == 0 && h == 0){
      break;
    }

    S = x * x + 4 * x * sqrt(x * x / 4 + h * h) / 2;

    printf("%f\n",S);

  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:59: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs]
    6 |   double x,h,a;/*テ、ツクツ?ィツセツコ*//*テゥツォツ佚」ツ??/
main.c:6:41: error: unterminated comment
    6 |   double x,h,a;/*テ、ツクツ?ィツセツコ*//*テゥツォツ佚」ツ??/
      |                                         ^
main.c:6:3: error: expected declaration or statement at end of input
    6 |   double x,h,a;/*テ、ツクツ?ィツセツコ*//*テゥツォツ佚」ツ??/
      |   ^~~~~~
Language: C++

#include<stdio.h>
#include<math.h>
int main(void)
{
	double x,h,S,y,l;
	while(1){
	scanf("%lf %lf",&x,&h);
	if(x==0 && h==0){
		break;
	}
	y=x*x;
	l=sqrt(h*h+(x/2)*(x/2))*x*2;
	S=y+l;
	printf("%f\n",S);
	}
	return 0;

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

#include<iostream>
#include<cmath>
using namespace std;
int main(){
	int x, h;
	while(cin >> x ;cin >> h){
		if(x == 0 && h == 0) break;
		double ans = x * x + 4 * (x * sqrt((x/2)*(x/2) + h*h) * 0.5);
		cout << ans << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:23: error: expected ')' before ';' token
    6 |         while(cin >> x ;cin >> h){
      |              ~        ^~
      |                       )
a.cc:6:33: error: expected ';' before ')' token
    6 |         while(cin >> x ;cin >> h){
      |                                 ^
      |                                 ;
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	long long int a = 0;
	long long int b = 0;
	while (cin >> a, cin >> b)
	{
		long long int c = 0;
		c = a*a*(a*a + b*b);
		long long int d = 0;
		d = sqrt(c * 10000000000);
		cout << a * a + d / 100000 << '.' << d % 100000 << endl;

	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'sqrt' was not declared in this scope
   13 |                 d = sqrt(c * 10000000000);
      |                     ^~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	long long int a = 0;
	long long int b = 0;
	while (cin >> a, cin >> b)
	{
		long long int c = 0;
		c = a*a*(a*a + 4*b*b) * 10000000000;
		long long int d = 0;
		d = sqrt(c);
		cout << a * a + d / 100000 << '.' << d % 100000 << endl;

	}
	

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'sqrt' was not declared in this scope
   13 |                 d = sqrt(c);
      |                     ^~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	long long int a = 0;
	long long int b = 0;
	while (cin >> a, cin >> b)
	{
		long long int c = a*a*(a*a + 4 * b*b) * 10000000000;
		long long int d = sqrt(c);
		cout << a * a + d / 100000 << '.' << d % 100000 << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:35: error: 'sqrt' was not declared in this scope
   11 |                 long long int d = sqrt(c);
      |                                   ^~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	long long int a = 0;
	long long int b = 0;
	while (1)
	{
		cin >> a;
		cin >> b;
		if (a == 0 && b == 0)
		{
			break;
		}
		long long int c = a*a*(a*a + 4 * b*b) * 10000000000;
		long long int d = sqrt(c);
		cout << a * a + d / 100000 << '.' << d % 100000 << endl;
	}
	
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:35: error: 'sqrt' was not declared in this scope
   17 |                 long long int d = sqrt(c);
      |                                   ^~~~
Language: C++

#include<iostream>
using nmespace std;
int main(){
int w,h;
float ans;
while(1){
cin>>w>>h;
if(w==0&&h==0){
break;
}
ans=(float)w*w*2.0+w*h*6.0;
cout<<ans<<endl;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nmespace'
    2 | using nmespace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | cin>>w>>h;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 | cout<<ans<<endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:12: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 | cout<<ans<<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)
      |     ^~~~
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int w,h;
float ans;
while(1){
cin>>w>>h;
if(w==0&&h==0){
break;
}
ans=(float)w*w*2.0+w*h*6.0;
cout<<ans<<endl;
}

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

import java.util.*;

public class Main {
  Scanner sc = new Scanner(System.in);
  double x, h;
  void run() {
    for(;;) {
      x = sc.nextInt();
      h = sc.nextInt();
      if (x == 0 && h == 0) break;
      System.out.println(x + "|" + h);
      double l = Math.sqrt(x*x/4 + h*h);
      double res = x*x + 2 * x * l;
      System.out.println(res);
    }
  }
  public static void main(String args[]) {
    new Main().run();
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

import java.util.*;

public class Main {
  Scanner sc = new Scanner(System.in);
  double x, h;
  void run() {
    for(;;) {
      x = sc.nextInt();
      h = sc.nextInt();
      if (x == 0 && h == 0) break;
      //System.out.println(x + "|" + h);
      double l = Math.sqrt(x*x/4 + h*h);
      double res = x*x + 2 * x * l;
      System.out.println(res);
    }
  }
  public static void main(String args[]) {
    new Main().run();
  }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

int main()
{
	double x, h;
	while(cin >> x >> h && (x || h))
		cout << setprecision(10) << x * x + x * sqrt(x * x / 4 + h * h) * 2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: 'cin' was not declared in this scope
    4 |         while(cin >> x >> h && (x || h))
      |               ^~~
a.cc:5:17: error: 'cout' was not declared in this scope
    5 |                 cout << setprecision(10) << x * x + x * sqrt(x * x / 4 + h * h) * 2 << endl;
      |                 ^~~~
a.cc:5:25: error: 'setprecision' was not declared in this scope
    5 |                 cout << setprecision(10) << x * x + x * sqrt(x * x / 4 + h * h) * 2 << endl;
      |                         ^~~~~~~~~~~~
a.cc:5:57: error: 'sqrt' was not declared in this scope
    5 |                 cout << setprecision(10) << x * x + x * sqrt(x * x / 4 + h * h) * 2 << endl;
      |                                                         ^~~~
a.cc:5:88: error: 'endl' was not declared in this scope
    5 |                 cout << setprecision(10) << x * x + x * sqrt(x * x / 4 + h * h) * 2 << endl;
      |                                                                                        ^~~~
Language: C++

#include <iostream>
#include <sstream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <vector>
#include <stack>

//AOJ0073
#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;

int main(void){

int x,h;
char k;
	while(cin >> x >> h){
		if(x==0 && h==0 || cin.eof()) break;
		double trg = sqrt(x*x/4.00 + 1.00*h*h) * x * 0.5;
		
		printf("%.8f\n",trg*4+x*x*1.00);
	}
	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:30: error: 'sqrt' was not declared in this scope
   21 |                 double trg = sqrt(x*x/4.00 + 1.00*h*h) * x * 0.5;
      |                              ^~~~
Language: C++

#inlude <stdio.h>

#include <math.h>

int main(void)
{
	double x,h,a;
	
	
	while(scanf("%lf %lf",%x,&h)){
		if(x==0&&h==0) break;
	
		printf("%.6f\n",(x*sqrt((4*h*h)+(x*x)))+(x*x));
	}
	return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inlude; did you mean #include?
    1 | #inlude <stdio.h>
      |  ^~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:10:31: error: expected primary-expression before '%' token
   10 |         while(scanf("%lf %lf",%x,&h)){
      |                               ^
a.cc:10:15: error: 'scanf' was not declared in this scope
   10 |         while(scanf("%lf %lf",%x,&h)){
      |               ^~~~~
a.cc:13:17: error: 'printf' was not declared in this scope
   13 |                 printf("%.6f\n",(x*sqrt((4*h*h)+(x*x)))+(x*x));
      |                 ^~~~~~
a.cc:4:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    3 | #include <math.h>
  +++ |+#include <cstdio>
    4 |
Language: C++

#include<stdio.h>
#include<math.h>

int main(){
	
	int x,h,y,num=0;
	
	while(1){
	
	scanf("%d %d",&x,&h);
	
	y=sqrt(x*x+h*h);
	num=x*x+2*x*y;
	if((x==0)&&(h==0)){
			break;
	}
		
	printf("%d",num);
	
		
	}
	
	

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

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

int main(){
  double S,nx,xh;
  int x,h;

  for(;;){
    cin >> x >> h;
    if(x == 0 && h == 0) break;
    nx = (double)x;
    nh = (double)h;
    S = sqrt(4*nh*nh+nx*nx)+nx*nx;
    printf("%.6f\n" ,S);
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:5: error: 'nh' was not declared in this scope; did you mean 'h'?
   14 |     nh = (double)h;
      |     ^~
      |     h
Language: C++

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

int main(){
double x,h,c,a;
while(1){
scanf("%lf%lf",&x,&h);
if(x==0&&h==0)break;
c=4*h*h+x*x;
c=sqrt(c);
a=x*c+x*x;
printf("%f\n",a)




return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: expected ';' before 'return'
   14 | printf("%f\n",a)
      |                 ^
      |                 ;
......
   19 | return 0;
      | ~~~~~~           
a.cc:20:2: error: expected '}' at end of input
   20 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

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

int main(){
double x,h,c,a;
while(1){
scanf("%lf%lf",&x,&h);
if(x==0&&h==0)break;
c=4*h*h+x*x;
c=sqrt(c);
a=x*c+x*x;
printf("%f\n",a);




return 0;
}

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

#include <cmath>
#include <cstdio>

using namespace std;

// x: base length,  h: height of pyramid
double get_surface_area_of_pyramid(int x, int h) {
	double height_of_triangle = sqrt(x * x / 4.0 + h * h);

	return 2 * x * height_of_triangle + x * x;
}

int main(void) {
	int x, h; // 4角推

	while (cin >> x >> h) {
		if (x == 0 && h == 0) {
			break;
		}
		printf("%.6f\n",get_surface_area_of_pyramid(x, h));
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'cin' was not declared in this scope
   16 |         while (cin >> x >> h) {
      |                ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <cstdio>
  +++ |+#include <iostream>
    3 |
Language: C++

#include<iostream>
#include<iomanip>

int main()
{
	double x, h;
	while( std::cin >> x >> h, x || h )
	{
		double t = sqrt( x * x / 4.0 + h * h );

		std::cout << std::fixed << std::setprecision( 6 ) << x * t * 2.0 + x * x << std::endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: 'sqrt' was not declared in this scope
    9 |                 double t = sqrt( x * x / 4.0 + h * h );
      |                            ^~~~
Language: C++

loop do
  x, h = 2.times.map{gets.to_i}
  break if x==0 && h==0
  puts x*x+Math.sqrt(4*h*h+x*x)*x
end

Compiler output:
a.cc:1:1: error: 'loop' does not name a type
    1 | loop do
      | ^~~~
a.cc:3:3: error: expected unqualified-id before 'break'
    3 |   break if x==0 && h==0
      |   ^~~~~
Language: C++

while true
  x, h = 2.times.map{gets.to_i}
  break if x==0 && h==0
  puts x*x+Math.sqrt(4*h*h+x*x)*x
end

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while true
      | ^~~~~
a.cc:3:3: error: expected unqualified-id before 'break'
    3 |   break if x==0 && h==0
      |   ^~~~~
Language: C++

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

int main(){
	while(1){
		double x,h,s;
		cin>>x>>h;
		if(x==0&&h==0)break;
		s=x*x+2*x*pow((x*x/4+h*h),0.5);
		cout<<fixed<<setprecision(6)<<s<<endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: 'pow' was not declared in this scope
   10 |                 s=x*x+2*x*pow((x*x/4+h*h),0.5);
      |                           ^~~
Language: C

h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'h' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
    1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
    1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
      |     ^
main.c:1:7: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
      |       ^
main.c:1:9: error: return type defaults to 'int' [-Wimplicit-int]
    1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
      |         ^~~~
main.c: In function 'main':
main.c:1:21: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
      |                     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
main.c:1:21: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
      |                     ^~~~~
main.c:1:21: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:49: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
      |                                                 ^~~~~~
main.c:1:49: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:49: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:49: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:1: error: expected declaration or statement at end of input
    1 | h,m,s,t;main(){for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%d:%d:%d\n%d:%d:%d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=h*3600+m*60+s;
      | ^
Language: C

h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;}
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'h' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
    1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;}
      |   ^
main.c:1:5: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
    1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;}
      |     ^
main.c:1:7: error: type defaults to 'int' in declaration of 't' [-Wimplicit-int]
    1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;}
      |       ^
main.c:1:9: error: return type defaults to 'int' [-Wimplicit-int]
    1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;}
      |         ^~~~
main.c: In function 'main':
main.c:1:19: error: expected expression before 'for'
    1 | h,m,s,t;main(){h=!for(;scanf("%d%d%d",&h,&m,&s),~h;printf("%02d:%02d:%02d\n%02d:%02d:%02d\n",t/3600,t/60%60,t%60,t*3/3600,t*3/60%60,t*3%60))t=7200-h*3600-m*60-s;}
      |                   ^~~
Language: C

include<stdio.h>

int main(void)
{
	int t,m,s,n,i,T=0,M=0,S=0,n3,sum,N;

	scanf("%d",&t);
	scanf("%d",&m);
	scanf("%d",&s);

	sum = 3600*t + 60*m + s;
	N = 7200 - sum;
	
	for(i=0;i<2;i++){
	if( N>=3600 ){
		T = N / 3600;
		N = N % 3600;
	}
	if( N>=60 && N<3600 ){
		M = N / 60;
		N = N % 60;
	}
	S = N;
	if(T<10){
		printf("0%d",T);
	}
	else{
		printf("%d",T);
	}
	if(M<10){
		printf(":0%d",M);
	}
	else{
		printf(":%d",M);
	}
	if(S<10){
		printf(":0%d",S);
	}
	else{
		printf(":%d",S);
	}
	printf("\n");
	N = 7200 - sum;
	N = N *3;
	}
	return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#include<iostream>
using namespace std;
int s[3], t[3], u[3], time, vtime[2];
int main() {
	while (true) {
		cin >> s[0] >> s[1] >> s[2];
		if (s[0] == -1) { break; }
		time = s[0] * 3600 + s[1] * 60 + s[2];
		vtime[0] = 7200 - time;
		vtime[1] = 7200 - (time / 3);
		t[0] = vtime[0] / 3600;
		t[1] = (vtime[0] / 60) % 60;
		t[2] = vtime[0] % 60;
		u[0] = vtime[1] / 3600;
		u[1] = (vtime[1] / 60) % 60;
		u[2] = vtime[1] % 60;
		for (int i = 0; i < 3; i++) {
			if (i) { cout << ':'; }
			if (t[i] < 10) { cout << '0' << t[i]; }
			else { cout << t[i]; }
		}
		cout << endl;
		for (int i = 0; i < 3; i++) {
			if (i) { cout << ':'; }
			if (u[i] < 10) { cout << '0' << u[i]; }
			else { cout << u[i]; }
		}
		cout << endl;
	}
}

Compiler output:
a.cc:3:23: error: 'int time' redeclared as different kind of entity
    3 | int s[3], t[3], u[3], time, vtime[2];
      |                       ^~~~
In file included from /usr/include/pthread.h:23,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr-default.h:35,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/gthr.h:157,
                 from /usr/include/c++/14/ext/atomicity.h:35,
                 from /usr/include/c++/14/bits/ios_base.h:39,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/time.h:76:15: note: previous declaration 'time_t time(time_t*)'
   76 | extern time_t time (time_t *__timer) __THROW;
      |               ^~~~
a.cc: In function 'int main()':
a.cc:8:22: error: assignment of function 'time_t time(time_t*)'
    8 |                 time = s[0] * 3600 + s[1] * 60 + s[2];
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:9:33: error: invalid operands of types 'int' and 'time_t(time_t*) noexcept' {aka 'long int(long int*) noexcept'} to binary 'operator-'
    9 |                 vtime[0] = 7200 - time;
      |                            ~~~~ ^ ~~~~
      |                            |      |
      |                            int    time_t(time_t*) noexcept {aka long int(long int*) noexcept}
a.cc:10:41: error: invalid operands of types 'time_t(time_t*) noexcept' {aka 'long int(long int*) noexcept'} and 'int' to binary 'operator/'
   10 |                 vtime[1] = 7200 - (time / 3);
      |                                    ~~~~ ^ ~
      |                                    |      |
      |                                    |      int
      |                                    time_t(time_t*) noexcept {aka long int(long int*) noexcept}
Language: C++

include<stdio.h>

int main(void)
{
	int t,m,s,n,i,T=0,M=0,S=0,n3,sum,N;

	scanf("%d",&t);
	scanf("%d",&m);
	scanf("%d",&s);

	sum = 3600*t + 60*m + s;
	N = 7200 - sum;
	
	for(i=0;i<2;i++){
	if( N>=3600 ){
		T = N / 3600;
		N = N % 3600;
	}
	if( N>=60 && N<3600 ){
		M = N / 60;
		N = N % 60;
	}
	S = N;
	if(T<10){
		printf("0%d",T);
	}
	else{
		printf("%d",T);
	}
	if(M<10){
		printf(":0%d",M);
	}
	else{
		printf(":%d",M);
	}
	if(S<10){
		printf(":0%d",S);
	}
	else{
		printf(":%d",S);
	}
	printf("\n");
	N = 7200 - sum;
	N = N *3;
	}
	return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<stdio.h>
      | ^~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
	int h,m,s,sum1,sum2;
	cin>>h>>m>>s;
	if(h==-1&&m==-1&&s==-1)break;
	sum1 = 60*60*60*h+60*60*m+60*s;
	sum2 = sum1/3;
	sum1 = 60*60*60*2 - sum1;
	sum2 = 60*60*60*2 - sum2;
	h = sum1/216000;
	m = (sum1%216000)/3600;
	s = ((sum1%216000)%3600)/60;
	cout<<h<<':'<<m<<':'<<s<<endl;;
	h = sum2/216000;
	m = (sum2%216000)/3600;
	s = ((sum2%216000)%3600)/60;
	cout<<h<<':'<<m<<':'<<s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:32: error: break statement not within loop or switch
    6 |         if(h==-1&&m==-1&&s==-1)break;
      |                                ^~~~~
Language: C++

#include<iostream>
#include<iomanip>

int main(){
    while(1){
        int t,m,s;
        double T=0,N;
        std::cin>>h>>m>>s;
        if(h==-1&&m==-1&&s==-1)break;
        T+=h*60;
        T+=m;
        T+=(s/60);
        NT=120-T;
        h=NT/60;
        m=NT-h*60;
        s=(NT-h*60-m)*60;
        std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':';
        std::cout<<std::setw(2)<<std::setfill('0')<<m<<':';         
        std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl;
        NT*=3;
        h=NT/60;
        m=NT-h*60;
        s=(NT-h*60-m)*60;
        std::cout<<std::setw(2)<<std::setfill('0')<<h<<':';
        std::cout<<std::setw(2)<<std::setfill('0')<<m<<':';
        std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl;
    }
    return 0;
}

Compiler output:
a.cc:17:56: error: empty character constant
   17 |         std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':';
      |                                                        ^~
a.cc:17:59: warning: missing terminating ' character
   17 |         std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':';
      |                                                           ^
a.cc:17:59: error: missing terminating ' character
   17 |         std::cout<<std::setw(2)<<std::setfill('0')<<h<<'':';
      |                                                           ^~
a.cc: In function 'int main()':
a.cc:8:19: error: 'h' was not declared in this scope
    8 |         std::cin>>h>>m>>s;
      |                   ^
a.cc:13:9: error: 'NT' was not declared in this scope; did you mean 'N'?
   13 |         NT=120-T;
      |         ^~
      |         N
Language: C++

#include<iostream>
#include<iomanip>
 
int main(){
    while(1){
        int t,m,s;
        double T=0,N;
        std::cin>>h>>m>>s;
        if(h==-1&&m==-1&&s==-1)break;
        T+=h*60;
        T+=m;
        T+=(s/60);
        NT=120-T;
        h=NT/60;
        m=NT-h*60;
        s=(NT-h*60-m)*60;
        std::cout<<std::setw(2)<<std::setfill('0')<<h<<':';
        std::cout<<std::setw(2)<<std::setfill('0')<<m<<':';         
        std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl;
        NT*=3;
        h=NT/60;
        m=NT-h*60;
        s=(NT-h*60-m)*60;
        std::cout<<std::setw(2)<<std::setfill('0')<<h<<':';
        std::cout<<std::setw(2)<<std::setfill('0')<<m<<':';
        std::cout<<std::setw(2)<<std::setfill('0')<<s<<std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'h' was not declared in this scope
    8 |         std::cin>>h>>m>>s;
      |                   ^
a.cc:13:9: error: 'NT' was not declared in this scope; did you mean 'N'?
   13 |         NT=120-T;
      |         ^~
      |         N