stablegradients/pie-gem5-bysrc huggingface dataset:
// Original C++ solution (slower):
#include <cstdio>

#include <cstring>



using namespace std;



#define rep1(i,x) for(int i=1;i<=(x);++i)



int a[100001];

int memo[100001];

int start[100001];



int main()

{

    int n, k;

    while (scanf("%d %d", &n, &k), n || k) {

        memset(a, 0, sizeof(a));

        memset(memo, 0, sizeof(memo));

        memset(start, 0, sizeof(start));



        bool f = false;



        rep1(i, k) {

            int tmp; scanf("%d", &tmp);

            if (tmp == 0) f = true;

            else a[tmp] = true;

        }



        rep1(i, n) {

            if (a[i]) {

                if (i - 1 >= 0 && a[i - 1]) {

                    start[i] = start[i - 1];

                    memo[start[i]]++;

                } else {

                    start[i] = i;

                    memo[start[i]]++;

                }

            }

        }



        int ma = 0;

        int now = -1;



        rep1(i, n) {

            if (a[i]) {

                if (now == start[i]) continue;

                if (ma < memo[start[i]]) {

                    ma = memo[start[i]];

                    now = start[i];

                }

            } else if (f) {

                int v;

                if (i + 1 <= n && a[i - 1] && a[i + 1]) {

                    v = memo[start[i - 1]] + memo[start[i + 1]] + 1;

                    if (ma < v) {

                        ma = v;

                        now = start[i + 1];

                    }

                } else if (a[i - 1]) {

                    v = memo[start[i - 1]] + 1;

                    if (ma < v) {

                        ma = v;

                        now = start[i - 1];

                    }

                } else if (i + 1 <= n && a[i + 1]) {

                    v = memo[start[i + 1]] + 1;

                    if (ma < v) {

                        ma = v;

                        now = start[i + 1];

                    }

                }

            }

        }



        printf("%d\n", ma);

    }

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



using namespace std;



#define rep1(i,x) for(int i=1;i<=(x);++i)

#define chmax(a,b) a=max(a,b)



int a[100001];

int memo[100001];

int start[100001];



int main()

{

	int n, k;

	while (scanf("%d %d", &n, &k), n || k) {

		fill_n(a, n, 0);

		fill_n(memo, n, 0);

		fill_n(start, n, 0);



		bool f = false;



		rep1(i, k) {

			int tmp; scanf("%d", &tmp);

			if (tmp == 0) f = true;

			else a[tmp] = true;

		}



		rep1(i, n) {

			if (a[i]) {

				if (a[i - 1]) {

					start[i] = start[i - 1];

					memo[start[i]]++;

				} else {

					start[i] = i;

					memo[start[i]]++;

				}

			}

		}



		int ma = 0;



		rep1(i, n) {

			if (a[i]) {

				chmax(ma, memo[start[i]]);

			} else if (f) {

				if (i + 1 <= n) {

					chmax(ma, memo[start[i - 1]] + memo[start[i + 1]] + 1);

				} else {

					chmax(ma, memo[start[i - 1]] + 1);

				}

			}

		}



		printf("%d\n", ma);

	}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <cstdio>

#include <cstring>



using namespace std;



#define rep1(i,x) for(int i=1;i<=(x);++i)



int a[100001];

int memo[100001];

int start[100001];



int main()

{

	int n, k;

	while (scanf("%d %d", &n, &k), n || k) {

		memset(a, 0, sizeof(a));

		memset(memo, 0, sizeof(memo));

		memset(start, 0, sizeof(start));



		bool f = false;



		rep1(i, k) {

			int tmp; scanf("%d", &tmp);

			if (tmp == 0) f = true;

			else a[tmp] = true;

		}



		rep1(i, n) {

			if (a[i]) {

				if (i - 1 >= 0 && a[i - 1]) {

					start[i] = start[i - 1];

					memo[start[i]]++;

				} else {

					start[i] = i;

					memo[start[i]]++;

				}

			}

		}



		int ma = 0;

		int now = -1;



		rep1(i, n) {

			if (a[i]) {

				if (now == start[i]) continue;

				if (ma < memo[start[i]]) {

					ma = memo[start[i]];

					now = start[i];

				}

			} else if (f) {

				int v;

				if (i + 1 <= n && a[i - 1] && a[i + 1]) {

					v = memo[start[i - 1]] + memo[start[i + 1]] + 1;

					if (ma < v) {

						ma = v;

						now = start[i + 1];

					}

				} else if (a[i - 1]) {

					v = memo[start[i - 1]] + 1;

					if (ma < v) {

						ma = v;

						now = start[i - 1];

					}

				} else if (i + 1 <= n && a[i + 1]) {

					v = memo[start[i + 1]] + 1;

					if (ma < v) {

						ma = v;

						now = start[i + 1];

					}

				}

			}

		}



		printf("%d\n", ma);

	}

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>



using namespace std;



#define rep1(i,x) for(int i=1;i<=(x);++i)

#define chmax(a,b) a=max(a,b)



int a[100001];

int memo[100001];

int start[100001];



int main()

{

	int n, k;

	while (scanf("%d %d", &n, &k), n || k) {

		fill_n(a, n, 0);

		fill_n(memo, n, 0);

		fill_n(start, n, 0);



		bool f = false;



		rep1(i, k) {

			int tmp; scanf("%d", &tmp);

			if (tmp == 0) f = true;

			else a[tmp] = true;

		}



		rep1(i, n) {

			if (a[i]) {

				if (a[i - 1]) {

					start[i] = start[i - 1];

					memo[start[i]]++;

				} else {

					start[i] = i;

					memo[start[i]]++;

				}

			}

		}



		int ma = 0;



		rep1(i, n) {

			if (a[i]) {

				chmax(ma, memo[start[i]]);

			} else if (f) {

				if (i + 1 <= n) {

					chmax(ma, memo[start[i - 1]] + memo[start[i + 1]] + 1);

				} else {

					chmax(ma, memo[start[i - 1]] + 1);

				}

			}

		}



		printf("%d\n", ma);

	}

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

#define N 500009

using namespace std;

 

int n,m,q[N];

struct node{ double x,y,z; }a[N];

int main(){

	scanf("%d%d",&n,&m);

	int i,k,head=1,tail=0; double now=0,ans=0;

	for (i=1; i<=n; i++){

		scanf("%lf%lf",&a[i].x,&a[i].y);

		ans+=a[i].x*a[i].y;

		a[i].z=now=now+a[i].y;

		for (; head<=tail && a[k=q[head]].z<=now-m; head++)

			ans-=a[k].x*a[k].y;

		ans-=a[k].x*a[k].y;

		a[k].y=a[k].z-(now-m);

		ans+=a[k].x*a[k].y;

		for (; head<=tail && a[k=q[tail]].x>a[i].x; tail--){

			a[i].x=(a[i].x*a[i].y+a[k].x*a[k].y)/(a[i].y+a[k].y);

			a[i].y+=a[k].y;

		}

		q[++tail]=i;

		printf("%.10f\n",ans/m);

	}

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>



const int maxn = 5e5 + 10;



int n, m, fnt, rar, s, x[maxn];

double ans, y[maxn];



int main() {

	scanf("%d%d", &n, &m);

	for (int i = 1; i <= n; ++i) {

		int t, v;

		scanf("%d%d", &t, &v);

		while(fnt < rar && s - x[fnt] >= m - v) {

			ans -= y[fnt];

			s -= x[fnt++];

		}

		if(s > m - v) {

			ans -= y[fnt];

			y[fnt] -= (s - m + v) * y[fnt] / x[fnt];

			ans += y[fnt];

			x[fnt] -= (s - m + v);

		}

		s = m;

		double k = 1. * t * v;

		ans += k;

		while(fnt < rar && y[rar - 1] * v >= k * x[rar - 1]) {

			v += x[--rar];

			k += y[rar];

		}

		x[rar] = v;

		y[rar++] = k;

		printf("%.12f\n", ans / m);

	}

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#include<vector>

#include<functional>

#include<string>

#include<cmath>

#include<map>

#include<set>

#include<queue>

#include<stack>

#include<cstdio>

using namespace std;

using ll = long long;

#define MOD (int)1e9 + 7

int main(){

  int n, m;

  cin >> n >> m;

  if(abs(n - m) > 1){

    cout << 0 << endl;

    return 0;

  }

  ll ans = 1;

  for(int i = 0; i < n; i++){

    ans *= (i + 1);

    ans %= MOD;

  }

  for(int i = 0; i < m; i++){

    ans *= (i + 1);

    ans %= MOD;

  }

  if(m == n){

    ans *= 2;

  }

  ans %= MOD;

  cout << ans << endl;

  return 0;

}

// Optimized solution to the same problem (faster):
#include<stdio.h>



int main() { 

  long long  n, m, ans = 1;

  scanf("%Ld %Ld", &n, &m);

  if( n-m > 1 || m-n > 1){

    printf("%d\n", 0);

    return 0;

  }

  int i;

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

    ans *= (i + 1);

    ans %= 1000000007;

  }

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

    ans *= (i + 1);

    ans %= 1000000007;

  }

  if(n == m){

    ans *= 2;

  }

  ans %= 1000000007;

  printf("%Ld\n", ans);

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

const int mod=1e9+7;

int main(){

    int n,m;

    cin>>n>>m;

    long long p;

    if(abs(n-m)>1) cout<<0<<endl;

    else{

        long long  sum=1,cnt=1;

        for(int i=1;i<=n;i++) {

                sum*=i;

                sum%=mod;

        }

        for(int i=1;i<=m;i++) {

                cnt*=i;

                cnt%=mod;

        }

        p=cnt*sum%mod;

        if(m==n) p*=2;

        p%=mod;

        cout<<p<<endl;

    }

    return 0;

}


// Optimized solution to the same problem (faster):
#include<cstdio>

#include<algorithm>

#include<cmath>

#define MOD 1000000007

using namespace std;

long long n,m;

int main()

{

	scanf("%lld%lld",&n,&m);

	if(abs(n-m)>1) {puts("0");return 0;}

	long long n1=1,n2=1;

	for(long long i=2;i<=n;++i) n1=(n1*i)%MOD;

	for(long long i=2;i<=m;++i) n2=(n2*i)%MOD;

	if(n!=m) printf("%lld\n",n1*n2%MOD);

	else printf("%lld\n",n1*n2*2%MOD);

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<cstdio>

#include<cmath>

using namespace std;

long long a[100002],n,m,p=1e9+7;

long long ksm(int a,int b,int p)

{

	long long ans=1;

	while(b)

	{

		if(b&1)

		{

			ans=ans*a%p;

		}

		a=a*a%p;

		b>>=1;

	}

	return ans;

}

long long c(long long n,long long m)

{

	if(m>n)

	{

		return 0;

	}

	return (((a[n]*ksm(a[m],p-2,p))%p*ksm(a[n-m],p-2,p))%p);

}

long long lucas(long long n,long long m)

{

	if(m==0)

	{

		return 1;

	}

	return (c(n%p,m%p)*lucas(n/p,m/p))%p;

}

int main()

{

	cin>>n>>m;

	if(abs(n-m)>1)

	{

		cout<<"0"<<endl;

		return 0;

	}

	a[0]=1;

	for(int i=1;i<=max(n,m);i++)

	{

		a[i]=(a[i-1]*i)%p;

	}

	if(n==m)

	{

		cout<<(2*a[n]*a[m])%p<<endl;

	}

	if(abs(n-m)==1)

	{

		cout<<(a[n]*a[m])%p<<endl;

	}

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

#define M 1000000007

typedef long long LL;



int main()

{		

	int n, m, d, i;

	LL f, t, ans;

	

	scanf("%d%d", &n, &m);

	if(n < m) n ^= m, m ^= n, n ^= m;

	d = n - m;

	if(d > 1){

		puts("0");

		return 0;

	}

	for(i = 1, f = 1; i < n; i++){

		f = f * (LL)i % M;

	}

	t = f * (LL)n % M;

	

	if(!d) ans = t * t * 2 % M;

	else ans = t * f % M;

	printf("%lld\n", ans);	

			

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <string>

#include <vector>

#include <algorithm>

#include <numeric>

#include <cmath>



using namespace std;



constexpr int64_t MOD = 1'000'000'007;

constexpr int     MAX =       100'005;



int64_t fac[MAX], finv[MAX], inv[MAX];



// テーブルを作る前処理

void COMinit() {

    fac[0] = fac[1] = 1;

    finv[0] = finv[1] = 1;

    inv[1] = 1;

    for (int i = 2; i < MAX; i++){

        fac[i] = fac[i - 1] * i % MOD;

        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;

        finv[i] = finv[i - 1] * inv[i] % MOD;

    }

}



// 二項係数計算

int64_t COM(int n, int k){

    if (n < k) return 0;

    if (n < 0 || k < 0) return 0;

    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;

}



int main(void) {

    int N, M;

    cin >> N >> M;

    if(N > M) swap(N, M);

    COMinit();

    if(N+1 == M) {

        cout << (fac[N] * fac[M]) % MOD << endl;

    } else if(N == M) {

        cout << ((fac[N] * fac[M]) % MOD * 2) % MOD << endl;

    } else {

        cout << 0 << endl;

    }

    return 0;

}


// Optimized solution to the same problem (faster):
#include <iostream>

#include <vector>



using namespace std;



constexpr int64_t MOD = 1'000'000'007;



int main(void) {

    int N, M;

    cin >> N >> M;

    if(N > M) swap(N, M);



    if(N+1 < M) {

        cout << 0 << endl;

    } else {

        vector<int64_t> factrial(M+1);

        factrial[0] = 1;

        for(int i=1; i<=M; i++) {

            factrial[i] = (factrial[i-1] * i) % MOD;

        }

        int64_t ans = (factrial[N] * factrial[M]) % MOD;

        if(N == M) ans = (ans * 2) % MOD;

        cout << ans << endl;

    }

    return 0;

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<algorithm>

#define DIV 100000

using namespace std;



long long d,S[100010];



int main(){

	long long n, m, k, t = 0;

	long long ans = 0;

	cin >> n >> m; S[0] = 0;

	for (int i = 1; i < n; i++){

		cin >> d; S[i] = S[i - 1] + d;

	}

	while (m--){

		cin >> k;

		ans += abs(S[t] - S[t + k]);

		ans = ans%DIV;

		t += k;

	}

	cout << ans << endl;

}

// Optimized solution to the same problem (faster):
#include<cstdio>

#include<math.h>

#include <stdlib.h>

#define M 100000

using namespace std;





int n, m,l, p = 0 , result = 0;

int x[100010];



int main(){

	scanf("%d %d",&n,&m);

	x[0] = 0;

	for (int i = 1; i < n; i++){

		scanf("%d", &x[i]);

		x[i] += x[i - 1];

	}

	while (m--){

		scanf("%d", &l);

		result += abs(x[p + l] - x[p]);

		result %= M;

		p += l;

	}

	printf("%d\n", result);

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#define MAX 100500



using namespace std;



int main(void){



  int n,m;

  long long int N, M[MAX],d[MAX];

  

  while(cin >> n ){



    cin >> m;



    for(int i = 0 ; i < MAX ; i++){

      M[i] = 0;

      d[i] = 0;

    }



    d[0] = 0;



    for(int i = 1 ; i < n; i++){

      cin >> N;

      d[i] += d[i-1] + N;

      //  cout << "N = " << N << " d[i] = " << d[i] << endl;

    }



    for(int i = 0 ; i < m ; i++) cin >> M[i];



    long long int sum = 0,now = 0;

    

    for(int i = 0 ; i < m ; i++){

     

      // cout << endl << "i = " << i << " now = "  << now << endl;//



      //  cout <<"now + M[i] = " << now + M[i]<<   " d[now + M[i]] = " << d[now + M[i]] << " d[now] =  " <<  d[now] << endl;//

      



      if(M[i] >= 0){

	sum += d[now + M[i]] - d[now];  

	//	cout << "! N = " << d[now + M[i]] - d[now] << endl;//

      }

      else{

	sum += d[now] - d[now + M[i]];

	//	cout << "? N = " <<  d[now] - d[now + M[i]]  << endl;//

      }



      now = now + M[i];//



    }

    cout << sum % 100000 << endl;

  }



  return 0;

}

// Optimized solution to the same problem (faster):
#include <iostream>

using namespace std;

int shu[100000];

long long co[100001];

int main (){

  int n,m;

  cin>>n>>m;

  for(int i=0;i<n-1;i++) cin>>shu[i];

  for(int i=0;i<=n;i++) co[i]=0;

  int ima=0;

  for(int i=0;i<m;i++){

    int s,e;

    int a;

    cin>>a;

    s=min(ima+a,ima);

    e=max(ima+a,ima);

    co[s]++;

    co[e]--;

    ima+=a;

  }

  for(int i=1;i<n;i++) co[i]+=co[i-1];

  long long sumco=0;

  for(int i=0;i<n-1;i++) sumco+=co[i]*shu[i],sumco%=100000;

  cout<<sumco<<endl;

  return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std; 

int main()

{

string s;

cin>>s;



 for(int i=0;i<s.length();i++){

 	

 	if(s[i]==','){

 		cout<<" ";

	 }

	 else

	 cout<<s[i];

 }

}

// Optimized solution to the same problem (faster):
#include <stdio.h>  

#include <string.h>  

   

int main()  

{  

    char str[105];  

    scanf("%s",str);

    char ch = ' ';  

      

    

    for(int i = 0; i < strlen(str); i++){  

        if(str[i] == ',')  

            str[i] = ch;  

    }  

      

     

    printf("%s", str);  

          

    return 0;  

}  

// Fastest known solution for this problem:
// Original C++ solution (slower):
#pragma GCC optimize ("O3")

///#include<bits/stdc++.h>

#include<iostream>

#include<string>

using namespace std;







/// Info.

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

/// Coder               : BAHAA El_DEEN OSAMA SAYED.

/// Problem name        : A - Haiku

/// Method              : IM-string

/// Date                : 23/2/2020

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





#define rep0(i,x)         for(int i=0; i<=x ;++i)

#define all(v)           ((v.begin()),((v.end())

#define mm(v,d)          memset(v,d,sizeof(v))

#define lp(i,v)          for(int i=0;i<sizeof(v);++i)

#define lpi(i,j,n)       for(int i=(j);i>=(int)n;++i)

#define lpd(i,j,n)       for(int i=(j);i>=(int)n;--i)

#define MP               make_pair

#define SZ(v)            ((int) ( (v).size() ) )

#define ull              unsigned long long

#define ll               long long

#define pi               3.1415926536

#define oo               1e9

#define OO               1e18

#define Fx(n)            fixed<<setprecision(n)

#define FasterIO           std::ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)

#define RE0              return 0

#define RE1              return 1

#define mp(a,b)          make_pair(a,b)

#define X                first

#define Y                second

#define pii              pair(int a, int b)

#define rep1(i,x)        for(int i=1;i<x;++i)

#define rep2(i,x)        for(int i=2;i<x;++i)

#define RE               return

//#define LD               long double

#define all(v) ((v).begin()),((v).end())





const  int  N   = (int) 1e5+100;

const  int  M   = (int) 1e4+4;

const  int  INF = (int) 0x3f3f3f3f;

///const double ESP = 1e-7;

///const ll MOD=1e8+9;





string str;



int main()

{

FasterIO;



cin>> str;

rep0(i,str.size())

{

    if(str[i]==',')

        str[i]= ' ' ;

}



cout << str;







 RE0;}


// Optimized solution to the same problem (faster):
#include <stdio.h>  

#include <string.h>  

   

int main()  

{  

    char str[105];  

    scanf("%s",str);

    char ch = ' ';  

      

    

    for(int i = 0; i < strlen(str); i++){  

        if(str[i] == ',')  

            str[i] = ch;  

    }  

      

     

    printf("%s", str);  

          

    return 0;  

}  

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <cstdio>

#include <string>

#include <cstring>

#include <stdlib.h>

#include <math.h>

#include <ctype.h>

#include <queue>

#include <map>

#include <set>

#include <string.h>

#include <algorithm>

using namespace std;



int main()

{

    char s[25];

   scanf("%s",s);

    for(int i=0;s[i]!='\0';++i)

    {

        if(s[i]==',')

            s[i]=' ';

    }

    printf("%s\n",s);

    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main(){

    char arr[20];

    scanf ("%[^\n]", arr);

    for (int i = 0; arr[i] != '\0'; i++)

        if (arr[i] == ',') arr[i] = ' ';

    puts (arr);

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>



using namespace std;



int main()

{

    char s[30];

    scanf("%s",s);

    for(int i = 0; i < 19; i ++)

    {

        if(s[i] == ',')printf(" ");

        else printf("%c",s[i]);

    }

    printf("\n");

    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main(){

    char arr[20];

    scanf ("%[^\n]", arr);

    for (int i = 0; arr[i] != '\0'; i++)

        if (arr[i] == ',') arr[i] = ' ';

    puts (arr);

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>



using namespace std;



int main()

{

 string S;

 cin>>S;

 char a=',';

for(int i=0;i<S.length();i++){

    if(S[i]==a){S[i]=' ';}

}

cout<<S;

 return 0;



}

// Optimized solution to the same problem (faster):
#include <stdio.h>



int main(){

    char arr[20];

    scanf ("%[^\n]", arr);

    for (int i = 0; arr[i] != '\0'; i++)

        if (arr[i] == ',') arr[i] = ' ';

    puts (arr);

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>



using namespace std;



int main()

{

    string s;

    int i=0;

    cin>>s;

    for(i=0;i<s.size();i++){

        if (s[i]==',')

            s[i]=' ' ;



    }

    cout<<s;

    return 0;

}


// Optimized solution to the same problem (faster):
#include <stdio.h>



int main(){

    char arr[20];

    scanf ("%[^\n]", arr);

    for (int i = 0; arr[i] != '\0'; i++)

        if (arr[i] == ',') arr[i] = ' ';

    puts (arr);

}


// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<iostream>

#include<cstring>

using namespace std;

int main()

{

    string n;

    int a,i;

    cin>>n;

    a=n.length();

    for(i=0;i<a;i++)

    {

        if(n[i]==',') cout<<" ";

        else cout<<n[i];

    }

    cout<<endl;

    return 0;

}

// Optimized solution to the same problem (faster):
#include"stdio.h"

using namespace std;

int main(){

	int i;char c;

	for(i=1;i<=19;i++){

		c=getchar();

		if(c!=',') printf("%c",c);

		else printf(" ");

	}

	printf("\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

int main()

{

	string n;

	cin>>n;

	int l=n.length();

	for(int i=0;i<l;i++)

	{

		if(n[i]==',') n[i]=' ';

	}

	cout<<n<<endl;

}

// Optimized solution to the same problem (faster):
#include"stdio.h"

using namespace std;

int main(){

	int i;char c;

	for(i=1;i<=19;i++){

		c=getchar();

		if(c!=',') printf("%c",c);

		else printf(" ");

	}

	printf("\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

string s;

int main()

{

	cin>>s;

	for(int i=0;i<s.size();i++)

	{

		if(s[i]==',') cout<<" ";

		else cout<<s[i];

	}

	cout<<endl;

	return 0;

}


// Optimized solution to the same problem (faster):
#include"stdio.h"

using namespace std;

int main(){

	int i;char c;

	for(i=1;i<=19;i++){

		c=getchar();

		if(c!=',') printf("%c",c);

		else printf(" ");

	}

	printf("\n");

	return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

using namespace std;

#include <string>

#include <algorithm>

int main()

{

    char s[20];

    cin>>s;

    for(int i=0;s[i];i++)

    {

        if(s[i]==',')

            s[i]=' ';

    }

    cout<<s;

}




// Optimized solution to the same problem (faster):
#include <stdio.h>

 

int main(){

    char s[21];

    scanf ("%[^\n]", s);

    for (int i = 0; s[i] != '\0'; i++)

        if (s[i] == ',') s[i] = ' ';

    puts (s);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
# include <bits/stdc++.h>

using namespace std;

string s;

int main (){

    cin >> s;

    for(int i=0;i<s.size();i++){

        if(s[i]!=',') cout<<s[i];

        else cout<<' ';

    }

}


// Optimized solution to the same problem (faster):
#include <stdio.h>

 

int main(){

    char s[21];

    scanf ("%[^\n]", s);

    for (int i = 0; s[i] != '\0'; i++)

        if (s[i] == ',') s[i] = ' ';

    puts (s);

    return 0;

}

// Fastest known solution for this problem:
// Original C++ solution (slower):
#include <iostream>

#include <string>

using namespace std;

string s;

int main(){

    cin>>s;

    for (int i=0; i<s.length(); i++){

        if (s[i]==',')cout<<" ";

        else cout<<s[i];

    }

    return 0;

}

// Optimized solution to the same problem (faster):
#include <stdio.h>

 

int main(){

    char s[21];

    scanf ("%[^\n]", s);

    for (int i = 0; s[i] != '\0'; i++)

        if (s[i] == ',') s[i] = ' ';

    puts (s);

    return 0;

}

// Fastest known solution for this problem: