submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s054829223
p02264
C
5 100 p1 150 p2 80 p3 200 p4 350 p5 20
main.c:1:1: error: expected identifier or '(' before numeric constant 1 | 5 100 | ^
s756902168
p02264
C
#include<stdio.h> #include<string.h> #define N 100000 #define QON 1000 #define LEN 100005 typedef struct pp{ char name[100]; int time; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ } P dequeue(){ } int main(){ int elaps = 0, c; int i, q; P u; scanf("%d %d", &n, &q); for ( i = 1; i <= n; i...
main.c: In function 'main': main.c:32:22: error: 'P' {aka 'struct pp'} has no member named 't' 32 | scanf("%d", &Q[i].t); | ^
s554578269
p02264
C
int main(){ int i,j,time; int total_time = 0; int Process_number; scanf("%d %d",&Process_number,&time); for( tail = 0 ; tail < Process_number ; tail++){ scanf("%s %d",Process_name[tail],&Process_time[tail]); } while(head != tail){ Process_time[head] -= time; if(Process_time[...
main.c: In function 'main': main.c:7:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 7 | scanf("%d %d",&Process_number,&time); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:7:3: w...
s655944727
p02264
C
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(){ char c[100001][10],box[10]; int time[100001]; int i,n,q,top=0,tail=0,fcount=0,tcount=0,judgec=0; scanf("%d%d",&n,&q); for(i=0;fcount != n;i++){ if(i < n){ scanf("%s%d",c[i],&time[i]); tail++; } if(time[top]-q <=...
main.c: In function 'main': main.c:29:9: error: expected declaration or statement at end of input 29 | else top++; | ^~~~ main.c:29:9: error: expected declaration or statement at end of input main.c:29:9: error: expected declaration or statement at end of input
s231675266
p02264
C
#include<stdio.h> #include<string.h> #define LEN 10005 typedef struct kouzou{ char name[100]; int t; }K; K Q[LEN]; int head,tail,n; void enqueue(K x){ Q[tail] = x; tail += 1; tail = tail % LEN; } K dequeue(){ K x = Q[head]; head += 1; head = head % LEN; return x; } int main(void){ int min(int,i...
/usr/bin/ld: /tmp/ccqUEPmW.o: in function `main': main.c:(.text+0x3ee): undefined reference to `min' collect2: error: ld returned 1 exit status
s375472169
p02264
C
#include<stdio.h> #define MAX 100000 typedef struct{ char name[100]; int time; } roll; void enqueue(roll); roll dequeue(void); int head=0,tail=0; roll Q[MAX]; int main(void){ int n,q,i,sum=0; roll p; scanf("%d%d",&n,&q); for(i=0;i<n;i++){ scanf("%s%d",p.name,&p.time); enqueue(p); } while(1){ i...
/usr/bin/ld: /tmp/cchaeQXF.o: in function `main': main.c:(.text+0xe0): undefined reference to `enqueue' /usr/bin/ld: main.c:(.text+0x14c): undefined reference to `dequeue' /usr/bin/ld: main.c:(.text+0x269): undefined reference to `enqueue' /usr/bin/ld: main.c:(.text+0x287): undefined reference to `dequeue' collect2: er...
s256963035
p02264
C
#include<stdio.h> #include<string.h> #define N 100000 typedef struct pp{ char name[100]; int time; }Process; void enqueue(){ Q[head].time = Q[head].time -q; Q[tail] = Q[head]; if(tail > n+1) tail = 0; else tail++; } void dequeue(){ printf("%s %d\n",Q[head].name, Q[head].time+c); } int head, tail, n...
main.c: In function 'enqueue': main.c:11:3: error: 'Q' undeclared (first use in this function) 11 | Q[head].time = Q[head].time -q; | ^ main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in main.c:11:5: error: 'head' undeclared (first use in this function) 1...
s008983859
p02264
C
#include<stdio.h> #include<string.h> #define N 100000 typedef struct pp{ char name[100]; int time; }Process; void enqueue(){ Q[head].time = Q[head].time -q; Q[tail] = Q[head]; if(tail > n+1) tail = 0; else tail++; } void dequeue(){ printf("%s %d\n",Q[head].name, Q[head].time+c); } int head, tail, n...
main.c: In function 'enqueue': main.c:11:3: error: 'Q' undeclared (first use in this function) 11 | Q[head].time = Q[head].time -q; | ^ main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in main.c:11:5: error: 'head' undeclared (first use in this function) 1...
s528053675
p02264
C
#include<stdio.h> #define MAX 100000 typedef struct{ char name[100]; int time; } queue; void enqu(roll); roll dequ(void); int head=0,tail=0; roll C[MAX]; main(){ int n,m,i,sum=0; queue D[MAX]; scanf("%d%d",&n,&m); for(i=0;i<n;i++){ scanf("%s%d",D.name,&D.time); enqueue(D);...
main.c:8:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 8 | void enqu(roll); | ^~~~ main.c:9:1: error: unknown type name 'roll' 9 | roll dequ(void); | ^~~~ main.c:12:1: error: unknown type name 'roll' 12 | roll C[MAX]; | ^~~~ main.c:...
s207003744
p02264
C
#include<stdio.h> #define MAX 100000 typedef struct{ char name[100]; int time; } queue; void enqu(roll); roll dequ(void); int head=0,tail=0; queue C[MAX]; main(){ int n,m,i,sum=0; queue D[MAX]; scanf("%d%d",&n,&m); for(i=0;i<n;i++){ scanf("%s%d",D.name,&D.time); ...
main.c:8:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 8 | void enqu(roll); | ^~~~ main.c:9:1: error: unknown type name 'roll' 9 | roll dequ(void); | ^~~~ main.c:14:5: error: return type defaults to 'int' [-Wimplicit-int] 14 | main(){...
s514362087
p02264
C
#include<stdio.h> #define MAX 100000 typedef struct{ char name[100]; int time; } queue; void enqu(queue); queue dequ(void); int head=0,tail=0; queue C[MAX]; main(){ int n,m,i,sum=0; queue D[MAX]; scanf("%d%d",&n,&m); for(i=0;i<n;i++){ scanf("%s%d",D.name,&D.time); ...
main.c:14:5: error: return type defaults to 'int' [-Wimplicit-int] 14 | main(){ | ^~~~ main.c: In function 'main': main.c:20:27: error: '(queue *)&D' is a pointer; did you mean to use '->'? 20 | scanf("%s%d",D.name,&D.time); | ^ | ...
s241504365
p02264
C
#include<stdio.h> #define MAX 100000 typedef struct{ char name[100]; int time; } queue; void enqu(queue); queue dequ(void); int head=0,tail=0; queue C[MAX]; main(){ int n,m,i,sum=0; queue D; scanf("%d%d",&n,&m); for(i=0;i<n;i++){ scanf("%s%d",D.name,&D.time); ...
main.c:14:5: error: return type defaults to 'int' [-Wimplicit-int] 14 | main(){ | ^~~~ main.c: In function 'main': main.c:25:17: error: subscripted value is neither array nor pointer nor vector 25 | if(D[head].time > m){ | ^ main.c:26:21: error: incompatible types w...
s299207226
p02264
C
#include<stdio.h> #define MAX 100000 typedef struct{ char name[100]; int time; } queue; void enqu(queue); queue dequ(void); int head=0,tail=0; queue C[MAX]; main(){ int n,m,i,sum=0; queue D; scanf("%d%d",&n,&m); for(i=0;i<n;i++){ scanf("%s%d",D->name,&D->time); ...
main.c:14:5: error: return type defaults to 'int' [-Wimplicit-int] 14 | main(){ | ^~~~ main.c: In function 'main': main.c:20:27: error: invalid type argument of '->' (have 'queue') 20 | scanf("%s%d",D->name,&D->time); | ^~ main.c:20:36: error: invalid type...
s061511665
p02264
C
#include<stdio.h> #define MAX 100000 typedef struct{ char name[100]; int time; } queue; void enqu(queue); queue dequ(void); int head=0,tail=0; queue C[MAX]; main(){ int n,m,i,sum=0; queue D; scanf("%d%d",&n,&m); for(i=0;i<n;i++){ scanf("%s%d",D.name,&D.time); ...
main.c:14:5: error: return type defaults to 'int' [-Wimplicit-int] 14 | main(){ | ^~~~ main.c: In function 'main': main.c:26:21: error: incompatible types when assigning to type 'int' from type 'queue' 26 | m = dequ(); | ^~~~ main.c:32:21: error: implicit de...
s204406300
p02264
C
#include <stdio.h> #include <string.h> #define N 100000 int main(){ int n, q, time[N], head = 0, tail = 0, t = 0, i; char name[11][N]; scanf("%d%d" ,&n ,&q); for(i = 0; i < n; i++){ scanf("%s%d", name[i], &time[i]); tail += 1; } while(1){ if(head == tail) break; if(time[head] > q){ ...
main.c:31:3: error: expected identifier or '(' before 'return' 31 | return 0; | ^~~~~~ main.c:32:1: error: expected identifier or '(' before '}' token 32 | } | ^
s461979787
p02264
C
#include <stdio.h> #include <string.h> #define N 100000 int main(){ int n, q, time[N], head = 0, tail = 0, t_sum = 0, i; char name[11][N]; scanf("%d%d" ,&n ,&q); for(i = 0; i < n; i++){ scanf("%s%d", name[i], &time[i]); tail += 1; } while(head != tail){ if(time[head] > q){ t_sum += q; ...
main.c:32:3: error: expected identifier or '(' before 'return' 32 | return 0; | ^~~~~~ main.c:33:1: error: expected identifier or '(' before '}' token 33 | } | ^
s683308221
p02264
C
#include<stdio.h> #define N 100000 typedef struct pro{ char name[10]; int tim; }P; P Q[N+1]; int length,quantum; int top,end; void enqueue(P); proceses dequeue(void); void printqueue(void); main(){ int i; P p; int t_time=0; int count=0; scanf("%d %d",&length,&quantum); top = length/2; ...
main.c:14:1: error: unknown type name 'proceses' 14 | proceses dequeue(void); | ^~~~~~~~ main.c:17:1: error: return type defaults to 'int' [-Wimplicit-int] 17 | main(){ | ^~~~ main.c: In function 'main': main.c:36:9: error: incompatible types when assigning to type 'P' {aka 'struct pro'} from type 'in...
s374676354
p02264
C
include<stdio.h> #include<string.h> typedef struct { char name[10]; int time; }QUE; int main(){ int i,sum=0,shori,N,Q,head=0,tail; QUE task[100000]; scanf("%d%d",&N,&Q); tail = N-1; shori = N; for(i=0;i<N;i++){ scanf("%s",task[i].name); scanf("%d",&task[i].time); } while(shori>0){ if(ta...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s193430834
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN]; int head, tail, n; void enqueue(P x){ Q[tail] = x; tail = (tail + 1) % LEN; } P dequeue(){ P x = Q[head]; head = (head + 1) % LEN; return x; } int min(int a, int b){ return a < b ? a : b; }...
main.c: In function 'main': main.c:36:3: error: implicit declaration of function 'While' [-Wimplicit-function-declaration] 36 | While ( head != tail ){ | ^~~~~ main.c:36:25: error: expected ';' before '{' token 36 | While ( head != tail ){ | ^ | ...
s219375464
p02264
C
#include<stdio.h> #include<string.h> int a; int q; typedef struct{ char name[100]; int time; } Queue; Queue Q[10000000]; int n; int head = 0, tail = 0; void enqueue(Queue x) { Q[head] = x; head++; } Queue dequeue() { tail++; return Q[tail-1]; } int main(void){ int i,j; int cnt; int SumOfTime = 0;...
main.c: In function 'main': main.c:40:9: error: 'Queue' has no member named 't' 40 | if(x.t <= q) { | ^ main.c:41:21: error: 'Queue' has no member named 't' 41 | SumOfTime += x.t; | ^ main.c:44:8: error: 'Queue' has no member named 't' 44 | x.t -= q; ...
s537643288
p02264
C
#include<stdio.h> #include<string.h> int a; int q; typedef struct{ char name[100]; int time; } Queue; Queue Q[10000000]; int n; int head = 0, tail = 0; void enqueue(Queue x) { Q[head] = x; head++; } Queue dequeue() { tail++; return Q[tail-1]; } int main(void){ int i,j; int cnt; int SumOfTime = 0;...
main.c: In function 'main': main.c:45:7: error: 'TimeOfSum' undeclared (first use in this function) 45 | TimeOfSum += q; | ^~~~~~~~~ main.c:45:7: note: each undeclared identifier is reported only once for each function it appears in
s449932150
p02264
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *n; struct node *p; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ /* your code */ } void init(){ nil = malloc(sizeof(struct node)); nil->n = nil; nil->p = nil; ...
main.c: In function 'deleteLast': main.c:53:14: error: 'd' undeclared (first use in this function) 53 | deleteNode(d); | ^ main.c:53:14: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'insert': main.c:72:6: error: 'struct node' has no m...
s677396923
p02264
C
#include<stdio.h> #define M 100000 typedef struct{ char name[10]; int time; }Que; void enqueue(int); int dequeue(void); int head=0,tail=0; Que p[M]; int main(){ Que p[M]; int i,j,n,q,k; scanf("%d%d",&n,&q); for(i=0;i<n;i++){ scanf("%s%d",p[i].name,&p[i].time); enqueue(p[i].time); } ...
main.c: In function 'main': main.c:32:22: error: expected expression before ')' token 32 | printf("%s %d",) | ^ main.c:60:1: error: expected declaration or statement at end of input 60 | } | ^
s498327540
p02264
C
#include <stdio.h> #include <string.h> #define LOOP_INIT 0 #define VER_INIT 0 #define P_NAME_MAX 10 #define P_NAME_INIT 0 #define QUEUE_MAX 100000 #define QUEUE_INIT 0 #define FIRST_ITEM 0 #define PROCESS_END -1 #define STACK_MAX 1000 #define TRUE 1 #define FALSE 0 #define EXIT_SUCCESS 0; #define INF_LOOP while( 1 ) #...
main.c: In function 'main': main.c:42:37: error: 'ulW_Cinput_cnt' undeclared (first use in this function); did you mean 'ulW_Cend_cnt'? 42 | scanf( "%s", queue[ ulW_Cinput_cnt ].ubW_Dp_name ); | ^~~~~~~~~~~~~~ | ulW_C...
s598691844
p02264
C
#include <stdio.h> #include <string.h> #define QUEUE_MAX 100005 /* ?????????????????\????????§??? */ #define NAME_MAX 100 /* ????????????????????§??? */ #define HEAD_INIT 1 /* ?????\??????????????????????????? */ #define PROCESS_END 0 /...
main.c:19:1: error: unknown type name 'Process' 19 | Process st_queue_add ); /* ??????????±??????\????????¢?????¬??? */ | ^~~~~~~ main....
s053601592
p02264
C
#include <stdio.h> #include <string.h> #define QUEUE_MAX 100005 /* ?????????????????\????????§??? */ #define NAME_MAX 100 /* ????????????????????§??? */ #define HEAD_INIT 1 /* ?????\??????????????????????????? */ #define PROCESS_END 0 /...
main.c:18:22: error: unknown type name 'Process' 18 | static void enqueue( Process st_queue_add ); /* ??????????±??????\????????¢?????¬??? ...
s612557138
p02264
C
#include<stdio.h> #include<stdlib.h> #define N int Q[]; void enqueue(int); void dequeue(void); int head=0,tail,n; char name[100001][10]; int time[100001]; void dequeue(){ int x; if(head+1 == n) head = 0; else head = head + 1; } void enqueue(int x){ time[tail]=time[x]; strcpy(name[tail],name[x]); if(head+1...
main.c: In function 'enqueue': main.c:19:3: error: implicit declaration of function 'strcpy' [-Wimplicit-function-declaration] 19 | strcpy(name[tail],name[x]); | ^~~~~~ main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcpy' 2 | #include<stdlib.h> +++ |+#include <string.h> 3 |...
s830901720
p02264
C
#include<stdio.h> #include<stdlib.h> int head=0,tail,n; rypedef struct{ char name[100]; int time; }Process; Process Q[1000000]; void enqueue(Process); Process dequeue(void); Process dequeue(Process x){ tail++; return Q[tail-1]; } void enqueue(int x){ Q[head]=x if(head+1 == n) head = 0; else head...
main.c:5:8: error: expected ';' before 'struct' 5 | rypedef struct{ | ^~~~~~~ | ; main.c:10:1: error: unknown type name 'Process' 10 | Process Q[1000000]; | ^~~~~~~ main.c:11:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] ...
s689800746
p02264
C
#include<stdio.h> #include<stdlib.h> int head=0,tail,n; rypedef struct{ char name[100]; int time; }Process; Process Q[1000000]; void enqueue(Process); Process dequeue(void); Process dequeue(void){ tail++; return Q[tail-1]; } void enqueue(Process x){ Q[head]=x; if(head+1 == n) head = 0; else head = h...
main.c:5:8: error: expected ';' before 'struct' 5 | rypedef struct{ | ^~~~~~~ | ; main.c:10:1: error: unknown type name 'Process' 10 | Process Q[1000000]; | ^~~~~~~ main.c:11:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] ...
s345511720
p02264
C
#include <stdio.h> struct pro{ char proname[8]; int protime; struct pro next; }; typedef struct pro Pro; int main(void){ int n,q,i; char *proNum[100000]; int cnt = 0; int tcnt = 0; Pro p; Pro head = {"",0,p}; scanf("%d %d",&n,&q); for( i = 0; i < n-1; i++){ scanf("%s %d",p.proname,p.protime...
main.c:6:28: error: field 'next' has incomplete type 6 | struct pro next; | ^~~~ main.c: In function 'main': main.c:23:26: error: wrong type argument to increment 23 | p.next = ++p; | ^~
s196580535
p02264
C
#include <stdio.h> #include <string.h> #define LEN 100005 /*?????????????????¨????§???????*/ typedef struct pp { char name[100]; int t; } P; P Q[LEN]; int head, tail, n; void enqueue(P x) { Q[tail] = x; tail = (tail + 1) % LEN; } P dequeue() { P x = Q[head]; head = (head + 1) % LEN; re...
main.c: In function 'main': main.c:39:25: error: 'time' undeclared (first use in this function) 39 | scanf("%d %d", &n, &time); | ^~~~ main.c:3:1: note: 'time' is defined in header '<time.h>'; this is probably fixable by adding '#include <time.h>' 2 | #include <string.h> +++ |...
s688193350
p02264
C
#include<stdio.h> #include<stdlib.h> #include <string.h> struct Queue { int time; char name[7]; Queue *next; }; void push(int a, char nam[7]); struct Queue *top = NULL, *bot = NULL; int main(void){ int n, i, num, ans = 0, tmp; char str[7]; scanf("%d %d",&n, &num); for (i=0;i<n;i++) { scanf("%s %d",str,&tmp); ...
main.c:8:3: error: unknown type name 'Queue' 8 | Queue *next; | ^~~~~ main.c: In function 'main': main.c:27:10: error: 'bot' is a pointer; did you mean to use '->'? 27 | bot = bot.next; | ^ | -> main.c:32:10: error: 'bot' is a pointer; did you mean to use '->'? 32 | bot...
s144073119
p02264
C
#include<stdio.h> #include<stdlib.h> #include <string.h> struct Queue { int time; char name[7]; struct Queue *next; }; void push(int a, char nam[7]); struct Queue *top = NULL, *bot = NULL; int main(void){ int n, i, num, ans = 0, tmp; char str[7]; scanf("%d %d",&n, &num); for (i=0;i<n;i++) { scanf("%s %d",str,...
main.c: In function 'main': main.c:27:10: error: 'bot' is a pointer; did you mean to use '->'? 27 | bot = bot.next; | ^ | -> main.c:32:10: error: 'bot' is a pointer; did you mean to use '->'? 32 | bot = bot.next; | ^ | ->
s534511559
p02264
C
#include <stdio.h> #include <string.h> typedef struct{ char name[10]; int time; }Process; void enqueue(Process); Process dequeue(void); int n; int head = 0; int tail = 0; Process p[100001]; int main(){ int i,q,takenTime; Process x; scanf("%d %d",&n,&q); for(i=0;i<n;i++){ scanf("%s %d",x.name,&x.time); ...
/usr/bin/ld: /tmp/cc4mFzTG.o: in function `main': main.c:(.text+0x85): undefined reference to `dequeue' collect2: error: ld returned 1 exit status
s754018008
p02264
C
a
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | a | ^
s245539843
p02264
C
#include<stdio.h> #include<stdlib.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void initialize(void){ head = tail = 0; } int Empty(void){ if(head == tail){ return 1; } else return 0; } int isFull(void){ if(head == (tai...
main.c: In function 'dequeue': main.c:52:6: error: implicit declaration of function 'isEmpty'; did you mean 'Empty'? [-Wimplicit-function-declaration] 52 | if(isEmpty()){ | ^~~~~~~ | Empty
s958863400
p02264
C
a
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | a | ^
s990665118
p02264
C
P Q[LEN+1]; int head, tail, n; void enqueue(P x){ Q[tail]=x; if(tail+1==100000){ tail=0; } else tail++; } P dequeue(){ P x; x=Q[head]; if(head+1==100000){ head=0; } else head++; return x; } int main(){ int elaps = 0, c; int i, q; P u; scanf("%d %d", &n, &q); for ( i = 1; i <= ...
main.c:1:1: error: unknown type name 'P' 1 | P Q[LEN+1]; | ^ main.c:1:5: error: 'LEN' undeclared here (not in a function) 1 | P Q[LEN+1]; | ^~~ main.c:4:14: error: unknown type name 'P' 4 | void enqueue(P x){ | ^ main.c:12:1: error: unknown type name 'P' 12 | P dequeue(...
s118144837
p02264
C
char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ Q[tail]=x; if(tail + 1 == MAX) tail=0; else tail++; } P dequeue(void){ P x; x=Q[head]; if(head+1 == MAX) head=0; else head++; return x; } int main(){ int elaps = 0, c; int i, q; P p; scanf("%d ...
main.c:3:1: error: expected identifier or '(' before '}' token 3 | }P; | ^ main.c:3:2: warning: data definition has no type or storage class 3 | }P; | ^ main.c:3:2: error: type defaults to 'int' in declaration of 'P' [-Wimplicit-int] main.c:5:1: error: unknown type name 'P' 5 | P Q[LEN+1]; ...
s533669046
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 void enqueue(P); P enqueue(void); int min(int ,int); typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ Q[tail] = x; tail++; } P dequeue(){ head++; return Q[head-1]; } int min(int a,int b){ return a ...
main.c:5:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 5 | void enqueue(P); | ^~~~ main.c:6:1: error: unknown type name 'P' 6 | P enqueue(void); | ^ main.c:6:3: error: conflicting types for 'enqueue'; have 'int(void)' 6 | P enqueue(void)...
s342629752
p02264
C
include<stdio.h> #include<string.h> #define MAX 100005 typedef struct pp{ char name[MAX]; int t; }P; P Q[LEN+1]; int head, tail, n; void initialize(){ head=tail=0; } int isEmpty(){ if(head==tail) return 0; else return 1; } int isFull(){ if(head==(tail+1)%MAX) return 0; else; return 1; } ...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s088114037
p02264
C
include<stdio.h> #include<string.h> #define LEN 100005 #define MAX 100 typedef struct pp{ char name[MAX]; int t; }P; P Q[LEN+1]; int head, tail, n; void initialize(){ head=tail=0; } int isEmpty(){ if(head==tail) return 0; else return 1; } int isFull(){ if(head==(tail+1)%MAX) return 0; else...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s587370496
p02264
C
include<stdio.h> #include<string.h> #define LEN 100005 #define MAX 100 typedef struct pp{ char name[MAX]; int t; }P; P Q[LEN+1]; int head, tail, n; void initialize(){ head=tail=0; } int isEmpty(){ if(head==tail) return 0; else return 1; } int isFull(){ if(head==(tail+1)%MAX) return 0; else...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s794666134
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void initialize(){ head=tail=0; } int isEmpty(){ if(head==tail) return 0; else return 1; } int isFull(){ if(head==(tail+1)%LEN) return 0; else; return 1; }...
main.c: In function 'main': main.c:80:5: error: expected declaration or statement at end of input 80 | return 0; | ^~~~~~
s085433722
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 void enqueue(P); P enqueue(void); int min(int ,int); typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ Q[tail] = x; tail = (tail + 1) % LEN; } P dequeue(){ P x = Q[head]; head = (head + 1) % LEN; ret...
main.c:5:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 5 | void enqueue(P); | ^~~~ main.c:6:1: error: unknown type name 'P' 6 | P enqueue(void); | ^ main.c:6:3: error: conflicting types for 'enqueue'; have 'int(void)' 6 | P enqueue(void)...
s405460240
p02264
C
#include<stdio.h> #include<string.h> #include<stdlib.h> #define LEN 100005 typedef struct{ char name[100]; int t; }P; void enqueue(P); P dequeue(void); P Q[LEN+1]; int head=0,tail=0,n; int main(){ int elaps = 0; int i,q,sum; P u; scanf("%d%d",&n,&q); for ( i = 1; i <= n; i++){ scanf("%s",Q[i]....
main.c: In function 'enqueue': main.c:53:19: error: 'MAX' undeclared (first use in this function) 53 | if( tail + 1 == MAX ) | ^~~ main.c:53:19: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'dequeue': main.c:64:19: error: 'MAX' u...
s279863918
p02264
C
#include<stdio.h> void enqueue(int ); int dequeue(); int time[1000]; char name[1000][10]; int head=0,tail=0,n,q; int main(){ int i,total=0,flag=1; // input scanf("%d%d",&n,&q); for(i=0;i<n;i++){ scanf("%s%d",name[i],&time[i]); } // execute while(1){ flag = 0; for(i=0;i<n;i++){ if...
main.c: In function 'main': main.c:37:3: error: expected declaration or statement at end of input 37 | return 0; | ^~~~~~
s189764864
p02264
C
#include<stdio.h> #define N 100000 #define n 10 typedef struct{ char name[n]; int time; }Queue; Queue A[N]; int h=0,t=0; void Enqueue(Queue); Queue Dequeue(void); int main() { int n,q; int i,T=0; Queue j; scanf("%d%d",&n,&q); for(i=0;i<n;i++){ scanf("%s%d",j.name,&j.time); Enqueue(j); } while(...
main.c: In function 'main': main.c:3:11: error: expected identifier or '(' before numeric constant 3 | #define n 10 | ^~ main.c:15:7: note: in expansion of macro 'n' 15 | int n,q; | ^ main.c:18:16: error: lvalue required as unary '&' operand 18 | scanf("%d%d",&n,&q); | ...
s288463090
p02264
C
#include<stdio.h> #define N 10000 #define s 100 typedef struct{ char name[s]; int time; }Q; Q A[N+1]; int h,t; void Enq(Q); Q Deq(void); int main() { int n,q; int i,T=0; Q j; scanf("%d%d",&n,&q); for(i=0;i<n;i++){ scanf("%s%d",j.name,&j.time); Enq(j); } while(n>0){ j=deq(); if(j.time>q)...
main.c: In function 'main': main.c:23:7: error: implicit declaration of function 'deq'; did you mean 'Deq'? [-Wimplicit-function-declaration] 23 | j=deq(); | ^~~ | Deq main.c:23:7: error: incompatible types when assigning to type 'Q' from type 'int' main.c: In function 'Deq': main.c:44:10...
s798105951
p02264
C
#include<stdio.h> #define N 10000 #define s 100 typedef struct{ char name[s]; int time; }Q; Q A[N+1]; int h,t; void Enq(Q); Q Deq(void); int main() { int n,q; int i,T=0; Q j; scanf("%d%d",&n,&q); for(i=0;i<n;i++){ scanf("%s%d",j.name,&j.time); Enq(j); } while(n>0){ j=deq(); if(j.time>q)...
main.c: In function 'main': main.c:23:7: error: implicit declaration of function 'deq'; did you mean 'Deq'? [-Wimplicit-function-declaration] 23 | j=deq(); | ^~~ | Deq main.c:23:7: error: incompatible types when assigning to type 'Q' from type 'int'
s213607335
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 void enqueue(char *); char dequeue(void); int min(int,int); typedef struct pp{ char name[100]; int t; }P; P Q[LEN]; int head, tail, n; void enqueue(P x){ Q[tail] = x; tail = (tail + 1) % LEN; } P dequeue(){ P x = Q[head]; head = (head + 1) % LEN; ...
main.c:16:6: error: conflicting types for 'enqueue'; have 'void(P)' {aka 'void(struct pp)'} 16 | void enqueue(P x){ | ^~~~~~~ main.c:5:6: note: previous declaration of 'enqueue' with type 'void(char *)' 5 | void enqueue(char *); | ^~~~~~~ main.c:21:3: error: conflicting types for 'dequeue';...
s123006075
p02264
C
void Enqueue(P ); P Dequeus(void); int main() { int i,n,q,T=0; P y; scanf("%d%d",&n,&q); for(i=0;i<n;i++){ scanf("%s%d",y.s,&y.time); Enqueue(y); } while(n!=0){ y=Dequeue(); if(y.time>q){ y.time=y.time-q; T+=q; Enqueue(y); } else{ T=T+y.time; printf(...
main.c:1:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 1 | void Enqueue(P ); | ^~~~ main.c:2:1: error: unknown type name 'P' 2 | P Dequeus(void); | ^ main.c: In function 'main': main.c:7:3: error: unknown type name 'P' 7 | P y; |...
s366425176
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; void enqueue(P); P dequeue(void); int min(int,int); P Q[LEN]; int head, tail, n; void enqueue(P x){ Q[tail] = x; tail = tail + 1; } P dequeue(){ x = Q[head]; head = head + 1; return x; } int min(int...
main.c: In function 'dequeue': main.c:23:3: error: 'x' undeclared (first use in this function) 23 | x = Q[head]; | ^ main.c:23:3: note: each undeclared identifier is reported only once for each function it appears in
s338578727
p02264
C
#include<stdio.h> #include<stdlib.h> #define MAX 100000 typedef struct{ char name[10]; int time; } data; void initialize(void); int isEmpty(void); int isFull(void); void enqueue(data); data dequeue(void); int head,tail,n; data Q[MAX+1]; int main(){ int q,i,t; data d; scanf("%d %d",&n,&q); for(i=0;i<n;...
main.c: In function 'main': main.c:42:7: error: implicit declaration of function 'equeue'; did you mean 'dequeue'? [-Wimplicit-function-declaration] 42 | equeue(d); | ^~~~~~ | dequeue
s508534744
p02264
C
#define N 100000 #include<stdio.h> typedef struct{ char name[10]; int time; int flag; }da_ta; typedef struct{ da_ta data[N]; int head; int tail; } queue; void initialize(queue*,int); void enqueue(queue*,da_ta); int main(){ int cnt=0,i,n,q,tim=0; queue Q; scanf("%d %d",&n,&q); initialize(&...
main.c: In function 'main': main.c:52:3: error: expected declaration or statement at end of input 52 | } | ^
s319968507
p02264
C
#include<stdio.h> #include<string.h> #include<stdlib.h> #define MAX 100000 typedef struct pp{ char name[100]; int t; }P; P Q[MAX+1]; int head = 0, tail, n; void enqueue(P x); P dequeue(void); /*int isEmpty(void); int isFull(void);*/ int main(){ int elaps = 0, c, t = 0; int i, q; P u; scanf("%d %d", &n...
main.c:51:1: error: expected identifier or '(' before 'return' 51 | return 0; | ^~~~~~ main.c:52:1: error: expected identifier or '(' before '}' token 52 | } | ^
s797872406
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; void enqueue(P); P dequeue(void); P Q[LEN+1]; int head, tail, n; void enqueue(P x){ Q[head] = x; head++; } P dequeue(){ tail++; return Q[tail-1]; } int main(){ int sum_time = 0; int i, q; P u; ...
main.c: In function 'main': main.c:34:20: error: expected expression before '.' token 34 | scanf("%d", &u[.t); | ^
s441806209
p02264
C
#include <stdio.h> #define N 100000 #define Q 1000 void enq1(int); int deq1(void); void enq2(int); int deq2(void); int head=0,tail=0,p; int S1[N],S2[N]; int main(){ int n,q,i,T=0,a,b,c=0; char name[N][10]; int time[N]; scanf("%d %d",&n,&q); for(i=0 ; i<n ; i++){ scanf("%s %d",name[i],&time[i]); ...
main.c: In function 'main': main.c:34:8: error: 'tale' undeclared (first use in this function) 34 | if(tale==0) tale=0; | ^~~~ main.c:34:8: note: each undeclared identifier is reported only once for each function it appears in
s551947107
p02264
C
include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN]; int head,tail,n; void enqueue(P x){ Q[tail] = x; tail = (tail + 1) % LEN;/*ring buffer*/ } P dequeue(){ P x; x = Q[head]; head = (head + 1) % LEN; return x; /*?§????????????£??\???...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/string.h:44:22: error: unknown type name 'size_t' 44 | size_t __n) __THROW __nonnull ((1, 2)); | ...
s605281607
p02264
C
#include<stdio.h> #define MAX 100000 typedef struct{ char name[10]; int time; }process; void enqueue(process); process dequeue(void); int head=0,tail=0,q; process p[MAX]; int main() { process x; int n,i,t=0; scanf("%d%d",&n,&q); for(i=0; i<n; i++) { scanf("%s%d",x.name,&x.time); enqueue(x); } ...
/usr/bin/ld: /tmp/ccjggKEH.o: in function `main': main.c:(.text+0xe9): undefined reference to `dequeue' /usr/bin/ld: main.c:(.text+0x180): undefined reference to `dequeue' collect2: error: ld returned 1 exit status
s473043099
p02264
C
#include <stdio.h> #include <string.h> #include <stdlib.h> int head=0; int tail; int Q[100000]; void initiaize(void); int isEmpty(void); int isFull(void); int dequeue(int ); void enqueue(int ,int ); int main(){ int n,q,i; int count=0,extend; scanf("%d%d",&n,&q); char name[n][10]; char name2[n][10]; int Q2[n];...
main.c: In function 'main': main.c:36:37: error: 'names' undeclared (first use in this function); did you mean 'name2'? 36 | else strcpy(names[i],name[head-1]); | ^~~~~ | name2 main.c:36:37: note: each undecla...
s142935454
p02264
C
#include <stdio.h> #include <string.h> #include <stdlib.h> int head=0; int tail; int Q[100000]; void initiaize(void); int isEmpty(void); int isFull(void); int dequeue(int ); void enqueue(int ,int ); int main(){ int n,q,i; int count=0,extend; scanf("%d%d",&n,&q); char name[n][10]; tail=n; for(i=0;i<n;i++){ s...
main.c: In function 'main': main.c:32:25: error: 'Q2' undeclared (first use in this function); did you mean 'Q'? 32 | Q2[i]=count; | ^~ | Q main.c:32:25: note: each undeclared identifier is reported only once for each function it app...
s643107242
p02264
C
#include <stdio.h> typedef struct{ char name[10]; int time; }queue; queue Q[100000]; int head=0; int tail=0; void dequeue(queue ,int); queue enqueue(int); int main(){ int n,i,q; int count=0; scanf("%d%d",&n,&q); queue Que; for(i=0;i<n;i++){ scanf("%s",Que.name); scanf("%d",&Que.time); enqueque(Que,n)...
main.c: In function 'main': main.c:27:17: error: implicit declaration of function 'enqueque'; did you mean 'enqueue'? [-Wimplicit-function-declaration] 27 | enqueque(Que,n); | ^~~~~~~~ | enqueue main.c:35:27: error: invalid operands to binary <= (have 'queu...
s351635506
p02264
C
#include <stdio.h> typedef struct{ char name[10]; int time; }queue; queue Q[100000]; int head=0; int tail=0; void dequeue(queue ,int); queue enqueue(int); int main(){ int n,i,q; int count=0; scanf("%d%d",&n,&q); queue Que; for(i=0;i<n;i++){ scanf("%s",Que.name); scanf("%d",&Que.time); enqueque(Que,n)...
main.c: In function 'main': main.c:27:17: error: implicit declaration of function 'enqueque'; did you mean 'enqueue'? [-Wimplicit-function-declaration] 27 | enqueque(Que,n); | ^~~~~~~~ | enqueue main.c:35:27: error: invalid operands to binary <= (have 'queu...
s065165611
p02264
C
#include <stdio.h> typedef struct{ char name[10]; int time; }queue; queue Q[100000]; int head=0; int tail=0; void enqueue(queue ,int); queue dequeue(int); int main(){ int n,i,q; int count=0; scanf("%d%d",&n,&q); queue Que; for(i=0;i<n;i++){ scanf("%s",Que.name); scanf("%d",&Que.time); enqueque(Que,n)...
main.c: In function 'main': main.c:27:17: error: implicit declaration of function 'enqueque'; did you mean 'enqueue'? [-Wimplicit-function-declaration] 27 | enqueque(Que,n); | ^~~~~~~~ | enqueue
s990022428
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ Q[tail]=x; if(tail+1 == LEN+1)tail=0; else tail++; } P dequeue(){ P x; x=Q[head]; if(head+1 == LEN+1)head=0; else head++; return x; } ...
main.c: In function 'main': main.c:52:5: error: 'c' undeclared (first use in this function) 52 | c = u.t - q; | ^ main.c:52:5: note: each undeclared identifier is reported only once for each function it appears in
s030733322
p02264
C
#include<stdio.h> #define max 300000 typedef struct process{ char name[256]; int time; } p; int head = 0, tail = 0, n; p Q[max]; void enqueue(p); p dequeue(void); int main(){ int i, q, temp, passage = 0; p dq; scanf("%d%d", &n, &q); head = 1; tail = n + 1; for(i = 1; i <= n; i++){ scanf("%s...
main.c: In function 'main': main.c:29:22: error: expected statement before ')' token 29 | while(tail != head)){ | ^
s935509359
p02264
C
#include<stdio.h> #include<string.h> #define MAX 10000 typedef struct pp { char name[10]; int t; }P; P Q[MAX + 1]; int head, tail, n; void enqueue(P x) { Q[tail] = x; tail = (tail + 1)%MAX; } P dequeue() { P x = Q[head];#include<stdlib.h> head = (head + 1)%MAX; return x; } int min (int a, int b) { ...
main.c: In function 'dequeue': main.c:23:17: error: stray '#' in program 23 | P x = Q[head];#include<stdlib.h> | ^ main.c:23:18: error: 'include' undeclared (first use in this function) 23 | P x = Q[head];#include<stdlib.h> | ^~~~~~~ main.c:23:18: note: each undecl...
s696454998
p02264
C
#include <string> #include <stdio.h> #include <math.h> #define N 1000 void enqueue(int); int dequeue(void); int isEmpty(void); int isFull(void); void initialize(void); int S[N], head = 0, tail = 0, n, q; int main(void) { char str[N][11]; int x, a, cou = 0, time = 0, i, j; scanf("%d %d", &n, &q); for (i = 0; i < n; ...
main.c:1:10: fatal error: string: No such file or directory 1 | #include <string> | ^~~~~~~~ compilation terminated.
s299955968
p02264
C
#include <string> #include <stdio.h> #include <math.h> #define N 1000 void enqueue(int); int dequeue(void); int isEmpty(void); int isFull(void); void initialize(void); int S[N], head = 0, tail = 0, n, q; int main(void) { char str[N][11]; int x, a, cou = 0, time = 0, i, j; scanf("%d %d", &n, &q); for (i = 0; i < n; ...
main.c:1:10: fatal error: string: No such file or directory 1 | #include <string> | ^~~~~~~~ compilation terminated.
s328976433
p02264
C
#include <string> #include <stdio.h> #include <math.h> #define N 1000 void enqueue(int); int dequeue(void); int isEmpty(void); int isFull(void); void initialize(void); int S[N], head = 0, tail = 0, n, q; int main(void) { char str[N][11]; int x, a, cou = 0, time = 0, i, j; scanf("%d %d", &n, &q); for (i = 0; i < n; ...
main.c:1:10: fatal error: string: No such file or directory 1 | #include <string> | ^~~~~~~~ compilation terminated.
s023270856
p02264
C
int main(){ int n, i, x; char com[20]; scanf("%d", &n); for ( i = 0; i < n; i++ ){ scanf("%s", com); if ( com[0] == 'f' ){ scanf("%d", &x); Node t = treeSearch(root, x); if ( t != NIL ) printf("yes\n"); else printf("no\n"); } if ( com[0] == 'i' ){ ...
main.c: In function 'main': main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 4 | scanf("%d", &n); | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | int main(){ main.c:4:3: warning: incompatible ...
s288751319
p02264
C
#include <stdio.h> #include <string.h> typedef struct{ char n[10]; int t; }P; void enqueue(P); P dequeue(void); int min(int a,int b){ if(a >= b) return b; else return a; } int head,tail,n; P Q[100000]; int main(){ int q, i, total = 0, c; P u; scanf("%d%d", &n, &q); for( i = 0; i < n; i++) ...
main.c: In function 'main': main.c:35:6: error: 'P' has no member named 'time' 35 | u.time -= c; | ^
s075365644
p02264
C
//============================================================================ // #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> //============================================================================ typedef struct{ char name[20]; long quantam; int ...
main.c: In function 'remain': main.c:49:21: error: expected ';' before 'return' 49 | return 1 | ^ | ; 50 | //printf("r%ld\n", r); 51 | return 0; | ~~~~~~
s544193337
p02264
C
#include <cstdio> #include <queue> #include <string> #include <utility> using namespace std; int main() { size_t n; int qtime; scanf("%zu %d", &n, &qtime); queue<pair<string, int>> q; for (size_t i=0; i<n; ++i) { char buf[1<<4]; int time; scanf("%s %d", buf, &time); ...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s313610373
p02264
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include<stdio.h> #define N 10000 struct Queue { char name[100]; int time; }; int head, tail, n; Queue Q[N]; void initialize(); void enqueue(Queue); struct Queue dequeue(); int main() { Queue a; int q, i, t=0, cnt = 0; scanf("%d%d", &n, &q); initialize...
main.c:12:1: error: unknown type name 'Queue'; use 'struct' keyword to refer to the type 12 | Queue Q[N]; | ^~~~~ | struct main.c:15:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 15 | void enqueue(Queue); | ^~~~ main.c: In function 'mai...
s070032478
p02264
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include<stdio.h> #define N 10000 typedef struct Queue{ char name[100]; int time; }; int head, tail, n; struct Queue Q[N]; void initialize(); void enqueue(Queue); struct Queue dequeue(); int main() { struct Queue a; int q, i, t=0, cnt = 0; scanf("%d%d",...
main.c:9:1: warning: useless storage class specifier in empty declaration 9 | }; | ^ main.c:15:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 15 | void enqueue(Queue); | ^~~~ main.c:44:14: error: unknown type name 'Queue' 44 | void enqueue(...
s335845035
p02264
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include<stdio.h> #define N 10000 struct Queue{ char name[100]; int time; }; int head, tail, n; struct Queue Q[N]; void initialize(); void enqueue(Queue); struct Queue dequeue(); int main() { struct Queue a; int q, i, t=0, cnt = 0; scanf("%d%d", &n, &q)...
main.c:15:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 15 | void enqueue(Queue); | ^~~~ main.c:44:14: error: unknown type name 'Queue' 44 | void enqueue(Queue a) { | ^~~~~
s378664850
p02264
C
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include<stdio.h> struct Queue { char name[100]; int time; }; int head = 0, tail = 0, n; struct Queue Q[1000]; void enqueue(Queue); struct Queue dequeue(); int main() { struct Queue a; int q, i, t = 0, cnt = 0; scanf("%d%d", &n, &q); for (i = 0; i < n;...
main.c:13:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 13 | void enqueue(Queue); | ^~~~ main.c:37:14: error: unknown type name 'Queue' 37 | void enqueue(Queue a) { | ^~~~~
s869403399
p02264
C
#include<stdio.h> #include<string.h> #define N 100000 ???? typedef struct pp{ ????char name[100]; ????int time; }Process; ?? ???? int head, tail, n, c=0, q; Process Q[N]; ?? ?? void enqueue(){ ????Q[head].time = Q[head].time -q; ????Q[tail] = Q[head]; ????if(tail > n+1) tail = 0; ????else tail++; } ???? void dequeue(){...
main.c:4:1: error: expected identifier or '(' before '?' token 4 | ???? | ^ main.c:8:2: warning: data definition has no type or storage class 8 | }Process; | ^~~~~~~ main.c:8:2: error: type defaults to 'int' in declaration of 'Process' [-Wimplicit-int] main.c:9:1: error: expected identifier or '(' ...
s499978248
p02264
C
#include<stdio.h> #include<string.h> #define N 100000 ???? typedef struct pp{ ????char name[100]; ????int time; }Process; ?? ???? int head, tail, n, c=0, q; Process Q[N]; ?? ?? void enqueue(){ ????Q[head].time = Q[head].time -q; ????Q[tail] = Q[head]; ????if(tail > n+1) tail = 0; ????else tail++; } ???? void dequeue(){...
main.c:4:1: error: expected identifier or '(' before '?' token 4 | ???? | ^ main.c:8:2: warning: data definition has no type or storage class 8 | }Process; | ^~~~~~~ main.c:8:2: error: type defaults to 'int' in declaration of 'Process' [-Wimplicit-int] main.c:9:1: error: expected identifier or '(' ...
s361457314
p02264
C
#include<stdio.h> #include<string.h> #define N 100000 typedef struct pp{ char name[100]; int time; }Process; int head, tail, n, c=0, q; Process Q[N]; void enqueue(){ Q[head].time = Q[head].time -q; Q[tail] = Q[head]; if(tail > n+1) tail = 0; else tail++; } ???? void dequeue(){ printf("%s %d\n",Q[head].name, Q...
main.c:19:1: error: expected identifier or '(' before '?' token 19 | ???? | ^ main.c:23:1: error: expected identifier or '(' before '?' token 23 | ???? | ^
s626231293
p02264
C
#include<stdio.h> #include<string.h> #define N 100000 typedef struct pp{ char name[100]; int time; }Process; int head, tail, n, c=0, q; Process Q[N]; void enqueue(){ Q[head].time = Q[head].time -q; Q[tail] = Q[head]; if(tail > n+1) tail = 0; else tail++; } ???? void dequeue(){ printf("%s %d\n",Q[head].name, Q...
main.c:19:1: error: expected identifier or '(' before '?' token 19 | ???? | ^ main.c:23:1: error: expected identifier or '(' before '?' token 23 | ???? | ^
s592054261
p02264
C
#include<stdio.h> #include<string.h> #define N 100000 typedef struct pp{ char name[100]; int time; int time2; }Process; int head, tail, n, c=0, q; Process Q[N]; void enqueue(){ Q[head].time = Q[head].time -q; Q[tail] = Q[head]; if(tail > n+1) tail = 0; else tail++; for ( i = 1; i <= tail; i++){ prnitf("%s"...
main.c: In function 'enqueue': main.c:19:15: error: 'i' undeclared (first use in this function) 19 | for ( i = 1; i <= tail; i++){ | ^ main.c:19:15: note: each undeclared identifier is reported only once for each function it appears in main.c:20:17: error: implicit declaration of function...
s321519940
p02264
C
#include<stdio.h> #include<string.h> #define N 100000 typedef struct pp{ char name[100]; int time; int time2; }Process; int head, tail, n, c=0, q; Process Q[N]; void enqueue(){ int i; Q[head].time = Q[head].time -q; Q[tail] = Q[head]; if(tail > n+1) tail = 0; else tail++; for ( i = 1; i <= tail; i++){ prn...
main.c: In function 'enqueue': main.c:21:17: error: implicit declaration of function 'prnitf'; did you mean 'printf'? [-Wimplicit-function-declaration] 21 | prnitf("%s", Q[i].name); | ^~~~~~ | printf
s927012851
p02264
C
#include<stdio.h> #include<cstring> //int LEN=100005; const int LEN=100005; struct pp{ char name[100]; int t; }; struct myqueue{ pp a[LEN]; int head,tail; bool isfull(){ if((tail+1)%LEN==head) return 1; return 0; } bool isempty(){ if(head==tail)return 1; return 0; ...
main.c:2:9: fatal error: cstring: No such file or directory 2 | #include<cstring> | ^~~~~~~~~ compilation terminated.
s475245325
p02264
C
#include<stdio.h> #include<queue> using namespace std; typedef struct hh{ char name[15]; int t; }p; p q[100005]; int h,t,n; void en(p x){ q[t]=x; t=(t+1)%100005; } p de(){ p x=q[h]; h=(h+1)%100005; return x; } int min(int a,int b){ return a<b?a:b; } int main(){ int elaps=0,c; int...
main.c:2:9: fatal error: queue: No such file or directory 2 | #include<queue> | ^~~~~~~ compilation terminated.
s100358834
p02264
C
#include <stdio.h> #include <string.h> #define LEN 100005 typedef struct pp { char name[100]; int t; } P; P Q[LEN]; int head, tail; void enqueue(P x) { Q[tail] = x; tail = (tail + 1) % LEN; } P dequeue() { P x = Q[head]; head = (head + 1) % LEN; return x; } int main() { int i, q, n, LANtime = 0; P u; s...
main.c: In function 'main': main.c:29:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 29 | scanf_s("%d %d", &n, &q); | ^~~~~~~ | scanf
s132876468
p02264
C
#include <stdio.h> #include <string.h> #define LEN 100005 typedef struct pp { char name[100]; int t; } P; P Q[LEN]; int head, tail; void enqueue(P x) { Q[tail] = x; tail = (tail + 1) % LEN; } P dequeue() { P x = Q[head]; head = (head + 1) % LEN; return x; } int main() { int i, q, n, LANtime = 0; P u; s...
main.c: In function 'main': main.c:29:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration] 29 | scanf_s("%d %d", &n, &q); | ^~~~~~~ | scanf
s959195484
p02264
C
#include <iostream> using namespace std; const int LEN = 100000;//??????????????§?????? struct pp { char name[10]; int time; } P[LEN]; int head, tail, n; void enqueue(struct pp x)//??\????????° { P[tail] = x;//?°?x?????\??°????°? tail = tail + 1;//??¨?????????????????????????????????head=(tail + 1) % LEN??¶??´?????...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s097132106
p02264
C
#include<stdio.h> using namespace std; const int LEN = 100000;//??????????????§?????? struct pp { char name[10]; int time; } P[LEN]; int head, tail, n; void enqueue(struct pp x)//??\????????° { P[tail] = x;//?°?x?????\??°????°? tail = tail + 1;//??¨?????????????????????????????????head=(tail + 1) % LEN??¶??´??????...
main.c:3:1: error: unknown type name 'using' 3 | using namespace std; | ^~~~~ main.c:3:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std' 3 | using namespace std; | ^~~ main.c:9:3: error: variably modified 'P' at file scope 9 | } P[LEN]; | ^ main.c: ...
s968482202
p02264
C
#include<stdio.h> const int LEN = 100000;//??????????????§?????? struct pp { char name[10]; int time; } P[LEN]; int head, tail, n; void enqueue(struct pp x)//??\????????° { P[tail] = x;//?°?x?????\??°????°? tail = tail + 1;//??¨?????????????????????????????????head=(tail + 1) % LEN??¶??´??????????????? } struct pp ...
main.c:7:3: error: variably modified 'P' at file scope 7 | } P[LEN]; | ^
s415383333
p02264
C
#include<stdio.h> const int LEN = 100000;//??????????????§?????? struct pp { char name[10]; int time; } ; pp P[LEN]; int head, tail, n; void enqueue(struct pp x)//??\????????° { P[tail] = x;//?°?x?????\??°????°? tail = tail + 1;//??¨?????????????????????????????????head=(tail + 1) % LEN??¶??´??????????????? } struc...
main.c:8:1: error: unknown type name 'pp'; use 'struct' keyword to refer to the type 8 | pp P[LEN]; | ^~ | struct main.c:8:4: error: variably modified 'P' at file scope 8 | pp P[LEN]; | ^ main.c: In function 'enqueue': main.c:12:19: error: incompatible types when assigning to type 'int' fr...
s837550653
p02264
C
#include <stdio.h> typedef struct{ char name[10]; int t; } Process; int main(int argc, char const *argv[]) { int num,times,i; Process Q[200000]; int count = 0, sum = 0; scanf("%d%d",&num,&times); for( i = 0 ; i < num ; i++ ){ scanf("%s",Q[i].name); scanf("%d",&Q[i].t); } for( i = 0 ; i <...
main.c: In function 'main': main.c:27:28: error: 'Process' has no member named 's' 27 | printf("%s %d\n",Q[i].s,sum); | ^
s080010671
p02264
C
#include<stdio.h> #include<string.h> #define MAX 100005 #define N 100 typedef struct{ char name[N]; int t; }P; P Q[MAX+1]; int head=1, tail=1, n; void enqueue(P x){ if(tail==n) tail = 0; Q[tail]=x; tail++; } P dequeue(void){ if(head==MAX) head==0; return Q[head++]; } int main(){ int i, q, T=0; P...
main.c: In function 'main': main.c:40:7: error: implicit declaration of function 'Enqueue'; did you mean 'enqueue'? [-Wimplicit-function-declaration] 40 | Enqueue(a); | ^~~~~~~ | enqueue
s021053533
p02264
C
#include<stdio.h> #define MAX 100005 #define N 100 typedef struct{ char name[N]; int t; }P; P Q[MAX+1]; int head, tail; int main(){ int i,q,n,T=0; P a; scanf("%d %d", &n, &q); for (i=0;i<n;i++){ scanf("%s%d",a.name,&a.t); Enqueue(a); } while(n!=0){ a=Dequeue(); if(a.t>q){ ...
main.c: In function 'main': main.c:21:6: error: implicit declaration of function 'Enqueue' [-Wimplicit-function-declaration] 21 | Enqueue(a); | ^~~~~~~ main.c:25:7: error: implicit declaration of function 'Dequeue' [-Wimplicit-function-declaration] 25 | a=Dequeue(); | ^~~~~~~ main....
s566367653
p02264
C
#include<stdio.h> struct data{ char name[10]; int time; }; int main(){ int n,q,i; struct data Q[100000]; scanf("%d%d",&n,&q); for(i=0;i<n;i++){ scanf("%s%d",Q[i].name,&Q[i].time); } while(1){ return 0; }
main.c: In function 'main': main.c:24:1: error: expected declaration or statement at end of input 24 | } | ^
s747370707
p02264
C
#include<stdio.h> #include<string.h> typedef struct { char name[100]; int t; } P; P Q[100000]; int head,tail,n; void initialize(){ head=0; tail=0; } int isEmpty(){ if(head==tail){ return ; } } void enqueue(P x){ if (isFull()){ fprintf(stderr,"Overflow"); } Q[tail]=x; if(tail+1==100...
main.c: In function 'isEmpty': main.c:16:5: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 16 | return ; | ^~~~~~ main.c:14:5: note: declared here 14 | int isEmpty(){ | ^~~~~~~ main.c: In function 'enqueue': main.c:20:7: error: implicit declaration of fun...
s759326237
p02264
C
#include<stdio.h> #define LEN 100010 #define T 1 #define F 2 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head = 1, tail, n; int isEmpty() { if(head == tail) return T; else return F; } void enqueue (P x) { Q[tail] = x; if(tail + 1 == LEN) tail = 0; else tail = tail + 1; } P dequeue(...
main.c: In function 'dequeue': main.c:28:12: error: incompatible types when returning type 'int' but 'P' {aka 'struct pp'} was expected 28 | return head; | ^~~~
s404031873
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P); P dequeue(void); int min(int,int); int main(){ int elaps = 0, c; int i, q,n,s; P u; scanf("%d %d", &n, &q); for ( i = 1; i <= n; i++){ scanf("%s",...
main.c: In function 'main': main.c:44:3: error: implicit declaration of function 'prointf'; did you mean 'printf'? [-Wimplicit-function-declaration] 44 | prointf("\n"); | ^~~~~~~ | printf