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

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

using namespace std;
 
int n[2],m[2];
map< pair<string,string> , int > memo[501][501];
vector< vector<int> > a[2];
vector< vector<string> > b[2];
 
int dfs(int p1,int p2,string s1,string s2){
        if(p1 == n[0]-1 && p2 == n[1]-1) return (s1 == "" && s2 == "");
		if(memo[p1][p2].count(make_pair(s1,s2))) return memo[p1][p2][make_pair(s1,s2)];

        int ans = 0;
		if( p1 <= p2 || p2 == n[1]-1){
			for(int i = 0 ; i < a[0][p1].size() ; i++){
					string x = s1 + b[0][p1][i];
					string y = s2;
					int I = 0 , J = 0;
					for( ; I < x.size() && J < y.size() && x[I] == y[J] ; ) I++ , J++ ;
					if( I == x.size() || J == y.size() ){
							
							if( I == x.size() && I == y.size() ) x = "" , y = "";
							else if( I == x.size() ) x = "" , y = y.substr(J);
							else if( J == y.size() ) x = x.substr(I) , y = "";
							
							ans = ( ans + dfs(a[0][p1][i],p2,x,y) ) % 1000000007;
					}
			}
		}
		if(p1 > p2 || p1 == n[0]-1){
			for(int j = 0 ; j < a[1][p2].size() ; j++){
						string x = s1;
						string y = s2 + b[1][p2][j] ;
						int I = 0 , J = 0;
						for( ; I < x.size() && J < y.size() && x[I] == y[J] ; ) I++ , J++ ;
						if( I == x.size() || J == y.size() ){
								
								if( I == x.size() && I == y.size() ) x = "" , y = "";
								else if( I == x.size() ) x = "" , y = y.substr(J);
								else if( J == y.size() ) x = x.substr(I) , y = "";
								
								ans = ( ans + dfs(p1, a[1][p2][j],x,y) ) % 1000000007;
						}
				}
			}
		}
        return memo[p1][p2][make_pair(s1,s2)] = ans;
}
 
int main(){
        int T;cin >> T;
        while(T--){
                for(int i = 0 ; i < 2 ; i++){
                        cin >> n[i] >> m[i];
                        //cout << n[i] << " " << m[i] << endl;
                        a[i].clear(); b[i].clear(); a[i].resize((unsigned)n[i]) , b[i].resize((unsigned)n[i]);
                        for(int j = 0 ; j < m[i] ; j++){
                                int A,B; string C;
                                cin >> A >> B >> C;
                                a[i][A].push_back(B);
                                b[i][A].push_back(C);
                        }
                }
				for(int i = 0 ; i < 501 ; i++)
					for(int j = 0 ; j < 501 ; j++)
						memo[i][j].clear();
				string ok;
                cout << dfs(0,0,ok,ok) << endl;
        }
}

Compiler output:
a.cc:51:9: error: expected unqualified-id before 'return'
   51 |         return memo[p1][p2][make_pair(s1,s2)] = ans;
      |         ^~~~~~
a.cc:52:1: error: expected declaration before '}' token
   52 | }
      | ^
a.cc: In function 'int dfs(int, int, std::string, std::string)':
a.cc:50:17: warning: control reaches end of non-void function [-Wreturn-type]
   50 |                 }
      |                 ^
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>

using namespace std;

#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) (EQ((a).real(),(b).real()) && EQ((a).imag(),(b).imag()))

typedef complex<double> P;
typedef long long ll;

const int MAX_SIZE = 10000;

void solve(){
    int n,k,t,u,v,l;
    cin>>n>>k>>t>>u>>v>>l;
    int d[1000];
    for(int i = 0; i < n; i++)
        cin>>d[i];
    sort(d,d+n);
    d[n]=l;
    int nin=0;
    double sumS=0;
    int prvP=0;
    double left=0;
    for(int i = 0; i <= n; i++){
        int move=-prvP+d[i];
        // ±Ì£ðÅ«éÀèÁ¬µÄÊß·é
        double s=(double)move/v;
        if(s>left){
            sumS+=left;
            double leftDis=move-v*left;
            sumS+=(double)leftDis/u;
            left=0;
        }
        // SæÔÊßÂ\
        else{
            left-=s;
            sumS+=s;
        }
        if(i==n)
            break;
        // ¡Éñ¶ñðÇÁÅ«éÈç
        if(left<=k*t)
            left+=t;
        else{
            left=(k+1)*t;
        }
        prvP=d[i];
    }
    printf("%.8f\n",sumS);
}

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

Compiler output:
a.cc: In function 'void solve()':
a.cc:56:12: error: 'i' was not declared in this scope
   56 |         if(i==n)
      |            ^
a.cc:57:13: error: break statement not within loop or switch
   57 |             break;
      |             ^~~~~
a.cc:64:16: error: 'i' was not declared in this scope
   64 |         prvP=d[i];
      |                ^
a.cc: At global scope:
a.cc:66:11: error: expected constructor, destructor, or type conversion before '(' token
   66 |     printf("%.8f\n",sumS);
      |           ^
a.cc:67:1: error: expected declaration before '}' token
   67 | }
      | ^
Language: C++

#include <stdio.h>
#include <iostream>
#include <vector>
#include <list>
#include <cmath>
#include <fstream>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <iterator>
#include <cstdlib>
#include <cstring>
#include <sstream>

using namespace std;

#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) (EQ((a).real(),(b).real()) && EQ((a).imag(),(b).imag()))

typedef complex<double> P;
typedef long long ll;

const int MAX_SIZE = 10000;

void solve(){
    int n,k,t,u,v,l;
    cin>>n>>k>>t>>u>>v>>l;
    int d[1000];
    for(int i = 0; i < n; i++)
        cin>>d[i];
    sort(d,d+n);
    d[n]=l;
    int nin=0;
    double sumS=0;
    int prvP=0;
    double left=0;
    for(int i = 0; i <= n; i++){
        int move=-prvP+d[i];
        // ±Ì£ðÅ«éÀèÁ¬µÄÊß·é
        double s=(double)move/v;
        if(s>left){
            sumS+=left;
            double leftDis=move-v*left;
            sumS+=(double)leftDis/u;
            left=0;
        }
        // SæÔÊßÂ\
        else{
            left-=s;
            sumS+=s;
        }
        if(i==n)
            break;
        // ¡Éñ¶ñðÇÁÅ«éÈç
        if(left<=k*t)
            left+=t;
        else{
            left=(k+1)*t;
        }
        prvP=d[i];
    }
    printf("%.8f\n",sumS);
}
int main(){
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:56:12: error: 'i' was not declared in this scope
   56 |         if(i==n)
      |            ^
a.cc:57:13: error: break statement not within loop or switch
   57 |             break;
      |             ^~~~~
a.cc:64:16: error: 'i' was not declared in this scope
   64 |         prvP=d[i];
      |                ^
a.cc: At global scope:
a.cc:66:11: error: expected constructor, destructor, or type conversion before '(' token
   66 |     printf("%.8f\n",sumS);
      |           ^
a.cc:67:1: error: expected declaration before '}' token
   67 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <string>
#include <cctype>
#include <cassert>
using namespace std;

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

ll mod = 100000007;
ll dp[2][100010];
ll sum[2][100010];

void make_table(ll *d, ll *s, int dist){
  d[0] = 1;
  for(int i = 1; i <= 100000; i++){
    for(int j = 1; j <= dist; j++){
      if(i - j >= 0) d[i] += d[i-j];
      d[i] %= mod;
    }
  }
  s[0] = 0;
  for(int i = 1; i <= 100000; i++){
    s[i] = d[i];
    if(i >= dist) s[i] += s[i-dist];
    s[i] %= mod;
  }
}

int main(){
  rep(i, 2)memset(dp[i], 0, sizeof(dp[i]));
  rep(i, 2)memset(sum[i], 0, sizeof(sum[i]));
  make_table(dp[0], sum[0], 5);
  make_table(dp[1], sum[1], 3);
  string s;
  while(getline(cin, s) && s != "#"){
    int n = s.size();
    ll res = 1;
    int pos = 0;
    while(pos < n){
      char ch = s[pos];
      int cnt = 0;
      while(pos < n && ch == s[pos]) pos++, cnt++;
      if(ch == '0' || ch == '8') res = (res * sum[1][cnt]) % mod;
      else res = (res * sum[0][cnt]) % mod;
    }
    cout << res << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:12: error: 'memset' was not declared in this scope
   34 |   rep(i, 2)memset(dp[i], 0, sizeof(dp[i]));
      |            ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <cassert>
  +++ |+#include <cstring>
    8 | using namespace std;
a.cc:35:12: error: 'memset' was not declared in this scope
   35 |   rep(i, 2)memset(sum[i], 0, sizeof(sum[i]));
      |            ^~~~~~
a.cc:35:12: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
Language: C++

#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <queue>
#include <map>
#include <set>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
const int INF = 1<<29;
typedef long long ll;
int M = 100000007;

int table[10] = {3,5,5,5,5,5,5,5,3,5};
int dp[10][100001][6];

ll solve(int button, int len) {
  ll res = 0;
//  cout << button << " " << len << endl;
  REP(i, table[button]) {
    res = (res + dp[button][len][i]) % M;
  }
  return res;
}

int main() {
  memset(dp,0,sizeof(dp));
  REP(i, 10) {
    //dp[i][0][0] = 1;
    for (int j=1; j<100001; ++j) {
      if (j%table[i]==1) dp[i][j][0] = 1;
      REP(k, table[i])
        dp[i][j][0] = (dp[i][j][0] + dp[i][j-1][k]) % M;
      for (int k=1; k<table[i]; ++k) {
        dp[i][j][k] = (dp[i][j][k] + dp[i][j-1][k-1]) % M;
      }
    }
  }
  // REP(i,10) {
  //   REP(j,5) {
  //     printf("(%d,%d)=%d ", i,j,dp[1][i][j]);
  //   }
  //   cout <<endl;
  // }
  // cout << endl;
  
  string s;
  while(cin >> s, s!="#") {
    char now = 0;
    int start = 0;
    ll res = 1;
    REP(i, s.size()) {
      if (s[i] != now) {
        if (now!=0) {
          res = (res * solve(now-'0', i-start)) % M;
        }
        now = s[i];
        start = i;
      }
    }
    res = (res * solve(now-'0', s.size()-start)) % M;
    cout << res << endl;
  }
}
q

Compiler output:
a.cc:73:1: error: 'q' does not name a type
   73 | q
      | ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <cstring>
#include <queue>
#include <sys/time.h>
using namespace std;
static const double EPS = 1e-10;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define rev(i,n) for(int i=(int)n-1;i>=0;i--)
#define all(a) a.begin(),a.end()
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define SS stringstream
#define bitcount(b) __builtin_popcount(b)
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)

#define delete(a,n) a.erase(remove(all(a),n),a.end())
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ( (a)/__gcd((a),(b))*(b) )

template<typename T, typename S> vector<T>& operator<<(vector<T>& a, S b) { a.push_back(b); return a; }
template<typename T> void operator>>(vector<T>& a, int b) {while(b--)if(!a.empty())a.pop_back();}
bool isprime(int n){ if(n<2)return false;  for(int i=2;i*i<=n;i++)if(n%i==0)return false;  return true;} 
ll b_pow(ll x,ll n){return n ? b_pow(x*x,n/2)*(n%2?x:1) : 1ll;}
string itos(int n){stringstream ss;ss << n;return ss.str();}

long long dp[100030];
long long dp2[100030];

int gen5(){
	dp[0] = 0;
	dp[1] = 1;
	dp[2] = 2;
	dp[3] = 4;
	dp[4] = 8;
	dp[5] = 16;
	dp[6] = 32;
	for(int i = 7 ; i < 100010 ; i++){
		dp[i] = (2 * dp[i-1] - dp[i-6])%100000007;
	}
}
int gen3(){
	dp2[0] = 0;
	dp2[1] = 1;
	dp2[2] = 2;
	dp2[3] = 4;
	dp2[4] = 8;
	for(int i = 5 ; i < 100010 ; i++){
		dp2[i] = (2*dp2[i-1]-dp2[i-4])%100000007;
	}
}
int main(int a,char *b[]){

	gen5();
	gen3();
	string s;
	while(cin >> s && s[0] != '#'){
		assert(s.size() <= 100000);
		s += "~";
		long long c = 1;
		long long ans = 1;
		for(int i = 1 ; i < s.size() ; i++){
			if(s[i] != s[i-1]){
				//cout << c << endl;
				if(s[i-1] != '0' && s[i-1] != '8'){
					ans = ( ans * dp[c] )  % 100000007;
				}else{
					ans = ( ans * dp2[c] ) % 100000007;
				}
				c = 1;
			}else{
				c++;
			}
		}
		cout << ans%100000007 << endl;
	}
}

Compiler output:
a.cc: In function 'int gen5()':
a.cc:57:1: warning: no return statement in function returning non-void [-Wreturn-type]
   57 | }
      | ^
a.cc: In function 'int gen3()':
a.cc:67:1: warning: no return statement in function returning non-void [-Wreturn-type]
   67 | }
      | ^
a.cc: In function 'int main(int, char**)':
a.cc:74:17: error: 'assert' was not declared in this scope
   74 |                 assert(s.size() <= 100000);
      |                 ^~~~~~
a.cc:21:1: note: 'assert' is defined in header '<cassert>'; this is probably fixable by adding '#include <cassert>'
   20 | #include <sys/time.h>
  +++ |+#include <cassert>
   21 | using namespace std;
Language: C++

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <iterator>
#include <functional>
#include <utility>
#include <algorithm>
#include <numeric>
#include <typeinfo>

using namespace std;

#define dump(n) cerr<<"# "<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();++i)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<string> vs;
typedef pair<int,int> pii;

const int MOD=100000007;

void solve(string s,vvi& dp1,vvi& dp2)
{
	ll res=1;
	for(int i=0,j=0;i<s.size();i=j){
		for(j=i;j<s.size() && s[j]==s[i];j++)
			;
		if(s[i]=='8' || s[i]=='0')
			res=res*(dp2[0][j-i]+dp2[1][j-i]+dp2[2][j-i])%MOD;
		else
			res=res*(dp1[0][j-i]+dp1[1][j-i]+dp1[2][j-i]+dp1[3][j-i]+dp1[4][j-i])%MOD;
	}
	cout<<res<<endl;
}

int main()
{
	vvi dp1(5,vi(100001));
	dp1[1][1]=1;
	repi(i,1,dp1[0].size()){
		rep(j,5)
			dp1[1][i]+=dp1[j][i-1];
		rep(j,5)
			dp1[(j+1)%5][i]+=dp1[j][i-1]-(i<6?0:dp1[j][i-6]);
	}
	vvi dp2(3,vi(100001));
	dp2[1][1]=1;
	repi(i,1,dp2[0].size()){
		rep(j,3)
			dp2[1][i]+=dp2[j][i-1];
		rep(j,3)
			dp2[(j+1)%3][i]+=dp2[j][i-1]-(i<4?0:dp2[j][i-4]);
	}
	
	for(static char s[100001];gets(s),s[0]!='#';)
		solve(s,dp1,dp2);
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:84:35: error: 'gets' was not declared in this scope; did you mean 'getw'?
   84 |         for(static char s[100001];gets(s),s[0]!='#';)
      |                                   ^~~~
      |                                   getw
Language: C++

#include<iostream>
#include<cmath>
#include<cstdio>

using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
#define ALL(C)     (C).begin(),(C).end();

typedef long long ll;

ll gcd(ll a,ll b){
  return b==0?a:gcd(b,a%b);
};


ll lcm(ll w,ll m){
  ll g = gcd(w,m);
  return w*m/g;
}

ll ans;

ll table[32][32];

void solve(int n,int now,bool flag,ll *num,ll me,ll op,ll L){
  if (n == now){
    if (!flag){
      solve(n,0,true,num,me,op,L);
      return;
    }
    //    cout << me << " "<< op << " " <<  L << endl;
    if (me <= op && lcm(me,op) == L)ans++;
    return;
  }


  rep(i,num[now]+1){
    if (!flag){
      solve(n,now+1,flag,num,me*table[now][i],op,L);
    }
    else solve(n,now+1,flag,num,me,op*table[now][i],L);
  }
}


int f(ll in,ll *val,ll *num){
  int p = 0;
  ll tmp = in;
  for(int i=2;i*i <= tmp;i++){
    if (tmp % i == 0){
      ll cnt = 0;
      while(true){
	if (tmp/i == 0 || tmp%i != 0)break;
	tmp/=i;
	cnt++;
      }
      num[p]=cnt;
      val[p]=i;
      p++;
    }
  }

  if (tmp != 1){
    num[p]=1;
    val[p]=tmp;
    p++;
  }

  rep(i,p){
    tmp = 1;
    rep(j,num[i]+1){
      table[i][j]=tmp;
      tmp*=val[i];
    }
  }

  return p;
}


main(){
  ll n;
  ll val[100],num[100];
  while(cin>>n && n){
    int index = f(n,val,num);
    ans = 0;
    solve(index,0,false,num,1,1,n);
    cout << << ans << endl;
  }
  return false;
}

Compiler output:
a.cc:82:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   82 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:89:13: error: expected primary-expression before '<<' token
   89 |     cout << << ans << endl;
      |             ^~
Language: C++

#include<iostream>
#include<vector>
#include<set>
#include<assert>
#include<algorithm>
using namespace std;

typedef unsigned long long llong;

void factorize( llong x, vector<llong> &factors ){
    llong d, q;
    while ( x >= 4 && x % 2 == 0 ) {
	factors.push_back(2);
	x /= 2;
    }
    d = 3; q = x / d;
    while ( q >= d ){
	if ( x % d == 0 ) {
	    factors.push_back(d);
	    x = q;
	} else {
	    d += 2;
	}
	q = x / d;
    }
    factors.push_back(x);
}

void rec(int p, llong d, vector<llong> &divisors, vector<pair<llong, llong> > &factpairs, llong n){
    if ( p == factpairs.size() ){
	assert( d <= n );
	divisors.push_back(d);
	return;
    }

    llong v = d;
    for ( int i = 0; i <= factpairs[p].second; i++ ){
	rec(p+1, v, divisors, factpairs, n);
	v *= factpairs[p].first;
	//	cout << v << endl;
    }
}



llong gcd( llong x, llong y ){
    llong r;

    if ( x < y ) swap( x, y ); 
    
    while ( y > 0 ){
        r = x % y;
        x = y;
        y = r;
    }

    return x;
}

llong lcm( llong x, llong y ){
    return (x/gcd(x,y))*y;
}

int compute(llong n){
    vector<llong> factors;
    vector<pair<llong, llong> > factpairs;

    factorize(n, factors);
    if ( factors.size() > 0 ) factpairs.push_back(make_pair(factors[0], 1));
    for ( int i = 1; i < factors.size(); i++ ){
	if( factpairs[factpairs.size()-1].first == factors[i] ){
	    factpairs[factpairs.size()-1].second++;
	} else {
	    factpairs.push_back(make_pair(factors[i], 1));
	}
    }
    

    vector<llong> divisors;
    rec(0, 1, divisors, factpairs, n);
    
    if ( divisors.size() >= 2 && divisors[0] == 1 && divisors[1] == 1 ){
	divisors.erase(divisors.begin());
    }

    //set<llong> ss;
    //for ( int i = 0; i < divisors.size(); i++ ) ss.insert(divisors[i]);
    //assert( ss.size() == divisors.size());

    sort(divisors.begin(), divisors.end());
    //        for ( int i = 0; i < divisors.size(); i++ ) cout << divisors[i] << endl;


    //    cout << "---- " << divisors.size() << endl;
    int cnt = 0;
    for ( int i = 0; i < divisors.size(); i++ ){
	for ( int j = i; j < divisors.size(); j++ ){
	     if ( gcd(divisors[i], divisors[j] ) == 1 ){
		cnt++;
	    }
	}
    }
    return cnt;
}

main(){
    llong n;
    while(1){
	cin >> n;
	if ( n == 0 ) break;
	assert ( n <= 1000000000000LL );
	//cout << n << " " << compute(n) << endl;
	cout << compute(n) << endl;
    }
}

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

#include<iostream>
#include<queue>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
int cost[1000][1000][1 << 5];
int dx[]={0,0,1,-1};
int dy[]={1,-1,0,0};
char m[1000][1000];
int lim;
const int INF = (1 << 21);
class state{
public:
  int my;
  int x,y;
  int ini;
  state(){};
  state(int sx,int sy,int sm){
    x=(sx);y=(sy);my=(sm);
  }
  bool have(int now){
    if ( (my&(1<<now)) !=0)return true;
    else return false;
  }
};

pair<int,int> solve(int x,int y,int r,int c){
  rep(i,r){
    rep(j,c){
      rep(k,1<<5)cost[i][j][k]=INF;
    }
  }
  queue<state> Q;
  state ini;  
  cost[y][x][0]=0;
  rep(i,5){
    ini.x=x;
    ini.y=y;
    ini.my=(1<<i);
    ini.ini=i;
    Q.push(ini);
    cost[y][x][ini.my]=0;
  }

  while(!Q.empty()){
    state now = Q.front();
    Q.pop();
    if ( m[now.y][now.x] == 'G' && now.my == ((1<<5)-1)){
      return make_pair(now.ini,now.cost[now.y][now.x][now.my]);
    }

    rep(i,4){
      int nex=now.x+dx[i],ney=now.y+dy[i];
      int nemy=now.my;
      if ( nex<0||nex>=c || ney<0||ney>=r )continue;
      if ( m[ney][nex]<10){
	//	cout << (int)m[ney][nex]<<" " << (m[ney][nex]-1+5)%5<<" " << now.have((m[ney][nex]-1+5)%5) << endl;
	if ( now.have((m[ney][nex]+-1+5)%5) )nemy=(now.my)|(1<<(int)m[ney][nex]);
	else nemy=now.my;
      }
	
      if (cost[now.y][now.x][now.my]+1 <lim &&  cost[ney][nex][nemy] ==INF){
	state next;
	next.x=nex;
	next.y=ney;
	next.my=nemy;
	next.ini=now.ini;
	cost[ney][nex][nemy]=cost[now.y][now.x][now.my]+1;
	Q.push(state(nex,ney,nemy));
      }
    }
  }

  return make_pair(-1,-1);
}


main(){
  int c,r;
  while(cin>>c>>r && c){
    int sx=0,sy=0;
    int flag=0;
    lim=INF;
    rep(i,r){
      cin>>m[i];
      rep(j,c){
	if ( isdigit(m[i][j]))m[i][j]=m[i][j]-'0'-1,flag|=(1<<(int)m[i][j]);
	else if ( m[i][j]=='S')sx=j,sy=i;
      }
    }
    if ( flag  !=(1<<5)-1 ){
      cout << "NA"<<endl;
      continue;
    }
    pair<int,int> ans = solve(sx,sy,r,c);
    cout << ans.fisrt+1 <<" " << ans.second << endl;
  }
  return false;
}

Compiler output:
a.cc: In function 'std::pair<int, int> solve(int, int, int, int)':
a.cc:49:36: error: 'class state' has no member named 'cost'
   49 |       return make_pair(now.ini,now.cost[now.y][now.x][now.my]);
      |                                    ^~~~
a.cc: At global scope:
a.cc:78:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   78 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:96:17: error: 'struct std::pair<int, int>' has no member named 'fisrt'; did you mean 'first'?
   96 |     cout << ans.fisrt+1 <<" " << ans.second << endl;
      |                 ^~~~~
      |                 first
Language: C++

#include<iostream>
#include<queue>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
int cost[1000][1000][1 << 5];
int dx[]={0,0,1,-1};
int dy[]={1,-1,0,0};
char m[1000][1024];
int lim;
const int INF = (1 << 21);
class state{
public:
  int my;
  int x,y;
  int ini;
  bool state::have(int now);
};
bool state::have(int now){
    if ( (my&(1<<now)) !=0)return true;
    else return false;
}

inline pair<int,int> solve(int x,int y,int r,int c){
  rep(i,r){
    rep(j,c){
      REP(k,1,1<<5)cost[i][j][k]=INF;
    }
  }
  queue<state> Q;
  state ini;  
  cost[y][x][0]=0;
  rep(i,5){
    ini.x=x;
    ini.y=y;
    ini.my=(1<<i);
    ini.ini=i;
    Q.push(ini);
    cost[y][x][ini.my]=0;
  }

  while(!Q.empty()){
    state now = Q.front();
    Q.pop();
    if ( m[now.y][now.x] == 'G' && now.my == ((1<<5)-1)){
      return make_pair(now.ini,cost[now.y][now.x][now.my]);
    }

    rep(i,4){
      int nex=now.x+dx[i],ney=now.y+dy[i];
      int nemy=now.my;
      if ( nex<0||nex>=c || ney<0||ney>=r )continue;
      if ( m[ney][nex]<10){
	if ( now.have((m[ney][nex]+-1+5)%5) )nemy=(now.my)|(1<<(int)m[ney][nex]);
	else nemy=now.my;
      }
	
      if (cost[now.y][now.x][now.my]+1 <lim &&  cost[ney][nex][nemy] ==INF){
	state next;
	next.x=nex;
	next.y=ney;
	next.my=nemy;
	next.ini=now.ini;
	cost[ney][nex][nemy]=cost[now.y][now.x][now.my]+1;
	Q.push(next);
      }
    }
  }

  return make_pair(-1,-1);
}


main(){
  int c,r;
  while(cin>>c>>r && c){
    int sx=0,sy=0;
    int flag=0;
    lim=INF;
    fgets(m[0],10,stdin);
    rep(i,r){
      //      cin>>m[i];
      fgets(m[i],1000,stdin);
      rep(j,c){
	if ( isdigit(m[i][j]))m[i][j]=m[i][j]-'0'-1,flag|=(1<<(int)m[i][j]);
	else if ( m[i][j]=='S')sx=j,sy=i;
      }
    }
    if ( flag  !=(1<<5)-1 ){
      cout << "NA"<<endl;
      continue;
    }
    pair<int,int> ans = solve(sx,sy,r,c);
    cout << ans.first+1 <<" " << ans.second << endl;
  }
  return false;
}

Compiler output:
a.cc:17:8: error: extra qualification 'state::' on member 'have' [-fpermissive]
   17 |   bool state::have(int now);
      |        ^~~~~
a.cc:74:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   74 | main(){
      | ^~~~
Language: C++

#include<iostream>
#include<queue>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
int cost[1000][1000][1 << 5];
int dx[]={0,0,1,-1};
int dy[]={1,-1,0,0};
char m[1000][1024];
int lim;
const int INF = (1 << 21);
class state{
public:
  int my;
  int x,y;
  int ini;
  bool state::have(int now);
};
bool have(int now){
    if ( (my&(1<<now)) !=0)return true;
    else return false;
}

inline pair<int,int> solve(int x,int y,int r,int c){
  rep(i,r){
    rep(j,c){
      REP(k,1,1<<5)cost[i][j][k]=INF;
    }
  }
  queue<state> Q;
  state ini;  
  cost[y][x][0]=0;
  rep(i,5){
    ini.x=x;
    ini.y=y;
    ini.my=(1<<i);
    ini.ini=i;
    Q.push(ini);
    cost[y][x][ini.my]=0;
  }

  while(!Q.empty()){
    state now = Q.front();
    Q.pop();
    if ( m[now.y][now.x] == 'G' && now.my == ((1<<5)-1)){
      return make_pair(now.ini,cost[now.y][now.x][now.my]);
    }

    rep(i,4){
      int nex=now.x+dx[i],ney=now.y+dy[i];
      int nemy=now.my;
      if ( nex<0||nex>=c || ney<0||ney>=r )continue;
      if ( m[ney][nex]<10){
	if ( now.have((m[ney][nex]+-1+5)%5) )nemy=(now.my)|(1<<(int)m[ney][nex]);
	else nemy=now.my;
      }
	
      if (cost[now.y][now.x][now.my]+1 <lim &&  cost[ney][nex][nemy] ==INF){
	state next;
	next.x=nex;
	next.y=ney;
	next.my=nemy;
	next.ini=now.ini;
	cost[ney][nex][nemy]=cost[now.y][now.x][now.my]+1;
	Q.push(next);
      }
    }
  }

  return make_pair(-1,-1);
}


main(){
  int c,r;
  while(cin>>c>>r && c){
    int sx=0,sy=0;
    int flag=0;
    lim=INF;
    fgets(m[0],10,stdin);
    rep(i,r){
      //      cin>>m[i];
      fgets(m[i],1000,stdin);
      rep(j,c){
	if ( isdigit(m[i][j]))m[i][j]=m[i][j]-'0'-1,flag|=(1<<(int)m[i][j]);
	else if ( m[i][j]=='S')sx=j,sy=i;
      }
    }
    if ( flag  !=(1<<5)-1 ){
      cout << "NA"<<endl;
      continue;
    }
    pair<int,int> ans = solve(sx,sy,r,c);
    cout << ans.first+1 <<" " << ans.second << endl;
  }
  return false;
}

Compiler output:
a.cc:17:8: error: extra qualification 'state::' on member 'have' [-fpermissive]
   17 |   bool state::have(int now);
      |        ^~~~~
a.cc: In function 'bool have(int)':
a.cc:20:11: error: 'my' was not declared in this scope; did you mean 'm'?
   20 |     if ( (my&(1<<now)) !=0)return true;
      |           ^~
      |           m
a.cc: At global scope:
a.cc:74:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   74 | main(){
      | ^~~~
a.cc: In function 'bool have(int)':
a.cc:22:1: warning: control reaches end of non-void function [-Wreturn-type]
   22 | }
      | ^
Language: C++

&#65279;//dinic
//accepted by 820
//accepted by 10249
//accepted by rose 2096//main not here because use long long...
//accepte by rose 1163
//accepted by 10330
#include<iostream>
#include<queue>
 
using namespace std;
//for maximum flow
const int N = 2000;
#define INF (1 << 21)//#define INF (1LL << 60)
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n) REP(i,0,n)
int cap[N][N];
bool visited[N];
int parent[N];
int flow[N][N];
int layer[N];
 
void make_layer(int n,int s,int t){
  queue<int> Q;
  Q.push(s);
  layer[s]=0;
  while(!Q.empty()){
    int now = Q.front();Q.pop();
    rep(i,n){
      if ( cap[now][i]-flow[now][i]>0 &&layer[i]==-1){
        layer[i]=layer[now]+1;
        Q.push(i);
      }
    }
  }
}
 
int augment(int now,int t,int n,int f){
  if ( now == t||f==0)return f;
  if ( visited[now])return 0;
  visited[now]=true;
  rep(i,n){
    if ( layer[now]<layer[i] ){
      int tmp= augment(i,t,n,min(f,cap[now][i]-flow[now][i]));
      if ( tmp > 0){
        flow[now][i]+=tmp;
        flow[i][now]=-flow[now][i];
        visited[now]=false;
        return tmp;
      }
    }
  }
  return 0;
}
 
int dinic(int n,int s,int t){
  int ansflow=0;
  bool flag=true;
  rep(i,n)rep(j,n)flow[i][j]=0;
  while(flag){
    fill(layer,layer+n,-1);
    fill(visited,visited+n,false);
    flag = false;
    //make layer
    make_layer(n,s,t);
    if (layer[t]==-1)break;//if no such path to go to sink
 
    //find blocking flow
    for(int f=1;f;flag=true){
      f = augment(s,t,n,INF);
      if ( f == 0)break;
      ansflow+=f;
    }
  }
  return ansflow;
}
//end maximum flow




const int dx[]={0,0,1,-1};
const int dy[]={1,-1,0,0};
 
inline int getval(int i,int j,int c){
  return i*c+j;
}
 
main(){
  int r,c;
  while(cin>>r>>c && r){
    int n=2*(r*c)+2;
    int in=0,out=r*c,src=2*r*c,dst=src+1;
    rep(i,n){
      rep(j,n)cap[i][j]=0;
    }
    int cnt=0;
    rep(i,r){
      rep(j,c){
        cap[src][in+getval(i,j,c)]=1;
        cap[out+getval(i,j,c)][dst]=1;
        rep(k,4){
          int nex=j+dx[k],ney=i+dy[k];
          if (nex==-1||ney==-1||nex==c||ney==r)continue;
          //cout << getval(i,j,c)<<" " << getval(ney,nex,c) << endl;
          cnt++;
          cap[in+getval(i,j,c)][out+getval(ney,nex,c)]=1;
        }
      }
    }


    int ans=dinic(n,src,dst);
    //cout <<"node " << n <<" edge " << cnt << endl;
    //cout << n*n*cnt << endl;
    //cout << ans << " " << r*c << endl;
    if (ans == r*c)cout << "yes"<<endl;
    else cout <<"no"<<endl;
  }
  return false;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | &#65279;//dinic
      |  ^
a.cc:1:3: error: expected unqualified-id before numeric constant
    1 | &#65279;//dinic
      |   ^~~~~
a.cc:88:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   88 | main(){
      | ^~~~
Language: C++

&#65279;//dinic
//accepted by 820
//accepted by 10249
//accepted by rose 2096//main not here because use long long...
//accepte by rose 1163
//accepted by 10330
#include<iostream>
#include<queue>
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n) 
using namespace std;
const int MAX_V = 1000;
       
int V;
vector<int> G[MAX_V];
int match[MAX_V];
bool used[MAX_V];


void add_edge(int u, int v){
  G[u].push_back(v);
  G[v].push_back(u);
}


bool dfs(int v){
  used[v] = true;
  rep(i, (int)G[v].size()){
    int u = G[v][i], w = match[u];
    if(w < 0 || (!used[w] && dfs(w))){
      match[v] = u;
      match[u] = v;
      return true;
    }
  }
  return false;
}


int bipartite_matching(){
  int res = 0;
  memset(match, -1, sizeof(match));
  rep(i, V){
    if(match[i] < 0){
      memset(used, 0, sizeof(used));
      if(dfs(i)){
        res++;
      }
    }
  }
  return res;
}
       


const int dx[]={0,0,1,-1};
const int dy[]={1,-1,0,0};
 
inline int getval(int i,int j,int c){
  return i*c+j;
}
 
main(){
  int r,c;
  while(cin>>r>>c && r){
    int n=2*(r*c)+2;
    int in=0,out=r*c,src=2*r*c,dst=src+1;
    V=out;
    rep(i,n){
      G[i].clear();
    }
    rep(i,r){
      rep(j,c){
        rep(k,4){
          int nex=j+dx[k],ney=i+dy[k];
          if (nex==-1||ney==-1||nex==c||ney==r)continue;
          G[in+getval(i,j,c)].push_back(out+getval(ney,nex,c));
        }
      }
    }


    int ans=bipartite_matching();
    //cout <<"node " << n <<" edge " << cnt << endl;
    //cout << n*n*cnt << endl;
    //cout << ans << " " << r*c << endl;
    if (ans == r*c)cout << "yes"<<endl;
    else cout <<"no"<<endl;
  }
  return false;
}

Compiler output:
a.cc:1:2: error: stray '#' in program
    1 | &#65279;//dinic
      |  ^
a.cc:1:3: error: expected unqualified-id before numeric constant
    1 | &#65279;//dinic
      |   ^~~~~
a.cc: In function 'int bipartite_matching()':
a.cc:42:3: error: 'memset' was not declared in this scope
   42 |   memset(match, -1, sizeof(match));
      |   ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include<queue>
  +++ |+#include <cstring>
    9 | #define REP(i,b,n) for(int i=b;i<n;i++)
a.cc: At global scope:
a.cc:63:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   63 | main(){
      | ^~~~
Language: C++

//dinic
//accepted by 820
//accepted by 10249
//accepted by rose 2096//main not here because use long long...
//accepte by rose 1163
//accepted by 10330
#include<iostream>
#include<queue>
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n) 
using namespace std;
const int MAX_V = 1000;
       
int V;
vector<int> G[MAX_V];
int match[MAX_V];
bool used[MAX_V];


void add_edge(int u, int v){
  G[u].push_back(v);
  G[v].push_back(u);
}


bool dfs(int v){
  used[v] = true;
  rep(i, (int)G[v].size()){
    int u = G[v][i], w = match[u];
    if(w < 0 || (!used[w] && dfs(w))){
      match[v] = u;
      match[u] = v;
      return true;
    }
  }
  return false;
}


int bipartite_matching(){
  int res = 0;
  memset(match, -1, sizeof(match));
  rep(i, V){
    if(match[i] < 0){
      memset(used, 0, sizeof(used));
      if(dfs(i)){
        res++;
      }
    }
  }
  return res;
}
       


const int dx[]={0,0,1,-1};
const int dy[]={1,-1,0,0};
 
inline int getval(int i,int j,int c){
  return i*c+j;
}
 
main(){
  int r,c;
  while(cin>>r>>c && r){
    int n=2*(r*c)+2;
    int in=0,out=r*c,src=2*r*c,dst=src+1;
    V=out;
    rep(i,n){
      G[i].clear();
    }
    rep(i,r){
      rep(j,c){
        rep(k,4){
          int nex=j+dx[k],ney=i+dy[k];
          if (nex==-1||ney==-1||nex==c||ney==r)continue;
          G[in+getval(i,j,c)].push_back(out+getval(ney,nex,c));
        }
      }
    }


    int ans=bipartite_matching();
    //cout <<"node " << n <<" edge " << cnt << endl;
    //cout << n*n*cnt << endl;
    //cout << ans << " " << r*c << endl;
    if (ans == r*c)cout << "yes"<<endl;
    else cout <<"no"<<endl;
  }
  return false;
}

Compiler output:
a.cc: In function 'int bipartite_matching()':
a.cc:42:3: error: 'memset' was not declared in this scope
   42 |   memset(match, -1, sizeof(match));
      |   ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include<queue>
  +++ |+#include <cstring>
    9 | #define REP(i,b,n) for(int i=b;i<n;i++)
a.cc: At global scope:
a.cc:63:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   63 | main(){
      | ^~~~
Language: C++


int main(){
	cin>>r>>c;
	while(r!=0){
		if(c%2==0 || r%2==0)
			cout<<"yes\n";
		else cout<<"no\n";
		cin>>r>>c;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin>>r>>c;
      |         ^~~
a.cc:3:14: error: 'r' was not declared in this scope
    3 |         cin>>r>>c;
      |              ^
a.cc:3:17: error: 'c' was not declared in this scope
    3 |         cin>>r>>c;
      |                 ^
a.cc:6:25: error: 'cout' was not declared in this scope
    6 |                         cout<<"yes\n";
      |                         ^~~~
a.cc:7:22: error: 'cout' was not declared in this scope
    7 |                 else cout<<"no\n";
      |                      ^~~~
Language: C++

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

int main() {
	int r, c;
	while(cin >> r >> c, R || c) {
		cout << (r % 2 == 0 || c % 2 == 0) "yes" : "no" << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: 'R' was not declared in this scope
    8 |         while(cin >> r >> c, R || c) {
      |                              ^
a.cc:9:51: error: expected ';' before string constant
    9 |                 cout << (r % 2 == 0 || c % 2 == 0) "yes" : "no" << endl;
      |                                                   ^~~~~~
      |                                                   ;
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    while(true) {
      Double x1 = sc.nextDouble();
      Double y1 = sc.nextDouble();
      Double x2 = sc.nextDouble();
      Double y2 = sc.nextDouble();
      Double result = Math.sqrt(Math.pow((x1-x2),2)+Math.pow((y1-y2),2))
      System.out.println(result);
    }
  }
}

Compiler output:
Main.java:10: error: ';' expected
      Double result = Math.sqrt(Math.pow((x1-x2),2)+Math.pow((y1-y2),2))
                                                                        ^
1 error
Language: C

#include <stdio.h>
#include <math.h>
int main(int argc,char *argv[]){
    int x1,y1,x2,y2;
    double r;
    
    scanf("%d %d %d %d",&x1,&y1,&x2,&y2);
    range=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
    printf("%1.8f\n",r);
    
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: 'range' undeclared (first use in this function)
    8 |     range=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
      |     ^~~~~
main.c:8:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <cstdio>
#include <cmath>

int main(void)
{
	double x1, y1, x2, y2;
	double range;
	
	scanf("%lf %lf %lf %lf", &x1, &y1, &x2, &y2);
	range = pow(x2 - x1, 2) + pow(y2 - y1, 2);
	
	printf("%f\n", sqrt(range));
	return (0);
}

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

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

int main(void)
{
	double x1, y1, x2, y2;
	
	scanf("%lf %lf %lf %lf", &x1, &y1, & x2, &y2);
	
	printf ("%lf\n", sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:10:77: error: expected ')' before ';' token
   10 |         printf ("%lf\n", sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
      |                ~                                                            ^
      |                                                                             )
main.c:12:20: error: expected ';' before '}' token
   12 |         return (0);
      |                    ^
      |                    ;
   13 | }
      | ~
Language: C

#include<stdio.h>
#include<math.h>
int main()
{
	double x1,x2,y1,y2,a;

	scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);

	a=sqrt(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2));

	printf("%lf\n",a);

	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:9:51: error: expected ')' before ';' token
    9 |         a=sqrt(((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2));
      |               ~                                   ^
      |                                                   )
main.c:13:20: error: expected ';' before '}' token
   13 |         return (0);
      |                    ^
      |                    ;
   14 | }
      | ~
Language: C

#include<stdio.h>
#include<math.h>
int main(){
int a,b,c,d;
scanf("%d %d %d %d",&a,&b,&c,&d);
printf("%f\n",hypot(a-c,b-d);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:29: error: expected ')' before ';' token
    6 | printf("%f\n",hypot(a-c,b-d);
      |       ~                     ^
      |                             )
main.c:7:10: error: expected ';' before '}' token
    7 | return 0;
      |          ^
      |          ;
    8 | }
      | ~
Language: C

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

int main(void)
{
	float x1, x2, y1 , y2, p;
	
	scanf("%f %f %f %f", &x1, &y1, &x2, &y2);
	
	x1 = copysingf( x1 - x2, 1.0);
	y1 = copysingf( y1 - y2, 1.0);
	
	printf("%d", hypotf(x1, y1));
}

Compiler output:
main.c: In function 'main':
main.c:10:14: error: implicit declaration of function 'copysingf'; did you mean 'copysignf'? [-Wimplicit-function-declaration]
   10 |         x1 = copysingf( x1 - x2, 1.0);
      |              ^~~~~~~~~
      |              copysignf
Language: C

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

int main(){

  double x, x2, y, y2;
  double result;
  cin >> x;
  cin >> y;
  cin >> x2;
  cin >> y2;
  result = sqrt(1.0*(x-x2)*(x-x2)+(y-y2)*(y-y2));
  printf("%.8f", result);

  return 0;
}

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

#include<stdio.h>
#include<math.h>
int main() {
  float x1, x2, y1, y2;
   
  scanf("%f %f %f %f", &x1, &x2, &y1, &y2);
  printf("%.8f\n", sqrt((y1 - x1) * (y1 - x1) + pow((y2 - x2) * (y2 - x2)));
   
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:49: error: too few arguments to function 'pow'
    7 |   printf("%.8f\n", sqrt((y1 - x1) * (y1 - x1) + pow((y2 - x2) * (y2 - x2)));
      |                                                 ^~~
In file included from /usr/include/features.h:523,
                 from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:28,
                 from main.c:1:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:173:1: note: declared here
  173 | __MATHCALL_VEC (pow,, (_Mdouble_ __x, _Mdouble_ __y));
      | ^~~~~~~~~~~~~~
main.c:7:76: error: expected ')' before ';' token
    7 |   printf("%.8f\n", sqrt((y1 - x1) * (y1 - x1) + pow((y2 - x2) * (y2 - x2)));
      |         ~                                                                  ^
      |                                                                            )
main.c:9:12: error: expected ';' before '}' token
    9 |   return 0;
      |            ^
      |            ;
   10 | }
      | ~
Language: C

#include<stdio.h>
#include<math.h>
int main() {
  float x1, x2, y1, y2;
    
  scanf("%f %f %f %f", &x1, &x2, &y1, &y2);
  printf("%.8f\n", sqrt((y1 - x1) * (y1 - x1) + (y2 - x2) * (y2 - x2));
    
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:71: error: expected ')' before ';' token
    7 |   printf("%.8f\n", sqrt((y1 - x1) * (y1 - x1) + (y2 - x2) * (y2 - x2));
      |         ~                                                             ^
      |                                                                       )
main.c:9:12: error: expected ';' before '}' token
    9 |   return 0;
      |            ^
      |            ;
   10 | }
      | ~
Language: C

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

int main(void){
          double x1,y1,x2,y2,d;
             scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
             d = (x2-x1)*(x2-x1+(y2-y1)*(y2-y1)
             d = sqrt(d);
              printf("%lf\n",d);
              return 0;
 ]

Compiler output:
main.c: In function 'main':
main.c:7:48: error: expected ')' before 'd'
    7 |              d = (x2-x1)*(x2-x1+(y2-y1)*(y2-y1)
      |                          ~                     ^
      |                                                )
    8 |              d = sqrt(d);
      |              ~                                  
main.c:10:24: error: expected ';' before ']' token
   10 |               return 0;
      |                        ^
      |                        ;
   11 |  ]
      |  ~                      
main.c:11:2: error: expected statement before ']' token
   11 |  ]
      |  ^
main.c:11:2: error: expected declaration or statement at end of input
Language: C

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

int main(void){
          double x1,y1,x2,y2,d;
             scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
             d = (x2-x1)*(x2-x1+(y2-y1)*(y2-y1);
             d = sqrt(d);
              printf("%lf\n",d);
              return 0;
 ]

Compiler output:
main.c: In function 'main':
main.c:7:48: error: expected ')' before ';' token
    7 |              d = (x2-x1)*(x2-x1+(y2-y1)*(y2-y1);
      |                          ~                     ^
      |                                                )
main.c:10:24: error: expected ';' before ']' token
   10 |               return 0;
      |                        ^
      |                        ;
   11 |  ]
      |  ~                      
main.c:11:2: error: expected statement before ']' token
   11 |  ]
      |  ^
main.c:11:2: error: expected declaration or statement at end of input
Language: C

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

int main(void){
          double x1,y1,x2,y2,d;
             scanf("%lf %lf %lf %lf",&x1,&y1,&x2,&y2);
             d = (x2-x1)*(x2-x1+(y2-y1)*(y2-y1);
              printf("%lf\n",sqrt(d));
              return 0;
 }

Compiler output:
main.c: In function 'main':
main.c:7:48: error: expected ')' before ';' token
    7 |              d = (x2-x1)*(x2-x1+(y2-y1)*(y2-y1);
      |                          ~                     ^
      |                                                )
main.c:9:24: error: expected ';' before '}' token
    9 |               return 0;
      |                        ^
      |                        ;
   10 |  }
      |  ~
Language: C

#include<stdio.h>
#include<math.h>
int main(void){
    double x1,x2,y1,y2,d;
    scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2)
    d=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
    printf("%f\n",sqrt(d));
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:42: error: expected ';' before 'd'
    5 |     scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2)
      |                                          ^
      |                                          ;
    6 |     d=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
      |     ~
Language: C

double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}

Compiler output:
main.c:1:11: error: 'd' undeclared here (not in a function)
    1 | double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}
      |           ^
main.c:1:21: error: return type defaults to 'int' [-Wimplicit-int]
    1 | double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}
      |                     ^~~~
main.c: In function 'main':
main.c:1:34: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}
      |                                  ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}
main.c:1:34: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}
      |                                  ^~~~~
main.c:1:34: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:56: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}
      |                                                        ^~~~~~
main.c:1:56: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:56: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:56: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:68: error: implicit declaration of function 'hypot' [-Wimplicit-function-declaration]
    1 | double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}
      |                                                                    ^~~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'hypot'
  +++ |+#include <math.h>
    1 | double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}
main.c:1:68: warning: incompatible implicit declaration of built-in function 'hypot' [-Wbuiltin-declaration-mismatch]
    1 | double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}
      |                                                                    ^~~~~
main.c:1:68: note: include '<math.h>' or provide a declaration of 'hypot'
main.c:1:54: error: assignment to 'double *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
    1 | double*p=&d,a,b,c,d;main(){for(;~scanf("%lf",p++););p=!printf("%f",hypot(d-c,b-a));}
      |                                                      ^