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

#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;

bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd_(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}

int main(){
  
  int n;
  long long m;
  int q;
  cin>>n>>m>>q;
  bool in_cycle[n] = {};
  int a[q],b[q],c[q];
  bool qexist[n] = {};
  REP(i,q){
    cin>>a[i]>>b[i]>>c[i];
    a[i]--;b[i]--;
    qexist[a[i]] = true;
    qexist[b[i]] = true;
  }
  REP(i,q){
    if(c[i]==1){
      in_cycle[a[i]] = true;
      in_cycle[b[i]] = true;
    }
  }
  
  long long num_in_cycle = 0;
  REP(i,n){
    if(in_cycle[i]){
      num_in_cycle++;
    }
  }
  
  
  if(num_in_cycle<1){
    long long valid = 0;
    REP(i,n){
      if(qexist[i]){
        valid++;
      }
    }
    long long l_limit = (long long)n - 1;
    long long u_limit = valid + (n-valid)*(n-valid-1)/2;
    if(l_limit<=m && m<=u_limit){
      cout<<"Yes"<<endl;
    }else{
      cout<<"No"<<endl;
    }
    return 0;
  }
  
  if(num_in_cycle<3){
    bool flag = false;
    long long cnt = 2;
    long long valid = 0;
    REP(i,n){
      if(!qexist[i]){
        flag = true;
        cnt++;
      }
    }
    if(!flag){
      cout<<"No"<<endl;
      return 0;
    }
    
    REP(i,n){
      if(qexist[i] && !in_cycle[i]){
        valid++;
      }
    }
    
    long long l_limit = (long long)n;
    long long u_limit = valid + (n-valid)*(n-valid-1)/2;
    
    if(l_limit<=m && m<=u_limit){
      cout<<"Yes"<<endl;
    }else{
      cout<<"No"<<endl;
    }
    
    return 0;
  }
  
  bool flag = true;
  REP(i,q){
    if(c[i]==0){
      if(in_cycle[a[i]] && in_cycle[b[i]]){
        flag = false;
        break;
      }
    }
  }
  if(!flag){
    cout<<"No"<<endl;
    return 0;
  }
  
  long long l_limit,u_limit;
  long long valid = 0;
  REP(i,n){
    if(qexist[i] && !in_cycle[i]){
      valid++
    }
  }
  l_limit = (long long)n;
  u_limit = valid + (n-valid)*(n-valid-1)/2;
  if(l_limit<=m && m<=u_limit){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:145:14: error: expected ';' before '}' token
  145 |       valid++
      |              ^
      |              ;
  146 |     }
      |     ~
Language: C++

#include <iostream>
#include <cstdio>
#define ll long long
using namespace std;
inline int read()
{
	int x = 0, f = 1; char ch = getchar();
	while(ch < '0' || ch > '9') {if(ch == '-') f = -1; ch = getchar();}
	while(ch >= '0' && ch <= '9') {x = (x << 3) + (x << 1) + (ch ^ 48); ch = getchar();}
	return x * f;
}
const int N = 410,mod = 998244353;
int n,sa,sb;
int a[N],b[N];
int f[N][N][N],fac[N],inv[N];
int ksm(int x,int y){int res = 1; for(;y;y >>= 1,x = x * x % mod) res = res * x % mod; return res;}
void add(int &x,int y){x = x + y; if(x >= mod) x -= mod;}
int main()
{
	n = read();
	for(int i = 1;i <= n;i ++) a[i] = read(),b[i] = read(),sa += a[i],sb += b[i];
	fac[0] = 1; for(int i = 1;i <= 400;i ++) fac[i] = 1ll * fac[i - 1] * i % mod;
	inv[400] = ksm(fac[400],mod - 2);
	for(int i = 399;i >= 0;i --) inv[i] = 1ll * inv[i + 1] * (i + 1) % mod;
	f[0][0][0] = mod - 1;
	for(int i = 1;i <= n;i ++)
		for(int j = 0;j <= sa;j ++)
			for(int k = 0;k <= sb;k ++)
			{
				if(!f[i - 1][j][k]) continue;
				add(f[i][j][k],f[i - 1][j][k]);
				int x = 1;
				for(int l = 0;l < b[i];l ++,x = 1ll * x * a[i] % mod) add(f[i][j + a[i]][k + l],mod - 1ll * x * inv[l] % mod * f[i - 1][j][k] % mod);
			}
	int ans = 0;
	for(int i = 1,x,invi;i <= sa;i ++)
	{
		invi = ksm(i,mod - 2);
		x = 1ll * sa * invi % mod;
		for(int j = 0;j <= sb;j ++,x = 1ll * x * y % mod) add(ans,1ll * x * fac[j] % mod * f[n][i][j] % mod);
	}
	cout << ans << "\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:40:58: error: 'y' was not declared in this scope
   40 |                 for(int j = 0;j <= sb;j ++,x = 1ll * x * y % mod) add(ans,1ll * x * fac[j] % mod * f[n][i][j] % mod);
      |                                                          ^
Language: C++


/// @file gachapon.cc
/// @brief gachapon の実装ファイル
/// @author Yusuke Matsunaga (松永 裕介)
///
/// Copyright (C) 2019 Yusuke Matsunaga
/// All rights reserved.


#include <iostream>
#include <vector>

using namespace std;


int
main(int argc,
     char** argv)
{
  int n;
  cin >> n;

  // 確率の重み
  vector<int> A(n);
  // 最低の出現数
  vector<int> B(n);

  // 確率の重みの総和
  int sum_A = 0;
  for ( int i = 0; i < n; ++ i ) {
    cint >> A[i] >> B[i];
    sum_A += A[i];
  }

  // 全部で sum_A 個の玉が入った袋から１つ玉を取り出す．
  // 玉には n 種類の色がありそれぞれ A[i] 個ずつ入っている．
  // これを K 回繰り返した時に各玉の個数が B[i] 以上となる
  // K の期待値を求めよ．
  // ただし，期待値が P / Q の既約分数で表される時，
  // R x Q = P mode 998244353 の R で答えよ．

  // まず，sum_B = sum B[i] とすると sum_B 以下の回数では
  // 制約を満たせない．
  // sum_B 回の試行で制約を満たす組み合わせは
  // B[i] 個ずつの重複を許した順列の数となる．
  // 具体的には sum_B ! / Prod_i B[i] !

  // 長さ k (>= sum_B) の A の順列 Pk を考える．
  // 総数は sum_A^k
  // Pk 中の A[i] の個数が B[i] 以上となる順列の数は
  // Psum_B の順列数 x (k - sum_B 個の要素を任意の場所に配置する
  // 順列の数)


  return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:31:5: error: 'cint' was not declared in this scope; did you mean 'uint'?
   31 |     cint >> A[i] >> B[i];
      |     ^~~~
      |     uint
Language: C++

#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#include <bits/stdc++.h>
using namespace std;
template<class t> inline t read(t &x){
	char c=getchar();bool f=0;x=0;
	while(!isdigit(c)) f|=c=='-',c=getchar();
	while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();
	if(f) x=-x;return x;
}
template<class t,class ...A> inline void read(t &x,A &...a){
	read(x);read(a...);
}
template<class t> inline void write(t x){
	if(x<0) putchar('-'),write(-x);
	else{if(x>9) write(x/10);putchar('0'+x%10);}
}

const int N=2e5+5,M=5e6+5;
int en=1,h[N],n,a[N],b[N],id1[N],id2[N],cnt,cnt1,cnt2,d[N],cur[N];

struct edge{
	int n,v,w;
}e[M<<1];

void add(int x,int y,int z){
	e[++en]={h[x],y,z};
	h[x]=en;
}

void exadd(int x,int y,int f){
	add(x,y,f);
	add(y,x,0);
}

bool bfs(int s,int aim){
	memset(d,0,sizeof d);
	memset(cur,h,sizeof h);
	queue<int> q;
	q.push(s);
	d[s]=1;
	while(!q.empty()){
		int x=q.front();
		q.pop();
		for(int i=h[x];i;i=e[i].n){
			int y=e[i].v;
			if(!d[y]&&e[i].w){
				d[y]=d[x]+1;
				if(y==aim) return 1;
				q.push(y);
			}
		}
	} 
	return 0;
}

int dfs(int x,int flow,int aim){
	if(x==aim) return flow;
	int rest=flow;
	for(int &i=cur[x];i&&rest;i=e[i].n){
		int y=e[i].v;
		if(d[y]==d[x]+1&&e[i].w){
			int tp=dfs(y,min(rest,e[i].w),aim);
			if(!tp) d[y]=0;
			rest-=tp;
			e[i].w-=tp;
			e[i^1].w+=tp;
		}
	}
	return flow-rest;
}

int dinic(int s,int t){
	int res=0;
	while(bfs(s,t)) res+=dfs(s,INT_MAX,t);
	return res;
}

signed main(){
	read(n);
	for(int i=1;i<=n;i++) read(a[i]),a[i]++;
	for(int i=1;i<=n;i++) read(b[i]),b[i]++;
	for(int i=1;i<=n;i++) if(!id1[i]){
		cnt1++;
		int x=i;
		do{
			id1[x]=cnt1;
			x=a[x];
		}while(x!=i);
	}
	for(int i=1;i<=n;i++) if(!id2[i]){
		cnt2++;
		int x=i;
		do{
			id2[x]=cnt2;
			x=b[x];
		}while(x!=i);
	}
  	for(int i=1;i<=n;i++){
  		int x=id1[i],y=id2[i];
  		if(a[i]!=i&&b[i]!=i){
  			exadd(x,cnt1+y,1);
  			if(a[i]==b[i]) exadd(cnt1+y,x,1);
		}
		else if(a[i]!=i) exadd(x,cnt1+cnt2+1,1);
		else if(b[i]!=i) exadd(0,cnt1+y,1);
		else cnt++;
	}
  	write(n-cnt-dinic(0,cnt1+cnt2+1));
}


Compiler output:
a.cc: In function 'bool bfs(int, int)':
a.cc:37:20: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   37 |         memset(cur,h,sizeof h);
      |                    ^
      |                    |
      |                    int*
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:2:
/usr/include/string.h:61:37: note:   initializing argument 2 of 'void* memset(void*, int, size_t)'
   61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
      |                                 ~~~~^~~
Language: C++

#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#include <bits/stdc++.h>
using namespace std;
template<class t> inline t read(t &x){
	char c=getchar();bool f=0;x=0;
	while(!isdigit(c)) f|=c=='-',c=getchar();
	while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();
	if(f) x=-x;return x;
}
template<class t,class ...A> inline void read(t &x,A &...a){
	read(x);read(a...);
}
template<class t> inline void write(t x){
	if(x<0) putchar('-'),write(-x);
	else{if(x>9) write(x/10);putchar('0'+x%10);}
}

const int N=2e5+5,M=5e6+5;
int en=1,h[N],n,a[N],b[N],id1[N],id2[N],cnt,cnt1,cnt2,d[N];

struct edge{
	int n,v,w;
}e[M<<1];

void add(int x,int y,int z){
	e[++en]={h[x],y,z};
	h[x]=en;
}

void exadd(int x,int y,int f){
	add(x,y,f);
	add(y,x,0);
}

bool bfs(int s,int aim){
	memset(d,0,sizeof d);
	memset(cur,h,sizeof h);
	queue<int> q;
	q.push(s);
	d[s]=1;
	while(!q.empty()){
		int x=q.front();
		q.pop();
		for(int i=h[x];i;i=e[i].n){
			int y=e[i].v;
			if(!d[y]&&e[i].w){
				d[y]=d[x]+1;
				if(y==aim) return 1;
				q.push(y);
			}
		}
	} 
	return 0;
}

int dfs(int x,int flow,int aim){
	if(x==aim) return flow;
	int rest=flow;
	for(int &i=cur[x];i&&rest;i=e[i].n){
		int y=e[i].v;
		if(d[y]==d[x]+1&&e[i].w){
			int tp=dfs(y,min(rest,e[i].w),aim);
			if(!tp) d[y]=0;
			rest-=tp;
			e[i].w-=tp;
			e[i^1].w+=tp;
		}
	}
	return flow-rest;
}

int dinic(int s,int t){
	int res=0;
	while(bfs(s,t)) res+=dfs(s,INT_MAX,t);
	return res;
}

signed main(){
	read(n);
	for(int i=1;i<=n;i++) read(a[i]),a[i]++;
	for(int i=1;i<=n;i++) read(b[i]),b[i]++;
	for(int i=1;i<=n;i++) if(!id1[i]){
		cnt1++;
		int x=i;
		do{
			id1[x]=cnt1;
			x=a[x];
		}while(x!=i);
	}
	for(int i=1;i<=n;i++) if(!id2[i]){
		cnt2++;
		int x=i;
		do{
			id2[x]=cnt2;
			x=b[x];
		}while(x!=i);
	}
  	for(int i=1;i<=n;i++){
  		int x=id1[i],y=id2[i];
  		if(a[i]!=i&&b[i]!=i){
  			exadd(x,cnt1+y,1);
  			if(a[i]==b[i]) exadd(cnt1+y,x,1);
		}
		else if(a[i]!=i) exadd(x,cnt1+cnt2+1,1);
		else if(b[i]!=i) exadd(0,cnt1+y,1);
		else cnt++;
	}
  	write(n-cnt-dinic(0,cnt1+cnt2+1));
}


Compiler output:
a.cc: In function 'bool bfs(int, int)':
a.cc:37:16: error: 'cur' was not declared in this scope
   37 |         memset(cur,h,sizeof h);
      |                ^~~
a.cc: In function 'int dfs(int, int, int)':
a.cc:59:20: error: 'cur' was not declared in this scope
   59 |         for(int &i=cur[x];i&&rest;i=e[i].n){
      |                    ^~~
Language: C++

#include<cstdio>
#include<cstring>
#define M 400004
#define N 100002
int S,T,a[N],b[M],c[M],e[N],f[N],g[N],h[N],l,n,o[N],p[N],q[N],r,t,x;bool d[M];
inline void add(int u,int v){b[++t]=a[u],c[a[u]=t]=v,d[t]=true,b[++t]=a[v],c[a[v]=t]=u;}
inline bool bfs()
{
    for(memset(h+1,-1,T<<2),q[l=0]=S,r=1;l<r;)
		for(int u=q[l++],i=a[u];i;i=b[i])
			if(d[i]&&h[c[i]]<0)h[q[r++]=c[i]]=h[u]+1;
    return h[T]>=0;
}
bool dfs(int u)
{
    if(u==T)return true;
    for(int&i=e[u];i;i=b[i])if(d[i]&&h[c[i]]==h[u]+1&&dfs(c[i]))return d[i]=false,d[i^1]=true;
    return false;
}
int i,j;
int main()
{
    scanf("%d",&n),t=1,x=n;
    for(i=0;i<n;i++)scanf("%d",o+i);
    for(i=0;i<n;i++)scanf("%d",p+i);
    for(i=0;i<n;i++) if(o[i]!=i&&!f[i]) for(j=i,T++;!f[j];j=o[j])f[j]=T;
    for(i=0;i<n;i++) if(p[i]!=i&&!g[i]) for(j=i,T++;!g[j];j=p[j])g[j]=T;
    for(i=0,T++;i<n;i++)
	    if(o[i]==i&&p[i]==i)x--;
	    else if(o[i]==i)add(g[i],T);
	    else if(p[i]==i)add(S,f[i]);
	    else if(o[i]!=p[i])add(g[i],f[i]);
	    else add(f[i],g[i]),add(g[i],f[i]);
    while(bfs())for(memcpy(e,a,T+1<<2);dfs(S);)x--;
    printf("%d\n",x)
}


Compiler output:
a.cc: In function 'int main()':
a.cc:35:21: error: expected ';' before '}' token
   35 |     printf("%d\n",x)
      |                     ^
      |                     ;
   36 | }
      | ~
Language: C++

#include <iostream>
#include <vector>
#include <queue>
#define llint long long
#define inf 1e18

using namespace std;

struct edge{
	llint to, cap, rev;
	edge(llint a, llint b, llint c){
		to = a, cap = b, rev = c;
	}
};

int n;
llint p[100005], q[100005];
llint a[100005], b[100005];

vector<edge> G[100005];
int S, T;
llint level[100005], iter[100005];


void bfs(llint s)
{
	for(int i = 1; i <= T; i++) level[i] = inf;
	level[s] = 0;
	
	queue<int> Q;
	Q.push(s);
	while(Q.size()){
		int v = Q.front();
		Q.pop();
		for(int i = 0; i < G[v].size(); i++){
			int u = G[v][i].to;
			if(G[v][i].cap <= 0 || level[u] < inf) continue;
			level[u] = level[v] + 1;
			Q.push(u);
		}
	}
}

llint dfs(int v, llint f)
{
	if(v == T) return f;
	
	llint ret;
	for(int &i = iter[v]; i < G[v].size(); i++){
		if(level[v] >= level[G[v][i].to] || G[v][i].cap <= 0) continue;
		ret = dfs(G[v][i].to, min(f, G[v][i].cap));
		if(ret > 0){
			G[v][i].cap -= ret;
			G[G[v][i].to][G[v][i].rev].cap += ret;
			return ret;
		}
	}
	return 0;
}

void add_edge(int s, int t, llint cap)
{
	G[s].push_back(edge(t, cap, G[t].size()));
	G[t].push_back(edge(s, 0, G[s].size()-1));
}

llint calc(llint p[], llint a[])
{
	llint ret = 1;
	for(int i = 1; i <= n; i++){
		if(a[i]) continue;
		int v = i;
		do{
			a[v] = ret;
			v = p[v];
		}while(!a[v]);
		ret++;
	}
	return ret-1;
}

int main(void)
{
	cin >> n;
	for(int i = 1; i <= n; i++) cin >> p[i], p[i]++;
	for(int i = 1; i <= n; i++) cin >> q[i], q[i]++;
	
	llint P = calc(p, a), Q = calc(q, b);
	S = P+Q+1, T = P+Q+2;
	
	int ans = 0;
	for(int i = 1; i <= n; i++){
		if(p[i] == i && q[i] == i) ans++;
		else if(p[i] == i) add_edge(P+b[i], T, 1);
		else if(q[i] == i) add_edge(S, a[i], 1);
		else{
			add_edge(P+b[i], a[i], 1);
			if(p[i] == q[i]) add_edge(a[i], P+b[i], 1);
		}
	}
		
	llint flow;
	while(1){
		bfs(S);
		if(level[T] >= inf) break;
		for(int i = 1; i <= T; i++) iter[i] = 0;
		while(1){
			flow = dfs(S, inf);
			if(flow <= 0) break;
			ans += flow;
		}
	}
	cout << n-ans << endl;
	
	return 0;
}

Compiler output:
a.cc: In function 'long long int dfs(int, long long int)':
a.cc:49:28: error: cannot bind non-const lvalue reference of type 'int&' to a value of type 'long long int'
   49 |         for(int &i = iter[v]; i < G[v].size(); i++){
      |                      ~~~~~~^
Language: C++

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
struct edge {int to; long long int cap; int rev;} ;

vector<edge> G[200020];
int level[200020];
int iter[200020];
 
void add_edge(int from, int to, long long int cap){
	edge e;
	e.to=to, e.cap=cap, e.rev=G[to].size();
	G[from].push_back(e);
	e.to=from, e.cap=0, e.rev=G[from].size()-1;
	G[to].push_back(e);
}
 
void bfs(int s){
	memset(level, -1, sizeof(level));
	queue<int> que;
	level[s]=0;
	que.push(s);
	while(!que.empty()){
		int v=que.front();
		que.pop();
		for(int i=0; i<G[v].size(); i++){
			edge e=G[v][i];
			if(e.cap>0 && level[e.to]<0){
				level[e.to]=level[v]+1;
				que.push(e.to);
			}
		}
	}
}
 
long long int dfs(int v, int t, long long int f){
	if(v==t) return f;
	for(int &i=iter[v]; i<G[v].size(); i++){
		edge &e=G[v][i];
		if(e.cap>0 && level[v]<level[e.to]){
			long long int d=dfs(e.to, t, min(f, e.cap));
			if(d>0){
				e.cap-=d;
				G[e.to][e.rev].cap+=d;
				return d;
			}
		}
	}
	return 0;
}
 
long long int max_flow(int s, int t){
	long long int flow=0;
	while(1){
		bfs(s);
		if(level[t]<0) return flow;
		memset(iter, 0, sizeof(iter));
		long long int f;
		while((f=dfs(s, t, INF))>0){
			flow+=f;
		}
	}
}
const ll INF=1e16;
int main()
{
	int n;
	cin>>n;
	int p[100010], q[100010], indp[100010], indq[100010];
	for(int i=0; i<n; i++){
		cin>>p[i];
		indp[p[i]]=i;
	}
	for(int i=0; i<n; i++){
		cin>>q[i];
		indq[q[i]]=i;
	}
	int s=2*n, t=2*n+1;
	for(int i=0; i<n; i++){
		add_edge(i, n+i, 1);
		if(p[i]==q[i]) add_edge(n+i, i, 1);
		//add_edge(i, t, 0);
		if(p[i]==i) add_edge(s, i, INF);
		//else add_edge(s, i, 0);
		//add_edge(s, n+i, 0);
		if(q[i]==i) add_edge(n+i, t, INF);
		//else add_edge(n+i, t, 0);
	}
	for(int i=0; i<n; i++){
		add_edge(i, indp[i], INF);
	}
	for(int i=0; i<n; i++){
		add_edge(n+indq[i], n+i, INF);
	}
	cout<<n-max_flow(s, t)<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'long long int max_flow(int, int)':
a.cc:80:36: error: 'INF' was not declared in this scope
   80 |                 while((f=dfs(s, t, INF))>0){
      |                                    ^~~
Language: C

#include<stdio.h>
#include<stdlib.h>

int p[100000];

int main(void)
{
	int n, q, c = 0;

	scanf_s("%d", &n);
    
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &p[i]);
	}

	for (int j = 0; j < n; j++)
	{
		scanf("%d", &q);

		if (p[j] != q || p[j] != j)
		{
			c++;
		}
	}

	printf("%d", c);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   10 |         scanf_s("%d", &n);
      |         ^~~~~~~
      |         scanf
Language: Java

import java.util.*;
public class Main {

    public static void main(String[] args) {
	    Scanner sc = new Scanner(System.in);
        String st = sc.next();
        String Sunny, Cloudy, Rainy;
        if(st.equals(Sunny)){
            System.out.print("Cloudy");
        }else if(st.equals(Cloudy)){
            System.out.print("Rainy");
        }else{
            System.out.print("Sunny");
        }
    }
}

Compiler output:
Main.java:8: error: variable Sunny might not have been initialized
        if(st.equals(Sunny)){
                     ^
Main.java:10: error: variable Cloudy might not have been initialized
        }else if(st.equals(Cloudy)){
                           ^
2 errors
Language: Java

import java.util.*;
public class main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String a=sc.next();
		if(a.equals("Sunny")) {
			System.out.print("Cloudy");
		}
		if(a.equals("Cloudy")) {
			System.out.print("Rainy");
		}
		if(a.equals("Rainy")) {
			System.out.print("Sunny");
		}
	}

}


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

#include<bits/stdc++.h>
int main(){
string s;
  cin>>s;
  s=="Sunny"?cout<<"Cloudy":(s=="Cloudy"?cout<<"Rainy":cout<<"Sunny");
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:1: error: 'string' was not declared in this scope
    3 | string s;
      | ^~~~~~
a.cc:3:1: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    4 |   cin>>s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:4:8: error: 's' was not declared in this scope
    4 |   cin>>s;
      |        ^
a.cc:5:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 |   s=="Sunny"?cout<<"Cloudy":(s=="Cloudy"?cout<<"Rainy":cout<<"Sunny");
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
    string s;
    cin >> s;
    if (s == "Sunny")
        cout << "Cloudy" << endl;
    else if (s == "Cloudy") {
        cout << "Rainy" << ednl;
    } else {
        cout << "Sunny" << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: 'ednl' was not declared in this scope
   11 |         cout << "Rainy" << ednl;
      |                            ^~~~
Language: C++

#include<bits/stdc++.h>  
#include<random>  
#define int long long  
#define pp pair<int,int>  
#define ss second  
#define ff first  
#define pb push_back  
#define mod 1000000007  
using namespace std;  
void fastio()  
{    
  
  #ifndef ONLINE_JUDGE                  
  freopen("INPUT.txt","r",stdin);              
  freopen("OUTPUT.txt","w",stdout);              
  #endif    
     ios_base :: sync_with_stdio(false);   
     cin.tie(NULL) ;                             
      cout.tie(NULL);                              
   } 
   
signed main()  {    
        fastio();         
         int t=1;           
          // cin>>t;                
           while(t--)                  
              {                        
                string s,t;                          
                cin>>s;
                if(s=="Rainy")        
                t="Sunny"       ;
                else if(s="Sunny")    
                t="Cloudy ;
                else
                t="Rainy";
                 cout<<t;
                        
             }          
    }     

Compiler output:
a.cc:33:19: warning: missing terminating " character
   33 |                 t="Cloudy ;
      |                   ^
a.cc:33:19: error: missing terminating " character
   33 |                 t="Cloudy ;
      |                   ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:32:26: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"Sunny"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   32 |                 else if(s="Sunny")
      |                         ~^~~~~~~~
      |                          |
      |                          std::__cxx11::basic_string<char>
a.cc:34:17: error: expected primary-expression before 'else'
   34 |                 else
      |                 ^~~~
Language: C++

#include<bits/stdc++.h>  #include<random>  
#define int long long  
#define pp pair<int,int>  
#define ss second  
#define ff first  
#define pb push_back  
#define mod 1000000007  
using namespace std;  
void fastio()  
{    
  
  #ifndef ONLINE_JUDGE                  
  freopen("INPUT.txt","r",stdin);              
  freopen("OUTPUT.txt","w",stdout);              
  #endif    
     ios_base :: sync_with_stdio(false);   
     cin.tie(NULL) ;                             
      cout.tie(NULL);                              
   } 
   
signed main()  {    
        fastio();         
         int t=1;           
          // cin>>t;                
           while(t--)                  
              {                        
                string s,t;                          
                cin>>s;
                if(s=="Rainy")        
                t="Sunny"       ;
                else if(s="Sunny")    
                t="Cloudy ;
                else
                t="Rainy";
                 cout<<t;
                        
             }          
    }     

Compiler output:
a.cc:1:26: warning: extra tokens at end of #include directive
    1 | #include<bits/stdc++.h>  #include<random>
      |                          ^
a.cc:32:19: warning: missing terminating " character
   32 |                 t="Cloudy ;
      |                   ^
a.cc:32:19: error: missing terminating " character
   32 |                 t="Cloudy ;
      |                   ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:31:26: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"Sunny"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   31 |                 else if(s="Sunny")
      |                         ~^~~~~~~~
      |                          |
      |                          std::__cxx11::basic_string<char>
a.cc:33:17: error: expected primary-expression before 'else'
   33 |                 else
      |                 ^~~~
Language: C++

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

int main(){
	string s;
	cin >> s;
  	if(s == "Sunny"){
    cout << "Cloudy" << endl; 
    return 0;
    }else if(s == "Cloudy"){
    cout << "Rainy" << endl;
    return 0;
    }else if(s == "Rainy"){
    cout << "Sunny" << endl;
    return 0;
    }
}

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

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main() {
  string a;
  cin>>a;
  if(a=="Sunny"){
    cout<<"Cloudy"<<endl;
  }
  else if(a=="Cloudy"){
    cout<<"Rainy"<<endl;
  }
  else{
    cout<<"Sunny"<<endl;
  }
  return 0;
}
    

  
  
  
      
                        
                        
}


Compiler output:
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

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

int main()
{
    char S[10];

    gets(S);

    if(strcmp(S, "Sunny")==0)printf("Cloudy");
    if(strcmp(S, "Cloudy")==0)printf("Rainy");
    if(strcmp(S, "Rainy")==0)printf("Sunny");

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |     gets(S);
      |     ^~~~
      |     getw
Language: C++

#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, n); for(ll i = 0; i < (ll)n; i++)

int main() {
  vector<string>  S = {"Sunny", "Cloudy", "Rainy"}

  string s; cin >> s;
  if(s==S[0]) cout << S[1] << endl;
  if(s==S[1]) cout << S[2] << endl;
  if(s==S[2]) cout << S[0] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected ',' or ';' before 'string'
   10 |   string s; cin >> s;
      |   ^~~~~~
a.cc:10:20: error: 's' was not declared in this scope
   10 |   string s; cin >> s;
      |                    ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
string a;
cin>>a;
if(a==“Sunny”){cout<<“Cloudy”;}
else if(a==Cloudy){cout<<“Rainy”;}
else{cout<<“Sunny”;}
return 0;
}

Compiler output:
a.cc:6:7: error: extended character “ is not valid in an identifier
    6 | if(a==“Sunny”){cout<<“Cloudy”;}
      |       ^
a.cc:6:7: error: extended character ” is not valid in an identifier
a.cc:6:22: error: extended character “ is not valid in an identifier
    6 | if(a==“Sunny”){cout<<“Cloudy”;}
      |                      ^
a.cc:6:22: error: extended character ” is not valid in an identifier
a.cc:7:26: error: extended character “ is not valid in an identifier
    7 | else if(a==Cloudy){cout<<“Rainy”;}
      |                          ^
a.cc:7:26: error: extended character ” is not valid in an identifier
a.cc:8:12: error: extended character “ is not valid in an identifier
    8 | else{cout<<“Sunny”;}
      |            ^
a.cc:8:12: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:6:7: error: '\U0000201cSunny\U0000201d' was not declared in this scope
    6 | if(a==“Sunny”){cout<<“Cloudy”;}
      |       ^~~~~~~
a.cc:6:22: error: '\U0000201cCloudy\U0000201d' was not declared in this scope
    6 | if(a==“Sunny”){cout<<“Cloudy”;}
      |                      ^~~~~~~~
a.cc:7:12: error: 'Cloudy' was not declared in this scope
    7 | else if(a==Cloudy){cout<<“Rainy”;}
      |            ^~~~~~
a.cc:7:26: error: '\U0000201cRainy\U0000201d' was not declared in this scope
    7 | else if(a==Cloudy){cout<<“Rainy”;}
      |                          ^~~~~~~
Language: C++

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

int main(){
  string S;
  cin >> S;
  switch(S){
   case 'Sunny':    
      cout << 'Cloudy' << endl;
      break;
    case 'Cloudy':
      cout << 'Rainy' << endl;
      break;
    case 'Rainy':
      cout << 'Sunny' << endl;
      break;
    default:
      break;
  }
 return 0; 
}


Compiler output:
a.cc:8:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    8 |    case 'Sunny':
      |         ^~~~~~~
a.cc:9:15: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    9 |       cout << 'Cloudy' << endl;
      |               ^~~~~~~~
a.cc:11:10: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   11 |     case 'Cloudy':
      |          ^~~~~~~~
a.cc:12:15: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   12 |       cout << 'Rainy' << endl;
      |               ^~~~~~~
a.cc:14:10: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   14 |     case 'Rainy':
      |          ^~~~~~~
a.cc:15:15: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   15 |       cout << 'Sunny' << endl;
      |               ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:10: error: switch quantity not an integer
    7 |   switch(S){
      |          ^
Language: C++

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

int main(){
  strign S;
  cin >> S;
  switch(S){
   case 'Sunny':    
      cout << 'Cloudy' << endl;
      break;
    case 'Cloudy':
      cout << 'Rainy' << endl;
      break;
    case 'Rainy':
      cout << 'Sunny' << endl;
      break;
    default:
      break;
  }
 return 0; 
}

Compiler output:
a.cc:8:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    8 |    case 'Sunny':
      |         ^~~~~~~
a.cc:9:15: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    9 |       cout << 'Cloudy' << endl;
      |               ^~~~~~~~
a.cc:11:10: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   11 |     case 'Cloudy':
      |          ^~~~~~~~
a.cc:12:15: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   12 |       cout << 'Rainy' << endl;
      |               ^~~~~~~
a.cc:14:10: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   14 |     case 'Rainy':
      |          ^~~~~~~
a.cc:15:15: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   15 |       cout << 'Sunny' << endl;
      |               ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'strign' was not declared in this scope; did you mean 'strspn'?
    5 |   strign S;
      |   ^~~~~~
      |   strspn
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  string A;
  cin >> A;
  if(A == "Sunny") {
    cout << "Cloudy" << endl;
  }
  if(A == "Cloudy") {
    cout << "Rainy" << endl;
  }
  if(A =- "Rainy") {
    cout << "Sunny" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: wrong type argument to unary minus
   12 |   if(A =- "Rainy") {
      |           ^~~~~~~
Language: C

#include<stdio.h>
#include<string.h>
int main(){
  char a[10];
  scanf("%s",a);
  int l;
  l=lenstr(a);
  if(a[l+1]=='Sunny')
    printf("Cloudy");
  else if(a[l+1]=='Cloudy')
    printf("Rainy");
  else
    printf("Sunny");
}


Compiler output:
main.c: In function 'main':
main.c:7:5: error: implicit declaration of function 'lenstr' [-Wimplicit-function-declaration]
    7 |   l=lenstr(a);
      |     ^~~~~~
main.c:8:14: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    8 |   if(a[l+1]=='Sunny')
      |              ^~~~~~~
main.c:10:19: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   10 |   else if(a[l+1]=='Cloudy')
      |                   ^~~~~~~~
Language: C++

#include<iostrem>
#include<string>
using namespace std;
int main()
{
  string s;
  cin>>s;
  if(s=="Sunny") cout<<"Cloudy";
  if(s=="Cloudy") cout<<"Rainy";
  if(s=="Rainy") cout<<"Sunny";
}
  

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

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

int main() {
  string S;
  cin >> S;
  if(S == "Sunny")cout{
    cout << "Cloudy" <<endl;
  }
  if(S == "Cloudy"){
    cout << "Rainy" <<endl;
  }
  if(S == "Rainy"){
    cout << "Sunny" <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ';' before '{' token
    7 |   if(S == "Sunny")cout{
      |                       ^
      |                       ;
Language: C++

#include <iostream>
#include <stdio.h>
using namespace std;

string S;
int main (){
	cin >> S;
	if(S[0]=="S")cout<< "Cloudy"<<endl;
	if(S[0]=="C")cout<< "Rainy"<<endl;
	if(S[0]=="R")cout<< "Sundy"<< endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if(S[0]=="S")cout<< "Cloudy"<<endl;
a.cc:9:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |         if(S[0]=="C")cout<< "Rainy"<<endl;
a.cc:10:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(S[0]=="R")cout<< "Sundy"<< endl;
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <cassert>
#include <climits>
#include <string>
#include <bitset>
#include <cfloat>
#include <unordered_set>
#pragma GCC optimize("Ofast")
using namespace std;
typedef long double ld;
typedef long long int ll;
typedef unsigned long long int ull;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<ll> vll;
typedef vector<pair<int, int> > vpii;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<ll> > vvll;

#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define irep(it, stl) for (auto it = stl.begin(); it != stl.end(); it++)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define mes(a) cout << (a) << endl
#define dmes(a, b) cout << (a) << " " << (b) << endl
#define re0 return 0
#define mp(p, q) make_pair(p, q)
#define pb(n) push_back(n)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define Sort(a) sort(a.begin(), a.end())
#define rSort(a) sort(a.rbegin(), a.rend())
#define MATHPI acos(-1)
#define itn int;
int dx[8] = { 1, 0, -1, 0, 1, -1, -1, 1 };
int dy[8] = { 0, 1, 0, -1, 1, 1, -1, -1 };
template <class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template <class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
struct io { io() { ios::sync_with_stdio(false); cin.tie(0); } };
const int INF = INT_MAX;
const ll LLINF = 1LL << 60;
const ll MOD = 1000000007;
const double EPS = 1e-9;


signed main(void) 
{
    string s;
    cin >>s;
    if (s = "Sunny") mes("Cloudy");
    if (s = "Cloudy") mes("Rainy");
    if (s = "Rainy") mes("Sunny");
    
    
    
    
    

}


Compiler output:
a.cc: In function 'int main()':
a.cc:65:11: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"Sunny"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   65 |     if (s = "Sunny") mes("Cloudy");
      |         ~~^~~~~~~~~
      |           |
      |           std::__cxx11::basic_string<char>
a.cc:66:11: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"Cloudy"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   66 |     if (s = "Cloudy") mes("Rainy");
      |         ~~^~~~~~~~~~
      |           |
      |           std::__cxx11::basic_string<char>
a.cc:67:11: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"Rainy"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   67 |     if (s = "Rainy") mes("Sunny");
      |         ~~^~~~~~~~~
      |           |
      |           std::__cxx11::basic_string<char>
Language: C

#include <iostream>
#include<cstring>
using namespace std;
int main()
{
string S;
cin>>S;
if (S=="Sunny") 
cout<<"Cloudy"<<endl;
else if (S=="Cloudy") 
cout<<"Rainy"<<endl;
else if (S=="Rainy") 
cout<<"Sunny"<<endl;
return 0;
}



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

#include <iosteram>
#include <string>
using namespace std;

int main(){
  string s;
  cin >> s;
  if(s == "Sunny") cout << "Cloudy" << endl;
  else if(s == "Cloudy") cout << "Rainy" << endl;
  else cout << "Sunny" << endl;
  
  return 0;
}

Compiler output:
a.cc:1:10: fatal error: iosteram: No such file or directory
    1 | #include <iosteram>
      |          ^~~~~~~~~~
compilation terminated.
Language: Java

import java.util.Scanner;

public class Main1.java {

    public static void main(String[] args){
        Scanner reader = new Scanner(System.in);
        String []d={"Sunny","Cloudy","Rainy"};
        String input=reader.next();
       switch(input){
           case  "Sunny":
               {
                   System.out.println("Cloudy");
                   break;
               }
           case  "Cloudy":
               {
                   System.out.println("Rainy");
                   break;
               }
           case  "Rainy":
               {
                   System.out.println("Sunny");
                   break;
               }
        
       }
    }}

Compiler output:
Main.java:3: error: '{' expected
public class Main1.java {
                  ^
1 error
Language: Java

import java.util.Scanner;

public class Main1 {

    public static void main(String[] args){
        Scanner reader = new Scanner(System.in);
        String []d={"Sunny","Cloudy","Rainy"};
        String input=reader.next();
       switch(input){
           case  "Sunny":
               {
                   System.out.println("Cloudy");
                   break;
               }
           case  "Cloudy":
               {
                   System.out.println("Rainy");
                   break;
               }
           case  "Rainy":
               {
                   System.out.println("Sunny");
                   break;
               }
        
       }
    }}

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

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <map>
#include <algorithm>
#include <stdio.h>

int main(){
  std::string s;
  std::cin >> s;

  if(s=="Sunny"){
    std::cout << "Cloudy";
  }else if(s=="Cloudy"){
    std::cout << "Rainy";
  }else{
    std::cout << "Sunny"
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:25: error: expected ';' before '}' token
   18 |     std::cout << "Sunny"
      |                         ^
      |                         ;
   19 |   }
      |   ~
Language: C

#include<stdio.h>
int main()
{
  char a[3]={"Sunny","Cloudy","Rainy"};
  char s[10];
  int i;
  for(i=0;i<3;i++)
  {
    if(a[i]==s)
    {
      puts(a[(i+1)%3]);
      break;
    }
  }
  return(0);
}  
  

Compiler output:
main.c: In function 'main':
main.c:4:22: error: excess elements in 'char[3]' initializer
    4 |   char a[3]={"Sunny","Cloudy","Rainy"};
      |                      ^~~~~~~~
main.c:4:22: note: (near initialization for 'a')
main.c:4:31: error: excess elements in 'char[3]' initializer
    4 |   char a[3]={"Sunny","Cloudy","Rainy"};
      |                               ^~~~~~~
main.c:4:31: note: (near initialization for 'a')
main.c:4:13: warning: initializer-string for array of 'char' is too long
    4 |   char a[3]={"Sunny","Cloudy","Rainy"};
      |             ^
main.c:9:12: warning: comparison between pointer and integer
    9 |     if(a[i]==s)
      |            ^~
main.c:11:13: error: passing argument 1 of 'puts' makes pointer from integer without a cast [-Wint-conversion]
   11 |       puts(a[(i+1)%3]);
      |            ~^~~~~~~~~
      |             |
      |             char
In file included from main.c:1:
/usr/include/stdio.h:714:30: note: expected 'const char *' but argument is of type 'char'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C

#include<stdio.h>
#include<string.h>
#include<conio.h>
int main()
{
  char s[10];
  int i=0,t;
  char a[10][10]={"Sunny","Cloudy","Rainy"};
  printf("Enter todays wheather");
  gets(s);
  while(i<3)
  {
    t=strcmp(a[i],s);
    if(t==0 && i<2)
    {
      puts(a[i+1]);
      break;
    }
    else
    {
      puts(a[0]);
    }
     i++;
  }
  return(0);
}

Compiler output:
main.c:3:9: fatal error: conio.h: No such file or directory
    3 | #include<conio.h>
      |         ^~~~~~~~~
compilation terminated.
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<String> w = new ArrayList<String>();
    w.add("Sunny");
    w.add("Cloudy");
    w.add("Rainy");
    w.add("Sunny");
    System.out.println(w.get(indexOf(s)+1));
  }
}

Compiler output:
Main.java:12: error: cannot find symbol
    System.out.println(w.get(indexOf(s)+1));
                             ^
  symbol:   method indexOf(String)
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<String> w = new ArrayList<String>();
    w.add("Sunny");
    w.add("Cloudy");
    w.add("Rainy");
    w.add("Sunny");
    System.out.println(w.get(indexOf(s)+1);
  }
}


Compiler output:
Main.java:12: error: ')' or ',' expected
    System.out.println(w.get(indexOf(s)+1);
                                          ^
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<String> w = new ArrayList<String>(){
      w.add("Sunny");
      w.add("Cloudy");
      w.add("Rainy");
      w.add("Sunny");
    }
    System.out.println(w.get(indexOf(s)+1);
  }
}


Compiler output:
Main.java:8: error: <identifier> expected
      w.add("Sunny");
           ^
Main.java:8: error: illegal start of type
      w.add("Sunny");
            ^
Main.java:9: error: <identifier> expected
      w.add("Cloudy");
           ^
Main.java:9: error: illegal start of type
      w.add("Cloudy");
            ^
Main.java:10: error: <identifier> expected
      w.add("Rainy");
           ^
Main.java:10: error: illegal start of type
      w.add("Rainy");
            ^
Main.java:11: error: <identifier> expected
      w.add("Sunny");
           ^
Main.java:11: error: illegal start of type
      w.add("Sunny");
            ^
Main.java:12: error: ';' expected
    }
     ^
Main.java:13: error: ')' or ',' expected
    System.out.println(w.get(indexOf(s)+1);
                                          ^
10 errors
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    List<String> w = new ArrayList<String>(){
      add("Sunny");
      add("Cloudy");
      add("Rainy");
      add("Sunny");
    }
    System.out.println(w[indexOf(s)+1]);
  }
}

Compiler output:
Main.java:8: error: invalid method declaration; return type required
      add("Sunny");
      ^
Main.java:8: error: illegal start of type
      add("Sunny");
          ^
Main.java:9: error: invalid method declaration; return type required
      add("Cloudy");
      ^
Main.java:9: error: illegal start of type
      add("Cloudy");
          ^
Main.java:10: error: invalid method declaration; return type required
      add("Rainy");
      ^
Main.java:10: error: illegal start of type
      add("Rainy");
          ^
Main.java:11: error: invalid method declaration; return type required
      add("Sunny");
      ^
Main.java:11: error: illegal start of type
      add("Sunny");
          ^
Main.java:12: error: ';' expected
    }
     ^
9 errors
Language: Java

import java.util.Scanner;
 
public class Main {
  public static void main ( String[] args ) {
 
    Scanner sc = new Scanner ( System.in );
 
    String S = sc.next();
    
    if( "Sunny".equals(S)){
      System.out.println("Cloudy");
    }else if ( "Cloudy".equals(S)){
      System.out.println("Rainy");
    }else( "Rainy".equals(S)){
      System.out.println("Sunny");
    }
  }
}

Compiler output:
Main.java:14: error: not a statement
    }else( "Rainy".equals(S)){
         ^
Main.java:14: error: ';' expected
    }else( "Rainy".equals(S)){
                             ^
2 errors
Language: C++

#include<iostream>
using namespace std;
int main(){
    char S;
    cin >> S;
    if(S == "Sunny"){
        cout << "Cloudy" << endl;
    }
    else if(S == "Cloudy"){
        cout << "Rainy" << endl;
    }
    else{
        cout << "Sunny" << endl;
    }
    
    
    
    
    
    
    
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |     if(S == "Sunny"){
      |        ~~^~~~~~~~~~
a.cc:9:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     else if(S == "Cloudy"){
      |             ~~^~~~~~~~~~~
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    string S;
    
    cin>>S;
    
    if(S[0]=="S"){
       cout<<"Cloudy"<<endl;
    }else if(S[0]=="C")
    cout<<"Rainy"<<endl;
    else
    cout<<"Sunny"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     if(S[0]=="S"){
a.cc:11:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     }else if(S[0]=="C")
Language: C++

#include <iostream>
#include <algorithm>
using namespace std;
int main(void){
    string s;
    cin >> s;
    
    if(s == "Sunny")
        cout << "Cloudy" << endl;
    
    if else(s == "Cloudy")
        cout << "Rainy" << endl;
        
    else
        cout << "Sunny" << endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:8: error: expected '(' before 'else'
   11 |     if else(s == "Cloudy")
      |        ^~~~
      |        (
a.cc:14:5: error: 'else' without a previous 'if'
   14 |     else
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;
int main(void){
    char a,b,c;
    cin>>a>>b>>c;
    if(a==S){
        cout<<"Cloudy"<<endl;
    }else if(a==C){
        cout<<"Rainy"<<endl;
    }else{
        cout<<"Sunny"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'S' was not declared in this scope
    6 |     if(a==S){
      |           ^
a.cc:8:17: error: 'C' was not declared in this scope
    8 |     }else if(a==C){
      |                 ^