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

#include <cstdio>
int main()
{
cin >> m;
cout <<48-m << endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:1: error: 'cin' was not declared in this scope
    4 | cin >> m;
      | ^~~
a.cc:4:8: error: 'm' was not declared in this scope
    4 | cin >> m;
      |        ^
a.cc:5:1: error: 'cout' was not declared in this scope
    5 | cout <<48-m << endl;
      | ^~~~
a.cc:5:16: error: 'endl' was not declared in this scope
    5 | cout <<48-m << endl;
      |                ^~~~
Language: C++

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

#define fs first
#define sc second
#define pb emplace_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()

const int32_t inf = 1001001001;
const int64_t infll = 1001001001001001001ll;
const int dx[] = {0, -1, 1, 0, -1, 1, -1, 1}, dy[] = {-1, 0, 0, 1, -1, -1, 1, 1};

template <typename T> using vector2d = vector<vector<T>>;

// clang-format off
template <typename T> void sort(vector<T> &v) { sort(all(v)); }
ostream &operator<<(ostream &os, __int128_t value) { if (ostream::sentry(os)) { __uint128_t tmp = value < 0 ? -value : value; char buffer[64]; char *d = end(buffer); do { --d; *d = "0123456789"[tmp % 10]; tmp /= 10; } while (tmp != 0); if (value < 0) { --d; *d = '-'; } int len = end(buffer) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); }} return os; }
istream &operator>>(istream &is, __int128_t &value) { string in; is >> in; value = 0; for (const char &c : in) { if ('0' <= c && c <= '9') value = 10 * value + (c - '0'); } if (in[0] == '-') value *= -1; return is; }
ostream &operator<<(ostream &os, __uint128_t value) { if (ostream::sentry(os)) { char buffer[64]; char *d = end(buffer); do { --d; *d = "0123456789"[value % 10]; value /= 10; } while (value != 0); int len = end(buffer) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); }} return os; }
istream &operator>>(istream &is, __uint128_t &value) { string in; is >> in; value = 0; for (const char &c : in) { if ('0' <= c && c <= '9') value = 10 * value + (c - '0'); } return is; }
template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { os << v[0]; for (int i = 1; i < v.size(); ++i) os << " " << v[i]; return os; }
template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; }
template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { os << p.fs << " " << p.sc; return os; }
template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.fs >> p.sc; return is; }

struct IoSetup { IoSetup(){ cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); } } iosetup;

inline int64_t in() { int64_t x = 0; cin >> x; return x; }
template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
// clang-format on

signed main(int argc, char *argv[]) {
  int m = 24 - m() + 24;
  cout << m << endl;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:36:17: error: 'm' cannot be used as a function
   36 |   int m = 24 - m() + 24;
      |                ~^~
Language: Java

import java.util.Scanner;

public class NewYear {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int M = sc.nextInt();
		System.out.println(48 - M);
	}
}

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

#include<iostream>
uaing namespace std;
int main(){
    int n;
    cin>>n;
    cout<<48-n<<endl;
    return 0;
}

Compiler output:
a.cc:2:1: error: 'uaing' does not name a type
    2 | uaing namespace std;
      | ^~~~~
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin>>n;
      |     ^~~
      |     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:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout<<48-n<<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:6:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout<<48-n<<endl;
      |                 ^~~~
      |                 std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.Scanner;

public class NewYear
{

    public static void Main(String[] args)
    {
        Scanner input = new Scanner(System.in);
        int M = input.nextInt();
        int x = 24*2 - M;
        System.out.print(x);

    }

}


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

import java.util.Scanner;

public class NewYear
{

    public static void main(String[] args)
    {
        Scanner input = new Scanner(System.in);
        int M = input.nextInt();
        int x = 24*2 - M;
        System.out.print(x);

    }

}


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

#include<bits/stdc++.h>
using namespace std;
bool mycmp(int a,int b)
{
    return a>b;
}
int main()
{
	int i,x,y,xc=0,yc=0,k=0;
	char a[8001];
	int lenx,leny;
	int b[8001],c[8001],d[8001]={0};
	scanf("%s",a);
	scanf("%d%d",&x,&y);
	//x=abs(x);
	//y=abs(y);
	for(i=0;i<strlen(a);i++)
	{
		if(a[i]=='F')
		    d[k]++;
		else
			k++;
	}
	if(d[k]!=0)
		k++;
	lenx=leny=0;
	b[lenx++]=d[0]
	for(i=1;i<k;i++)
	{
		//printf("%d\n",d[i]);
		if(i%2==0)
			b[lenx++]=d[i];
		else
			c[leny++]=d[i];
	}
	sort(b,b+lenx,mycmp);
	sort(c,c+leny,mycmp);
	for(i=0;i<lenx;i++)
	{
		if(xc>=x)
			xc-=b[i];
		else
			xc+=b[i];
	}
	for(i=0;i<leny;i++)
	{
		if(yc>=y)
			yc-=c[i];
		else
			yc+=c[i];
	}
	//printf("%d %d",xc,yc);
	if(xc==x&&yc==y)
		printf("Yes");
	else
		printf("No");
	return 0;
} 

Compiler output:
a.cc: In function 'int main()':
a.cc:27:23: error: expected ';' before 'for'
   27 |         b[lenx++]=d[0]
      |                       ^
      |                       ;
   28 |         for(i=1;i<k;i++)
      |         ~~~            
a.cc:28:24: error: expected ';' before ')' token
   28 |         for(i=1;i<k;i++)
      |                        ^
      |                        ;
Language: C++

#include <cstdin>
#include <iostream>
#include <cstdbool>
#include <ctype.h>
using namespace std;

void check(int A,int B,char S){
    if(strlen(S) != A+B+1){
        printf("No");
        return;
    }
    for(int i = 0; i < A; i++){
        if(!isdigit(S[i])){
            printf("No");
            return;
        }
    }
    if(S[A] == '-'){
        printf("No");
        return;
    }
    for(int i = A+1; i < A+B+1; i++){
        if(!isdigit(S[i])){
            printf("No");
            return;
        }
    }
    printf("Yes");
}

int main(int argc, char const *argv[]) {
    int A,B;
    char S[11];
    scanf("%d %d",&A,&B);
    scanf("%s",S);
    check(A,B,S);
    return 0;
}


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

#include<stdio.h>
int main(){
	int M;
	scnaf("%d",&M);
	printf("%d",48-M);
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:9: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    4 |         scnaf("%d",&M);
      |         ^~~~~
      |         scanf
Language: C++

#include <iostream>
int main()
{
  int i;
  cin >> i;
  std::cout << 48 - i << std::endl;
  return 0;
}


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 >> i;
      |   ^~~
      |   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
      |                  ^~~
Language: C++

#include <iostream>
int main()
{
  int i;
  cin >> i;
  std::cout << 48 - i << endl;
  return 0;
}

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 >> i;
      |   ^~~
      |   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:6:26: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   std::cout << 48 - i << endl;
      |                          ^~~~
      |                          std::endl
In file included from /usr/include/c++/14/iostream:41:
/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;
/////////////////// TYPES & MACROS ///////////////////////////////
#define INFLL 0x3fffffffffffffffLL
#define INF 0x3fffffff
#define mp make_pair
#define eb emplace_back
#define pb push_back
#define all(x) x.begin(),x.end()
#define exist(s,e) (s.find(e)!=s.end())
#define EPS 1e7
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll MOD=1e9+7;
/////////////////// DEBUG MODE ///////////////////////////////////
#define D(x) cerr<<"DEBUG: "<<#x<<" is: "<<x<<'\n'
#define error(args...) {string _s=#args; replace(all(_s),',',' ');\
stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args);}
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}
/////////////////// GLOBAL VARIABLES /////////////////////////////
vector<vector<int>> adj; vector<bool> vis; vector<int> color;
vector<ll> lprime(10e5+2);
/////////////////// FUNCTIONS ////////////////////////////////////
template<class T>
T maxx(T a, T b) {return a>b?a:b;}
template<typename T, typename... Args>
T maxx(T a, T b, Args... args){return maxx(a>b?a:b, args...);}
ll mexp(ll x, ll n, ull m){
  ll res=1;  while(n){if(n&1) res=(res*x)%m;n>>=1; x=((x%m)*(x%m))%m;}
  return res;
}
double pow(double a, int n) {
  if(n == 0) return 1;if(n == 1) return a;
  double t = pow(a, n/2);return t * t * pow(a, n%2);
}
/////////////////// MAIN STARTS //////////////////////////////////
int main(){
  ios::sync_with_stdio(0);  cin.tie(0);   cout<<fixed; cerr<<fixed;
  cout<<setprecision(10); cerr<<setprecision(3);
  #ifdef DEBUG
  freopen("ip.txt","r",stdin); //freopen("op.txt","w",stdout);
  clock_t tStart = clock();
  #endif

	ll m; cin>>m cout<<48-m<<'\n';


	#ifdef DEBUG
	cerr<<"\nExecution time: "<<(((double)clock() - tStart)/CLOCKS_PER_SEC)*1000<<"ms.\n";
	#endif
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:53:21: error: expected ';' before 'cout'
   53 |         ll m; cin>>m cout<<48-m<<'\n';
      |                     ^~~~~
      |                     ;
Language: Java

import java.io.*;
import java.util.StringTokenizer;

public class AtCoder084A {
    public static void main(String[] args) throws IOException {
        FastScanner in = new FastScanner();
        int m = in.nextInt();
        int answer = (24-m) + 24;
        System.out.println(answer);
    }

    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}


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

 #include<bits/stdc++.h>
using  namespace std;
int  main()
  {
  int m;
  scanf("%d",&m);
  printf("%d\n",48-m);
  
  
  }

Compiler output:
a.cc:1:1: error: extended character   is not valid in an identifier
    1 |  #include<bits/stdc++.h>
      | ^
a.cc:1:2: error: stray '#' in program
    1 |  #include<bits/stdc++.h>
      |  ^
a.cc:2:7: error: extended character   is not valid in an identifier
    2 | using  namespace std;
      |       ^
a.cc:3:5: error: extended character   is not valid in an identifier
    3 | int  main()
      |     ^
a.cc:1:1: error: '\U000000a0' does not name a type
    1 |  #include<bits/stdc++.h>
      | ^
a.cc: In function 'int \U000000a0main()':
a.cc:6:3: error: 'scanf' was not declared in this scope
    6 |   scanf("%d",&m);
      |   ^~~~~
a.cc:7:3: error: 'printf' was not declared in this scope
    7 |   printf("%d\n",48-m);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 |  #include<bits/stdc++.h>
a.cc:10:3: warning: no return statement in function returning non-void [-Wreturn-type]
   10 |   }
      |   ^
Language: Java

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Main {
  public static void main (String[] args) {
    
   int a,b;
   String str;

   @suppressWarning("resource")
   Scanner sc = new Scanner (System.in);
   a=sc.nextInt();
   b=sc.nextInt();
   str=sc.next();    

   Pattern p = Pattern.compile("^[0-9]{"+a+"}-[0-9]{"+b+"}");
   Matcher m = p.matcher(str);
   if (m.find()) {
	System.out.println(Yes);
   } else {
 	System.out.println("No");
   }

  }
}

Compiler output:
Main.java:11: error: cannot find symbol
   @suppressWarning("resource")
    ^
  symbol:   class suppressWarning
  location: class Main
Main.java:20: error: cannot find symbol
	System.out.println(Yes);
	                   ^
  symbol:   variable Yes
  location: class Main
2 errors
Language: C

#include<stdio.h>

int mult(int x,int y){
	if(y==0)return 0;	
	if(x%y==0)return 1;
	return -1;
	}
}

int main(){
	int n,i,t,current,k;
	int c[500],s[500],f[500],a[500];
	
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d%d%d",&c[i],&s[i],&f[i]);
	}
	c[i]=-1;
	s[i]=-1;
	f[i]=-1;
	
	for(i=0;i<n;i++){
		t=0;
		current=i;
		while(1){
			if(current==n-1){
				a[i]=t;
				break;
			}
			while(1){
				if(t>=s[current]){
					if(mult(t-s[current],f[current])==1){
						t+=c[current];
						current++;
						break;
					}
				}
				t++;
			}
		}
	}
	for(i=0;i<n;i++){
		printf("%d\n",a[i]);
	}
	
	return 0;
}

Compiler output:
main.c:8:1: error: expected identifier or '(' before '}' token
    8 | }
      | ^
Language: C


#include<stdio.h>
#include<math.h>
bool prime(int n)
{
	int k = (int)(sqrt(n));
	bool ans = true;
	if (n == 1)
		return false;
	if (n == 2 || n == 3)
		return true;
	for (int i = 2; i <= k; i++)
	{
		if (n%i == 0)
		{
			ans = false;
		}
	}
	return ans;
}
bool zns(int n)
{
	if (prime(n) && (prime((n + 1) / 2)))
		return true;
	else
		return false;
}
int main()
{
	int n;
	scanf("%d", &n);
	while (n--)
	{
		int a, b, count = 0;
		scanf("%d%d", &a, &b);
		if (a == b)
		{
			if (zns(a))
			{
				printf("1\n");
				continue;
			}
			else
			{
				printf("0\n");
				continue;
			}
		}
		for (int i = a; i <= b; i++)
		{
			if (zns(i))
				count++;
		}
		printf("%d\n", count);
	}
	return 0;
}


Compiler output:
main.c:4:1: error: unknown type name 'bool'
    4 | bool prime(int n)
      | ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include<math.h>
  +++ |+#include <stdbool.h>
    4 | bool prime(int n)
main.c: In function 'prime':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool ans = true;
      |         ^~~~
main.c:7:9: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:7:20: error: 'true' undeclared (first use in this function)
    7 |         bool ans = true;
      |                    ^~~~
main.c:7:20: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:7:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:24: error: 'false' undeclared (first use in this function)
    9 |                 return false;
      |                        ^~~~~
main.c:9:24: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: At top level:
main.c:21:1: error: unknown type name 'bool'
   21 | bool zns(int n)
      | ^~~~
main.c:21:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c: In function 'zns':
main.c:24:24: error: 'true' undeclared (first use in this function)
   24 |                 return true;
      |                        ^~~~
main.c:24:24: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:26:24: error: 'false' undeclared (first use in this function)
   26 |                 return false;
      |                        ^~~~~
main.c:26:24: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b;
    char arr[15];
    scanf("%d %d ",&a,&b);
    gets(arr);
    bool ans=false;
    int siz=strlen(arr);
    if(arr[a]==45)
    {
        for(int i=a+1;i<siz;i++)
        {
            if(arr[i]>='0'&&arr[i]<='9')
            {
                ans=true;
            }
            else
            {
                ans=false;
                break;
            }
        }
    }
    if(ans)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
    return 0;
}


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

#include<stdio.h>
int main(void)
{
int box[];
int A,B,S;
scanf("%d",&A);
scanf("%d",&B);
scanf("%d",&S);
if(1<=A){
if(B<=5){
if(box[A+1]=='-'){
printf("yes");}}}
else{
printf("no");}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: storage size of 'box' isn't known
    4 | int box[];
      |     ^~~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * author @sahil
 */
public class test {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n=Integer.parseInt(br.readLine());
        System.out.println(24+(24-n));
    }
}


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

#include<iostream>
2.#include<cstdio>
3.int main ()
4.{
5.    int m;
6.    while(scanf("%d",&m)!=EOF)
7.    {
8.        printf("%d\n",48-m);
9.    }
10.    return 0;
11.}


Compiler output:
a.cc:2:3: error: stray '#' in program
    2 | 2.#include<cstdio>
      |   ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.#include<cstdio>
      | ^~
Language: C++

#include<iosream>
#include<cstdio>
int main ()
{
    int m;
    while(scanf("%d",&m)!=EOF)
    {
        printf("%d\n",48-m);
    }
    return 0;
}


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

#include<bit/stdc++.h>

using namespace std;

int main()
{
    int m;
    cin>>m;
    cout<<(48-m)<<endl;
    return 0;
}


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

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int M = in.nextInt();
        System.out.println(48 - M);
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
        Scanner in = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
        Scanner in = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

#include<iostream>
using namespace std;

int main(
int tc;cin>>tc;cout<<48-tc<<"\n";
)

Compiler output:
a.cc:5:7: error: expected ')' before ';' token
    5 | int tc;cin>>tc;cout<<48-tc<<"\n";
      |       ^
      |       )
a.cc:4:9: note: to match this '('
    4 | int main(
      |         ^
a.cc:4:5: warning: 'int main(int)' takes only zero or two arguments [-Wmain]
    4 | int main(
      |     ^~~~
a.cc:5:8: error: 'cin' does not name a type
    5 | int tc;cin>>tc;cout<<48-tc<<"\n";
      |        ^~~
a.cc:5:16: error: 'cout' does not name a type
    5 | int tc;cin>>tc;cout<<48-tc<<"\n";
      |                ^~~~
a.cc:6:1: error: expected unqualified-id before ')' token
    6 | )
      | ^
Language: C++

#include<iostream>
using namespace std;

int main()
{
	int m, ans;
	cin >> m;
	ans = 24 - m + 24;
	
	cout << ans << endl;

	return0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'return0' was not declared in this scope
   12 |         return0;
      |         ^~~~~~~
Language: Java

import java.util.Scanner;

public class Newyear {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int hour = sc.nextInt();
    System.out.println(24 - hour + 24);
  }
}

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

#include wbits/stdc++.h>
using namespace std;
int main()
{
  int a;
  cin>>a;
  cout<<48-a;
}

Compiler output:
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include wbits/stdc++.h>
      |          ^~~~~
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>a;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include wbits/stdc++.h>
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout<<48-a;
      |   ^~~~
a.cc:7:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <stdio.h>
int main()
{
    int x;
    scanf("%d",&x)
    printf("%d\n",48-x);
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: expected ';' before 'printf'
    5 |     scanf("%d",&x)
      |                   ^
      |                   ;
    6 |     printf("%d\n",48-x);
      |     ~~~~~~
Language: Java

import java.util.scanner;

class Newyear {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int hour = sc.nextInt();
    System.out.println(24 - hour + 24);
  }
}

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.scanner;
                ^
  symbol:   class scanner
  location: package java.util
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Newyear
Main.java:5: error: cannot find symbol
    Scanner sc = new Scanner(System.in);
                     ^
  symbol:   class Scanner
  location: class Newyear
3 errors
Language: C++

/* 2017-12-30-18.01.58 */
 
#include<bits/stdc++.h>
#define ll long long int
#define N 100010
using namespace std;

int main()
{
    int A,B;
    cin >> A >> B;
    string s;
    cin >> s;
    for(i=0;i<s.length();i++)
    {
        if(i==A && s[i]=='-') continue;
        if(s[i]-'0'>=0) continue;
        printf("No\n");
        return 0;
    }
    printf("Yes\n");
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:9: error: 'i' was not declared in this scope
   14 |     for(i=0;i<s.length();i++)
      |         ^
Language: Java

import java.util.Scanner;

public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
  int hour = sc.nextInt();
  System.out.println(24 - hour + 24);
}

Compiler output:
Main.java:3: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args){
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include<iostream>

using namespace std;

int main(){
	int x=0:
  	cin>>x;
  	cout<<48-x<<endl;
   
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: expected ',' or ';' before ':' token
    6 |         int x=0:
      |                ^
Language: C++

#include <stdio.h>
int a,b;
char s;
int main(){
scanf("%d%d",&a,&b);
scanf("%s",&s);
for(int k=0;k<a;k++){
if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
}
for(int k=a;k<a+b+1;k++){
if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
}
if(s[a]!="-"){printf("No");return 0;}
printf("Yes");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: invalid types 'char[int]' for array subscript
    8 | if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
      |             ^
a.cc:8:24: error: invalid types 'char[int]' for array subscript
    8 | if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
      |                        ^
a.cc:11:13: error: invalid types 'char[int]' for array subscript
   11 | if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
      |             ^
a.cc:11:24: error: invalid types 'char[int]' for array subscript
   11 | if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
      |                        ^
a.cc:13:5: error: invalid types 'char[int]' for array subscript
   13 | if(s[a]!="-"){printf("No");return 0;}
      |     ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
int n;
cin>>n;
cout<<48–n<<endl;
return 0;
}

Compiler output:
a.cc:7:7: error: extended character – is not valid in an identifier
    7 | cout<<48–n<<endl;
      |       ^
a.cc: In function 'int main()':
a.cc:7:7: error: unable to find numeric literal operator 'operator""\U00002013n'
    7 | cout<<48–n<<endl;
      |       ^~~~
Language: C++

#include <GLUT/glut.h>
#include <string>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cfloat>
#include <algorithm>
#include <vector>
#include <iostream>
#define PI 3.141592
using namespace std;

int main (){
    int x;
    cin >> x;
    cout << 24 - x + 24 << "\n";
}


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

#include <stdio.h>
int a,b;
char s;
int main(){
for(int k=0;k<a;k++){
if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
}
for(int k=a;k<a+b+1;k++){
if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
}
if(s[a]!="-"){printf("No");return 0;}
printf("Yes");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: invalid types 'char[int]' for array subscript
    6 | if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
      |             ^
a.cc:6:24: error: invalid types 'char[int]' for array subscript
    6 | if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
      |                        ^
a.cc:9:13: error: invalid types 'char[int]' for array subscript
    9 | if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
      |             ^
a.cc:9:24: error: invalid types 'char[int]' for array subscript
    9 | if(0<=(int)s[k]&&(int)s[k]<=9){}else{printf("No");return 0;}
      |                        ^
a.cc:11:5: error: invalid types 'char[int]' for array subscript
   11 | if(s[a]!="-"){printf("No");return 0;}
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main{
int a;cin>>a;
cout<<48-a<<endl;
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:1: error: expected primary-expression before 'int'
    4 | int a;cin>>a;
      | ^~~
a.cc:4:1: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:4:7: error: 'cin' does not name a type
    4 | int a;cin>>a;
      |       ^~~
a.cc:5:1: error: 'cout' does not name a type
    5 | cout<<48-a<<endl;
      | ^~~~
a.cc:6:1: error: expected declaration before '}' token
    6 | }
      | ^
Language: C++

#include<iostream>
#include<map>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
#include<cmath>
#define ll long long
using namespace std;
const int maxint=INT_MAX;
const ll maxll=__LONG_LONG_MAX__;
int main(){
	int x;
	cin>>x;
	cout<<24+(24-x);
	
	
}

Compiler output:
a.cc:10:18: error: 'INT_MAX' was not declared in this scope
   10 | const int maxint=INT_MAX;
      |                  ^~~~~~~
a.cc:8:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
    7 | #include<cmath>
  +++ |+#include <climits>
    8 | #define ll long long
Language: C++

#include <iostream>
#include <string>
#include <algorthm>
int main(){
	int a;
	std::cin >> a;
	std::cout << (24 - a) + 24 << std::endl;
}

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

import java.util.*;
import java.io.*;

public class NewYear {
    public static void main(String args[]) throws IOException {
        Scanner in = new Scanner(System.in);
        System.out.println(48 - in.nextInt());
    }
}

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

#include <bits/stdc++.h>

using namespace std

int main(){
  int a,b;
  cin >> a >> b;
  string s;
  cin >> s;
  if(s.size()!=a.size()+b.size()+1){
    cout << "No";
    return 0;
  }
  for(int x = 0;x<s.size();x++){
    if(s[x]=='-'&&x!=a){
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}


Compiler output:
a.cc:3:20: error: expected ';' before 'int'
    3 | using namespace std
      |                    ^
      |                    ;
    4 | 
    5 | int main(){
      | ~~~                 
a.cc: In function 'int main()':
a.cc:10:18: error: request for member 'size' in 'a', which is of non-class type 'int'
   10 |   if(s.size()!=a.size()+b.size()+1){
      |                  ^~~~
a.cc:10:27: error: request for member 'size' in 'b', which is of non-class type 'int'
   10 |   if(s.size()!=a.size()+b.size()+1){
      |                           ^~~~
Language: C++

#include <iostream>
#include <string>
#include <algorthm>
int main(){
	int a;
	std::cin >> a;
	std::cout << (24 - a) + 12 << std::endl;
}

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

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

using namespace std;

#define sz(x) (int)(x.size())
#define fi(a,b) for(int i=a;i<b;++i)
#define fj(a,b) for(int j=a;j<b;++j)
#define fo(a,b) for(int o=a;o<b;++o)
#define fdi(a,b) for(int i=a-1;i>=b;--i)
#define fdj(a,b) for(int j=a-1;j>=b;--j)
#define fdo(a,b) for(int o=a-1;o>=b;--o)
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
//////////////////////



void solve(){
	
}

int main(){
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);

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

	solve();
	int ans = (24 - m) + 24;

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

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:25: error: 'm' was not declared in this scope
   38 |         int ans = (24 - m) + 24;
      |                         ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define _abs(x)((x) < 0 ? (x) * -1 : (x))
#define _max(x, y)(max(0, max((x), (y))))
#define _min(x, y)(max(0, min((x), (y))))
#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y) - 1; 0 <= (x); (x)--)
#define repi(x, y, z) for ((x) = (z); (x) < (y); (x)++)
#define repiin(x, y, z) for ((x) = (z); (x) <= (y); (x)++)
#define reps(x, y, z) for ((x) = 0; (x) < (y); (x) += (z))
#define repit(x, y) for ((x) = (y).begin(); (x) != (y).end(); (x)++)
#define all(x) (x).begin(),(x).end()
#define _end '\n'
template<typename T> inline bool __max__(T &x, const T &y) { return x < y ? x = y, 1 : 0; }
template<typename T> inline bool __min__(T &x, const T &y) { return x > y ? x = y, 1 : 0; }
template<typename T> using vvec = vector<vector<T> >;

#define pb push_back
#define mp make_pair

static const ll MOD = 1e9 + 7;
static const double PI = 3.141592653589793;

int main()
{
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    //freopen("debug.txt", "w", stderr);

    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;

    cin >> n;

    cout << (24 - m) + 24 << _end;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:19: error: 'm' was not declared in this scope
   43 |     cout << (24 - m) + 24 << _end;
      |                   ^
Language: C++

#include <iostream>
#include <algorithm>
int main(){
	int M;
	cin >> M;
	M = 48 - M;
	cout << M << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         cin >> M;
      |         ^~~
      |         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:7:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         cout << M << 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:7:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    7 |         cout << M << endl;
      |                      ^~~~
      |                      std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
#include <cstring>
#include <cstdio>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <cmath>
#include <set>
#include <map>
#include <ctime>
using namespace std;
int n;
int a[11111];
int main() {
    cin >> n;
    cout << 24 - x + 24 << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:18: error: 'x' was not declared in this scope
   17 |     cout << 24 - x + 24 << endl;
      |                  ^
Language: C++

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

int main () {
  int A, B, ans = 1;
  cin >> A >> B;
  string S;
  cin >> S;
  for (int i = 0; i < A; i++) {
    if (!('0' <= S[i] && S[i] <= '9')) ans = 0;
  }
  if (S[i] != '-') ans = 0;
  for (int i = A+1; i < A+B+1; i++) {
    if (!('0' <= S[i] && S[i] <= '9')) ans = 0;
  }
  if (ans) printf("Yes");
  else printf("No");
  return 0;
}
 


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'i' was not declared in this scope
   12 |   if (S[i] != '-') ans = 0;
      |         ^
Language: C

#include <stdio.h>

int main(){
	int a,b;
	int flag  = 1;
	scanf("%d %d",&a,&b);		
	char s[a+b+5];
	scanf("%s",s);
	s[a] != '-' ? flag = 0 : flag  = 1;
		for(int i=0;s[i]!='\0';i++){
			if(i!=a){
				if(s[i]<'0' || s[i]>'9'){
					flag = 0;
				}
			
			}
		}
		flag==1 ? puts("Yes") : puts("No");
 	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:40: error: lvalue required as left operand of assignment
    9 |         s[a] != '-' ? flag = 0 : flag  = 1;
      |                                        ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
    int a,b;
    string s;
    cin>>a>>b>>s;
    for(int i=0; i<s.size(); i++){
            if(s[a]!='-'){
                    cout<<"No"
                    return 0;
            }
            else if(s[i]=='-'){
                    cout<<"No"
                    return 0;
            }
    }
    cout<<Yes
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:31: error: expected ';' before 'return'
   10 |                     cout<<"No"
      |                               ^
      |                               ;
   11 |                     return 0;
      |                     ~~~~~~     
a.cc:14:31: error: expected ';' before 'return'
   14 |                     cout<<"No"
      |                               ^
      |                               ;
   15 |                     return 0;
      |                     ~~~~~~     
a.cc:18:11: error: 'Yes' was not declared in this scope
   18 |     cout<<Yes
      |           ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(void){
    // Your code here!
    int a,b;
    string s;
    cin>>a>>b>>s;
    if(s[a]=='-'){
            cout<<"Yes"<<endll;
    }
    else{
            cout<<"No"<<endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:26: error: 'endll' was not declared in this scope
    9 |             cout<<"Yes"<<endll;
      |                          ^~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
  int A, B;
  string S;
  cin >> A >> B >> S;
  bool ans = true;
  for (int i = 0; i < A; i++) {
    if ('0'<=S[i] && S[i]<='9') {
      ;
    } else {
      ans = false;
      break;
    }
  }
  if (S[A]!='-') {
    ans = false;
  }
  for (int i = 0; i < B; i++) {
    if ('0'<=S[i+A+1] && S[i+A+1]<='9') {
      ;
    } else {
      ans = false;
      break;
    }
  }
  if (ans) {
    cout << "Yes" MM endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:18: error: expected ';' before 'MM'
   30 |     cout << "Yes" MM endl;
      |                  ^~~
      |                  ;
Language: C

#include <stdio.h>
 
int main() {
  int A, B, pos = 0;
  char S[20];
  scanf("%d %d %s", &A, &B, S);
  for (int i = 0; S[i] != '\0'; i++) {
    (S[i] == '-') ? pos += i + 1 : pos += 0;
  }
  pos == A + 1 ? puts("Yes") : puts("No");
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:40: error: lvalue required as left operand of assignment
    8 |     (S[i] == '-') ? pos += i + 1 : pos += 0;
      |                                        ^~
Language: C

#include <stdio.h>

int main (){
	int a,b;
	scanf ("%d %d", &a, &b);
	char str[20];
	scanf("%s", str);
	int valid = true; 
	if (str[a]!='-')
	{
		valid = false;
	}
	for (int i=0 ; str[i]!='\0' ; i++)
	{
		if (i!=a)
		{
			if(str[i]<'0' || str[i]>'9')
			{
				valid = false;
				break; // keluar dari loop
			}
		}
	}
	(valid) ? printf("Yes") : printf ("No");	
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:21: error: 'true' undeclared (first use in this function)
    8 |         int valid = true;
      |                     ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:8:21: note: each undeclared identifier is reported only once for each function it appears in
    8 |         int valid = true;
      |                     ^~~~
main.c:11:25: error: 'false' undeclared (first use in this function)
   11 |                 valid = false;
      |                         ^~~~~
main.c:11:25: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <stdio.h>

int main (){
	int a,b;
	scanf ("%d %d", &a, &b);
	char str[20];
	scanf("%s", str);
	bool valid = true; 
	if (str[a]!='-')
	{
		valid = false;
	}
	for (int i=0 ; str[i]!='\0' ; i++)
	{
		if (i!=a)
		{
			if(str[i]<'0' || str[i]>'9')
			{
				valid = false;
				break; // keluar dari loop
			}
		}
	}
	(valid) ? printf("Yes") : printf ("No");	
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:9: error: unknown type name 'bool'
    8 |         bool valid = true;
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:8:22: error: 'true' undeclared (first use in this function)
    8 |         bool valid = true;
      |                      ^~~~
main.c:8:22: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:8:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:25: error: 'false' undeclared (first use in this function)
   11 |                 valid = false;
      |                         ^~~~~
main.c:11:25: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <stdio.h>

int main (){
	int a,b;
	scanf ("%d %d", &a, &b);
	char str[20];
	scanf("%s", str);
	bool valid = true; 
	if(str[a]!='-')
	{
		valid = false;
	}
	for (int i=0 ; str[i]!='\0' ; i++)
	{
		if (i!=a)
		{
			if(str[i]<'0' || str[i]>'9')
			{
				valid = false;
				break; // keluar dari loop
			}
		}
	}
	(valid) ? printf("YES") : printf ("NO");	
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:9: error: unknown type name 'bool'
    8 |         bool valid = true;
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:8:22: error: 'true' undeclared (first use in this function)
    8 |         bool valid = true;
      |                      ^~~~
main.c:8:22: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:8:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:25: error: 'false' undeclared (first use in this function)
   11 |                 valid = false;
      |                         ^~~~~
main.c:11:25: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <stdio.h>

int main (){
	int a,b;
	scanf ("%d %d", &a, &b);
	char str[20];
	scanf("%s", str);
	bool valid = true; // bool s= kita semua anggap semua postal code awalnya valid
	if(str[a]!='-')
	{
		valid = false;
	}
	for (int i=0 ; str[i]!='\0' ; i++)
	{
		if (i!=a)
		{
			if(str[i]<'0' || str[i]>'9')
			{
				valid = false;
				break; // keluar dari loop
			}
		}
	}
	(valid) ? printf("YES") : printf ("NO");	
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:9: error: unknown type name 'bool'
    8 |         bool valid = true; // bool s= kita semua anggap semua postal code awalnya valid
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:8:22: error: 'true' undeclared (first use in this function)
    8 |         bool valid = true; // bool s= kita semua anggap semua postal code awalnya valid
      |                      ^~~~
main.c:8:22: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:8:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:25: error: 'false' undeclared (first use in this function)
   11 |                 valid = false;
      |                         ^~~~~
main.c:11:25: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

#include <stdio.h>
int main (){
	int a,b;
	scanf ("%d %d", &a, &b);
	char str[20];
	scanf("%s", str);
	bool valid = true; // bool s= kita semua anggap semua postal code awalnya valid
	if(str[a]!='-')
	{
		valid = false;
	}
	for (int i=0 ; str[i]!='\0' ; i++)
	{
		if (i!=a)
		{
			if(str[i]<'0' || str[i]>'9')
			{
				valid = false;
				break; // keluar dari loop
			}
		}
	}
	(valid) ? printf("YES") : printf ("NO");	
return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name 'bool'
    7 |         bool valid = true; // bool s= kita semua anggap semua postal code awalnya valid
      |         ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | int main (){
main.c:7:22: error: 'true' undeclared (first use in this function)
    7 |         bool valid = true; // bool s= kita semua anggap semua postal code awalnya valid
      |                      ^~~~
main.c:7:22: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:7:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:25: error: 'false' undeclared (first use in this function)
   10 |                 valid = false;
      |                         ^~~~~
main.c:10:25: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'