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

#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#define BUFSIZE 1000000

char hoge[BUFSIZE] = {0};
long long A,B;
long long V,W,T;

int main(void){
  scanf("%lld %lld",&A ,&V);
  scanf("%d %d",&B ,&W);
  scanf("%d",&T);

printf("%lf"abs

  if(V > W && abs(B-A) <= T*(V-M)){
    printf("YES");
  }else{
    printf("NO");
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:13: error: expected ')' before 'abs'
   16 | printf("%lf"abs
      |       ~     ^~~
      |             )
main.c:24:12: error: expected ';' before '}' token
   24 |   return 0;
      |            ^
      |            ;
   25 | }
      | ~
Language: Java

import java.util.Scanner;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        final int A,V,B,W,T ;
        A = sc.nextInt();
        V = sc.nextInt();
        B = sc.nextInt();
        W = sc.nextInt();
        T = sc.nextInt();
        sc.close();
        int diff = Math.abs(A - B);
        if (Math.abs(V - W) * T >= diff && V - M >0 && B - A > 0){System.out.println("YES");}
        if (Math.abs(V - W) * T >= diff && M - V >0 && A - B > 0){System.out.println("NO");}
        else {System.out.println("NO");}
    }
}

Compiler output:
Main.java:13: error: cannot find symbol
        if (Math.abs(V - W) * T >= diff && V - M >0 && B - A > 0){System.out.println("YES");}
                                               ^
  symbol:   variable M
  location: class Main
Main.java:14: error: cannot find symbol
        if (Math.abs(V - W) * T >= diff && M - V >0 && A - B > 0){System.out.println("NO");}
                                           ^
  symbol:   variable M
  location: class Main
2 errors
Language: C++

#include<iostream>
#include<string>
#include <sstream>
#include <stdio.h>
#include <cmath>
#include <cstdlib>
#include <algorithm> 
 #include <vector> 
using namespace std;
 
int main() {
  long long int A,B,V,W,T;
    cin >> A >> V;
    cin >> B >> W;
    cin >> T;
    if(A =< B){
        for(int i=0;i<T;i++){
        if((A+V*i)>=(B+W*i)){
            cout << "YES" <<endl;
            return 0;
            }
            
        } 
         cout << "NO" <<endl;  
          return 0;
          
    }else{
       
            cout << "NO" <<endl;
             return 0;
       
    }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: expected primary-expression before '<' token
   16 |     if(A =< B){
      |           ^
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int A = sc.nextInt();
    int V = sc.nextInt();
    int B = sc.nextInt();
    int W = sc.nextInt();
    int T = sc.nextInt();
    if((V-W)*T >= B=A) {
      System.out.println("yes");
    }else{
      System.out.println("no");
    }
  }
}

Compiler output:
Main.java:11: error: unexpected type
    if((V-W)*T >= B=A) {
               ^
  required: variable
  found:    value
1 error
Language: C++

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

int main() {
 int64_t a, v, b, w, t; cin >> a >> v >> b >> w >> t;
  int distspeed = v-w;
  bool ans = false;
  if(a>b){
    if(distspeed > 0) {
  cout << "YES" << endl;
  } else {
  cout << "NO" << endl;
  } 
  }else{
    if(distspeed <= 0){
    cout << "NO" << endl;
  } else {
  for(int i = 1; i<= t; i++){
    if(a+distspeed*i >= b){
      ans = true;
    }
    if(ans) break;
  }
  if(ans) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}



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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll; 
const int INF = 0x3f3f3f3f;
const int mod = 1e9+7;
const int N = 1000 + 5;

int main()
{
	ll a,v,b,w,t;
	cin >> a >> v >> b >> w >> t;
	if(a > b)
		x = a - b;
	else
		x = b - a;
	if(v < w)
		cout << "NO" << endl;
	else{
		if((v-w)*t >= x)
			cout << "YES" << endl;	
		else
			cout << "NO" << endl;	
	}
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'x' was not declared in this scope
   13 |                 x = a - b;
      |                 ^
a.cc:15:17: error: 'x' was not declared in this scope
   15 |                 x = b - a;
      |                 ^
a.cc:19:31: error: 'x' was not declared in this scope
   19 |                 if((v-w)*t >= x)
      |                               ^
Language: C++

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

int main() {

  int64_t A, V, B, W, T;
  
  cin >> A >> V >> B >> W >> T;
  
  bool isCatch = false;
  
  // 1秒ごとに座標チェック
  for (int i = 0; i =< T; i++) {
  	A += V;
    B += W;
    
    if (A == B) {
    	isCatch = true;
        break;
    } 
  }
  
  if (isCatch) {
  	cout << "YES" << endl;
  } else {
  	cout << "NO" << endl;
  }   
     
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: expected primary-expression before '<' token
   13 |   for (int i = 0; i =< T; i++) {
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long int

int main(){
    ll a,b,v,w,t,ans=0;
    cin>>a>>v>>b>>w>>t;
    if(a<b) swap(a,b),swap(v,w);
    ll p=a-b,q=w-v;
    if(p<0 && q<0)  p*=-1,Q*=-1;
    if(p>0 && q>0 && p%q==0 && p/q<=t)  ans=1;
    else                    ans=-1;
    if(ans==1)  cout<<"YES"<<endl;
    else        cout<<"NO"<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: 'Q' was not declared in this scope
   10 |     if(p<0 && q<0)  p*=-1,Q*=-1;
      |                           ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define rep_ll(i,n) for(ll i = 0; i < (ll)(n); i++)
using namespace std;
typedef long long ll;
typedef unsigned long long u_ll;
typedef pair<int, int> pair_;
const long double PI = (acos(-1));
const int INF = 1001001001;
const int dx[] = {-1, 0, 1, 0}; const int dy[] = {0, -1, 0, 1};
ll mod = 1000000007;
int main(){
    ll a, b;
    u_ll v, w, t;
    cin >> a >> v;
    cin >> b >> w;
    cin >> t;
    if(a>b){
        int ans=0;
        //if(a==b) ans=1;
        u_ll dis=a-b;
        u_ll bb= dis+t*w;
        u_ll aa= t*v;
        if(bb<aa){
        //for(u_ll i=1;i<t+1;i++){
        //if(dis+i*w==i*v){
        u_ll i=1;
        while(i*w+dis>i*v){
            i++;
        }
        if(i*w+dis==i*v) ans=1;
        }
    }
    else{
        int ans=0;
        //if(a==b) ans=1;
        u_ll dis=b-a;
        u_ll bb= dis+t*w;
        u_ll aa= t*v;
        if(bb<aa){
        //for(u_ll i=1;i<t+1;i++){
        //if(dis+i*w==i*v){
        u_ll i=1;
        while(i*w+dis>i*v){
            i++;
        }
        if(i*w+dis==i*v) ans=1;
        }
    }
//      }
//        else if(aa==bb) ans=1;

        if(ans) cout << "YES";
        else cout << "NO"; 

    //}


    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:12: error: 'ans' was not declared in this scope; did you mean 'abs'?
   53 |         if(ans) cout << "YES";
      |            ^~~
      |            abs
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int A,B,V,W,T;
  cin>>A>>V;
  cin>>B>>W;
  cin>>T;
  if((A>B&&V>W)||(A<B&&V<W)){
    cout<<"NO";
    return 0;
  }
  while(T--){
  if(A==B){
  	cout<<"YES";
    return 0;
  	}
    A+=v;
    B+=W;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:8: error: 'v' was not declared in this scope
   17 |     A+=v;
      |        ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int a,b,c,d,t;
  cin>>a>>b>>c>>d>>t;
  if(a>=c)
  {
  if((a<=(c+(d*t)))
  {
    cout<<"YES";
  }
  else cout<<"NO";
     }
 else
     {
  if((a+(b*t))>=(c+(d*t)))
  {
    cout<<"YES";
  }
  else cout<<"NO";
     }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: expected ';' before '{' token
    9 |   if((a<=(c+(d*t)))
      |                    ^
      |                    ;
   10 |   {
      |   ~                 
a.cc:13:3: error: expected primary-expression before 'else'
   13 |   else cout<<"NO";
      |   ^~~~
a.cc:12:4: error: expected ')' before 'else'
   12 |   }
      |    ^
      |    )
   13 |   else cout<<"NO";
      |   ~~~~
a.cc:9:5: note: to match this '('
    9 |   if((a<=(c+(d*t)))
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  unsigned long long int a,v,b,w,s,k=0;
  cin>>a>>v;
  cin>>b>>w;
  cin>>s;
  if(w>=v && a!=b)
    cout<<"NO";
  else
  if(a<b)
  {
   while(s--)
   { a=a+v;
    b=b+w;
    if(b<=a)
    {
      k=1;
      break;
    }  
  }
  else
  {
     while(s--)
     {
       a=a+v;
       b=b+w;
       if(b>=a)
       {
        k=1;
        break;
       }
     }
  }
      
  if(k==1)
    cout<<"YES";
  else
    cout<<"NO";
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:3: error: expected '}' before 'else'
   23 |   else
      |   ^~~~
a.cc:13:3: note: to match this '{'
   13 |   {
      |   ^
Language: C++

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

int main() {
 int64_t a, v, b, w, t; cin >> a >> v >> b >> w >> t;
  int distspeed = v-w;
  bool ans = false;
  if(distspeed <= 0){
    cout << "NO" << endl;
  } else if(a>=b && distspeed > 0) {
  cout << "YES" << endl;
  } else if(a>b && distspeed <=0){
  cout << "NO" << endl;
  else{
  for(int i = 1; i<= t; i++){
    if(a+distspeed*i >= b){
      ans = true;
    }
    if(ans) break;
  }
  if(ans) cout << "YES" << endl;
    else cout << "NO" << endl;
  }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: expected '}' before 'else'
   14 |   else{
      |   ^~~~
a.cc:12:34: note: to match this '{'
   12 |   } else if(a>b && distspeed <=0){
      |                                  ^
Language: Java

import java.util.*;
 
class Main{
  	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      int A = sc.nextInt();
      int V = sc.nextInt();
      int B = sc.nextInt();
      int W = sc.nextInt();
      int T = sc.nextInt();
      boolean flag = true;
      if(A>B){
        flag = false;
      }
      for(int i=0;i<T;i++){
        if(flag){
        	A += V;
        	B +=W;
        }else{
          A	-= V;
          B -= W;
        }
      }
      if(flag){
        if(A>=B){
          System.out.print("YES");
        }else{
          System.out.print("NO");
        }
      }else{
        if(A<=B){
          System.out.print("YES");
        }else{
          System.out.print("NO");
        }
      }
      
    }
}
import java.util.*;

class Main{
  	public static void main(String args[]){
      Scanner sc = new Scanner(System.in);
      int A = sc.nextInt();
      int V = sc.nextInt();
      int B = sc.nextInt();
      int W = sc.nextInt();
      int T = sc.nextInt();
      boolean flag = true;
      if(A>B){
        flag = false;
      }
      for(int i=0;i<T;i++){
        if(flag){
        	A += V;
        	B +=W;
        }else{
          A	-= V;
          B -= W;
        }
      }
      if(flag){
        if(A>=B){
          System.out.print("YES");
        }else{
          System.out.print("NO");
        }
      }else{
        if(A<=B){
          System.out.print("YES");
        }else{
          System.out.print("NO");
        }
      }
      
    }
}
提出情報

Compiler output:
Main.java:40: error: class, interface, enum, or record expected
import java.util.*;
^
Main.java:79: error: reached end of file while parsing
????
^
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
 
int main(void) {
	ll a,b,v,w,t,tmp;
  	cin >> a >> v >> b >> w >> t;
	if(a <= b) {
        for(ll i = 0; i <= t; ++i) {
          if (a >= b) {
              cout << "YES" << "\n";
              return 0;
          }
          a+=v;
          b+=w;
      }
    }
	if(a >= b) {
        for(ll i = 0; i <= t; ++i) {
          if (a =< b) {
              cout << "YES" << "\n";
              return 0;
          }
          a+=v;
          b+=w;
      }
    }
	cout << "NO" << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:18: error: expected primary-expression before '<' token
   20 |           if (a =< b) {
      |                  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  long long a,v,b,w,t;
  cin>>a>>v>>b>>w>>t;
  bool c=false;
   for (int i = 0; i < t; i++) {
     a=a+v;
     b=b+w
     if(a==b ||a>b){
       c=true;
        break;
     }
   }
  if(c){
    cout<<"YES"<<endl;
  }
  else{
    cout<<"NO"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: expected ';' before 'if'
   10 |      b=b+w
      |           ^
      |           ;
   11 |      if(a==b ||a>b){
      |      ~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  unsigned long long int a,v,b,w,s,k=0;
  cin>>a>>v;
  cin>>b>>w;
  cin>>s;
  if(w>=v && a!=b)
    cout<<"NO";
  else
    if(a<b)
  {
  while(s--)
  { a=a+v;
    b=b+w;
    if(b<=a)
    {
      k=1;
      break;
    }
    
  }
  else
  {
     while(s--)
     {
       a=a+v;
       b=b+w;
       if(b>=a)
       {
        k=1;
        break;
       }
     }
  }
  if(k==1)
    cout<<"YES";
  else
    cout<<"NO";
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:3: error: expected '}' before 'else'
   24 |   else
      |   ^~~~
a.cc:13:3: note: to match this '{'
   13 |   {
      |   ^
a.cc: At global scope:
a.cc:42:1: error: expected declaration before '}' token
   42 | }
      | ^
Language: C++

/*
    *****
    @Author: Harith Insider
    *****
*/
#include<bits/stdc++.h>
typedef long long int ll;
typedef long long double ld;
#define pb push_back
#define ff first
#define ss second
#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
void solve()
{
    ld x1,x2,t1,t2,t;
    cin>>x1>>t1>>x2>>t2>>t;
    if(t1==t2)
    {
        if(x1==x2)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
        return;
    }
    ld v=(x1-x2)/(t2-t1);
    if(v<0.0)
        v*=(-1.0);
    if((t2-t1)*v!=(x1-x2))
        v++;
    if(v>0.0 and v<=t)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
}
int main()
{
    fastio;
    solve();
}


Compiler output:
a.cc:8:14: error: 'long long' specified with 'double'
    8 | typedef long long double ld;
      |              ^~~~
Language: C

#include<stdio.h>

int main(){

  long i,j,a,b,v,w,t;
  
  scanf("%ld%ld%ld%ld%ld",&a,&v,&b,&w,&t);
  
  long sa=v-w;
  long dis=b-a;
  if(sa!=0){
  long ds=dis/sa;
  long dsa=dis%sa;
     if(dsa==0 && ds <= t ds >0){
        printf("YES");
       return 0;
     }
  }
  else{
    if(dis==0){
      printf("YES");
      return 0;
    }
  }
  printf("NO");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:14:26: error: expected ')' before 'ds'
   14 |      if(dsa==0 && ds <= t ds >0){
      |        ~                 ^~~
      |                          )
Language: C++

#include<iostream>
using namespace std;
int main() {
    int A, B, V, W, T, kyori;
    cin >> A >> V;
    cin >> B >> W;
    cin >> T;
    kyori = abs(A - B);
    bool seikou = false;
    if (V <= W) {
        seikou = false;
    }
    else {
      if(kyori/(V-W) <= T && kyori % (V-W) = 0){
        seikou == true;
      }else{
        seikou == false;
      }
    }
    if (seikou == true) {
        cout << "YES" << endl;
    }
    else {
        cout << "NO" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: lvalue required as left operand of assignment
   14 |       if(kyori/(V-W) <= T && kyori % (V-W) = 0){
      |          ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
Language: C

#include<stdio.h>

int main(){

  long i,j,a,b,v,w,t;
  
  scanf("%ld%ld%ld%ld%ld",&a,&v,&b,&w,&t);
  
  long sa=v-w;
  long dis=b-a;
  if(sa!==0){
  long ds=dis/sa;
  long dsa=dis%sa;
     if(dsa==0 && ds <= t){
        printf("YES");
       return 0;
     }
  }
  else{
    if(dis==0){
      printf("YES");
      return 0;
    }
  }
  printf("NO");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:10: error: expected expression before '=' token
   11 |   if(sa!==0){
      |          ^
main.c:14:19: error: 'ds' undeclared (first use in this function); did you mean 'dsa'?
   14 |      if(dsa==0 && ds <= t){
      |                   ^~
      |                   dsa
main.c:14:19: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;
int main()
{
	long long int a,b,v,w,f,s,t,p,f,emp,dis;
	cin>>a>>v>>b>>w>>t;
	f=a+v*t;
	s=b+w*t;
	if(v==w)
	f=2;
	else if(v<w)
	f=2;
	else
	{
		p=v-w;
		dis=abs(b-a);
		emp=dis/p;
		if(emp<=t)
		f=1;
		else
		f=2;
	}
	if(f==1)
	cout<<"YES"<<endl;
	else
	cout<<"NO"<<endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:39: error: redeclaration of 'long long int f'
    5 |         long long int a,b,v,w,f,s,t,p,f,emp,dis;
      |                                       ^
a.cc:5:31: note: 'long long int f' previously declared here
    5 |         long long int a,b,v,w,f,s,t,p,f,emp,dis;
      |                               ^
Language: C++

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

long long A, B, V, W, T;

int main()
{
    cin >> A >> B >> V >> W >> T;
    long long vel = W - V;
    if (vel > 0 && abs(A - B) / vel <= T && abs(a - b) % vel == 0)
    {
        cout << "YES\n";
    }
    else
        cout << "NO\n";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:49: error: 'a' was not declared in this scope
   11 |     if (vel > 0 && abs(A - B) / vel <= T && abs(a - b) % vel == 0)
      |                                                 ^
a.cc:11:53: error: 'b' was not declared in this scope
   11 |     if (vel > 0 && abs(A - B) / vel <= T && abs(a - b) % vel == 0)
      |                                                     ^
Language: C++

#include<iostream>
 
int main(void){
  
  int A,B,V,W,T;
  cin << A << V;
  cin << B << W;
  cin << T;
  
  if ( (( A - B) + ( V - W )*T ) >= 0 ){
    cout >> "YES";
  }else{
    cout >> "No";
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin << A << V;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:11:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |     cout >> "YES";
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout >> "No";
      |     ^~~~
      |     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;
#define int long long
 
int32_t main()
{
  int a;int v1;
  int b;int v2;
  cin>>a>>v1>>b>>v2;
  int tim;
  cin>>tim;
  
  int diff=b-a;
  int speed=v1-v2;
  if(v1==v2)
  {
    cout<<"NO"<<endl;
    return 0;
  }
  double ans=(diff*1.0)/speed;
  int p=(floor)ans;
  
  
  if((ans<=tim)&&(ans>0)&&(ans==p))
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:21:15: error: cannot resolve overloaded function 'floor' based on conversion to type 'long long int'
   21 |   int p=(floor)ans;
      |               ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
	long long int a,b,v,w,f,s,t;
	cin>>a>>v>>b>>w>>t;
	f=a+v*t;
	s=b+w*t;
	if(v==w)
	f=2;
	else if(v<w)
	f=2;
	else
	{
		p=v-w;
		dis=abs(b-a);
		emp=dis/p;
		if(emp<=t)
		f=1;
		else
		f=2;
	}
	if(f==1)
	cout<<"YES"<<endl;
	else
	cout<<"NO"<<endl;
	
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: 'p' was not declared in this scope
   15 |                 p=v-w;
      |                 ^
a.cc:16:17: error: 'dis' was not declared in this scope; did you mean 'div'?
   16 |                 dis=abs(b-a);
      |                 ^~~
      |                 div
a.cc:17:17: error: 'emp' was not declared in this scope
   17 |                 emp=dis/p;
      |                 ^~~
Language: C

#include<stdio.h>
int main(){
  long a,v,b,w,t;
  scanf("%ld %ld",&a,&v);
  scanf("%ld %ld",&b,&w);
  scanf("%ld",&t);
  for(long i=0;i<=t;i++) {
    if (a+v*t==b+w*t) {
      printf("YES");
      break;
    }else{
      printf("NO");
    }
  return 0;
}


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

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

int main()
{
    long double a, b, v, w, t;
    cin >> a >> v >> b >> w >> t;
    if (a > b)
    {
        cout << "NO\n";
        return;
    }
    if (v - w <= 0)
    {
        cout << "NO\n";
        return 0;
    }
    if ((b - a) / (v - w) <= t)
    {
        cout << "YES\n";
    }
    else
    {
        cout << "NO\n";
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
   11 |         return;
      |         ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define int long long
 
int32_t main()
{
  int a;int v1;
  int b;int v2;
  cin>>a>>v1>>b>>v2;
  int tim;
  cin>>tim;
  
  int diff=b-a;
  int speed=v1-v2;
  if(v1==v2)
  {
    cout<<"NO"<<endl;
    return 0;
  }
  double ans=(diff*1.0)/speed;
  double p=(floor)ans;
  
  
  if((ans<=tim)&&(ans>0)&&(ans==p))
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}

Compiler output:
a.cc: In function 'int32_t main()':
a.cc:21:18: error: cannot resolve overloaded function 'floor' based on conversion to type 'double'
   21 |   double p=(floor)ans;
      |                  ^
Language: C++

/*
    *****
    @Author: Harith Insider
    *****
*/
#include<bits/stdc++.h>
typedef long long int ll;
typedef long double ld;
#define pb push_back
#define ff first
#define ss second
#define fastio ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
void solve()
{
    ll x1,x2,t1,t2,t;
    cin>>x1>>t1>>x2>>t2>>t;
    if(t1==t2)
    {
        if(x1==x2)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
        return;
    }
    ll v=(x1-x2)/(t2-t1);
    v=abs(v)
    if(v>=0 and v<=t)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
}
int main()
{
    fastio;
    solve();
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:27:13: error: expected ';' before 'if'
   27 |     v=abs(v)
      |             ^
      |             ;
   28 |     if(v>=0 and v<=t)
      |     ~~       
a.cc:30:5: error: 'else' without a previous 'if'
   30 |     else
      |     ^~~~
Language: C++

#include<ctdio>
 
int main(void){
  
  int A,B,V,W,T;
  cin << A << V;
  cin << B << W;
  cin << T;
  
  if ( (( A - B) + ( V - W )*T ) >= 0 ){
    cout >> "YES";
  }else{
    cout >> "No";
  }
  
  return 0;
}

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

#include<stdio.h>
int main(){
  long a,v,b,w,t;
  scanf("%ld %ld",&a,&v);
  scanf("%ld %ld",&b,&w);
  scanf("%ld",&t);
  for(long i=0;i<=t;i++) {
    if (a+v*t=b+w*t) {
      printf("YES");
      break;
    }else{
      printf("NO");
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:14: error: lvalue required as left operand of assignment
    8 |     if (a+v*t=b+w*t) {
      |              ^
main.c:15:1: error: expected declaration or statement at end of input
   15 | }
      | ^
Language: C

#include<stdio.h>

int main(){

  long i,j,a,b,v,w,t;
  
  scanf("%ld%ld%ld%ld%ld",&a,&v,&b,&w,&t);
  
  long sa=v-w;
  long dis=b-a;
  if(sa!==0){
  long ds=dis/sa,dsa=dis%sa;
     if(dsa==0 && ds <= t){
        printf("YES");
       return 0;
     }
  }
  else{
    if(dis==0){

      printf("YES");
      return 0;
    }
  }
  printf("NO");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:10: error: expected expression before '=' token
   11 |   if(sa!==0){
      |          ^
main.c:13:9: error: 'dsa' undeclared (first use in this function); did you mean 'sa'?
   13 |      if(dsa==0 && ds <= t){
      |         ^~~
      |         sa
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:19: error: 'ds' undeclared (first use in this function); did you mean 'dis'?
   13 |      if(dsa==0 && ds <= t){
      |                   ^~
      |                   dis
Language: C

#include<stdio.h>
int main(){
  long a,v,b,w,t;
  scanf("%ld %ld",&a,&v);
  scanf("%ld %ld",&b,&w);
  scanf("%ld",&t);
  for(int i=0;i<=t;i++) {
    if (a+v*t=b+w*t) {
      printf("YES");
      break;
    }else{
      printf("NO");
    }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:14: error: lvalue required as left operand of assignment
    8 |     if (a+v*t=b+w*t) {
      |              ^
main.c:15:1: error: expected declaration or statement at end of input
   15 | }
      | ^
Language: C++


#includes<ctdio>

int main(void){
  
  int A,B,V,W,T;
  cin << A << V;
  cin << B << W;
  cin << T;
  
  if ( (( A - B) + ( V - W )*T ) >= 0 ){
    cout >> "YES";
  }else{
    cout >> "No";
  }
  
  return 0;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #includes; did you mean #include?
    2 | #includes<ctdio>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin << A << V;
      |   ^~~
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout >> "YES";
      |     ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout >> "No";
      |     ^~~~
Language: C

#include<stdio.h>
 
void main(){
  int a,v,b,w,t,aa,bb;
  scanf("%d %d %d %d %d",&a,&v,&b,&w,&t);
  if(a>b){
    aa= a - v*t;
    bb= b - W*t;
    if(aa<=bb){
      printf("YES");
    }else{
      printf("NO");
    }
  }else{
    aa= a + v*t;
    bb= b + w*t;
    if(aa>=bb){
      printf("YES");
    }else{
      printf("NO");
    }
  }
}

Compiler output:
main.c: In function 'main':
main.c:8:13: error: 'W' undeclared (first use in this function)
    8 |     bb= b - W*t;
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;

public class Main{
 public  static void main(String args[]) throws Exception{
   Scanner sc = new Scanner(System.in);
   long A = sc.nextLong();
   long V = sc.nextLong();
   long B = sc.nextLong();
   long  W = sc.nextLong();
   long  T = sc.nextLong();
   long chati = (V-W)*T
   if ((B-A) < chati) {
     System.out.println("YES");
   } else {
     System.out.println("NO")
   }
 }
}

Compiler output:
Main.java:11: error: ';' expected
   long chati = (V-W)*T
                       ^
Main.java:15: error: ';' expected
     System.out.println("NO")
                             ^
2 errors
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
 
int main(void) {
	ll a,b,v,w,t,tmp;
  	cin >> a >> v >> b >> w >> t;
	if(a > b) {
    	tmp = a;
      	a = b;
      	b = tmp;
      	tmp = v;
      	v = w;
      	w = tmp;
    }
  	for(ll i = 0; i <= t; ++i) {
    	if (a >= b) {
        	cout << "YES" << "\n";
        	return 0;
        }
      	a+=v;
      	b+=w;
    }
	cout << "NO" << "\n";
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
 
int main(void) {
	ll a,b,v,w,t;
  	cin >> a >> v >> b >> w >> t;
	if(a > b) {
    	tmp = a;
      	a = b;
      	b = tmp;
      	tmp = v;
      	v = w;
      	w = tmp;
    }
  	for(ll i = 0; i <= t; ++i) {
    	if (a >= b) {
        	cout << "YES" << "\n";
        	return 0;
        }
      	a+=v;
      	b+=w;
    }
	cout << "NO" << "\n";
	return 0;
}
提出情報
提出日時	2020-06-13 21:30:32
問題	B - Tag
ユーザ	retch
言語

Compiler output:
a.cc:31:5: error: redefinition of 'int main()'
   31 | int main(void) {
      |     ^~~~
a.cc:5:5: note: 'int main()' previously defined here
    5 | int main(void) {
      |     ^~~~
a.cc: In function 'int main()':
a.cc:35:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
   35 |         tmp = a;
      |         ^~~
      |         tm
a.cc: At global scope:
a.cc:53:1: error: '\U000063d0\U000051fa\U000060c5\U00005831' does not name a type
   53 | 提出情報
      | ^~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
 
int main(void) {
	ll a,b,v,w,t;
  	cin >> a >> v >> b >> w >> t;
	if(a > b) {
    	tmp = a;
      	a = b;
      	b = tmp;
      	tmp = v;
      	v = w;
      	w = tmp;
    }
  	for(ll i = 0; i <= t; ++i) {
    	if (a >= b) {
        	cout << "YES" << "\n";
        	return 0;
        }
      	a+=v;
      	b+=w;
    }
	cout << "NO" << "\n";
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'tmp' was not declared in this scope; did you mean 'tm'?
    9 |         tmp = a;
      |         ^~~
      |         tm
Language: C

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

int main(void) {

  int a, b;
  int v, w;
  int t;
  int e1=pow(10, -9), e2=pow(10, 9);
  int aa, bb; //移動後

  scanf("%d%d\n", &a, &v);
  scanf("%d%d\n", &b, &w);
  scanf("%d", &t);

  if ((a<e1)||(e2<a)||(b<e1)||(e2<b)||(v<1)||(e2<v)||(w<1)||(e2<w)||(t<1)||(e2<t)||(a==b)) {
    printf("error\n");
    return -1;
  }

  aa = a + v*t;
  bb = b + w*t;

  if (aa>=bb) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }


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

#include<stdio.h>
 
void main(){
  int a,v,b,w,t,aa,bb;
  scanf("%i %i %i %i %i",a,v,b,w,t);
  if(a>b){
    aa= a - v*t;
    bb= b - W*t;
    if(aa<=bb){
      printf("YES");
    }else{
      printf("NO");
    }
  }else{
    aa= a + v*t;
    bb= b + w*t;
    if(aa>=bb){
      printf("YES");
    }else{
      printf("NO");
    }
  }
}

Compiler output:
main.c: In function 'main':
main.c:8:13: error: 'W' undeclared (first use in this function)
    8 |     bb= b - W*t;
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int main(){

  long i,j,a,b,v,w,t;
  
  scanf("%ld%ld%ld%ld%ld",&a,&v,&b,&w,&t);
  
  long sa=v-w;
  long dis=b-a;
  long ds=dis/sa,dsa=dis%sa;
  if(sa!=0){
     if(disa==0 && ds <= t){
        printf("YES");
       return 0;
     }
  }
  printf("NO");
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:9: error: 'disa' undeclared (first use in this function); did you mean 'dsa'?
   13 |      if(disa==0 && ds <= t){
      |         ^~~~
      |         dsa
main.c:13:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main(){
  long long int a,b,A,B;
  long long int t;
  cin >> a >> A >> b >> B >> t;
  if(a == b) cout << "YES" << endl;
  else{
    if(A == B) cout << "NO" << endl;
    else{
      if(A < B) cout << "NO" << endl;
      else{
        #if(b > a){
          if(A*t+b-a>=B*t) cout << "YES"<< endl;
          else cout << "NO" << endl;
        #}
        #else{
          #if(A*t+a-b>=B*t) cout << "YES"<< endl;
          #else cout << "NO" << endl;
        #}
      }
    }
  }
}

Compiler output:
a.cc:14:19: error: token "{" is not valid in preprocessor expressions
   14 |         #if(b > a){
      |                   ^
a.cc:18:14: warning: extra tokens at end of #else directive [-Wendif-labels]
   18 |         #else{
      |              ^
a.cc:19:29: error: missing binary operator before token "cout"
   19 |           #if(A*t+a-b>=B*t) cout << "YES"<< endl;
      |                             ^~~~
a.cc:20:17: warning: extra tokens at end of #else directive [-Wendif-labels]
   20 |           #else cout << "NO" << endl;
      |                 ^~~~
a.cc:21:10: error: invalid preprocessing directive #}
   21 |         #}
      |          ^
a.cc:19: error: unterminated #else
   19 |           #if(A*t+a-b>=B*t) cout << "YES"<< endl;
a.cc:14: error: unterminated #else
   14 |         #if(b > a){
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
	long long double a,v,b,w,t;
	cin>>a>>v>>b>>w>>t;
	v=v-w;
	if((t-(b-a)/v)>=0) cout<<"YES";
	else cout<<"NO"; 
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:4:14: error: 'long long' specified with 'double'
    4 |         long long double a,v,b,w,t;
      |              ^~~~
a.cc:4:14: error: 'long long' specified with 'double'
a.cc:4:14: error: 'long long' specified with 'double'
a.cc:4:14: error: 'long long' specified with 'double'
a.cc:4:14: error: 'long long' specified with 'double'
Language: C++

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

int main() {
  ll a, b, v, w, t, temp1, temp2, dist, speed;
  string ans;
  cin >> a >> v >> b >> w >> t;
  
  if(a > b){
    temp1 = a;
    a = b;
    b = temp1;
    
    temp2 = v;
    v = w;
    w = temp2;
  }
  
  dist = b - a;
  speed = v - w;
  
  if(speed * t >= dist){
    ans = "YES";
  }
  else{
    ans = "NO";
  }
  
  
  
  //cout << "dist:" << dist << "speed:" << speed << "time:" << t << endl;
  cout << ans << endl;
}


Compiler output:
a.cc:5:4: error: expected ';' before 'main'
    5 | int main() {
      |    ^~~~~
      |    ;
Language: C++

#include<iostream>
using namespace std;
int main(){
  int A;
  int B;
  int C;
  int D;
  int E;
  cin>>A>>B>>C>>D>>E;
  string S="NO";
  
  int F=A-C;
  if(F<0){
    F=-F;
  }
  if(F<=(B-D)*E){
    S="YES";
  }
  if(B=<D){
    S="NO";
  }
  cout<<S<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:8: error: expected primary-expression before '<' token
   19 |   if(B=<D){
      |        ^
Language: C++

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

int main() {
 int64_t a, v, b, w, t; cin >> a >> v >> b >> w >> t;
  int distspeed = v-w;
  bool ans = false;
  if(distspeed <= 0){
    cout << "NO" << endl;
  } else{
  for(int i = 1; i<= t; i++){
    if(a+distspeed*i == b){
      ans = true;
    }
    if(ans) break;
  }
  if(ans) cout << "YES" << endl;
    else cout << "NO" << endl;
  }

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

#include<bits/stdc++.h>
using namespace std;
#define fi(a) scanf("%d",&a);
#define fli(a) scanf("%ld",&a);
#define fll(a) scanf("%lld",&a);
#define pi(a) printf("%d\n",a);
#define ppi(i,a) printf("Case %d: %d\n",i,a);
#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

int main()
{
    bool flag = false;
    fast
    ll a,v,b,w,t,x,y,xx,yy;
    cin >> a >> v >> b >> w >> t;
    x = a + v*t;
    y = b + w*t;

    xx = a - v*t;
    yy = b - w*t;
    if(a<0 && b>)
    if(x>=y) cout << "YES\n";
    else if(yy>=xx) cout << "YES\n";
    else cout << "NO\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: expected primary-expression before ')' token
   22 |     if(a<0 && b>)
      |                 ^
Language: C++

#include<iostream>
using namespace std;
#define endl "\n"
#define ll long long
const int N = 1e5 + 5;
ll a[N];
const unsigned int M = 1000000007;
 
int main()
{
  ll A,B,V,W,T;
  
  cin>>A>>V;
  cin>>B>>W;
  cin>>T;
      while(T--)
      {
        A=A+V;
        B=B+W;
        if(A==B)
        {  cout<<"YES";
           return;
         }

      }
      cout<<"NO";
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:12: error: return-statement with no value, in function returning 'int' [-fpermissive]
   22 |            return;
      |            ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define fi(a) scanf("%d",&a);
#define fli(a) scanf("%ld",&a);
#define fll(a) scanf("%lld",&a);
#define pi(a) printf("%d\n",a);
#define ppi(i,a) printf("Case %d: %d\n",i,a);
#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

int main()
{
    bool flag = false;
    fast
    ll a,v,b,w,t,x,y;
    cin >> a >> v >> b >> w >> t;
    x = a + v*t;
    y = b + w*t;

    xx = a - v*t;
    yy = b - w*t;
    if(a<0 && b>)
    if(x>=y) cout << "YES\n";
    else if(yy>=xx) cout << "YES\n";
    else cout << "NO\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:5: error: 'xx' was not declared in this scope; did you mean 'x'?
   20 |     xx = a - v*t;
      |     ^~
      |     x
a.cc:21:5: error: 'yy' was not declared in this scope; did you mean 'y'?
   21 |     yy = b - w*t;
      |     ^~
      |     y
a.cc:22:17: error: expected primary-expression before ')' token
   22 |     if(a<0 && b>)
      |                 ^
Language: C

#include <stdio.h>

int main() {
	int a, v, b, w, t, k = 0;
	unsigned long long aa = 0, bb = 0;
	scanf("%d%d", &a, &v);
	scanf("%d%d", &b, &w);
	scanf("%d", &t);
    aa = a + v * t;
	bb = b + w * v;
	if (aa > bb)printf("YES");
	else printf("NO");
        }
	return 0;
}


Compiler output:
main.c:14:9: error: expected identifier or '(' before 'return'
   14 |         return 0;
      |         ^~~~~~
main.c:15:1: error: expected identifier or '(' before '}' token
   15 | }
      | ^
Language: C

#include<stdio.h>

void main(){
  int a,v,b,w,t,aa,bb;
  scanf("%d %d %d %d %d",a,v,b,w,t);
  if(a>b){
    aa= a - v*t;
    bb= b - W*t;
    if(aa<=bb){
      printf("YES");
    }else{
      printf("NO");
    }
  }else{
    aa= a + v*t;
    bb= b + w*t;
    if(aa>=bb){
      printf("YES");
    }else{
      printf("NO");
    }
  }
}

Compiler output:
main.c: In function 'main':
main.c:8:13: error: 'W' undeclared (first use in this function)
    8 |     bb= b - W*t;
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.Scanner;

public class Main9 {

	public static void main(String[] args) {
		try(Scanner scanner = new Scanner(System.in)) {
			String data1 = scanner.nextLine();
			String data2 = scanner.nextLine();
			String data3 = scanner.nextLine();

			String[] data1Array = data1.split(" ");
			String[] data2Array = data2.split(" ");

			long startPosA = Long.parseLong(data1Array[0]);
			long moveDisA = Long.parseLong(data1Array[1]);
			long startPosB = Long.parseLong(data2Array[0]);
			long moveDisB = Long.parseLong(data2Array[1]);
			long time = Long.parseLong(data3);

			boolean isCatch = false;
			for (int i = 1; i <= time; i++) {
				startPosA += moveDisA;
				startPosB += moveDisB;

				if (startPosA >= startPosB) {
					isCatch = true;
					break;
				}
			}

			System.out.println(isCatch ? "YES" : "NO");
		}
	}
}

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

import java.util.Scanner;

public class Main1 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long A = sc.nextLong();
		long V = sc.nextLong();
		long B = sc.nextLong();
		long W = sc.nextLong();
		long T = sc.nextLong();

		boolean catched = false;

		long dist = Math.abs(A - B);
		long dv = V - W;

		if (dv <= 0) {
			catched = false;
		} else if (dv >= dist / T) {
			catched = true;
		}

		if (catched) {
			System.out.println("YES");
		} else {
			System.out.println("NO");
		}

		sc.close();
	}
}


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<algorithm>
#include<climits>
#include<string>

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

using namespace std;

int main()
{
	long long int a,v,b,w,t;
	cin >> a >> v;
	cin >> b >> w;
	cin >> t;

	while(t > 0){
		a += v;
		b += w;
		cout << a << ' ' << b << ' ' << t << endl;
		if(a == b){
			cout << "YES" << endl;
			return 0;
		else if(a > b)
			break;
		}
		t--;
	}
	cout << "NO" << endl;


}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: expected '}' before 'else'
   24 |                 else if(a > b)
      |                 ^~~~
a.cc:21:27: note: to match this '{'
   21 |                 if(a == b){
      |                           ^
a.cc: At global scope:
a.cc:29:9: error: 'cout' does not name a type
   29 |         cout << "NO" << endl;
      |         ^~~~
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: C++

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


int main(){
  int A, B, V, W, T;
  cin >> A >> V >> B >> W >> T;
  

    if(V-W == 0){
        cout << "NO";
        return 0;
    }

  if(A<=B){
    float t = (B-A)/(V-W);
    if(t<0){
        cout << "NO";
        return 0;
    }
    if(t<=T){
      cout << "YES";
      return 0;
    }else{
      cout <<"NO";
      return 0;
    }

  }else{
    float t = (B-A)/(W-V);
    if(t<0){
        cout << "NO";
        return 0;
    }
    if(t<=T){
      cout << "YES";
      return 0;
    }else{
      cout <<"NO";
      return 0;
    }
    
  }

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

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


int main() {
  int A,V,B,W,T;
  cin >> A >> V >> B >> W >> T;
  
  if(W >= V){
    cout << "NO" <<endl;
  }
  
  else if(A > B){
    if((A-B)/(V-W)<T){
      cout << "YES" <<endl;
    }
    else if((A-B)%(V-W)==0 && (A-B)/(V-W)==T){
      cout << "YES" <<endl;
    }
    else{
      cout << "NO" <<endl;
    }
  }
  else{
    if((B-A))/(V-W)<T){
      cout << "YES" <<endl;
    }
    else if((B-A)%(V-W)==0 && (B-A)/(V-W)==T){
      cout << "YES" <<endl;
    }
    else{
      cout << "NO" <<endl;
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:14: error: expected primary-expression before '/' token
   26 |     if((B-A))/(V-W)<T){
      |              ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;

main(){
    ll a,b,v,w,t;
    cin>>a>>v>>b>>w>>t;
    if(a>b) cout<<"NO";
    else if(a<b){
        a+= v*t;
        b+= w*t;
        if(v<=w) cout<<"NO";
        else if(a>=b) cout<<"YES";
    }
    else{
        if(v < w) cout<<"NO";
        else if(v>=w) cout<<"YES";
    }
}
}

Compiler output:
a.cc:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    7 | main(){
      | ^~~~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^
Language: Java

import java.util.*;
import java.math.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in)){

            long catchNow = Long.parseLong(sc.next());
            long catchSpeed = Long.parseLong(sc.next());
            long helpNow = Long.parseLong(sc.next());
            long helpSpeed = Long.parseLong(sc.next());

            long time = Long.parseLong(sc.next());

            long distance = catchNow - helpNow;
            if(distance < 0) distance = distance * -1;

            long speedDiff = catchSpeed - helpSpeed;

            if(speedDiff <= 0 || noFlg) System.out.println("NO");
            else if(time >= distance/speedDiff){
                System.out.println("YES");                
            }else if(helpNow < -Math.pow(10, 8) || helpNow > Math.pow(10, 8)){
                System.out.println("YES");
            }else{
                System.out.println("NO");
            }

        }catch(Exception e){
            e.printStackTrace();
        }        
    }
}

Compiler output:
Main.java:21: error: cannot find symbol
            if(speedDiff <= 0 || noFlg) System.out.println("NO");
                                 ^
  symbol:   variable noFlg
  location: class Main
1 error
Language: C

#include<stdio.h>

void main(){
  int a,v,b,w,t,aa,bb;
  scanf("%s%s%s%s%s",a,v,b,w,t);
  if(a>b){
    aa= a - v*t;
    bb= b - W*t;
    if(aa<=bb){
      printf("YES");
    }else{
      printf("NO");
    }
  }else{
    aa= a + v*t;
    bb= b + w*t;
    if(aa>=bb){
      printf("YES");
    }else{
      printf("NO");
    }
  }
}

Compiler output:
main.c: In function 'main':
main.c:8:13: error: 'W' undeclared (first use in this function)
    8 |     bb= b - W*t;
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int64_t main() {
  int a, v, b, w, t;
  cin >> a >> v >> b >> w >> t;
  if (abs(a - b) <= t*(v - w)) {
    cout << "YES" << endl;
  }
  else {
    cout << "NO" << endl;
  }
}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | int64_t main() {
      | ^~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
int main(void){
  int A,B,V,W,T;
  scanf("%d %d",&A,&V);
  scanf("%d %d",&B,&W);
  scanf("%d",&T);
  
  //printf("A:%d V:%d B:%d W:%d T:%d\n",A,V,B,W,T);
  int j=V-W;
  int dist=abs(A-B);
  //printf("j:%d dist:%d\n",j,dist);
  if(j<=0){
    puts("NO");
    return 0;
  }
  

  if(j*T>=dist)
    puts("YES");
  else
    puts("NO");
  

Compiler output:
main.c: In function 'main':
main.c:22:5: error: expected declaration or statement at end of input
   22 |     puts("NO");
      |     ^~~~
Language: Java

ソースコード 

Copy
Copy
import java.util.Scanner;
public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        final int A,V,B,W,T ;
        A = sc.nextInt();
        V = sc.nextInt();
        B = sc.nextInt();
        W = sc.nextInt();
        T = sc.nextInt();
        sc.close();
        int diff = Math.abs(A - B);
        if(diff == 0){System.out.println("YES");}
        else if (Math.abs(V - W) * T >= diff && V - W > 0 && B - A > 0){System.out.println("YES");}
        else {System.out.println("NO");}
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
?????? 
^
1 error
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>

using namespace std;

int main()
{    
    int A, B;
    int V, W;
    int T;
    cin >> A >> V;
    cin >> B >> W;
    cin >> T;

    string ans = "NO";

    int dis = abs(A - B);
    
    int dis_minus = (V - M) * T;
    if (dis_minus >= dis) {
        ans = "YES";
    }
    
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:26: error: 'M' was not declared in this scope
   21 |     int dis_minus = (V - M) * T;
      |                          ^