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

#include <iostream>
using namespace std;

int x,y,s,i,j,sum;
int max=0;

int main() {
  while(1){
    cin>>x>>y>>s;
    if (x==0) break;
    for (i=1;i<s;i++){
      for (j=1;j<s-i;j++){
	if (i*(100+x)/100+j*(100+x)/100==s){
	  sum=i*(100+y)/100+j*(100+y)/100;
	  if (max<sum){
	    max=sum;
	  }
	}
      }
    }
    cout<<max<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: reference to 'max' is ambiguous
   15 |           if (max<sum){
      |               ^~~
In file included from /usr/include/c++/14/string:51,
                 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:1:
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:5:5: note:                 'int max'
    5 | int max=0;
      |     ^~~
a.cc:16:13: error: reference to 'max' is ambiguous
   16 |             max=sum;
      |             ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:5:5: note:                 'int max'
    5 | int max=0;
      |     ^~~
a.cc:21:11: error: reference to 'max' is ambiguous
   21 |     cout<<max<<endl;
      |           ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:5:5: note:                 'int max'
    5 | int max=0;
      |     ^~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm> // sort
#include <map> // pair
using namespace std;

//????¨????s???????????????????????????????????????
//????????¨???????¨????y??§??????????????????????????§????????????

int tax(int p, int price){
	return price * (100 + p) / 100;
}

int main(){
	int x, y, s;
	cin >> x;
	while(x != 0){
		cin >> y >> s;
		int maximum = 0;
		for(int i = 1; i < s; i++){
			for(int j = i; j < s; j++){
				if(tax(x, i) + tax(x, j) == s){
					maximum = max(maximum, tax(y, i) + tax(y, j));		
				}
			}
		}

		cout << maximum << endl;

		cin >> x;
	}

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


#include<iostream>
using namespace std;
int tax(int x,int y);

int tax(int x,int y,int a){
    int a=a*(100+y)/(100+x);
    return a;
}
int main()
{
    while(1){
        cin>>x>>y>>a;
        if(x==0&&y==0&&a==0){
            break;
        }
        cout<<tax(x,y,a)<<endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int tax(int, int, int)':
a.cc:7:9: error: declaration of 'int a' shadows a parameter
    7 |     int a=a*(100+y)/(100+x);
      |         ^
a.cc:6:25: note: 'int a' previously declared here
    6 | int tax(int x,int y,int a){
      |                     ~~~~^
a.cc: In function 'int main()':
a.cc:13:14: error: 'x' was not declared in this scope
   13 |         cin>>x>>y>>a;
      |              ^
a.cc:13:17: error: 'y' was not declared in this scope
   13 |         cin>>x>>y>>a;
      |                 ^
a.cc:13:20: error: 'a' was not declared in this scope
   13 |         cin>>x>>y>>a;
      |                    ^
Language: C++


#include "practice2.hpp"
#include<iostream>
using namespace std;
int tax(int x,int y,int a);

int tax(int x,int y,int a){
    int b=a*(100+y)/(100+x);
    return b;
}
int main()
{
    while(1){
        int x,y,a;
        cin>>x>>y>>a;
        if(x==0&&y==0&&a==0){
            break;
        }
        cout<<tax(x,y,a)<<endl;
    }
    return 0;
}

Compiler output:
a.cc:2:10: fatal error: practice2.hpp: No such file or directory
    2 | #include "practice2.hpp"
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++


#include <iostream>

using namespace std;
int max(int a,int b){
    if(a>b)
        return a;
    else
        return b;
}
int x,y;
int tax(int n){
    int p = 0;
    for(int i = 1 ; i < 1000 ; i++){
        if(i*(100+x)/100 == n){
            p = i;
            break;
        }
    }
    return p*(100+y)/100;
}

int main(){
    int s;
    while(cin >> x >> y >> s,(x|y|s)){
        int max = 0;
        for(int i = 1 ; i <= s/2 ; i++){
            max =max(max,tax(i)+tax(s-i));
        }
        cout << max << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:21: error: 'max' cannot be used as a function
   28 |             max =max(max,tax(i)+tax(s-i));
      |                  ~~~^~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int a,t;

int tax(a,t){
  int p;
  p = a*(100+t)/100;
  return p;
}

int main(){
    int x,y,s;
    int m = 0;
    while (cin >> x >> y >> s && s>0){
    	   for (int i=1; i<s; ++i){
    	   	for (int j=1; j<s; ++j){
		  if (tax(i,x) + tax(j,x) == s){
		    m = max(m, tax(i,y) + tax(j,y));}
		}
   	 }
	   cout << m << endl ;
    }
}

Compiler output:
a.cc:6:12: error: expression list treated as compound expression in initializer [-fpermissive]
    6 | int tax(a,t){
      |            ^
a.cc:6:13: error: expected ',' or ';' before '{' token
    6 | int tax(a,t){
      |             ^
a.cc: In function 'int main()':
a.cc:18:26: error: 'tax' cannot be used as a function
   18 |                   if (tax(i,x) + tax(j,x) == s){
      |                       ~~~^~~~~
a.cc:18:37: error: 'tax' cannot be used as a function
   18 |                   if (tax(i,x) + tax(j,x) == s){
      |                                  ~~~^~~~~
a.cc:19:35: error: 'tax' cannot be used as a function
   19 |                     m = max(m, tax(i,y) + tax(j,y));}
      |                                ~~~^~~~~
a.cc:19:46: error: 'tax' cannot be used as a function
   19 |                     m = max(m, tax(i,y) + tax(j,y));}
      |                                           ~~~^~~~~
Language: C++

#include <algorithm>
#include <iostream>

using namespace std;

int main(){
	
	double x,y;
	int s;
	while(cin >> x >> y >> s){
		if(x == 0 && y == 0 && s == 0)break;
		x /= 100.0;y /= 100.0;
		x += 1.0,y += 1.0;
		int ans = 0;
		for(int a = 1;a < s;a++){
			for(int b = 1;b < s;b++){
				if(a * x + b * x == s){
					ans = max(a * y + b * y,ans);
				}				
			}
		}
		cout << ans << endl;
	}


}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:50: error: no matching function for call to 'max(double, int&)'
   18 |                                         ans = max(a * y + b * y,ans);
      |                                               ~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:18:50: note:   deduced conflicting types for parameter 'const _Tp' ('double' and 'int')
   18 |                                         ans = max(a * y + b * y,ans);
      |                                               ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:18:50: note:   mismatched types 'std::initializer_list<_Tp>' and 'double'
   18 |                                         ans = max(a * y + b * y,ans);
      |                                               ~~~^~~~~~~~~~~~~~~~~~~
Language: C++

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

inline int deTax(int rate, int yen){
  return yen * 100 / (100 + rate);
}
inline int enTax(int rate, int yen){
  return yen * (100 + rate) / 100;
}
???
int main(){
  while(1){
    int x, y, s; cin >> x >> y >> s;
    if(!x && !y && !s) break;
???
    int maximum = 0;
    for(double i=1;i < s/2+1; ++i){
      double j = s-i+0.99999999999999;
      double k = i+0.99999999999999;
      
      int nx = deTax(x, k), ny = deTax(x, j);
      if(enTax(x, nx) + enTax(x, ny) == s){
        maximum = max(maximum, enTax(y, nx) + enTax(y, ny));
      }
    }
    cout << MAX << endl;
  }
}

Compiler output:
a.cc:11:1: error: expected unqualified-id before '?' token
   11 | ???
      | ^
Language: C++

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

inline int deTax(int rate, int yen){
  return yen * 100 / (100 + rate);
}
inline int enTax(int rate, int yen){
  return yen * (100 + rate) / 100;
}

int main(){
  while(1){
    int x, y, s; cin >> x >> y >> s;
    if(!x && !y && !s) break;

    int maximum = 0;
    for(double i=1;i < s/2+1; ++i){
      double j = s-i+0.99999999999999;
      double k = i+0.99999999999999;
      
      int nx = deTax(x, k), ny = deTax(x, j);
      if(enTax(x, nx) + enTax(x, ny) == s){
        maximum = max(maximum, enTax(y, nx) + enTax(y, ny));
      }
    }
    cout << MAX << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:13: error: 'MAX' was not declared in this scope
   27 |     cout << MAX << endl;
      |             ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){
int S;
cin >> S;
int maximum = 0;
for (int i=1; i<S; ++i)
for (int j=i; j<S; ++j)
if (tax(X,i)+tax(X,j) == S)
            maximum = max(maximum, tax(Y,i)+tax(Y,j));
			return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'X' was not declared in this scope
    9 | if (tax(X,i)+tax(X,j) == S)
      |         ^
a.cc:9:5: error: 'tax' was not declared in this scope
    9 | if (tax(X,i)+tax(X,j) == S)
      |     ^~~
a.cc:10:40: error: 'Y' was not declared in this scope
   10 |             maximum = max(maximum, tax(Y,i)+tax(Y,j));
      |                                        ^
Language: C++

#include <iostream>
using namespace std;
int main(){
while(true){
int X,Y,S;
cin >> X >> Y >> S;
if(X == 0 && Y == 0 && S == 0)break;
int maximum = 0;
for (int i=1; i<S; ++i)
for (int j=i; j<S; ++j)
if (tax(X,i)+tax(X,j) == S)
            maximum = max(maximum, tax(Y,i)+tax(Y,j));
cout << maximum;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'tax' was not declared in this scope
   11 | if (tax(X,i)+tax(X,j) == S)
      |     ^~~
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main() {
	int x, y, s;

	while (cin >> x >> y >> s, x || y || s) {
		int ans = 0;
		for (int i = 1; i < s; i++) {
			int a = i * (100 + x) / 100;
			int b = ceil((s - a) * 100 / (100 + x));
			
			if (b > 0 && a + (b * (100 + x) / 100) == s) {
				ans = max(ans, a + (b * (100 + y) / 100));
			}
		}
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:33: error: 'ceil' was not declared in this scope
   13 |                         int b = ceil((s - a) * 100 / (100 + x));
      |                                 ^~~~
Language: C++

#include<iostream>
#include<algorithm>

using namespace std;

#define REP(i,n) for(int i = 0;i < n;i++)
	
int main()
{
	int x,y,s;
	while(cin >> x >> y >> s,x|y|s)
	{
		int ans = 0;
		for(int i = 1;i < s;i++)
		{
			for(int j = 1;j < s ;j++)
			{
				int a = i*(100.d + x)/100d;
				int b = j*(100.d + x)/100.d;
				if(a + b != s)continue;
				a = i*(100.d + y)/100.d;
				b = j*(100.d + y)/100.d;
				ans = max(ans , a+b);
			}
		}
		cout << ans << endl;
		
	}
	
	return 0;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:55: error: unable to find numeric literal operator 'operator""d'
   18 |                                 int a = i*(100.d + x)/100d;
      |                                                       ^~~~
Language: C++

#include<algorithm>
#include<vector>

using namespace std;

vector<int> ans;
int x,y,s;

int main(){
	while(1){
		cin >> x >> y >> s;
		if(x + y + s == 0) break;
		int mx = 0;
		for(int i = 1; i < s;i++){
			for(int j = s-1;j >= 1;j--){
				if((i*(100+x)/100 + j*(100+x)/100) == s){
					int sum = i*(100+y)/100 + j*(100+y)/100;
					mx = max(mx,sum);
					break;
				}
			}
		}
		ans.push_back(mx);
	}
	for(int i = 0;i < ans.size();i++) cout << ans[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'cin' was not declared in this scope
   11 |                 cin >> x >> y >> s;
      |                 ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<vector>
  +++ |+#include <iostream>
    3 | 
a.cc:25:43: error: 'cout' was not declared in this scope
   25 |         for(int i = 0;i < ans.size();i++) cout << ans[i] << endl;
      |                                           ^~~~
a.cc:25:43: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:61: error: 'endl' was not declared in this scope
   25 |         for(int i = 0;i < ans.size();i++) cout << ans[i] << endl;
      |                                                             ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<vector>
  +++ |+#include <ostream>
    3 |
Language: C++

#include<algorithm>
#include<vector>

using namespace std;

vector<int> ans;
int x,y,s;

int main(){
	while(1){
		cin >> x >> y >> s;
		if(x + y + s == 0) break;
		int mx = 0;
		for(int i = 1; i < s;i++){
			for(int j = s-1;j >= 1;j--){
				if((i*(100+x)/100 + j*(100+x)/100) == s){
					int sum = i*(100+y)/100 + j*(100+y)/100;
					mx = max(mx,sum);
					break;
				}
			}
		}
		ans.push_back(mx);
	}
	for(int i = 0;i < ans.size();i++) cout << ans[i] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'cin' was not declared in this scope
   11 |                 cin >> x >> y >> s;
      |                 ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include<vector>
  +++ |+#include <iostream>
    3 | 
a.cc:25:43: error: 'cout' was not declared in this scope
   25 |         for(int i = 0;i < ans.size();i++) cout << ans[i] << endl;
      |                                           ^~~~
a.cc:25:43: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:61: error: 'endl' was not declared in this scope
   25 |         for(int i = 0;i < ans.size();i++) cout << ans[i] << endl;
      |                                                             ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include<vector>
  +++ |+#include <ostream>
    3 |
Language: C++

#include <iostream>
using namespace std;
int main(){
int x,y,s;
while(cin >> x >> y >> s && x){
int ans=0;
for(int i=1;i<s;i++){
for(int j=1;j<s;j++){
if(i*(100+x)/100+j*(100+x)/100==s){
if(i*(100+y)/100+j*(100+y)/100>ans){
ans=100+y)/100+j*(100+y)/100;
}
}
}
}
cout << ans << endl
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:10: error: expected ';' before ')' token
   11 | ans=100+y)/100+j*(100+y)/100;
      |          ^
      |          ;
a.cc:16:20: error: expected ';' before '}' token
   16 | cout << ans << endl
      |                    ^
      |                    ;
   17 | }
      | ~
Language: C++

#include<iostream>
using namespace std;

double tax(int price, int rate) {
	return price*(1+0.01*rate)
}

int main() {
	int x, y, s;
	int maximum = 0;
	cin >> x >> y >> s;
	for (int i = 1; i < s; ++i) {
		for (int j = i; j < s; ++j) {
			if (tax(i, x) + tax(j, x) == s) {
				if(maximum<tax(i,y)+tax(j,y))
					maximum = tax(i, y) + tax(j, y);
			}
		}
	}
	cout << maximum << "\n";
}

Compiler output:
a.cc: In function 'double tax(int, int)':
a.cc:5:35: error: expected ';' before '}' token
    5 |         return price*(1+0.01*rate)
      |                                   ^
      |                                   ;
    6 | }
      | ~
Language: C++

#include<iostream>
using namespace std;

double tax(int price, int rate) {
	return price*(1 + 0.01*rate);
}

int main() {
	while (true) {
		int x, y, s;
		int maximum = 0;
		cin >> x >> y >> s;
		if (x == 0 && y = 0 && s == 0) break;
		for (int i = 1; i < s; ++i) {
			for (int j = i; j < s; ++j) {
				if (tax(i, x) + tax(j, x) == s) {
					if (maximum < tax(i, y) + tax(j, y)) {
						maximum = tax(i, y) + tax(j, y);
					}
				}
			}
		}
		cout << maximum << "\n";
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:28: error: lvalue required as left operand of assignment
   13 |                 if (x == 0 && y = 0 && s == 0) break;
      |                     ~~~~~~~^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int x,y,s;
  cin >> x >> y >> s;
  int f = 0
  for(int i=0;i<s/2;i++){
    int a = i*100/(100 + x);
    if (a*(100+x)/100 != i){
      a += 1;
    }
    int b = (s-i)*100/(100 + x);
    if (b*(100+x)/100 != i){
      b += 1;
    }
    int k = (a*(100+y)/100) + (b*(100+y)/100);
    if(k > f){
      f = k;
    }
  }
  cout << f;

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(int i=0;i<s/2;i++){
      |   ^~~
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for(int i=0;i<s/2;i++){
      |               ^
a.cc:22:13: error: expected '}' at end of input
   22 |   cout << f;
      |             ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  int x,y,s;
  cin >> x >> y >> s;
  int f = 0
  for(int i=0;i<s/2;i++){
    int a = i*100/(100 + x);
    if (a*(100+x)/100 != i){
      a += 1;
    }
    int b = (s-i)*100/(100 + x);
    if (b*(100+x)/100 != i){
      b += 1;
    }
    int k = (a*(100+y)/100) + (b*(100+y)/100);
    if(k > f){
      f = k;
    }
  }
  cout << f;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: expected ',' or ';' before 'for'
    8 |   for(int i=0;i<s/2;i++){
      |   ^~~
a.cc:8:15: error: 'i' was not declared in this scope
    8 |   for(int i=0;i<s/2;i++){
      |               ^
Language: C++

cin >> x >> y >> s;
  if(x < 100 && x > 0 && y < 100 && y > 0 && s < 1000 && s > 0){
    int f = 0;
    for(int i=1;i<s-1;i++){
    int a = i*100/(100 + x);
    while(int(a*(100+x)/100) <= i){
      a += 1;
    }
    a -= 1;
    int b = (s-i)*100/(100 + x);
    while(int(b*(100+x)/100) <= s-i){
      b += 1;
    }
    b -= 1;
    int k = (a*(100+y)/100) + (b*(100+y)/100);
    if(k > f){
      f = k;
    }
  }
    cout << f << endl;
  }

Compiler output:
a.cc:1:1: error: 'cin' does not name a type
    1 | cin >> x >> y >> s;
      | ^~~
a.cc:2:3: error: expected unqualified-id before 'if'
    2 |   if(x < 100 && x > 0 && y < 100 && y > 0 && s < 1000 && s > 0){
      |   ^~
Language: C++

#include<iostream>
using namespace std;

int main(){
  int x,y,s;
  s = 1
  while(x != 0 || y!=0 || s != 0){
    cin >> x >> y >> s;
    if(x < 100 && x > 0 && y < 100 && y > 0 && s < 1000 && s > 0){
      int f = 0;
      for(int i=1;i<s-1;i++){
	int a = i*100/(100 + x);
	while(int(a*(100+x)/100) <= i){
	  a += 1;
	}
	a -= 1;
	int b = (s-i)*100/(100 + x);
	while(int(b*(100+x)/100) <= s-i){
      b += 1;
	}
	b -= 1;
	int k = (a*(100+y)/100) + (b*(100+y)/100);
	if(k > f){
	  f = k;
	}
      }
      cout << f << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: expected ';' before 'while'
    6 |   s = 1
      |        ^
      |        ;
    7 |   while(x != 0 || y!=0 || s != 0){
      |   ~~~~~
Language: C++

#if
???????????????????\??????¨??¨????????????????????£????????????????????????
??????????????????????????¨??????????????????????????????????????????????????°????????????????????????????????????????????????????????£????????????????????§??????
?????????????????????????????´???????????????????????\????????????????´???´??????????????¨???????????????
while?????¨????????§??????
????????´???????????????????????????????????§??????
#endif
#include <iostream>
using namespace std;
int X, Y, S;
int tax(int rate,int value){
  int cost;
  cost = (rate + 100)*value/100;
  return cost;
}
int solve(){
  int maximum = 0;
  for(int i = 1; i < S; ++i)
    for(int j = 1; j < S; ++j)
      if(tax(X,i) + tax(X,j) == S)
	maximum = max(maximum, tax(Y,i) + tax(Y,j));
  return maximum;
}
int main(){
  while(cin >> X >> Y >> S && X > 0 ){
    cout << solve() << endl;
  }
}

Compiler output:
a.cc:1:4: error: #if with no expression
    1 | #if
      |    ^
a.cc:2:51: error: extended character £ is not valid in an identifier
    2 | ???????????????????\??????¨??¨????????????????????£????????????????????????
      |                                                   ^
a.cc:3:78: error: extended character ° is not valid in an identifier
    3 | ??????????????????????????¨??????????????????????????????????????????????????°????????????????????????????????????????????????????????£????????????????????§??????
      |                                                                              ^
a.cc:3:135: error: extended character £ is not valid in an identifier
    3 | ??????????????????????????¨??????????????????????????????????????????????????°????????????????????????????????????????????????????????£????????????????????§??????
      |                                                                                                                                       ^
a.cc:3:156: error: extended character § is not valid in an identifier
    3 | ??????????????????????????¨??????????????????????????????????????????????????°????????????????????????????????????????????????????????£????????????????????§??????
      |                                                                                                                                                            ^
a.cc:5:20: error: extended character § is not valid in an identifier
    5 | while?????¨????????§??????
      |                    ^
a.cc:6:45: error: extended character § is not valid in an identifier
    6 | ????????´???????????????????????????????????§??????
      |                                             ^
Language: C++

int main () {
  while (true) {
    int before;
    int after;
    int sum;
    cin >> before >> after >> sum;

    if (before == 0 && after == 0 && sum == 0) {
      break;
    }

    int min = ceil(100.0/after); // ?????????????????§?????????????°????

    int before_raw_1; // ??§?¨?????????????
    int before_1; // ??§?¨??????????
    int before_raw_2; // ??§?¨?????????????
    int before_2; // ??§?¨??????????

    int max = 0; // ??°?¨?????????§??????

    for (int num = min; num <= sum/2; num++) {
      before_2 = num * (100 + before) / 100;
      double before_raw_1_temp_1 = floor((sum - before_2 + 1)*100.0/(100.0 + before));
      double before_raw_1_temp_2 = ceil((sum - before_2 + 1)*100.0/(100.0 + before));
      if (before_raw_1_temp_1 != before_raw_1_temp_2) {
        before_raw_1 = before_raw_1_temp_1;
      } else {
        before_raw_1 = before_raw_1_temp_1 - 1;
      }
      int sum_temp = num * (100 + after) / 100 + before_raw_1 * (100 + after) / 100;
      if (sum_temp >= max) {
        max = sum_temp;
      }
    }
    before_2 = 1 * (100 + before) / 100;
    before_raw_1 = (sum - before_2 + 1)*100/(100 + before);
    int sum_temp = 1 * (100 + after) / 100 + before_raw_1 * (100 + after) / 100;
    if (sum_temp >= max) {
      max = sum_temp;
    }
    cout << max << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> before >> after >> sum;
      |     ^~~
a.cc:12:15: error: 'ceil' was not declared in this scope
   12 |     int min = ceil(100.0/after); // ?????????????????§?????????????°????
      |               ^~~~
a.cc:23:36: error: 'floor' was not declared in this scope
   23 |       double before_raw_1_temp_1 = floor((sum - before_2 + 1)*100.0/(100.0 + before));
      |                                    ^~~~~
a.cc:41:5: error: 'cout' was not declared in this scope
   41 |     cout << max << endl;
      |     ^~~~
a.cc:41:20: error: 'endl' was not declared in this scope
   41 |     cout << max << endl;
      |                    ^~~~
Language: C++

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

int main()
{
  while(1){
    int x,y,s;
    cin>>x>>y>>s;

    if(x==0 && y==0 && s==0)
      break;

    int tmax = -1;

    for(int i=0; i<=s-1; i++){
      int ax = i*(100+x)/100;
      int ay = a*(100+y)/100;

      for(int j=0; j<=s-1; j++){
        int bx = j*(100+x)/100;
        int by = j*(100+y)/100;

        if(ax+bx ==s){
          tmax = max(tmax, ay+by);
        }
        else if(ax+by>s){
          break;
        }
      }
    }
    cout<<tmax<<endl;
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:16: error: 'a' was not declared in this scope; did you mean 'ay'?
   18 |       int ay = a*(100+y)/100;
      |                ^
      |                ay
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(){
  while(true){
    int x,y,s;
    cin>>x>>y>>s;
    if(x==0&&y==0&&s==0){
      break;
    }
    int tmax=-1;
    for(int a=1;a<=s-1;a++){
      int ax = a*(100+x)/100;
      int ay = a*(100+y)/100;

      for(int b=1;b<=s-1;b++){
        int bx=b*(100+x)/100;

        if(ax+bx==s){
          tmax=max(tmax,ay+by);
        }
        else if (ax+bx>s) {
          break;
        }
      }
    }
    cout<<tmax<<endl;
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:28: error: 'by' was not declared in this scope; did you mean 'bx'?
   20 |           tmax=max(tmax,ay+by);
      |                            ^~
      |                            bx
Language: C++

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

int main()
{
  while(true){
    int x,y,s;
    cin>>x>>y>>s;

    if(x==0&&y==0&&s==0)
    break;

    int tmax =-1;

    for(int a=1;i<=s-1;a++){
      int ax=a*(100+x)/100;
      int ay=a*(100+y)/100;

      for(int b=1; b<=s-1; b++){
        int bx=b*(100+x)/100;
        int by=b*(100+y)/100;

        if(ax+bx==s){
          tmax=max(tmax,ay+by);
        }
        else if(ax+bx>s){
          break;
        }
      }
    }
    cout<<n<<endl;

  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: 'i' was not declared in this scope
   16 |     for(int a=1;i<=s-1;a++){
      |                 ^
a.cc:32:11: error: 'n' was not declared in this scope
   32 |     cout<<n<<endl;
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	while (true) {
		int x,y,s;
		cin>>x>>y>>s;

		int tmax=-1;

		for (int a=0;a<s-1;a++){
			int ax=a*(100+x)/50;
			int ay=a*(100+y)/50;

			for(int b=1;b<s-1;b++){
				int bx =b*(100+x)/100;
				int by =b*(100+y)/100;

				if(ax+bx==s){
					tamx=max(tmax,ay+by);
				}
				else if(ax+bx>s){
					break;
				}
			}
		}
		cout<<tmax<<endl;
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:20:41: error: 'tamx' was not declared in this scope; did you mean 'tmax'?
   20 |                                         tamx=max(tmax,ay+by);
      |                                         ^~~~
      |                                         tmax
Language: C++

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

int main()
{
  while(true){
    int x,y,s;
    cin>>x>>y>>s;

    if(x==0&&y==0&&s==0)
    break;

    int tmax =-1;

    for(int a=1;a<=s-1;a++){
      int ax=a*(100+x)/100;
      int ay=a*(100+y)/100;

      for(int b=1; b<=s-1; b++){
        int bx=b*(100+x)/100;
        int by=b*(100+y)/100;

        if(ax+bx==s){
          tmax=max(tmax,ay+by);
        }
        else if(ax+bx>s){
          break;
        }
      }
    }
    cout<<n<<endl;

  }
  return 0;
}



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

#include <iostream>
using namespace std;
int chtax(int a,int x,int y){
    int cda = a * (100 / (100 + x)) * ((100 + y) / 100);//抜いて入れる
    return cda;
}
int main(){
    int x,y,s;
    cin >>x>>y>>s;
    //xの税率で最大の組をもとめる。
    int chenum = 0;
    for(int i = 1;i < s;i++){
        for(int j = 1;i < s; j++){
            if(s == i + j){
                if(chenum <= chtax(i,x,y) + chtax(j,x,y)){
                    chenum = chtax(i,x,y) + chtax(j,x,y);
                }
            }
            else{break;}
        }
    }
    //解はとなるのはxからyの税率へ直したもの。
    cout << chenum << endl;
    return 0;


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

#include<C:\bits\stdc++.h>
using namespace std;

int main(){
        int t,s,ans=0,subj,subk,x=0,y=0,suba,subs,subsum;
        double a,sum,j,k,b,c;

    while(1){
        t=0;

        cin>>x>>y>>s;
        a=((double)s/(100.00+x)*100.00)+1.8;
        cout<<a<<endl;

        suba=a;

        cout<<suba<<endl;

        for(int i=1;i<suba;i++){
            k=i;
            j=suba-k;
            cout<<k<<"   "<<j<<endl;

            b=(double)k*y/100.00;
            c=(double)j*y/100.00;

            cout<<b<<" "<<c<<endl;

            subk=(double)k+b;
            subj=(double)j+c;
            cout<<subk<<"   "<<subj<<endl;

            sum=subk+subj;
            subsum=sum;

            if(subsum>t){
                t=subsum;
            }
        }

        if(x==0 && y==0 && s==0){
            break;
        }

        cout<<t<<endl;

        

    }
}


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

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

int main(){
        int t,s,ans=0,subj,subk,x=0,y=0,suba,subs,subsum;
        double a,sum,j,k,b,c;

    while(1){
        t=0;

        cin>>x>>y>>s;
        a=(s/(100.00+x)*100.00);
        cout<<a<<endl;

        suba=a;

        cout<<suba<<endl;

        for(int i=1;i<suba;i++){
            k=(double)i+(double)x*0.1;
            j=(double)suba-(double)i+(double)*0.1;
            cout<<k<<"   "<<j<<endl;

            b=(double)k*y/100.00;
            c=(double)j*y/100.00;

            cout<<b<<" "<<c<<endl;

            subk=(double)k+b;
            subj=(double)j+c;
            cout<<subk<<"   "<<subj<<endl;

            sum=subk+subj;
            subsum=sum;

            if(subsum>t){
                t=subsum;
            }
        }

        if(x==0 && y==0 && s==0){
            break;
        }

        cout<<t<<endl;

        

    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:46: error: invalid type argument of unary '*' (have 'double')
   21 |             j=(double)suba-(double)i+(double)*0.1;
      |                                              ^~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	while(1){
		long int x,y,z,ans=0;
		cin >> x >> y >> z;
		if(!x&&!y&&!z)	break;
		for(long int i=0;i<z;i++){
			for(long int j=0;j<z;j++){
				if(long int(i*(100+x)/100)+long int(j*(100+x)/100)==z)
					ans = max(ans,long int(i*(100+y)/100)+long int(j*(100+y)/100));
			}
		}
		cout << ans << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:36: error: expected primary-expression before 'long'
   11 |                                 if(long int(i*(100+x)/100)+long int(j*(100+x)/100)==z)
      |                                    ^~~~
a.cc:11:36: error: expected ')' before 'long'
   11 |                                 if(long int(i*(100+x)/100)+long int(j*(100+x)/100)==z)
      |                                   ~^~~~
      |                                    )
a.cc:12:55: error: expected primary-expression before 'long'
   12 |                                         ans = max(ans,long int(i*(100+y)/100)+long int(j*(100+y)/100));
      |                                                       ^~~~
Language: C++

#include <iostream>using namespace std;int cut(double val){    //切り捨て
int newval,a,b; a = val; if(val >= a) b = a+1; else{  b = a;  a = b-1; } if(a < val < b) newval = a; else newval = val; return newval;}int main() { int th1,th2,x,y,thb1,thb2,tha1,tha2; //原価,税率,旧,新価格 
double s,m;  while(1){  cin >> x >> y >> s;  if(x==0&&y==0&&s==0) break;  int max = 0;  for(int th1=1;th1<s;th1++){   //原価1  
thb1 = cut(th1*(100+x)/100); //旧税率1  
th2 = cut((s-thb1)*100/(100+x)); //原価2  
if(cut((th2+1)*(100+x)/100) <= s-thb1)    th2 = th2+1; 
tha1 = cut(th1*(100+y)/100); //新税率1  
tha2 = cut(th2*(100+y)/100); //新税率2 
if(max < tha1+tha2){   max = tha1+tha2;   }  }  cout << max << endl; } return 0;}


Compiler output:
a.cc:1:26: warning: extra tokens at end of #include directive
    1 | #include <iostream>using namespace std;int cut(double val){    //切り捨て
      |                          ^~~~~~~~~
a.cc:1:10: fatal error: iostream>usin: No such file or directory
    1 | #include <iostream>using namespace std;int cut(double val){    //切り捨て
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
using namespace std;
​
int cut(double val){				//切り捨て
	int newval,a,b;
	a = val;
	if(val >= a) b = a+1;
	else{
		b = a;
		a = b-1; 
	}
	if(a < val < b) newval = a;
	else newval = val;
	return newval;
}
​
​
​
int main() {
	int th1,th2,x,y,thb1,thb2,tha1,tha2;	//原価,税率,旧,新価格
	double s,m;	
	
	while(1){
		cin >> x >> y >> s;
		if(x==0&&y==0&&s==0) break;
		int max = 0;
		for(int th1=1;th1<s;th1++){		//原価1
			thb1 = cut(th1*(100+x)/100);	//旧税率1
			if(cut((thb1-1)/(100+x)*100) == thb1) 
				thb1 = thb1-1;
			th2 = cut((s-thb1)*100/(100+x));	//原価2
			if(cut((th2+1)*(100+x)/100) == s-thb1) 
				th2 = th2+1;
			tha1 = cut(th1*(100+y)/100);	//新税率1
			tha2 = cut(th2*(100+y)/100);	//新税率2
			if(tha2 <= 0) break;
			if(tha1+tha2 > s) break;
			else if(max < tha1+tha2){
			max = tha1+tha2;
			} 
		}
	
		cout << max << endl;
	}
	return 0;
}


Compiler output:
a.cc:3:1: error: '\U0000200b' does not name a type
    3 | ​
      |  
a.cc:16:1: error: '\U0000200b' does not name a type
   16 | ​
      |
Language: Java

public class Main {
	static int H;
	static int[][] stone=new int[11][6];
	static int search() {
		int len;
		int point=0;
		for(int row=0; row<H; row++) {
			for(int col=0; col<=2; col++) {
				for(len=1; col+len<=4; len++) {
					if(stone[row][col]!=stone[row][col+len]) {
						break;
					}
				}
				if(len<=2) {
					continue;
				}
				point+=stone[row][col]*len;
				for(int i=0; i<len; i++) {
					stone[row][col+i]=0;//消滅させる石
				}
			}
		}
		return point;//その状態のpoint
	}
	
	static void change() {
		for(int col=0; col<5; col++) {
			for(int min=1; min<H; min++) {
				for(int row=H-1; row>=min; row--) {//落とせるところまで落とす
					if(stone[row][col]==0) {
						stone[row][col]=stone[row+1][col];//下に落とす
						stone[row+1][col]=0;//一つ上は消去
					}
				}
			}
		}
	}
	public static void main(String[] args) {
		try(Scanner sc = new Scanner(System.in)){
			while(sc.hasNext()) {
				H=sc.nextInt();
				if(H==0) break;
				for(int i=0; i<H; i++) {
					for(int j=0; j<5; j++) {
						stone[i][j]=sc.nextInt();
					}
				}
				int sum=0;
				int cont=0;
				while(true) {
					cont=search();
					if(cont==0) {
						System.out.println(sum);
						break;
					}
					sum+=cont;
					change();//移動
				}
			}
		}
	}
	
}


Compiler output:
Main.java:39: error: cannot find symbol
		try(Scanner sc = new Scanner(System.in)){
		    ^
  symbol:   class Scanner
  location: class Main
Main.java:39: error: cannot find symbol
		try(Scanner sc = new Scanner(System.in)){
		                     ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C

#include <stdio.h>
#define NUM 10

void drop(int puz[][5], int i, int j){

int k;

for(k=i; k>0; k--)
puz[k][j]=puz[k-1][j]

puz[0][j]=0;

}



int main(void){



replay:

int score=0;
int tscore=0;
int count=0;
int h, i;
int puz[NUM][5]={0};

while(1){



scanf("%d", &h);

if(h==0)
break;





for(i=0; i<h; i++){
 for(j=0; j<5; j++){
scanf("%d", &puz[i][j]);
  }
}





for(i=0; i<h; i++){

 for(j=0; j<5; j++){

 if(puz[i][j]==puz[i][j+1])
  count++;
 else if(count==2){
  score=score+(3*puz[i][j]);
  puz[i][j]=0;
  puz[i][j-1]=0;
  puz[i][j-2]=0;
  count=0;}
 else if(count==3){
  score=score+(4*puz[i][j]);
  puz[i][j]=0;
  puz[i][j-1]=0;
  puz[i][j-2]=0;
  puz[i][j-3]=0;
  count=0;}
  else
  count=0;

   }

 if(count==2){
  score=score+(3*puz[i][j]);
  puz[i][j]=0;
  puz[i][j-1]=0;
  puz[i][j-2]=0;
  count=0;}
 else if(count==3){
  score=score+(4*puz[i][j]);
  puz[i][j]=0;
  puz[i][j-1]=0;
  puz[i][j-2]=0;
  puz[i][j-3]=0;
  count=0;}
 else if(count==4){
  score=score+(5*puz[i][j]);
  puz[i][j]=0;
  puz[i][j-1]=0;
  puz[i][j-2]=0;
  puz[i][j-3]=0;
  puz[i][j-4]=0;
  count=0;}
  else
  count=0;



 }
 

for(i=0; i<h; i++){
 for(j=0; j<5; j++){

 if(puz[i][j]==0)
 drop(puz, i, j);
 
 }
}

if(score==0){
printf("%d\n", tscore);
goto replay;
}


tscore=tscore+score;
score=0;



}

return 0;

}

Compiler output:
main.c: In function 'drop':
main.c:9:22: error: expected ';' before 'puz'
    9 | puz[k][j]=puz[k-1][j]
      |                      ^
      |                      ;
   10 | 
   11 | puz[0][j]=0;
      | ~~~                   
main.c: In function 'main':
main.c:43:6: error: 'j' undeclared (first use in this function)
   43 |  for(j=0; j<5; j++){
      |      ^
main.c:43:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include<stdio.h>

int main(void){
  int h,i,j,k,x;
  int n=0;
  int count;
  int point[256] = {0};
  int stone[15][5]={0};

  while(1){

    scanf("%d", &h);                                    //高さの入力
    if(h == 0){
      break;
    }

    for(i=0;i<h;i++){                                   
      for(j=0;j<5;j++){
	scanf("%d",&stone[h-1-i][j]);                   //石群の入力
      }
    }

    for(k=0;k<=h*5;k++){
      for(i=0;i<h;i++){
	count=1;
	for(j=0;j<5;j++){
	  if(stone[i][j]==stone[i][j+1]){               //水平に隣り合う同じ数字の石を探す
	    count++;
	  }else{
	    if(count>2){                                
	      point[n] += count * stone[i][j];          //同じ数字の石が3個以上あれば　数字の合計を獲得ポイントに加算
	      for(count -= 1;count>=0;count--){
		stone[i][j-count] = 0;                  //同じ数字の石を全て0に更新
	      }
	    }
	    count=1;                                    //カウントをリセット
	  }
	}
      }

       for(j=0;j<5;j++){
	count = 0;
	for(i=0;i<h;i++){
	  stone[i-count][j]=stone[i][j];                //一つ上の石の数字を下の石にコピー　すなわち移動する
	  if(stone[i][j]==0)
	    count++;                                    //カウントをインクリメント
	}
	for(i=h-count;i<h;i++)
	  stone[i][j]=0;                                //上から移動された分の石を0に更新
      }
    }
    n++;
  }

  for(i=0;i<n;i++){                                      //出力
    printf("%d\n", point[i]);
  }

  return 0;
}

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

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)

int h, point;
int f[11][6];

bool check() {
	bool res = false;
	for(int y=h-1; y>=0; y--) {
		for(int x=2; x<5; x++) {
			if(f[y][x]!=0 && f[y][x-2]==f[y][x] && f[y][x-1]==f[y][x]) {
				res = true;
				int dx=1;
				while(x+dx<5 && f[y][x]==f[y][x+dx]) dx++;
				point += f[y][x] * (3+dx-1);
				for(int ex=x-2; ex<x+dx; ex++) {
					f[y][ex] = 0;
				}
			}
		}
	}
	return res;
}

void fall() {
	int py[5] = {};
	rep(y, h) {
		rep(x, 5) {
			f[py[x]][x] = f[y][x];
			if(f[y][x]>0) {
				py[x]++;
			}
		}
	}
	rep(x, 5) {
		for(int y=py[x]; y<h; y++) {
			f[y][x] = 0;
		}
	}
}

int main() {
	while(cin >> h, h) {
		point = 0;
		memset( f, 0, sizeof(f) );
		rep(y, h) {
			rep(x, 5) {
				int k;
				cin >> k;
				f[h-y-1][x] = k;
			}
		}
		while(check()) {
			fall();
		}
		cout << point << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:51:17: error: 'memset' was not declared in this scope
   51 |                 memset( f, 0, sizeof(f) );
      |                 ^~~~~~
a.cc:6:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    5 | #include <utility>
  +++ |+#include <cstring>
    6 | using namespace std;
Language: C++

import java.util.Scanner;

public class Main {

    /**
     * @param args
     */
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while(true){
            int h = sc.nextInt();
            if(h==0)break;
            int[][] f = new int[h][5];
            for (int i = 0; i < f.length; i++) {
                for (int j = 0; j < 5; j++) {
                    f[f.length-1-i][j]=sc.nextInt();   
                      
                }
            }
            System.out.println(calc(f));
        }
    }
    static int calc(int[][] f){
        int res = 0;
        while(true){
            boolean[][] checked = new boolean[f.length][5];
            int point = 0;
            for (int i = 0; i < f.length; i++) {
                for (int j = 0; j < 3; j++) {
                    for (int j2 = 1; j2 <= 9; j2++) {
                        boolean flg =true;
                        for (int k = 0; k < 3; k++) {
                            if(f[i][j+k]!=j2){
                                flg=false;
                            }
                        }
                        if(flg){
                            for (int k = 0; k < 3; k++) {
                                checked[i][j+k]=true;
                            }
                        }
                    }
                }
            }
            for (int i = 0; i < checked.length; i++) {
                for (int j = 0; j < 5; j++) {
                    if(checked[i][j]){
                        point+=f[i][j];
                        f[i][j]=0;
                    }
                }
            }
            
            if(point==0)break;
            res+=point;
            fall(f);
        }
        return res;
    }
    static void fall(int[][] f){
        for (int i = 0; i < f.length; i++) {
            for (int j = 0; j < 5; j++) {
                while(f[i][j]==0 && above(f,i,j)){
                    for (int j2 = i; j2 < f.length-1; j2++) {
                        f[j2][j] = f[j2+1][j];
                    }
                }
            }
        }
    }
    static boolean above(int[][]f,int y,int x){
        for (int i = y+1; i < f.length; i++) {
            if(f[i][x]>0)return true;
        }
        return false;
    }
   
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
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++

#include <cstdio>
#include <algorithm>
#include <vector>
using namespace std;
const int dx[]={0,1,0,-1,1,-1,-1,1};
const int dy[]={-1,0,1,0,1,1,-1,-1};
const int INF = 1<<30;
const double EPS = 1e-15;
#define PB push_back
#define mk make_pair
#define fi first
#define se second
#define ll long long
#define reps(i,j,k) for(int i = (j); i < (k); i++)
#define rep(i,j) reps(i,0,j)
#define MOD 1000000007
typedef pair<int,int> Pii;
typedef pair<int,Pii> P;
typedef vector<int> vi;
typedef vector<vi> vvi;

vector < Pii > deleteList;
int H,W;
int stage[12][6];

bool check(){
	deleteList.clear();
	bool flg = false;
	rep(i,H){
		reps(j,1,W-1){
			if(stage[i][j-1] != 0 && stage[i][j-1] == stage[i][j] && stage[i][j] == stage[i][j+1]){
				deleteList.PB(Pii(i,j-1));
				flg = true;
			}
		}
	}
	return flg;
}

int deleteBlock(){
	int ret = 0;
	rep(i,deleteList.size()){
		reps(j,deleteList[i].se,deleteList[i].se+3){
			if(stage[deleteList[i].fi][j] > 0)ret += stage[deleteList[i].fi][j];
			stage[deleteList[i].fi][j] = -1;
		}
	}
	return ret;
}

void dropBlock(){
	rep(i,H){
		rep(j,W){
			if(stage[i][j] == -1){
				while(stage[i][j] == -1){
					reps(k,i+1,H){
						stage[k-1][j] = stage[k][j];
					}
					stage[H-1][j] = 0;
				}
			}
		}
	}
	return ;
}

void DEBUGPRINT(){
	
	rep(i,H){
		rep(j,W){
			printf("%2d%c",stage[i][j],j==W-1?'\n':' ');
		}
	}
	puts("######################");
}

int main(){
	W = 5;
	while(scanf("%d",&H),H){
		memset(stage,-1,sizeof(stage));
		rep(i,H){
			rep(j,W){
				scanf("%d",&stage[H-i-1][j]);
			}
		}
		int score = 0;
		while(check()){
			//DEBUGPRINT();
			score += deleteBlock();
			dropBlock();
		}
		
		printf("%d\n",score);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:80:17: error: 'memset' was not declared in this scope
   80 |                 memset(stage,-1,sizeof(stage));
      |                 ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include <vector>
  +++ |+#include <cstring>
    4 | using namespace std;