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

#include <stdio.h>

typedef struct
{
	unsigned int id;
	unsigned long long total;
}info;

info s_info[4000];

int main()
{
	unsigned int i;
	unsigned int data_num;

	/* ????????? */
	for (i = 0; i < 4000; i++)
	{
		s_info[i].id = 0;3
		s_info[i].total = 0;
	}


	while (1)
	{
		unsigned int clear = 0;
		unsigned long long uri;
		unsigned long long kazu;

		scanf("%d", &data_num);

		if (data_num == 0)
		{
			break;
		}

		for (i = 0; i<data_num; i++)
		{
			scanf("%d %lld %lld", &s_info[i].id, &uri, &kazu);

			/* id?????????scanf?????§ */
			/* ?£????????????? */
			s_info[i].total = uri * kazu;
		}

		for (i = 0; i < data_num; i++)
		{
			if (s_info[i].total >= 1000000)
			{
				printf("%d\n", s_info[i].id);
				clear++;
			}
		}

		if (clear == 0)
		{
			printf("NA\n");
		}
	}

	return 0;

}

Compiler output:
main.c: In function 'main':
main.c:19:35: error: expected ';' before 's_info'
   19 |                 s_info[i].id = 0;3
      |                                   ^
      |                                   ;
   20 |                 s_info[i].total = 0;
      |                 ~~~~~~
Language: C

#include <bits/stdc++.h>
using namespace std;
long long int p,q,x[100002];
map<long long int,long long int>sells,vis;
vector<long long int>v;
int main()
{
    long long int a,b,c,d,i,j,y,z;
    while(scanf("%lld",&a)!=EOF)
    {   v.clear();
        sells.clear();
        vis.clear();
        if(a==0)break;

        for(i=1;i<=a;i++)
        {
            scanf("%lld %lld %lld",&z,&p,&q);
            sells[z]+=p*q;
            if(sells[z]>=1000000 && vis[z]!=1)
            {   vis[z]=1;
                v.push_back(z);
            }
        }
        if(v.size()==0)
        {   printf("NA\n");
            continue;
        }

        for(i=0;i<v.size();i++)
        {
            printf("%lld\n",v[i]);
        }
    }
    return 0;
}

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 "stdafx.h"


int main()
{
	int no[4000], pri[4000], num[4000], i=0,j,n;
	scanf("%d", &n);
	while (n) {
		scanf("%d %d %d", &no[i], &pri[i], &num[i]);
		i++;
		n--;
	}
	for (j = 0; j < i; i++) if (pri[j] * num[j] >= 100000) printf("%d\n", no[j]);
    return 0;
}



Compiler output:
main.c:1:10: fatal error: stdafx.h: No such file or directory
    1 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
#include <cassert>
#define MAX 4001

int  ans[MAX][2];
long long sum[MAX];

int tasu(int);

main(){
  long long p, q;
  int id;
  int i, j, n, f, temp;

  while(1){
    scanf("%d", &n);
    if(n==0) break;

    f=0;
    j=0;
    ans[0][0]=-1;
    for(i=0;i<n;i++){
      sum[i]=0;
    }

    for(i=0;i<n;i++){
      scanf("%d %d %d", &id, &p, &q);
      assert(id < 1000000);

      temp=tasu(id);
     
      sum[temp]+=p*q;
    }

    for(i=0;;i++){
      if(ans[i][0]==-1) break;
      if(sum[i]>=1000000){
	ans[i][1]=1;
	f=1;
      }
      else ans[i][0]=0;
    }

    if(f==0){
      printf("NA\n");
      continue;
    }

    for(i=0;;i++){
      if(ans[i][0]==-1) break;
      if(ans[i][1]==1){
	printf("%d\n", ans[i][0]);
      }
    }
  }
  return 0;
}


int tasu(int a){
  int i, f=0, temp;

  for(i=0;;i++){
    if(ans[i][0]==-1){
      temp=i;
      break;
    }
    if(ans[i][0]==a){
      f=1;
      return i;
    }
  }

  ans[temp][0]=a;
  ans[temp+1][0]=-1;

  return temp;
}

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

#include<stdio.h>

int main(void){
  int n;
  int i,j;
  int id[4000];
  long long int value[4000],num[4000],sale[4000];
  int c;

  while(1){
    scanf("%d",&n);
    if(!n)break;

    for(i=0;i<n;i++){
      scanf("%d %lld %lld",&id[i],&value[i],&num[i]);
      sale[i] = value[i] * num[i];
      for(j=0;j<i;j++)if(id[j] == id[i])break;
      if(j!=i){
	sale[j] += sale[i];
	i--;
	n--;
      }
    }

    c = 0;
    for(i=0;i<n;i++){
      if(1000000.0 - sale[i] < 1e-10){
	printf("%d\n",id[i]);
	c++;
      }
    }	 
    if(!c)printf("NA\n");

  }
 return 0;

Compiler output:
main.c: In function 'main':
main.c:35:2: error: expected declaration or statement at end of input
   35 |  return 0;
      |  ^~~~~~
Language: C

#include <stdio.h>

int main(void){
	int n , no , i , flag;
	__int64 table[4001] , a , b;
	while(1){
		scanf("%d" , &n);
		if(n==0) break;
		for(i=1;i<=4000;i++) table[i] = 0;
		for(i=1;i<=n;i++){
			scanf("%d %lld %lld" , &no , &a , &b);
			table[no] += a * b;
		}
		flag = 0;
		for(i=1;i<=4000;i++){
			if(table[i]>=1000000){
				printf("%d\n" , i);
				flag = 1;
			}
		}
		if(flag == 0) printf("NA\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:9: error: unknown type name '__int64'; did you mean '__int64_t'?
    5 |         __int64 table[4001] , a , b;
      |         ^~~~~~~
      |         __int64_t
Language: C

#include <stdio.h>

int main(){
  int setsize;
  int i;
  int num, tanka, suuryo;
  long uriage[4001][2];
  int order[4001];
  int count;
  bool na_flag;

  for(i=1; i<4001; i++){
    uriage[i][0]=0; uriage[i][1]=0; 
  }
  while(1){
    scanf("%d", &setsize);
    if(setsize==0) break;
    count=0; na_flag=true;
    for(i=0; i<setsize; i++){
      scanf("%d %d %d", &num, &tanka, &suuryo);
      if(uriage[num][0]==0){
        order[count]=num; count++;
      }
      uriage[num][0]+=(long)tanka*(long)suuryo;
      if(uriage[num][0]>=1000000) uriage[num][1]=1;
    }
    for(i=0; i<count; i++){
      num=order[i];
      if(uriage[num][1]==1){
        printf("%d\n", num);
        na_flag=false;
      }
      uriage[num][0]=0; uriage[num][1]=0;
    }
    if(na_flag) printf("NA\n");
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:3: error: unknown type name 'bool'
   10 |   bool na_flag;
      |   ^~~~
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:18:22: error: 'true' undeclared (first use in this function)
   18 |     count=0; na_flag=true;
      |                      ^~~~
main.c:18:22: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:18:22: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:17: error: 'false' undeclared (first use in this function)
   31 |         na_flag=false;
      |                 ^~~~~
main.c:31:17: 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 setsize;
  int i;
  int num
  long tanka, suuryo;
  long uriage[4001][2];
  int order[4001];
  int count;
  int na_flag;

  for(i=1; i<4001; i++){
    uriage[i][0]=0; uriage[i][1]=0; 
  }
  while(1){
    scanf("%d", &setsize);
    if(setsize==0) break;
    count=0; na_flag=1;
    for(i=0; i<setsize; i++){
      scanf("%d %ld %ld", &num, &tanka, &suuryo);
      if(uriage[num][0]==0){
        order[count]=num; count++;
      }
      uriage[num][0]+=tanka*suuryo;
      if(uriage[num][0]>=1000000) uriage[num][1]=1;
    }
    for(i=0; i<count; i++){
      num=order[i];
      if(uriage[num][1]==1){
        printf("%d\n", num);
        na_flag=0;
      }
      uriage[num][0]=0; uriage[num][1]=0;
    }
    if(na_flag) printf("NA\n");
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:10: error: expected ';' before 'long'
    6 |   int num
      |          ^
      |          ;
    7 |   long tanka, suuryo;
      |   ~~~~    
main.c:21:28: error: 'num' undeclared (first use in this function)
   21 |       scanf("%d %ld %ld", &num, &tanka, &suuryo);
      |                            ^~~
main.c:21:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include<stdio.h>

int main(){
  int n,id,tan,kazu,i,count=0,sum;
  
  while(1){
    count=0;
    scanf("%d",&n);
    if(n==0)break;
    for(i=0;i<n;i++){
      scanf("%d%d%d",&id,&tan,&kazu);
      sum=tan*kazu;
      if(sum>=1000000){
	printf("%d\n",id);
	count++;
      }
    }/*for*/
    if(count==0){
      printf("NA\n");
    }
    
  }/*while*/
  
  return 0;
  
}/*main*/

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include<stdio.h>

struct staff_data{
	int num;
	long unsigned int price,volume,total;
};

int main(void){

	int n,i,j,hantei;
	int num,price,volume;
	struct staff_data dt[4000]={0};
	
	while(scanf("%d",&n)!=0){
	
		if(n==0){
			break;
		}
		
		staff_data dt[4000]={0};
		
		for(i=0;i<n;i++){
			
			scanf("%d %d %d",&num,&price,&volume);
			
			for(j=i;j<=i;j++){
				
				if(dt[j].num==num || dt[j].num==0){
					
					dt[j].num=num;
					dt[j].total=(price)*(volume)+dt[j].total;
					break;
				}
				
			}
		}

		hantei=0;

		for(j=0;j<n;j++){
		
			if(dt[j].total>=1000000){
				printf("%4d\n",dt[j].num);
				hantei=1;
			}
		}
	
		if(hantei==0){
			printf("NA\n");
		}

	}

	return 0;
}

	

Compiler output:
main.c: In function 'main':
main.c:20:17: error: unknown type name 'staff_data'; use 'struct' keyword to refer to the type
   20 |                 staff_data dt[4000]={0};
      |                 ^~~~~~~~~~
      |                 struct 
main.c:28:41: error: request for member 'num' in something not a structure or union
   28 |                                 if(dt[j].num==num || dt[j].num==0){
      |                                         ^
main.c:28:59: error: request for member 'num' in something not a structure or union
   28 |                                 if(dt[j].num==num || dt[j].num==0){
      |                                                           ^
main.c:30:46: error: request for member 'num' in something not a structure or union
   30 |                                         dt[j].num=num;
      |                                              ^
main.c:31:46: error: request for member 'total' in something not a structure or union
   31 |                                         dt[j].total=(price)*(volume)+dt[j].total;
      |                                              ^
main.c:31:75: error: request for member 'total' in something not a structure or union
   31 |                                         dt[j].total=(price)*(volume)+dt[j].total;
      |                                                                           ^
main.c:42:33: error: request for member 'total' in something not a structure or union
   42 |                         if(dt[j].total>=1000000){
      |                                 ^
main.c:43:53: error: request for member 'num' in something not a structure or union
   43 |                                 printf("%4d\n",dt[j].num);
      |                                                     ^
Language: C

#include <stdio.h>

int main(void)
{
	int num;
	int employ_num;
	__int64 employ[4001];
	__int64 employ_money, employ_sell;
	int i;
	int flag;
	
	while (1){
		scanf("%d", &num);
		
		if (num == 0){
			break;
		}
		
		flag = 0;
		for (i = 0; i < num; i++){
			scanf("%d%I64d%I64d", &employ_num, &employ_money, &employ_sell);
			
			employ[employ_num] += employ_sell * employ_money;
			
			if (employ[employ_num] >= 1000000){
				printf("%d\n", employ_num);
				flag = 1;
			}
		}
		
		if (flag != 1){
			printf("NA\n");
		}
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: unknown type name '__int64'; did you mean '__int64_t'?
    7 |         __int64 employ[4001];
      |         ^~~~~~~
      |         __int64_t
main.c:8:9: error: unknown type name '__int64'; did you mean '__int64_t'?
    8 |         __int64 employ_money, employ_sell;
      |         ^~~~~~~
      |         __int64_t
Language: C

#include<stdio.h>

int main(void){
  long long x,emp[4001],val[4001];
  long long emp1,val1,con,flag;
  int i,j;

  while(scanf("%lld",&x),x){

    for(i=0;i<4001;i++){
      emp[i]=0;
      val[i]=0;
    }
    for(i=0;i<x;i++){
      scanf("%lld %lld")

      flag=0;
      for(j=0;j<x;j++){
	if(emp[j]==emp1){
	  flag=1;
	  val[j]+=val1*con;
	  break;
	}
      }
      if(flag==0){
	for(j=0;j<4001;j++){
	  if(emp[j]==0){
	    emp[j]=emp1;
	    val[j]=val1*con;
	    break;
	  }  
	}
      }
    }
      flag=0;
    for(j=0;j<4001;j++){
      if(val[j]>=1000000){
	printf("%d\n",emp[j]);
	flag=1;
      }
    }
    if(flag==0)printf("NA\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:25: error: expected ';' before 'flag'
   15 |       scanf("%lld %lld")
      |                         ^
      |                         ;
   16 | 
   17 |       flag=0;
      |       ~~~~
Language: C

#include<stdio.h>
void main(void)
{
	int a,b,c,d,i;
	int count;
	count=0;
	for(;;)
	{
		scanf(“%d”,&a);
		if(a==0) break;
		for(i=0;i<a;i++)
		{
			scanf(“%d%d%d”,&b,&c,&d);
			if(b*c<=1000000)
{
printf(“%d”,b);
count++;
			}
			if(count==0) printf(“NA”);
		}
	}
}

Compiler output:
main.c: In function 'main':
main.c:9:23: error: stray '\342' in program
    9 |                 scanf(<U+201C>%d<U+201D>,&a);
      |                       ^~~~~~~~
main.c:9:24: error: expected expression before '%' token
    9 |                 scanf(“%d”,&a);
      |                        ^
main.c:9:26: error: stray '\342' in program
    9 |                 scanf(<U+201C>%d<U+201D>,&a);
      |                                 ^~~~~~~~
main.c:13:31: error: stray '\342' in program
   13 |                         scanf(<U+201C>%d%d%d<U+201D>,&b,&c,&d);
      |                               ^~~~~~~~
main.c:13:32: error: expected expression before '%' token
   13 |                         scanf(“%d%d%d”,&b,&c,&d);
      |                                ^
main.c:13:38: error: stray '\342' in program
   13 |                         scanf(<U+201C>%d%d%d<U+201D>,&b,&c,&d);
      |                                             ^~~~~~~~
main.c:16:8: error: stray '\342' in program
   16 | printf(<U+201C>%d<U+201D>,b);
      |        ^~~~~~~~
main.c:16:9: error: expected expression before '%' token
   16 | printf(“%d”,b);
      |         ^
main.c:16:11: error: stray '\342' in program
   16 | printf(<U+201C>%d<U+201D>,b);
      |                  ^~~~~~~~
main.c:19:45: error: stray '\342' in program
   19 |                         if(count==0) printf(<U+201C>NA<U+201D>);
      |                                             ^~~~~~~~
main.c:19:48: error: stray '\342' in program
   19 |                         if(count==0) printf(<U+201C>NA<U+201D>);
      |                                                       ^~~~~~~~
main.c:19:46: error: 'NA' undeclared (first use in this function)
   19 |                         if(count==0) printf(“NA”);
      |                                              ^~
main.c:19:46: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
	int a,b,c,d,i;
	int count;
	count=0;
	while(1)
	{
		scanf(“%d”,&a);
		if(a==0) break;
		for(i=0;i<a;i++)
		{
			scanf(“%d %d %d”,&b,&c,&d);
			if(c*d<=1000000)
{
printf(“%d”,b);
count++;
			}
			if(count==0) printf(“NA”);
		}
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:23: error: stray '\342' in program
    9 |                 scanf(<U+201C>%d<U+201D>,&a);
      |                       ^~~~~~~~
main.c:9:24: error: expected expression before '%' token
    9 |                 scanf(“%d”,&a);
      |                        ^
main.c:9:26: error: stray '\342' in program
    9 |                 scanf(<U+201C>%d<U+201D>,&a);
      |                                 ^~~~~~~~
main.c:13:31: error: stray '\342' in program
   13 |                         scanf(<U+201C>%d %d %d<U+201D>,&b,&c,&d);
      |                               ^~~~~~~~
main.c:13:32: error: expected expression before '%' token
   13 |                         scanf(“%d %d %d”,&b,&c,&d);
      |                                ^
main.c:13:40: error: stray '\342' in program
   13 |                         scanf(<U+201C>%d %d %d<U+201D>,&b,&c,&d);
      |                                               ^~~~~~~~
main.c:16:8: error: stray '\342' in program
   16 | printf(<U+201C>%d<U+201D>,b);
      |        ^~~~~~~~
main.c:16:9: error: expected expression before '%' token
   16 | printf(“%d”,b);
      |         ^
main.c:16:11: error: stray '\342' in program
   16 | printf(<U+201C>%d<U+201D>,b);
      |                  ^~~~~~~~
main.c:19:45: error: stray '\342' in program
   19 |                         if(count==0) printf(<U+201C>NA<U+201D>);
      |                                             ^~~~~~~~
main.c:19:48: error: stray '\342' in program
   19 |                         if(count==0) printf(<U+201C>NA<U+201D>);
      |                                                       ^~~~~~~~
main.c:19:46: error: 'NA' undeclared (first use in this function)
   19 |                         if(count==0) printf(“NA”);
      |                                              ^~
main.c:19:46: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int n,num[4000];
long long int tanka[4000],sale_num[4000],sale_all[4001];
bool judge[4001];

int main(void)
{
int i,j,k;
	
while(scanf("%d",&n),n){
	for(i=0;i<n;i++){
		scanf("%d %lld %lld",&num[i],&tanka[i],&sale_num[i]);
	}
	k=0;
	for(j=0;j<4001;j++){
	judge[j]=0;
	sale_all[i]=0;
	}
	for(i=0;i<n;i++){
		sale_all[num[i]] += tanka[i]*sale_num[i];
	}
	for(i=0; i < n; i++){
		if((sale_all[num[i]] >= 1000000)&&(judge[num[i]]==0)){
			printf("%d\n",num[i]);
			judge[num[i]]=1;
			k=1;
		}
	}
	if(k!=1)printf("NA\n");
}

	return 0;
}

Compiler output:
main.c:5:1: error: unknown type name 'bool'
    5 | bool judge[4001];
      | ^~~~
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 |
Language: C

#include <stdio.h>
 
int n,num[4000];
long long int tanka,sale_num,sale_sum[4000],sale_all[4001];
short judge[4001];
 
int main(void)
{
int i,j,k;
     
while(scanf("%d",&n),n){
    for(i=0;i<n;i++){
        scanf("%d %lld %lld",&num[i],&tanka,&sale_num);
        sale_sum[i] = tanka*sale_num;
    }
    k=0;
    for(j=0;j<4001;j++){
    judge[j]=0;
    sale_all[j]=0;
    }
    for(i=0;i<n;i++){
        sale_all[num[i]] += tanka[i]*sale_num[i];
    }
    for(i=0; i < n; i++){
        if((sale_all[num[i]] >= 1000000)&&(judge[num[i]]==0)){
            printf("%d\n",num[i]);
            judge[num[i]]=1;
            k=1;
        }
    }
    if(k!=1)printf("NA\n");
}
 
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:22:34: error: subscripted value is neither array nor pointer nor vector
   22 |         sale_all[num[i]] += tanka[i]*sale_num[i];
      |                                  ^
main.c:22:46: error: subscripted value is neither array nor pointer nor vector
   22 |         sale_all[num[i]] += tanka[i]*sale_num[i];
      |                                              ^
Language: C

int main(void)
{
	int n=0;
	int i=0;
	int tanka[4001]={0};
	int hito[4001]={0};
	int flg=0;
	int uriage[4001]={0};
	int bangou[4001]={0};
	int ccc=0;
	while(true)
	{
		flg=0;
		ccc=0;
		scanf("%d",&n);
		if (n==0)
		{
			break;
		}
		for (i=1;i<=n;i++)
		{
			ccc++;
			scanf("%d %d %d",&bangou[ccc],&tanka[ccc],&uriage[ccc]);
		}
		for (i=1;i<=ccc;i++)
		{
			if (tanka[i]*uriage[i]>=1000000)
			{
				printf("%d\n",bangou[i]);
				flg=1;
			}
		}
		if (flg==0)
		{
			printf("NA\n");
		}
	}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: 'true' undeclared (first use in this function)
   11 |         while(true)
      |               ^~~~
main.c:1:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
  +++ |+#include <stdbool.h>
    1 | int main(void)
main.c:11:15: note: each undeclared identifier is reported only once for each function it appears in
   11 |         while(true)
      |               ^~~~
main.c:15:17: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   15 |                 scanf("%d",&n);
      |                 ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void)
main.c:15:17: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   15 |                 scanf("%d",&n);
      |                 ^~~~~
main.c:15:17: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:29:33: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   29 |                                 printf("%d\n",bangou[i]);
      |                                 ^~~~~~
main.c:29:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:29:33: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:29:33: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:35:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   35 |                         printf("NA\n");
      |                         ^~~~~~
main.c:35:25: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

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

int main(void){

  long long i,j,k,l;
  long long n;
  long long flag;
  long long data[3];
  long lomg judge[4000]={0};
  long long src[4000];

  while(1){
    k=0;
    memset(src,0,sizeof(src));

    scanf("%d",&n);
    if(n==0)break;

    for(i=0;i<n;i++){
      scanf("%d %d %d",&data[0],&data[1],&data[2]);
      flag=0;
      for(j=0;j<k+1;j++){
	if(data[0]==judge[j]){
	  src[j]+=data[1]*data[2];
	  flag=1;
	}
      }
      if(flag==0){
	judge[k]=data[0];
	src[k]+=data[1]*data[2];
	k++;
      }
    }

    flag=0;
    for(i=0;i<k+1;i++){
      if(src[i]>=1000000){
	printf("%d\n",judge[i]);
	flag=1;
      }
    }
    if(flag==0){
      printf("NA\n");
    }
  }
  return(0);
}

Compiler output:
main.c: In function 'main':
main.c:10:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'judge'
   10 |   long lomg judge[4000]={0};
      |             ^~~~~
main.c:10:13: error: 'judge' undeclared (first use in this function)
main.c:10:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:25: error: expected expression before '{' token
   10 |   long lomg judge[4000]={0};
      |                         ^
Language: C


    long int shain[4000];
    int million[4000];
    int n;
    int i;
    int c;
    long int bango,tanka,kosu;
    
    scanf("%d",&n);
    
    while(n!=0){
        for(i=0;i<4000;i++){
            shain[i]=0;
            million[i]=0;
        }
        
        for(i=0;i<n;i++){
            scanf("%d %d %d",&bango,&tanka,&kosu);
            shain[bango-1]+=tanka*kosu;
        }
        
        for(i=0;i<4000;i++){
            if(shain[i]>=1000000){
                million[c]=i+1;
                c++;
            }
        }
        if(c==0){
            printf("NA\n");
        }else{
            for(i=0;i<c;i++){
                printf("%d\n",million[i]);
            }
        }
        
        scanf("%d",&n);
        c=0;
    }
    
    return 0;
}

Compiler output:
main.c:9:11: error: expected declaration specifiers or '...' before string constant
    9 |     scanf("%d",&n);
      |           ^~~~
main.c:9:16: error: expected declaration specifiers or '...' before '&' token
    9 |     scanf("%d",&n);
      |                ^
main.c:11:5: error: expected identifier or '(' before 'while'
   11 |     while(n!=0){
      |     ^~~~~
main.c:40:5: error: expected identifier or '(' before 'return'
   40 |     return 0;
      |     ^~~~~~
main.c:41:1: error: expected identifier or '(' before '}' token
   41 | }
      | ^
Language: C

include<stdio.h>
main(){
  long long int a[4000],b[4000],c[4000];
  int date,to,i,j,cou[4000]={0};
  while(1){
    scanf("%d",&date);
    if(date == 0) break;
    for(i=0;i<date;i++){
      scanf("%d %lld %lld",&a[i],&b[i],&c[i]);
      cou[i] = b[i]*c[i];
      for(j=0;j<i;j++){
	if(cou[i] == cou[j]){
	  cou[j] = cou[i] + cou[j];
	  cou[i] = 0;
	}
      }
    }
    to = 0;
    for(i=0;i<date;i++){ 
      if(cou[i]>=1000000){
	printf("%d\n",a[i]);
	to=1;
      }
    }
    if(to == 0){
      printf("NA\n");
    }
  } 
  return 0;
}

    

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

#include <stdio.h>

int main(void)
{
	int n, sales, num, sales;
	int i, j, mem;
	long long int staf[4005][2];
	int flag;
	
	while (1){
		
		scanf("%d", &n);
		
		if (n == 0) break;
		
		mem = 0;
		
		for (i = 0; i < n; i++){
			scanf("%d %d %d", &num, &cost, &sales);
			flag = 0;
			
			for (j = 0; j < mem; j++){
				if (staf[j][0] == num){
					staf[j][1] += cost * sales;
					flag = 1;
				}
			}
			
			if (flag == 0) {
				staf[i][0] = num;
				staf[i][1] = cost * sales;
				mem++;
			}
		}
		flag = 0;
		for (i = 0; i < mem; i++){
			if (staf[i][1] >= 1000000){
				printf("%lld\n", staf[i][0]);
				flag = 1;
			}
		}
		
		if (flag == 0) puts("NA");
	}
	return (0);
}
		
		

Compiler output:
main.c: In function 'main':
main.c:5:28: error: redeclaration of 'sales' with no linkage
    5 |         int n, sales, num, sales;
      |                            ^~~~~
main.c:5:16: note: previous declaration of 'sales' with type 'int'
    5 |         int n, sales, num, sales;
      |                ^~~~~
main.c:19:50: error: 'cost' undeclared (first use in this function)
   19 |                         scanf("%d %d %d", &num, &cost, &sales);
      |                                                  ^~~~
main.c:19:50: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

int main(){
	int n;
	while (cin >> n)
	{	bool f = false;
		int e[4000], p[4000], q[4000], t[4000];
		for (int i = 0; i < n; i++)
		{
			cin >> e[i];
			cin >> p[i];
			cin >> q[i];
			t[i] = p[i] * q[i];
		}

		for (int a = 0; a < n; a++)
		{
			if (t[a] >= 1000000)
			{
				cout << e[a] << endl;
				f = true;
			}
		
		
		}
		if (!f)
		{
			cout << "NA" << endl;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:16: error: 'cin' was not declared in this scope
    3 |         while (cin >> n)
      |                ^~~
a.cc:18:33: error: 'cout' was not declared in this scope
   18 |                                 cout << e[a] << endl;
      |                                 ^~~~
a.cc:18:49: error: 'endl' was not declared in this scope
   18 |                                 cout << e[a] << endl;
      |                                                 ^~~~
a.cc:26:25: error: 'cout' was not declared in this scope
   26 |                         cout << "NA" << endl;
      |                         ^~~~
a.cc:26:41: error: 'endl' was not declared in this scope
   26 |                         cout << "NA" << endl;
      |                                         ^~~~
Language: C++

#include <cstdio>
#include <queue>
using namespace std;

const int sales = 1000000;

int main()
{
	int n;
	while(scanf("%d",&n),n) {
		bool flag[4000]={flalse};
		queue<int> employee_n;
		for(int i=0;i<n;++i) {
			int number,a,b;
			scanf("%d %d %d",&number,&a,&b);
			if(sales>a*b||flag[number-1]) continue;
			flag[number-1]=true;
			employee_n.push(number);
		}
		while(!employee_n.empty()){
			printf("%d\n",employee_n.front());
			employee_n.pop();
		}
		if(employee_n.empty()) puts("NA");
	}	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: 'flalse' was not declared in this scope
   11 |                 bool flag[4000]={flalse};
      |                                  ^~~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
  int n;//データ数
  while(cin >> n){
    int arr[4000];//社員番号
    int selling[n];//販売単科
    int sales[n];//売り上げ数量
    int num;
    int check=0;
    //社員は4000人未満
    memset(arr,0,sizeof(arr));
    if(n==0)
      break;
    for(int i=0;i<n;i++){
      cin >> num >> selling[i] >> sales[i];
      arr[num]+=selling[i]*sales[i];
      if(arr[num]>=1000000){
        cout << num << endl;
        check++;
      }
    }
    if(check==0)
      cout << "NA" << endl;
    check=0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'memset' was not declared in this scope
   13 |     memset(arr,0,sizeof(arr));
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++


int main(){

	long all[4001] = {};
	long code, a, b, n, i,j;

	while (1){
		j = 0;
		for (i = 0; i < 4001; i++){
			all[i] = 0;
		}


		cin >> n;
		if (n == 0){
			break;
		}

		for (i = 0; i < n; i++){
			cin >> code >> a >> b;
			all[code] += a*b;
			
		}

		for (i = 0; i < 4001; i++){
			if (all[i] >= 1000000){
				cout << i << endl;
				j++;
			}
		}

		if (j == 0){
			cout << "NA" << endl;
		}

	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'cin' was not declared in this scope
   14 |                 cin >> n;
      |                 ^~~
a.cc:27:33: error: 'cout' was not declared in this scope
   27 |                                 cout << i << endl;
      |                                 ^~~~
a.cc:27:46: error: 'endl' was not declared in this scope
   27 |                                 cout << i << endl;
      |                                              ^~~~
a.cc:33:25: error: 'cout' was not declared in this scope
   33 |                         cout << "NA" << endl;
      |                         ^~~~
a.cc:33:41: error: 'endl' was not declared in this scope
   33 |                         cout << "NA" << endl;
      |                                         ^~~~
Language: C++

    while (scanf("%d", &data_num)) {
        
        if (data_num == 0) break;
        
        data_num_update = data_num;
        for (int i = 0; i < data_num; ++i) {
            scanf("%d %lld %lld", &employee_num[i], &unit_sale_num[i],  &sale_num[i]);
        }
        
        int data_check = 0;

        while (data_check < data_num - 1) {
            for (int i = data_check + 1; i < data_num; ++i) {
                if (employee_num[data_check] == employee_num[i]) {
                    sale_num[data_check] += sale_num[i];
                    unit_sale_num[data_check] += unit_sale_num[i];
                    data_num_update--;
                }
            }
            data_check++;
        }
        
        bool result_flag = true;
        
        for (int i = 0; i < data_num_update; ++i) {
            if (unit_sale_num[i] * sale_num[i] >= 1000000) {
                printf("%d\n", employee_num[i]);
                result_flag = false;
            }
            
            if (result_flag) {
                printf("NA\n");
                break;
            }
        }
    }

    return 0;
}

Compiler output:
a.cc:1:5: error: expected unqualified-id before 'while'
    1 |     while (scanf("%d", &data_num)) {
      |     ^~~~~
a.cc:38:5: error: expected unqualified-id before 'return'
   38 |     return 0;
      |     ^~~~~~
a.cc:39:1: error: expected declaration before '}' token
   39 | }
      | ^
Language: C++

#include <iostream>
#include <map>
#include <vector>
#define int long long int
using namespace std;
void main() {
  bool f;
  vector<pair<int, int> > v;
  int n, a, b, c;
  while (cin >> n && n > 0) {
    v.clear();
    for (int i = 0; i < n; i++) {
      cin >> a >> b >> c;
      f = 0;
      for (int j = 0; j < v.size(); j++) {
        if (v[j].first == a) {
          v[j].second += b * c;
          f = 1;
        }
      }
      if (!f) {
        v.push_back(pair<int, int>(a, b * c));
      }
    }
    f = 0;
    for (int i = 0; i < v.size(); i++) {
      if (v[i].second >= 1000000) {
        cout << v[i].first << endl;
        f = 1;
      }
    }
    if (!f) {
      cout << "NA" << endl;
    }
  }
}

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

#include <iostream>
#include <vector>
#include <cstdio>

#define TOTAL_SALES_TH (1000000)

struct SALES_INFO {
  int employeeID;
  int totalSales;
};

void updataSalesInfos(std::vector<SALES_INFO>& salesInfos, 
                      int ID,
                      int unitPrice,
                      int amount)
{
  for (std::vector<SALES_INFO>::iterator it = salesInfos.begin();
    it != salesInfos.end();
    ++it) {
    if (it->employeeID == ID) {
      it->totalSales += unitPrice * amount;
      return;
    }
  }
  SALES_INFO newInfo;
  newInfo.employeeID = ID;
  newInfo.totalSales = unitPrice * amount;
  salesInfos.push_back(newInfo);
}

int main(void)
{
  while (true) {
    int numOfInput;
    std::cin >> numOfInput;

    if (numOfInput == 0) {
      break;
    }

    int ID, unitPrice, amount;
    char deli;

    std::vector<SALES_INFO> salesInfos;

    for (int i = 0; i < numOfInput; i++) {
      scanf_s("%d %d %d", &ID, &unitPrice, &amount);
      updataSalesInfos(salesInfos, ID, unitPrice, amount);
    }

    std::vector<int> achieveList;

    for (std::vector<SALES_INFO>::iterator it = salesInfos.begin();
      it != salesInfos.end();
      ++it) {
      if (it->totalSales >= TOTAL_SALES_TH) {
        achieveList.push_back(it->employeeID);
      }
    }

    if (achieveList.size() == 0) {
      std::cout << "NA" << std::endl;
    }
    else {
      for (std::vector<int>::iterator it = achieveList.begin();
        it != achieveList.end();
        ++it) {
        std::cout << *it << std::endl;
      }
    }
  }

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:47:7: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   47 |       scanf_s("%d %d %d", &ID, &unitPrice, &amount);
      |       ^~~~~~~
      |       scanf
Language: C++

#include <cstdio>
using namespace std;

typedef __int64 Int;

int main(){
	const int AIM = 1000000;
	int n;
	int num, per, sum;
	bool exist;
	bool comp[4001];
	Int pro[4001];
	
	while(true){
		scanf("%d", &n);
		if(n == 0) break;
		for(int i = 1; i <= 4000; i++){
			comp[i] = false;
			pro[i] = 0;
		}
		exist = false;
		for(int i = 0; i < n; i++){
			scanf("%d%d%d", &num, &per, &sum);
			if(comp[num]) continue;
			if(pro[num] + (Int)per * sum >= AIM){
				exist = true;
				comp[num] = true;
				printf("%d\n", num);
			}
			else{
				pro[num] += (Int)per * sum;
			}
		}
		if(!exist) printf("NA\n");
	}
	
	return 0;
}

Compiler output:
a.cc:4:9: error: '__int64' does not name a type; did you mean '__int64_t'?
    4 | typedef __int64 Int;
      |         ^~~~~~~
      |         __int64_t
a.cc: In function 'int main()':
a.cc:12:9: error: 'Int' was not declared in this scope; did you mean 'int'?
   12 |         Int pro[4001];
      |         ^~~
      |         int
a.cc:19:25: error: 'pro' was not declared in this scope
   19 |                         pro[i] = 0;
      |                         ^~~
a.cc:25:28: error: 'pro' was not declared in this scope
   25 |                         if(pro[num] + (Int)per * sum >= AIM){
      |                            ^~~
a.cc:25:44: error: expected ')' before 'per'
   25 |                         if(pro[num] + (Int)per * sum >= AIM){
      |                           ~                ^~~
      |                                            )
Language: C++

#include <map>
#include <iostream>
#include <vector>
using namespace std;
int main(){
    map<int,long long int> emps;
    vector<int> ids;
    int id,cost,amount,n;
    while(cin >> n,n){
        for(int i=0;i<n;i++){
            cin >> id >> cost >> amount;
            if(emps.find(id)!=emps.end()){
                emps[id]+=cost*amount;
            }else{
                emps[id]=cost*amount;
                ids.push_back(id);
            }
        }
        sort(ids.begin(),ids.end());
        for(int i=0;i<ids.size();i++){
            if(emps.at(ids[i])>=1000000) cout << ids[i] << endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   19 |         sort(ids.begin(),ids.end());
      |         ^~~~
      |         short
Language: C++

//AOJ0100
#include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
using namespace std;
#define int long long
void main(){
	int n;
	while(cin>>n,n!=0){
vector< pair<int,int> >ta;
ta.clear();
for(int i=0;i<n;i++){
int a,b,c;
cin>>a>>b>>c;
bool f=0;
int index=0;
for(int j=0;j<ta.size();j++)if(ta[j].first==a)f=1,index=j;
if(f==0)ta.push_back(pair<int,int>(a,b*c));
else ta[index].second+=b*c;
}
bool f=0;
for(int i=0;i<ta.size();i++){
	cout<<ta[i].first<<"   "<<ta[i].second<<endl;
	if(ta[i].second>=1000000){cout<<ta[i].first<<endl;;f=1;}
}
	if(!f)cout<<"NA"<<endl;
}
	return ;
}

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

/* -- 0100:Sale Result -- */
#include	<iostream>
#include	<map>

using namespace std;

typedef unsigned __int64 ull;

int main(void) {
	int n, buf_n, buf_c, buf_p;
	bool flag;
	ull buf_t;
	map<int, ull> List;

	while(1) {
		cin >> n;
		if(n == 0) { break; }

		flag = true;
		List.clear();
		for(int i=0; i<n; i++) {
			cin >> buf_n >> buf_p >> buf_c;
			buf_t = buf_p * buf_c;
			if(List.find(buf_n) == List.end()) {
				List[buf_n] = buf_t;
			} else {
				List[buf_n] += buf_t;
			}
		}
		map<int, ull>::iterator it = List.begin();
		while( it != List.end() ) {
			if(it->second >= 1000000) { flag = false; cout << it->first << endl; }
			it++;
		}
		if(flag) { cout << "NA" << endl; }
	}
	return 0;
}

Compiler output:
a.cc:7:26: error: expected initializer before 'ull'
    7 | typedef unsigned __int64 ull;
      |                          ^~~
a.cc: In function 'int main()':
a.cc:12:9: error: 'ull' was not declared in this scope
   12 |         ull buf_t;
      |         ^~~
a.cc:13:21: error: template argument 4 is invalid
   13 |         map<int, ull> List;
      |                     ^
a.cc:20:22: error: request for member 'clear' in 'List', which is of non-class type 'int'
   20 |                 List.clear();
      |                      ^~~~~
a.cc:23:25: error: 'buf_t' was not declared in this scope; did you mean 'buf_p'?
   23 |                         buf_t = buf_p * buf_c;
      |                         ^~~~~
      |                         buf_p
a.cc:24:33: error: request for member 'find' in 'List', which is of non-class type 'int'
   24 |                         if(List.find(buf_n) == List.end()) {
      |                                 ^~~~
a.cc:24:53: error: request for member 'end' in 'List', which is of non-class type 'int'
   24 |                         if(List.find(buf_n) == List.end()) {
      |                                                     ^~~
a.cc:25:37: error: invalid types 'int[int]' for array subscript
   25 |                                 List[buf_n] = buf_t;
      |                                     ^
a.cc:27:37: error: invalid types 'int[int]' for array subscript
   27 |                                 List[buf_n] += buf_t;
      |                                     ^
a.cc:30:29: error: template argument 4 is invalid
   30 |                 map<int, ull>::iterator it = List.begin();
      |                             ^
a.cc:30:41: error: expected initializer before 'it'
   30 |                 map<int, ull>::iterator it = List.begin();
      |                                         ^~
a.cc:31:24: error: 'it' was not declared in this scope; did you mean 'int'?
   31 |                 while( it != List.end() ) {
      |                        ^~
      |                        int
a.cc:31:35: error: request for member 'end' in 'List', which is of non-class type 'int'
   31 |                 while( it != List.end() ) {
      |                                   ^~~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int bangou,tanka,kosuu;
    int number; cin >> number;
    do{
        int man[4000];
        for(int i=0;i<4000;i++){
            man[i]=0;
        }
        for(int i=0;i<number;i++){
            cin >> bangou >> tanka >> kosuu;
            man[bangou] += tanka*kosuu;
        }
        int count =0;
        for(int i=0;i<4000;i++){
            if(man[i]>=1000000){
                cout << i;
                count++;
            }
        }
        if(count==0)
            cout<< "NA" << endl;
        cin >> number;
    }while(number !=0)

}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:23: error: expected ';' before '}' token
   25 |     }while(number !=0)
      |                       ^
      |                       ;
   26 | 
   27 | }
      | ~
Language: C++

#include<stdio.h>

int main(){
int N;
int n,m,p;
int P[4001][3]={};
int PT[4001][3]={};

while(1){
scanf("%d",&N);if(N==0)break;

for(int i=1;i<=N;i++){
scanf("%d %d %d",&n,&m,&p);
P[n][0]+=m*p;if(P[n][1]==0)P[n][1]=i;
}
int c=0;
for(int i=0;i<4000;i++)
if(1000000<=P[i][0]){PT[c][0]=P[i][0];PT[c][1]=P[i][1];c++;}

for(int i=0;i<c;i++)
for(int j=c-1;j>i;j--)
if(PT[j][1]<PT[j-1][1]){int TT=PT[j][1];PT[j][1]=PT[j-1][1];PT[j-1][1]=TT;}

for(int i=0;i<c;i++)
printf("%d\n",PT[i][1]);
}
RETURN 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:1: error: 'RETURN' was not declared in this scope
   27 | RETURN 0;
      | ^~~~~~
Language: C++

#include<cstdio>

using namespace std;
const int target = 1000000;

int main()
{
	int data;
	while (1)
	{
		scanf_s("%d", &data);
		if (data == 0)break;
		bool hero = false;
		for (int i = 0; i < data; i++)
		{
			int num, sell, cnt;
			scanf_s("%d %d %d", num, sell, cnt);
			if (sell*cnt >= target)
			{
				printf("%d\n", num);
				hero = true;
			}
		}
		if (hero == false)
			printf("NA\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   11 |                 scanf_s("%d", &data);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include<cstdio>
#include<vector>

using namespace std;
const int target = 1000000;
vector<int> heros;

int main()
{
	int data;
	while (1)
	{
		scanf_s("%d", &data);
		if (data == 0)break;
		bool hero = false;
		for (int i = 0; i < data; i++)
		{
			int num, sell, cnt;
			scanf_s("%d %d %d", &num, &sell, &cnt);
			if (sell*cnt >= target)
			{
				bool already = false;
				for (int j = 0; j < heros.size(); j++)
				{
					if (heros[j] == num)
						already = true;
				}
				if (already == false)
				{
					printf("%d\n", num);
					heros.push_back(num);
					hero = true;
				}
			}
		}
		if (hero==false)
			printf("NA\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   13 |                 scanf_s("%d", &data);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include<cstdio>
#include<algorithm>
#include<vector>
using namespace std;
const int target = 1000000;

int main()
{
	int data;
	while (1)
	{
		scanf_s("%d", &data);
		if (data == 0)break;
		vector<pair<int,int>> company;
		pair<int, int> sells;
		bool hero = false;
		int num, sell, cnt;
		for (int i = 0; i < data; i++)
		{
			scanf("%d %d %d", &num, &sell, &cnt);
			bool search = false;
			for (int j = 0; j < company.size(); j++)
			{
				if (company[j].first == num){
					search = true;
					company[j].second += sell*cnt;
					break;
				}
			}
			if (search == false)
			{
				sells.first = num;
				sells.second = sell*cnt;
				company.push_back(sells);
			}
		}
		for (int i = 0; i < company.size(); i++)
		{
			if (company[i].second >= target)
			{
				hero = true;
				printf("%d\n", company[i].first);
			}
		}
		if (hero == false)
			printf("NA\n");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   12 |                 scanf_s("%d", &data);
      |                 ^~~~~~~
      |                 scanf
Language: C++

#include <iostream>
using namespace std;

int p[4001];
int result[1000000];

int main(){
	int i ,j=0 , n , id , price , num , cnt;
	while(cin>>n){
		cnt=0;
		memset(p,0 , sizeof(p)/sizeof(p[0]));
		if (n==0) break;
		for(i=0 ; i<4001 ; i++){
			p[i]=false;
		}
		for(i=0 ; i<n ; i++){
			cin >> id >> price >> num;
				p[id]+=price*num;
			}
		for(i=0 ; i<4001 ; i++){
			if(p[i]>=1000000){
				result[j++]=i;
				cnt++;
			}
		}
		if (cnt==0) {
				result[j++]=0;
			}
	}
	for(i=0;i<j;i++){
		if (result[i]==0) {
			cout << "NA" << endl;
		} else {
		cout << result[i] << endl;
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: 'memset' was not declared in this scope
   11 |                 memset(p,0 , sizeof(p)/sizeof(p[0]));
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

#include <cstdio>
#include <iostream>
#include <iomanip>
#include <string> 
#include <vector> 
using namespace std;

int in;
cin >> in
int p[in][in * 3],i,ii,c = 0,uri[in],k;	
	for(i = 1;in >= i;i++){ cin >> p[i][0] >> p[i][1] >> p[i][2];uri[i] = 0;}	
	for(i = 1;in >= i;i++){
		for(ii = 1;in >= ii;ii++){if(p[i][0] == p[ii][0]){ uri[ii] = uri[ii] + p[i][1] * p[i][2];}}
	}
	for(i = 1;in >= i;i++){
		k = 0;
		for(ii = 1;i > ii;ii++){if(p[i][0] == p[ii][0]){ k = 1;} }		
			if(uri[i] >= 1000000 and k == 0){cout << p[i][0] << endl; c++;} 
	}
	if(c == 0 and in != 0) cout << "NA" << endl;

}

Compiler output:
a.cc:9:1: error: 'cin' does not name a type
    9 | cin >> in
      | ^~~
a.cc:11:9: error: expected unqualified-id before 'for'
   11 |         for(i = 1;in >= i;i++){ cin >> p[i][0] >> p[i][1] >> p[i][2];uri[i] = 0;}
      |         ^~~
a.cc:11:19: error: 'in' does not name a type; did you mean 'int'?
   11 |         for(i = 1;in >= i;i++){ cin >> p[i][0] >> p[i][1] >> p[i][2];uri[i] = 0;}
      |                   ^~
      |                   int
a.cc:11:27: error: 'i' does not name a type
   11 |         for(i = 1;in >= i;i++){ cin >> p[i][0] >> p[i][1] >> p[i][2];uri[i] = 0;}
      |                           ^
a.cc:12:9: error: expected unqualified-id before 'for'
   12 |         for(i = 1;in >= i;i++){
      |         ^~~
a.cc:12:19: error: 'in' does not name a type; did you mean 'int'?
   12 |         for(i = 1;in >= i;i++){
      |                   ^~
      |                   int
a.cc:12:27: error: 'i' does not name a type
   12 |         for(i = 1;in >= i;i++){
      |                           ^
a.cc:15:9: error: expected unqualified-id before 'for'
   15 |         for(i = 1;in >= i;i++){
      |         ^~~
a.cc:15:19: error: 'in' does not name a type; did you mean 'int'?
   15 |         for(i = 1;in >= i;i++){
      |                   ^~
      |                   int
a.cc:15:27: error: 'i' does not name a type
   15 |         for(i = 1;in >= i;i++){
      |                           ^
a.cc:20:9: error: expected unqualified-id before 'if'
   20 |         if(c == 0 and in != 0) cout << "NA" << endl;
      |         ^~
a.cc:22:1: error: expected declaration before '}' token
   22 | }
      | ^