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

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

int main() {
  int N,A;
  cin>>N>>A;
  if((N+500)/500!=(N-A+499)/500!){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:32: error: expected ')' before '!' token
    7 |   if((N+500)/500!=(N-A+499)/500!){
      |     ~                          ^
      |                                )
Language: C++

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

int main() {
 int n,a;
  cin>>n>>a;
 int x=n%500;
  if(x<=a){
    cout<<"Yes";
  }
  else{
    cout<<"No";

}


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

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

int main() {
  int  N,A;
  cin >>N,A;
    if (N/500 > A ){
    cout <<"No" <<end1;
    }
  else if(N/500 <= A){
  cout << "Yes"<<end1;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: 'end1' was not declared in this scope
    8 |     cout <<"No" <<end1;
      |                   ^~~~
a.cc:11:18: error: 'end1' was not declared in this scope
   11 |   cout << "Yes"<<end1;}
      |                  ^~~~
Language: C++

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

int main() {
  int  N,A;
  cin >>N,A;
    if (N/500 > A ){
    cout <<"No" << end1;
    }
  else if(N/500 <= A){
  cout << "Yes"<< end1;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:20: error: 'end1' was not declared in this scope
    8 |     cout <<"No" << end1;
      |                    ^~~~
a.cc:11:19: error: 'end1' was not declared in this scope
   11 |   cout << "Yes"<< end1;}
      |                   ^~~~
Language: C++

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

int main() {
  int  N,A;
  cin >>N,A <<end1;
    if (N/500 > A ){
    cout <<"No" << end1;
    }
  else if(N/500 <= A){
  cout << "Yes"<< emd1;}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'end1' was not declared in this scope
    6 |   cin >>N,A <<end1;
      |               ^~~~
a.cc:11:19: error: 'emd1' was not declared in this scope
   11 |   cout << "Yes"<< emd1;}
      |                   ^~~~
Language: C++

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

int main() {
  int N, A, R;
  cin >> N >> A;

  R = (N / 500);

  if ((N - (500 * R)) > A) {
    cout << "No" << endl;
  }

  else {
    cout << "Yes" << endl;
  }

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 int N,A;
  cin >> N >> A;
  if ((N%500)<=A){
    	cout << "Yes" << endl;
  }
  else {
    cout << "NO" << endl ;
  }
}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
 int N,A;
  cin >> N >> A;
  if ((N%500)<=A){
    	cout << "Yes" << endl;
  }
  else {
    cout << "NO" << endl ;
  }
}

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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  cin A,N;
  
  int a =1 ,b =500;
  

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

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

int main(){
  int N;
  int A;
  int coin500;
  cin >> N >> A;
  coin500 = N/500;
  if (N-500*coin500 > A){
    cout << "No" << endl;
  else{
    cout << "Yes" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: expected '}' before 'else'
   12 |   else{
      |   ^~~~
a.cc:10:25: note: to match this '{'
   10 |   if (N-500*coin500 > A){
      |                         ^
Language: C++

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

int main(){
  int N;
  int A;
  cin >> N >> A;
  coin500 = N/500;
  if (N-500*coin500 > A){
    cout << "No" << endl;
  else{
    cout << "Yes" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'coin500' was not declared in this scope
    8 |   coin500 = N/500;
      |   ^~~~~~~
a.cc:11:3: error: expected '}' before 'else'
   11 |   else{
      |   ^~~~
a.cc:9:25: note: to match this '{'
    9 |   if (N-500*coin500 > A){
      |                         ^
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

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

int main() {
  int N, A;
  cin >> N >> A;

  if (N % 500 <= A {
    cout << "Yes" << endl;
  }
  else{
    cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ')' before '{' token
    8 |   if (N % 500 <= A {
      |      ~            ^~
      |                   )
a.cc:14:1: error: expected primary-expression before '}' token
   14 | }
      | ^
Language: C++

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

int main() {
  int N,A;
  if(N%500=<A)cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected primary-expression before '<' token
    6 |   if(N%500=<A)cout<<"Yes"<<endl;
      |            ^
Language: C++

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

int main() {
  int N,A;
  if(N%500<A)cout<<"Yes"endl;
  else cout<<"No"<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: unable to find string literal operator 'operator""endl' with 'const char [4]', 'long unsigned int' arguments
    6 |   if(N%500<A)cout<<"Yes"endl;
      |                    ^~~~~~~~~
Language: C++

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

int main() {
  int N, B;
  cin >> N, B;
  
  if (N % 500 <= A)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'A' was not declared in this scope
    8 |   if (N % 500 <= A)
      |                  ^
Language: C++

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

int main(){
  int N,A;
  cin >> N >> A;
  if(N < 1 || 10000 < N || A < 0 || A > 1000){
    cout << "error" << endl;
  	exit();
  }
  if(N % 500 <= A)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
    
    
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: too few arguments to function 'void exit(int)'
    9 |         exit();
      |         ~~~~^~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:756:13: note: declared here
  756 | extern void exit (int __status) __THROW __attribute__ ((__noreturn__));
      |             ^~~~
Language: C++

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

int main() {
  int N, A;
  cin >> N >> A;

  if (A>= N % 500){ cout << "Yes" }
  else { cout << " No " }
}
 

Compiler output:
a.cc: In function 'int main()':
a.cc:8:34: error: expected ';' before '}' token
    8 |   if (A>= N % 500){ cout << "Yes" }
      |                                  ^~
      |                                  ;
a.cc:9:24: error: expected ';' before '}' token
    9 |   else { cout << " No " }
      |                        ^~
      |                        ;
Language: C++

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

int main() {
  int A,N;
  cin >> A,N;
  if(N%1000 <=A){
    cout << "Yes" <<
  }
  else{
    cout << "No" <<
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: expected primary-expression before '}' token
    9 |   }
      |   ^
a.cc:12:3: error: expected primary-expression before '}' token
   12 |   }
      |   ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,A,P;
  cin >> N A >> endl;
  P = N&500;
  if (P>A){
    cout << "No" << endl;
  }
  else {
    cout << "Yes" << endl;
  }
}
  


Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: expected ';' before 'A'
    5 |   cin >> N A >> endl;
      |           ^~
      |           ;
Language: C++

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

int main() {
  int a, b;
  cin >> a >> b;
  
  s = a % 500;

  if (a >= 500 && s <= b) {
      cout << "Yes" << endl;
  } else if (a < 500 && a <= b) {
      cout << "Yes" << endl;
  } else {
      cout << "No" << endl;
  }
}


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

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

int main() {
  int a, b;
  cin >> a >> b;

  if (x >= 500) {
    s = x % 500;
    if (s <= b) {
      cout << "Yes" << endl;
  } else if (x < 500 && a <= b) {
      cout << "Yes" << endl;
  } else {
      cout << "No" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 'x' was not declared in this scope
    8 |   if (x >= 500) {
      |       ^
a.cc:9:5: error: 's' was not declared in this scope
    9 |     s = x % 500;
      |     ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int N,A;
    cin>>N>>A;
    if(N%500<==A){
    cout<< "Yes" <<endl;
    }
  else {
  cout<< "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:15: error: expected primary-expression before '=' token
    7 |     if(N%500<==A){
      |               ^
Language: C++

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

int main() {
  int N,A
    cin>>N>>A
    if(N%500<==A){
    cout<< "Yes" <<endl;
    }
  else {
  cout<< "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin>>N>>A
      |     ^~~
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else {
      |   ^~~~
Language: C++

using namespace std;

int main() {
  int A, N;
  
  cin >> N;
  cin >> A;
  int remainder = N % 500; 
	if (remainder <=A)
    	cout << "yes" << endl;
  	else  
    	cout << "no" << endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:10:9: error: 'cout' was not declared in this scope
   10 |         cout << "yes" << endl;
      |         ^~~~
a.cc:10:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:26: error: 'endl' was not declared in this scope
   10 |         cout << "yes" << endl;
      |                          ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:12:9: error: 'cout' was not declared in this scope
   12 |         cout << "no" << endl;
      |         ^~~~
a.cc:12:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:25: error: 'endl' was not declared in this scope
   12 |         cout << "no" << endl;
      |                         ^~~~
a.cc:12:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  int N, A;
  cin >> N >> A;
  N %= 500
  if (N <= A) {
    cout << "YES" << endl;
  }
  else {
    cout << "NO" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: expected ';' before 'if'
    6 |   N %= 500
      |           ^
      |           ;
    7 |   if (N <= A) {
      |   ~~       
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else {
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A, N;
  cin >> N >> A;
  
  if ((N - A) % 500  == 0){
    cout << Yes << endl;
  }
  
  else {
    cout << No << endl;
  }
}
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'Yes' was not declared in this scope
    9 |     cout << Yes << endl;
      |             ^~~
a.cc:13:13: error: 'No' was not declared in this scope; did you mean 'N'?
   13 |     cout << No << endl;
      |             ^~
      |             N
Language: C++

#include<bits/stdc++.h>

int main(){
  int a , b;
  cin >> a;
  cin >> b;
  if(a%500 <= b){
    cout << "Yes" << endl;
  }else{
      cout << "No" << endl;
    }
  }
  


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << "Yes" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout << "Yes" << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:10:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |       cout << "No" << endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |       cout << "No" << endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<bits/stdc++.h>

int main(){
  int a , b;
  cin >> a;
  cin >> b;
  if(a%500 <= b){
    cout << "Yes" << endl;
    else{
      cout << "No" << endl;
    }
  }
  

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout << "Yes" << endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout << "Yes" << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:9:5: error: expected '}' before 'else'
    9 |     else{
      |     ^~~~
a.cc:7:17: note: to match this '{'
    7 |   if(a%500 <= b){
      |                 ^
a.cc:10:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |       cout << "No" << endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |       cout << "No" << endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main() {
  int A, N, B;
  cin>>A>>N;
  B=N%500
  if(A>=B){
    cout<<"yes"<<endl;
  }
  else{
    cout<<"no"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'if'
    7 |   B=N%500
      |          ^
      |          ;
    8 |   if(A>=B){
      |   ~~      
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else{
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int n,a;
int main()
{
    cin>>n>>a;
    if(n%500<=a) cout<<"Yes";
    else cout<<"No";
    return 0；
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: unable to find numeric literal operator 'operator""\U0000ff1b'
    9 |     return 0；
      |            ^~~
a.cc:9:15: error: expected ';' before '}' token
    9 |     return 0；
      |               ^
      |               ;
   10 | }
      | ~
Language: C++

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

int main() {
  int n,a;
  int ans="No";
  for(int i=0;i<=a;i++){
    if((n-i)%500==0) ans="Yes";
  }
  cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    6 |   int ans="No";
      |           ^~~~
      |           |
      |           const char*
a.cc:8:26: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    8 |     if((n-i)%500==0) ans="Yes";
      |                          ^~~~~
      |                          |
      |                          const char*
Language: C++

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

int main(){
  int N, A;
  cin >> N >> A;
  N = N % 500;
  if (N <= A)
  cout << "Yes" << endl;
  else
  cout << "No" << endl;
}

Compiler output:
a.cc:2:17: error: 'str' is not a namespace-name
    2 | using namespace str;
      |                 ^~~
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 >> N >> A;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:9:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |   cout << "Yes" << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    9 |   cout << "Yes" << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 |   cout << "No" << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |   cout << "No" << endl;
      |                   ^~~~
      |                   std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
  int N, A;
  cin >> N >> A;
  N = N % 500;
  if (N <= A)
  cout << "Yes" << endl;
  else
  cout << "No" << endl;
}

Compiler output:
a.cc:2:7: error: stray '#' in program
    2 | using #include<bits/stdc++.h>
      |       ^
a.cc:2:8: error: expected nested-name-specifier before 'include'
    2 | using #include<bits/stdc++.h>
      |        ^~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin >> N >> A;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:10:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   10 |   cout << "Yes" << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:10:20: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   10 |   cout << "Yes" << endl;
      |                    ^~~~
      |                    std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:12:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |   cout << "No" << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:19: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |   cout << "No" << endl;
      |                   ^~~~
      |                   std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main() {
  int N, A;
  cin >> N >> A
  if (N % 500 <= A) {
    cout << "Yes" << endl;
  }
    else {
      cout << "No" << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ';' before 'if'
    6 |   cin >> N >> A
      |                ^
      |                ;
    7 |   if (N % 500 <= A) {
      |   ~~            
a.cc:10:5: error: 'else' without a previous 'if'
   10 |     else {
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int N, A,;
    cin >> N >> A ;
    int b =N % 500;
    if (b =< A) cout << "YES" << endl;　
    else cout << "NO" << endl;
}

Compiler output:
a.cc:8:39: error: extended character 　 is not valid in an identifier
    8 |     if (b =< A) cout << "YES" << endl;　
      |                                       ^
a.cc: In function 'int main()':
a.cc:5:14: error: expected unqualified-id before ';' token
    5 |     int N, A,;
      |              ^
a.cc:8:12: error: expected primary-expression before '<' token
    8 |     if (b =< A) cout << "YES" << endl;　
      |            ^
a.cc:8:39: error: '\U00003000' was not declared in this scope
    8 |     if (b =< A) cout << "YES" << endl;　
      |                                       ^~
Language: C++

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

int main() {
  int x, y,z;
  cin >> x >> y;

  z=x%500;
  if (z <= y) {
    cout << "Yes" << endl;
   else{
      cout << "No" << endl;
    }
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:4: error: expected '}' before 'else'
   11 |    else{
      |    ^~~~
a.cc:9:15: note: to match this '{'
    9 |   if (z <= y) {
      |               ^
a.cc: At global scope:
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

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

int main() {
  int x, y,z;
  cin >> x >> y;

  z=x%500
  if (z <= y) {
    cout << "Yes" << endl;
   else{
      cout << "No" << endl;
    }
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected ';' before 'if'
    8 |   z=x%500
      |          ^
      |          ;
    9 |   if (z <= y) {
      |   ~~
Language: C++

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

int main() {
  int N,A,X;
  cin>>N>>A;
  X=N%500
    
  if (A>=499){
    cout<<"Yes"<<endl;
  }
  else if(A>=X){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'if'
    7 |   X=N%500
      |          ^
      |          ;
    8 | 
    9 |   if (A>=499){
      |   ~~      
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else if(A>=X){
      |   ^~~~
Language: C++

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

int main() {
  int N,A,X;
  cin>>N>>A;
  X=N%500
    
  if (A>=499){
    cout<<"Yes"<<endl;
  }
  else if(A>=X){
    cout<<"Yes"<<endl;
  }
  else{
    cout<<"No"<<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'if'
    7 |   X=N%500
      |          ^
      |          ;
    8 | 
    9 |   if (A>=499){
      |   ~~      
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else if(A>=X){
      |   ^~~~
Language: C++

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

int main() {
  int N,A;
  
  cin >> N >> A;
  
  int X = N % 500

  if (X<=A) {
    cout << "yes" << endl;
  }
  else{
    cout << "no" <<endl;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'if'
   11 |   if (X<=A) {
      |   ^~
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else{
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,A,p500;
  cin >> N;
  cin >> A;
 
  if (N < 500) {
    if (N <= A)
    cout << "Yes" << endl;
	else
      cout<< "No" << endl;
  }
  else{
  p500 = N/500
    if(N - p500*500 <= A)
      cout << "Yes" << endl;
   else
    cout<< "No" <<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:15: error: expected ';' before 'if'
   16 |   p500 = N/500
      |               ^
      |               ;
   17 |     if(N - p500*500 <= A)
      |     ~~         
a.cc:19:4: error: 'else' without a previous 'if'
   19 |    else
      |    ^~~~
Language: C++

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

int main() {
  int N,A,;
  cin>>N>>A;
  
  if (N%500<=A) {
    cout << "yes" << endl;
  }
  else {
    cout << "no" << endl; 
  }
  // ここにプログラムを追記
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: expected unqualified-id before ';' token
    5 |   int N,A,;
      |           ^
Language: C++

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

int main() {
  int N,A,X ;
  cin>>N>>A;
  X=N%500
  
  if (X<=A) {
    cout << "yes" << endl;
  }
  else {
    cout << "no" << endl; 
  }
  // ここにプログラムを追記
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected ';' before 'if'
    7 |   X=N%500
      |          ^
      |          ;
    8 | 
    9 |   if (X<=A) {
      |   ~~      
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else {
      |   ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, A;
  cin >> N >> A;
  if  (N % 500 =< A ) {
    cout << "Yes" << endl;
  }else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before '<' token
    7 |   if  (N % 500 =< A ) {
      |                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, A;
  cin >> N >> A;
  if  (N % 500 => A ) {
    cout << "No" << endl;
  }else {
    cout << "Yes" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before '>' token
    7 |   if  (N % 500 => A ) {
      |                 ^
Language: C++

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

int main() {
  int N, A;
   cin >> N >> A;
   if (N % 500　> A ){
  cout << "No" << endl;
    }else{
      cout << "Yes" << endl;
    }
    }
  

Compiler output:
a.cc:7:12: error: extended character 　 is not valid in an identifier
    7 |    if (N % 500　> A ){
      |            ^
a.cc: In function 'int main()':
a.cc:7:12: error: unable to find numeric literal operator 'operator""\U00003000'
    7 |    if (N % 500　> A ){
      |            ^~~~~
Language: C++

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

  int main() {
    int N, A;
    cin >> N >> A;
    if (N % 500　> A ){
     cout << "No" << endl;
     }else{
      cout << "Yes" << endl;
    }
   }
  

Compiler output:
a.cc:7:13: error: extended character 　 is not valid in an identifier
    7 |     if (N % 500　> A ){
      |             ^
a.cc: In function 'int main()':
a.cc:7:13: error: unable to find numeric literal operator 'operator""\U00003000'
    7 |     if (N % 500　> A ){
      |             ^~~~~
Language: C++

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

int main() {
  int N, A;
  cin >> N >> A;
if (N % 500　> A ){
  cout << "No" << endl;
}else{
  cout << "Yes" << endl;
}
}
  

Compiler output:
a.cc:7:9: error: extended character 　 is not valid in an identifier
    7 | if (N % 500　> A ){
      |         ^
a.cc: In function 'int main()':
a.cc:7:9: error: unable to find numeric literal operator 'operator""\U00003000'
    7 | if (N % 500　> A ){
      |         ^~~~~
Language: C++

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

int main() {
  int N, A;
  cin >> N >> A;
if (N % 500 < A && N % 500 = A){
  cout << "Yes" << endl;
}else{
  cout << "No" << endl;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: lvalue required as left operand of assignment
    7 | if (N % 500 < A && N % 500 = A){
      |     ~~~~~~~~~~~~^~~~~~~~~~
Language: C++

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

int main() {
  int N, A;
  cin >> N >> A;
if (N % 500 < A) && (N % 500 = A){
  cout << "Yes" << endl;
}else{
  cout << "No" << endl;
}
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: expected identifier before '(' token
    7 | if (N % 500 < A) && (N % 500 = A){
      |                     ^
Language: C++

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

int main() {
  int N, A;
  cin >> N >> A;
  if !(N - N / 500 * 500 > A) {
    cout << "yes" << endl;
  }  
  else {
    cout << "no" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected '(' before '!' token
    7 |   if !(N - N / 500 * 500 > A) {
      |      ^
      |      (
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else {
      |   ^~~~
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int N, A;
  cin >> N >> A;
  if (N - N / 500 * 500 =< A) {
    cout << "yes" << endl;
  }  
  else {
    cout << "no" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: expected primary-expression before '<' token
    7 |   if (N - N / 500 * 500 =< A) {
      |                          ^
a.cc:12:2: error: expected '}' at end of input
   12 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
  int A, B;
  string op;
  cin >> N >> A;
  if (N - N / 500 * 500 =< A) {
    cout << "yes" << endl;
  }  
  else {
    cout << "no" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: 'N' was not declared in this scope
    7 |   cin >> N >> A;
      |          ^
a.cc:8:26: error: expected primary-expression before '<' token
    8 |   if (N - N / 500 * 500 =< A) {
      |                          ^
a.cc:13:2: error: expected '}' at end of input
   13 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main(){
  int a,n;
  cin >> a >> n;
  if(b%500==n)
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 'b' was not declared in this scope
    7 |   if(b%500==n)
      |      ^
Language: C

#include<stdio.h>
int main(){
	int A,N;
  	scanf("%d%d",&A,&N);
  	if(N%500<=A){
      printf("Yes);
             }else{
               printf("No");
             }
             
            return 0;
             }

Compiler output:
main.c: In function 'main':
main.c:6:14: warning: missing terminating " character
    6 |       printf("Yes);
      |              ^
main.c:6:14: error: missing terminating " character
    6 |       printf("Yes);
      |              ^~~~~~
main.c:7:14: error: expected expression before '}' token
    7 |              }else{
      |              ^
main.c:6:14: error: expected ';' before '}' token
    6 |       printf("Yes);
      |              ^
      |              ;
    7 |              }else{
      |              ~
Language: C++

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

int main() {
  int N, A;
  cin >> N >> A;

  if ( N%500 =< A )
    cout << "Yes" << endl;

  else 
    cout << "No" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:15: error: expected primary-expression before '<' token
    8 |   if ( N%500 =< A )
      |               ^
Language: C++

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

int main(){
  int N,A,X;
  cin >> N >> A >> X;
  
  if(A-X => 0 && (N - X) % 500 == 0){
    cout << "Yes" << endl;
    
  else {
    cout << "No" << endl;
  }
}

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

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

int main() {
  int N, A;
  cin >> A >> B;
  if (N % 500 <= A) {
    cout << "Yes" << endl;
  
  else {
  cout << "No" << endl;
  }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'B' was not declared in this scope
    6 |   cin >> A >> B;
      |               ^
a.cc:10:3: error: expected '}' before 'else'
   10 |   else {
      |   ^~~~
a.cc:7:21: note: to match this '{'
    7 |   if (N % 500 <= A) {
      |                     ^
a.cc: At global scope:
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main () {
  int A, B;
  cin >> A >> B;
  if ( A % 500 < B || A % 500 == B ) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }

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

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

int main()
{
  int N, A;
  cin >> N;
  cin >> A;
  if (N % 500 <= A) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;

  
}

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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,A;
  cin>>N>>A;
  bool answer=flase;
  if(A>N%500){
  answer=true;
  }
  if(true){
    cout<<"YES"<<endl;
  }
  else{
    cout<<"NO"<<endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'flase' was not declared in this scope; did you mean 'fclose'?
    6 |   bool answer=flase;
      |               ^~~~~
      |               fclose
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N, A;
  cin >> N >> A; 
  cout << (N % 500 <= A ? "YES" : "NO") endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:40: error: expected ';' before 'endl'
    6 |   cout << (N % 500 <= A ? "YES" : "NO") endl;
      |                                        ^~~~~
      |                                        ;
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N, A;
  cin >> N >> A; 
  cout << (N % 500 <= A ? "YES" : "NO") endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:40: error: expected ';' before 'endl'
    6 |   cout << (N % 500 <= A ? "YES" : "NO") endl;
      |                                        ^~~~~
      |                                        ;
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N, A;
  cin >> N, A; 
  cout << (N % 500 <= A ? "YES" : "NO") endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:40: error: expected ';' before 'endl'
    6 |   cout << (N % 500 <= A ? "YES" : "NO") endl;
      |                                        ^~~~~
      |                                        ;
Language: C++

#include<iostream>
using namespace std;
int main(){
  int N;
  cin >> N;
  int A;
  cin >> A;
  
  if (N % 500 > A) {cout << "NO" << endl;}
  else if(N % <= A) {cout << "YES" << endl;}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: expected primary-expression before '<=' token
   10 |   else if(N % <= A) {cout << "YES" << endl;}
      |               ^~
Language: C++

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

int main() {
  int N, A;
  cin >> N >> A;

  if (N%500 <= A) {
    cout << "yes" << endl;
  else{
  cout << "no" <<endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: expected '}' before 'else'
   10 |   else{
      |   ^~~~
a.cc:8:19: note: to match this '{'
    8 |   if (N%500 <= A) {
      |                   ^
Language: C++

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

int main() {
  int N , A
  cin >> N >> A;
  if (N % 500 <= A) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> N >> A;
      |   ^~~
a.cc:7:18: error: 'A' was not declared in this scope
    7 |   if (N % 500 <= A) {
      |                  ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
  int N, A;
  cin >> N;
  cin >> A;
  
  M = N % 500;
  if (M - A > 0){
    cout << "NO" <<endl;
  }else{ 
    cout << "YES" <<endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'M' was not declared in this scope
   10 |   M = N % 500;
      |   ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
  int N, A;
  cin >> N;
  cin >> A;
  
  N = N % 500;
  if (N - A > 0){
    cout << "NO" <<endl
  }else{ 
    cout << "YES" <<endl;
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:24: error: expected ';' before '}' token
   12 |     cout << "NO" <<endl
      |                        ^
      |                        ;
   13 |   }else{
      |   ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
  int N, A;
  cin >> N;
  cin >> A;
  
  N = N % 500;
  if (N - A > 0);
    cout << "NO" <<endl;
  else cout << "YES" <<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else cout << "YES" <<endl;
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
  int N, A;
  cin >> N;
  cin >> A;
  
  N = N % 500;
  if N - A > 0;
    cout << "NO" <<endl;
  else cout << "YES" <<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:6: error: expected '(' before 'N'
   11 |   if N - A > 0;
      |      ^
      |      (
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else cout << "YES" <<endl;
      |   ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
int main()
{
  int N, A;
  cin >> N;
  cin >> A;
  
  N = N % 500
  if N - A > 0;
    cout << "NO" <<endl;
  else cout << "YES" <<endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ';' before 'if'
   10 |   N = N % 500
      |              ^
      |              ;
   11 |   if N - A > 0;
      |   ~~          
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else cout << "YES" <<endl;
      |   ^~~~
Language: C++

#include(bits/stdc++.h)
using namespace std;
 
int main()
{
  int N, A;
  cin >> N;
  cin >> A;
  
  N = N % 500
  if N - A > 0;
    cout << "NO" <<endl;
  else cout << "YES" <<endl;
  
  return 0;
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(bits/stdc++.h)
      |         ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(bits/stdc++.h)
a.cc:10:14: error: expected ';' before 'if'
   10 |   N = N % 500
      |              ^
      |              ;
   11 |   if N - A > 0;
      |   ~~          
a.cc:12:5: error: 'cout' was not declared in this scope
   12 |     cout << "NO" <<endl;
      |     ^~~~
a.cc:12:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:20: error: 'endl' was not declared in this scope
   12 |     cout << "NO" <<endl;
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(bits/stdc++.h)
a.cc:13:3: error: 'else' without a previous 'if'
   13 |   else cout << "YES" <<endl;
      |   ^~~~
Language: C++

#include(bits/stdc++.h)
using namespace std;
 
int main()
{
  int N, A;
  cin >> N;
  cin >> A;
  
  N = N % 500
  if (N - A > 0){
    cout << "NO" <<endl;
  }else {
    cout << "YES" <<endl;
  }
  
  return 0;
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(bits/stdc++.h)
      |         ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(bits/stdc++.h)
a.cc:10:14: error: expected ';' before 'if'
   10 |   N = N % 500
      |              ^
      |              ;
   11 |   if (N - A > 0){
      |   ~~          
a.cc:13:4: error: 'else' without a previous 'if'
   13 |   }else {
      |    ^~~~
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << "YES" <<endl;
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:21: error: 'endl' was not declared in this scope
   14 |     cout << "YES" <<endl;
      |                     ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(bits/stdc++.h)
Language: C++

ソースコード 拡げる

Copy
Copy
#include(bits/stdc++.h)
using namespace std;
 
int main()
{
  int N, A;
  cin >> N;
  cin >> A;
  
  N = N % 500
  if (N - A > 0){
    cout << "NO" <<endl;
  }else {
    cout << "YES" <<endl;
  }
  
  return 0;
}

Compiler output:
a.cc:5:9: error: #include expects "FILENAME" or <FILENAME>
    5 | #include(bits/stdc++.h)
      |         ^
a.cc:1:1: error: '\U000030bd\U000030fc\U000030b9\U000030b3\U000030fc\U000030c9' does not name a type
    1 | ソースコード 拡げる
      | ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:11:3: error: 'cin' was not declared in this scope
   11 |   cin >> N;
      |   ^~~
a.cc:14:14: error: expected ';' before 'if'
   14 |   N = N % 500
      |              ^
      |              ;
   15 |   if (N - A > 0){
      |   ~~          
a.cc:17:4: error: 'else' without a previous 'if'
   17 |   }else {
      |    ^~~~
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << "YES" <<endl;
      |     ^~~~
a.cc:18:21: error: 'endl' was not declared in this scope
   18 |     cout << "YES" <<endl;
      |                     ^~~~
Language: C++

#include(bits/stdc++.h)
using namespace std;
 
int main()
{
  int N, A;
  cin >> N;
  cin >> A;
  
  N = N % 500
  if N - A > 0
  {cout << "NO" <<endl;}
  
  else 
  {cout << "YES" <<endl;}
  
  return 0;
}

Compiler output:
a.cc:1:9: error: #include expects "FILENAME" or <FILENAME>
    1 | #include(bits/stdc++.h)
      |         ^
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> N;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include(bits/stdc++.h)
a.cc:10:14: error: expected ';' before 'if'
   10 |   N = N % 500
      |              ^
      |              ;
   11 |   if N - A > 0
      |   ~~          
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else
      |   ^~~~
a.cc:15:4: error: 'cout' was not declared in this scope
   15 |   {cout << "YES" <<endl;}
      |    ^~~~
a.cc:15:4: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:15:20: error: 'endl' was not declared in this scope
   15 |   {cout << "YES" <<endl;}
      |                    ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include(bits/stdc++.h)