submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s204772140
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 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; return x; } int min(int a,int b){return a<b?a:b;} in...
main.c: In function 'main': main.c:43:15: error: 't' undeclared (first use in this function) 43 | c=min(q,u,t); | ^ main.c:43:15: note: each undeclared identifier is reported only once for each function it appears in main.c:43:13: error: incompatible type for argument 2 of 'min' 43 | c...
s689209045
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 == n){ tail = 0; } else { tail++; } } P dequeue(){ P x = Q[head]; if(head+1 == n){ head = 0; } else { head+...
main.c: In function 'main': main.c:48:9: error: implicit declaration of function 'dequence'; did you mean 'dequeue'? [-Wimplicit-function-declaration] 48 | u = dequence(); | ^~~~~~~~ | dequeue main.c:48:9: error: incompatible types when assigning to type 'P' {aka 'struct pp'} from typ...
s577494914
p02264
C
#include<stdio.h> #define LEN 100000 #define Q 1000 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ tail++; Q[tail]=x; head++; } P dequeue(){ head++; return Q[head]; } int main(){ int elaps = 0; int i, q; P u; scanf("%d %d", &n, &q); if(n>L...
main.c:3:11: error: expected identifier or '(' before numeric constant 3 | #define Q 1000 | ^~~~ main.c:9:3: note: in expansion of macro 'Q' 9 | P Q[LEN+1]; | ^ main.c: In function 'enqueue': main.c:14:4: error: subscripted value is neither array nor pointer nor vector 14 | Q[tail]=...
s595942131
p02264
C
#include<stdio.h> #define LEN 100000 #define Q 1000 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ tail++; Q[tail]=x; head++; } P dequeue(){ head++; return Q[head]; } int main(){ int elaps = 0; int i, q; P u; scanf("%d %d", &n, &q); for (...
main.c:3:11: error: expected identifier or '(' before numeric constant 3 | #define Q 1000 | ^~~~ main.c:9:3: note: in expansion of macro 'Q' 9 | P Q[LEN+1]; | ^ main.c: In function 'enqueue': main.c:14:4: error: subscripted value is neither array nor pointer nor vector 14 | Q[tail]=...
s171525740
p02264
C
#include<stdio.h> #define LEN 100000 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ tail++; Q[tail]=x; head++; } P dequeue(){ head++; return Q[head]; } int main(){ int elaps = 0; int i, q,status; P u; status=scanf("%d %d", &n, &q); if(n>=LEN...
main.c: In function 'main': main.c:29:21: error: expected ';' before 'printf' 29 | else (status==EOF)printf("Too Large"); | ^~~~~~ | ;
s583511560
p02264
C
#include <stdio.h> #include <stdlib.h> #define MAX 100000 typedef struct pp{ char name[100]; int t; }P; P Q1[MAX+1],Q2[MAX+1]; void initialize(void); int isEmpty(void); int isFull(void); void enqueue(P x); P dequeue(void); int tail,head,n; int main(){ int x,time=0,i,t; char elaps[100]; P q; scanf("%d %d",...
main.c: In function 'dequeue': main.c:81:3: error: expected declaration or statement at end of input 81 | return x; | ^~~~~~
s713623471
p02264
C
#include<stdio.h> #define LEN 100000 #define A 1000 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ tail++; Q[tail]=x; head++; } P dequeue(){ head++; return Q[head]; } int main(){ int elaps = 0; int i, q,status; P u; status=scanf("%d %d", &n, &q...
main.c: In function 'main': main.c:29:21: error: expected ';' before 'printf' 29 | else (status==EOF)printf("Too Large"); | ^~~~~~ | ;
s773172798
p02264
C
#include<stdio.h> #include<stdlib.h> #define MAX 100005 typedef struct{ char name[10]; int time; }Q; Q data[MAX+1]; int head=0, tail=0, n; void enqueue(Q); Q dequeue(void); int main() { int q, sum_t=0, i; Q p; scanf("%d%d",&n,&q); for( i=0 ; i<n ; i++ ){ scanf("%s%d",data[i].name, &data[i].time)...
main.c: In function 'main': main.c:46:10: error: 'fp' undeclared (first use in this function); did you mean 'p'? 46 | fclose(fp); | ^~ | p main.c:46:10: note: each undeclared identifier is reported only once for each function it appears in
s330965767
p02264
C
for(i=0;i<n;i++){ if (scanf("%s%d",name[i],&time[i])==EOF)break; } for(i=0;i<n;i++){ if(time[i]<=q && time[i]>=0){ printf("%s %d\n",name[i],alltime+time[i]); alltime+=time[i]; time[i]=-1; flag+=1; } else if(time[i]>q){ alltime+=q; time[i]-=q; } i...
main.c:2:3: error: expected identifier or '(' before 'for' 2 | for(i=0;i<n;i++){ | ^~~ main.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 2 | for(i=0;i<n;i++){ | ^ main.c:2:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' tok...
s147623318
p02264
C
#include <stdio.h> #include <string.h> typedef struct{ char name[100]; int time; }Data; int n, head = 0, tail = 0; Data Q[1000]; void enqueue(Data); Data dequeue(void); int main(){ int i, q, t = 0, count = 0; struct Data data; scanf("%d %d",&n, &q); for(i = 0; i < n; i++){ scanf("%s%d",Q[i].name, &...
main.c: In function 'main': main.c:17:15: error: storage size of 'data' isn't known 17 | struct Data data; | ^~~~
s948041012
p02264
C
#include <stdio.h> #include <string.h> #define LEN 100005 #define MAX 100000 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...
main.c: In function 'main': main.c:49:7: error: implicit declaration of function 'prntf'; did you mean 'printf'? [-Wimplicit-function-declaration] 49 | prntf("%s %d\n",u.name, elaps); | ^~~~~ | printf
s604887457
p02264
C
#include<stdio.h> #define LEN 1000 typedef struct { char name[100]; int t; }P; P Q[LEN+1]; int head = 0, tail = 0, n; void enqueue (P x) { if(tail == n) tail = 1; else tail++; Q[tail] = x; } P dequeue() { if(head == n) head = 1; else head++; return Q[head]; } int main () { int elaps = 0, count = ...
main.c: In function 'main': main.c:41:14: error: expected ';' before 'printf' 41 | u.t = 0 | ^ | ; 42 | printf("%s %d\n", u.name, elaps); | ~~~~~~
s342630881
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 equeue(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;} int main(){ int elaps=0,c; int i,q; P...
main.c: In function 'dequeue': main.c:19:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token 19 | P x-Q[head]; | ^ main.c:19:4: error: wrong type argument to unary minus main.c:21:8: error: 'x' undeclared (first use in this function) 21 | return x; | ^ main.c:21:8: no...
s255350015
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 equeue(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;} int main(){ int elaps=0,c; int i,q; P...
main.c: In function 'main': main.c:44:10: error: implicit declaration of function 'enqueue'; did you mean 'equeue'? [-Wimplicit-function-declaration] 44 | if(u.t>0)enqueue(u); | ^~~~~~~ | equeue
s994224481
p02264
C
#include <stdint.h> #include <stdio.h> #include <stdlib.h> struct queue_tag { uint8_t *data; size_t size; size_t top; size_t buttom; size_t max_size; }; queue_t *queue_create(const size_t len) { queue_t *q = (queue_t *)malloc(sizeof(queue_t)); if (q == NULL) goto err; q->data = (uint8_t *)malloc(len...
main.c:14:1: error: unknown type name 'queue_t' 14 | queue_t *queue_create(const size_t len) | ^~~~~~~ main.c: In function 'queue_create': main.c:16:3: error: unknown type name 'queue_t' 16 | queue_t *q = (queue_t *)malloc(sizeof(queue_t)); | ^~~~~~~ main.c:16:17: error: 'queue_t' undeclared (firs...
s911240586
p02264
C
#include <stdint.h> #include <stdio.h> #include <stdlib.h> struct queue_tag; typedef struct queue_tag queue_t; extern queue_t *queue_create(const size_t len); extern void queue_destroy(queue_t *const q); extern size_t queue_get_size(const queue_t *const q); extern bool queue_enqueue(queue_t *const q, void *data, size_...
main.c:10:8: error: unknown type name 'bool' 10 | extern bool queue_enqueue(queue_t *const q, void *data, size_t len); | ^~~~ main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' 3 | #include <stdlib.h> +++ |+#include <stdbool.h> ...
s294228261
p02264
C
include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct{ char name[10]; int time; }set; struct node{ set data; struct node *next; }; struct node* insert(set); struct node* finditem(set); struct node* make_1node(set,struct node*); void delnode(struct node*); struct node *head; int main(){ int n,...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/stdlib.h:98:8: error: unknown type name 'size_t' 98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; | ^~~~~~ /usr/inclu...
s790348925
p02264
C
Last login: Tue May 02 2017 23:42:11 +0900 from KD106154090090 Oracle Corporation SunOS 5.11 11.3 January 2017 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - Solaris11: - Computer Exercise Room 1 and 2 ... std1dc2 - std1dc46, std2dc2 - std2dc46 - Computer Exercise Ro...
main.c:1:1: error: unknown type name 'Last' 1 | Last login: Tue May 02 2017 23:42:11 +0900 from KD106154090090 | ^~~~ main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token 1 | Last login: Tue May 02 2017 23:42:11 +0900 from KD106154090090 | ^ main.c:1:39: er...
s409484495
p02264
C
#include<stdio.h> #include<string.h> #define MAX 100005 typedef struct pp{ char name[100]; int t; }P; P Q[MAX]; int head,tail,n; void enqueue(P x) { Q[tail]=x; tail=(tail+1)%MAX; } P dequeue() { P x=Q[head]; head=(head+1)%MAX; return x; } int min(int a,int b) { return a<b?a:b; } int main() { int...
main.c: In function 'main': main.c:35:3: error: unknown type name 'data' 35 | data u; | ^~~~ main.c:48:9: error: incompatible types when assigning to type 'int' from type 'P' {aka 'struct pp'} 48 | u=dequeue(); | ^~~~~~~ main.c:49:16: error: request for member 't' in something not a ...
s636683460
p02264
C
#include <stdio.h> #include <string.h> #define TRUE 1 #define FALSE -1 #define MAX 100005 ?? typedef struct pp { ????char name[10]; ????int time; } P; ?? P Q[MAX]; int head, tail, n; ?? void enqueue(P x); P dequeue(); int isEmpty(); int isFull(); int min(int a, int b); ?? int main(){ ????int elaps = 0, c; ????int i, q...
main.c:7:1: error: expected identifier or '(' before '?' token 7 | ?? | ^ main.c:11:3: warning: data definition has no type or storage class 11 | } P; | ^ main.c:11:3: error: type defaults to 'int' in declaration of 'P' [-Wimplicit-int] main.c:12:1: error: expected identifier or '(' before '?' toke...
s378866311
p02264
C
#include <stdio.h> #include <string.h> #define TRUE 1 #define FALSE -1 #define MAX 100005 ?? typedef struct pp { ????char name[10]; ????int time; } P; ?? P Q[MAX]; int head, tail, n; ?? void enqueue(P x); P dequeue(); int isEmpty(); int isFull(); int min(int a, int b); ?? int main(){ ????int elaps = 0, c; ????int i, q...
main.c:7:1: error: expected identifier or '(' before '?' token 7 | ?? | ^ main.c:11:3: warning: data definition has no type or storage class 11 | } P; | ^ main.c:11:3: error: type defaults to 'int' in declaration of 'P' [-Wimplicit-int] main.c:12:1: error: expected identifier or '(' before '?' toke...
s940801424
p02264
C
#include <stdio.h> #include <string.h> #define TRUE 1 #define FALSE -1 #define MAX 100005 ?? typedef struct pp { ????char name[10]; ????int time; } P; ?? P Q[MAX]; int head, tail, n; ?? void enqueue(P x); P dequeue(); int isEmpty(); int isFull(); int min(int a, int b); ?? int main(){ ????int elaps = 0, c; ????int i, q ...
main.c:6:1: error: expected identifier or '(' before '?' token 6 | ?? | ^ main.c:10:3: warning: data definition has no type or storage class 10 | } P; | ^ main.c:10:3: error: type defaults to 'int' in declaration of 'P' [-Wimplicit-int] main.c:11:1: error: expected identifier or '(' before '?' toke...
s012250288
p02264
C
#include <stdio.h> #include <string.h> #define TRUE 1 #define FALSE -1 #define MAX 100005 ?? typedef struct pp { ????char name[10]; ????int time; } P; ?? P Q[MAX]; int head, tail, n; ?? void enqueue(P x); P dequeue(); int isEmpty(); int isFull(); int min(int a, int b); ?? int main(){ ????int elaps = 0, c; ????int i, q ...
main.c:6:1: error: expected identifier or '(' before '?' token 6 | ?? | ^ main.c:10:3: warning: data definition has no type or storage class 10 | } P; | ^ main.c:10:3: error: type defaults to 'int' in declaration of 'P' [-Wimplicit-int] main.c:11:1: error: expected identifier or '(' before '?' toke...
s086269159
p02264
C
#include<stdio.h> #include<string.h> typedef struct pp{ char name[100]; int t; }A; A Q[100000]; int head=0, tail, n; void enqueue(P x){ strcpy(Q[tail].name,x.name); Q[tail].t = x.t; tail++; if(tail == 100000){ tail = 0; } } int main(){ int elaps = 0; int i, q; scanf("%d %d", &n, &q); for ( i ...
main.c:10:14: error: unknown type name 'P' 10 | void enqueue(P x){ | ^ main.c: In function 'main': main.c:31:7: error: implicit declaration of function 'enqueue' [-Wimplicit-function-declaration] 31 | enqueue(Q[head]); | ^~~~~~~
s570932542
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 == n){ tail = 0; } else { tail++; } } P dequeue(){ P x; x.name = Q[head].name; x.t = Q[head].t; if(head+1 == ...
main.c: In function 'dequeue': main.c:24:10: error: assignment to expression with array type 24 | x.name = Q[head].name; | ^ main.c: In function 'main': main.c:50:9: error: implicit declaration of function 'dequence'; did you mean 'dequeue'? [-Wimplicit-function-declaration] 50 | u = dequence...
s423789963
p02264
C
include <stdio.h> #include <string.h> #define LEN 100005 #define MAX typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void initialize(){ head = tail = 0; } int isEmpty(){ return head == tail; } int isFull(){ if(head == (tail+1)%LEN) return 1; else return 0; } void enqueue(P...
main.c:1:9: 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)); | ...
s092467005
p02264
C
#include<string.h> #include<stdio.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; x = Q[head]; head=(head+1)%LEN; return x; } int min(int a,int b){ int main(){ int elaps=0;c; ...
main.c: In function 'main': main.c:28:15: error: 'c' undeclared (first use in this function) 28 | int elaps=0;c; | ^ main.c:28:15: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'min': main.c:48:1: error: expected declaration or statem...
s094093385
p02264
C
#include<stdio.h> #include <stdlib.h> typedef struct{ char name[10]; int time; scanf("%d",&p[i].time); } while(head!=end){ if(p[head].time<=q){ count+=p[head].time; p[head].time=0; printf("%s %d\n",p[head].name,count); } else{ p[head].time-=q; count+=q; } h...
main.c:7:5: error: expected specifier-qualifier-list before 'scanf' 7 | scanf("%d",&p[i].time); | ^~~~~ main.c:9:3: error: expected identifier or '(' before 'while' 9 | while(head!=end){ | ^~~~~ main.c:33:3: error: expected identifier or '(' before 'return' 33 | return 0; | ...
s299297469
p02264
C
#include <stdio.h> #include <stdlib.h> #define MAX 100000 #define TRUE 1 #define FALSE 0 typedef struct{ char name[10]; int time; } Que; int isEmpty(void); int isFull(void); void enqueue(Que ); Que dequeue(void); Que Q[MAX+1]; int head; int tail; int main(){ int n,q,i,sum=0; Que que; scanf("%d %d",&n,...
main.c: In function 'dequeue': main.c:77:10: error: 'x' undeclared (first use in this function) 77 | return x= Q[head++]; | ^ main.c:77:10: note: each undeclared identifier is reported only once for each function it appears in
s321330564
p02264
C
#include <stdio.h> #include <stdlib.h> #define MAX 100000 #define TRUE 1 #define FALSE 0 typedef struct{ char name[10]; int time; } Que; int isEmpty(void); int isFull(void); void enqueue(Que ); Que dequeue(void); Que Q[MAX+1]; int head; int tail; int main(){ int n,q,i,sum=0; Que que; scanf("%d %d",&n,...
main.c: In function 'enqueue': main.c:68:3: error: 'else' without a previous 'if' 68 | else tail++; | ^~~~
s386123143
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 #define MAX 100000 void initialize(void); int isEmpty(void); int isFull(void); void enqueue(int); int dequeue(void); typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int head, tail, n; void enqueue(P x){ if(isFull()){ printf("error(overflow)"...
main.c:19:6: error: conflicting types for 'enqueue'; have 'void(P)' {aka 'void(struct pp)'} 19 | void enqueue(P x){ | ^~~~~~~ main.c:8:6: note: previous declaration of 'enqueue' with type 'void(int)' 8 | void enqueue(int); | ^~~~~~~ main.c:28:3: error: conflicting types for 'dequeue'; have ...
s628919400
p02264
C
#include<stdio.h> #include<string.h> #define LENG 100005 #define MAX 100000 typedef struct aa{ char name[100]; int t; }A; A Q[LENG+1]; int head, tail, n; void enqueue(A x){ if(isFull()){ printf("error(overflow)"); } Q[tail] = x; if(tail+1 == MAX)tail = 0; else tail++; } A dequeue(){ A res; if(is...
main.c: In function 'enqueue': main.c:13:6: error: implicit declaration of function 'isFull' [-Wimplicit-function-declaration] 13 | if(isFull()){ | ^~~~~~ main.c: In function 'dequeue': main.c:23:6: error: implicit declaration of function 'isEmpty' [-Wimplicit-function-declaration] 23 | if(isEmpty(...
s878027043
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 type struct pp { char name[100]; //Is it OK if name isn't array? 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...
main.c:5:5: error: expected ';' before 'struct' 5 | type struct pp { | ^~~~~~~ | ; main.c:10:1: error: unknown type name 'P' 10 | P Q[LEN]; | ^ main.c:13:14: error: expected declaration specifiers or '...' before 'P' 13 | void enqueue(P x) { | ^ main.c:18:1: error:...
s167062791
p02264
C
#include "bits/stdc++.h" using namespace std; #ifdef _DEBUG #include "dump.hpp" #else #define dump(...) #endif //#define int long long #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--) #define all(c) begin(c),end(c) const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f...
main.c:1:10: fatal error: bits/stdc++.h: No such file or directory 1 | #include "bits/stdc++.h" | ^~~~~~~~~~~~~~~ compilation terminated.
s886740038
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;} int main(){ int e...
main.c: In function 'dequeue': main.c:17:9: error: unknown type name 'p' 17 | p x = Q[head]; | ^ main.c:17:15: error: incompatible types when initializing type 'int' using type 'P' {aka 'struct pp'} 17 | p x = Q[head]; | ^ main.c:19:16: error: incompatible types w...
s886395155
p02264
C
#include<stdio.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 main(){ int elaps = 0,c; int i, q; P u; scanf("%d %d", &n, &q); for...
main.c: In function 'main': main.c:36:7: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 36 | c=min(q,u.t); | ^~~ | main
s370954433
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 0; } int min(int a,int b){ return a < b ? a : b; } int main...
main.c: In function 'dequeue': main.c:21:16: error: incompatible types when returning type 'int' but 'P' {aka 'struct pp'} was expected 21 | return 0; | ^
s431649223
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct pp{ char name[100]; int t; }katamei; //?????°??£?¨? katamei Q[LEN + 1]; int head=1, tail, n; void enqueue(katamei x){ Q[tail] = x; if(tail >= LEN){ tail=0; } else{ tail++; } } katamei dequeue(){ katamei y; y = Q[head]; ...
main.c: In function 'main': main.c:51:7: error: 'sum' undeclared (first use in this function) 51 | sum += q; | ^~~ main.c:51:7: note: each undeclared identifier is reported only once for each function it appears in
s769199999
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedef struct { 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)tail = 0; else tail++; } P dequeue(){ x = Q[head]; if(head+1 ==LEN)head=0; else head++; return x; } int main(){ int elaps = 0, c...
main.c: In function 'dequeue': main.c:20:1: error: 'x' undeclared (first use in this function) 20 | x = Q[head]; | ^ main.c:20:1: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'main': main.c:44:19: error: 'cnt' undeclared (first use in this function)...
s451872589
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)tail = 0; else tail++; } P dequeue(){ x = Q[head]; if(head+1 ==LEN)head=0; else head++; return x; } int main(){ int elaps = 0,...
main.c: In function 'dequeue': main.c:20:1: error: 'x' undeclared (first use in this function) 20 | x = Q[head]; | ^ main.c:20:1: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'main': main.c:44:19: error: 'cnt' undeclared (first use in this function)...
s613820591
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)tail = 0; else tail++; } P dequeue(){ P x; x = Q[head]; if(head+1 ==LEN)head=0; else head++; return x; } int main(){ int elaps...
main.c: In function 'main': main.c:45:19: error: 'cnt' undeclared (first use in this function); did you mean 'int'? 45 | cnt++; | ^~~ | int main.c:45:19: note: each undeclared identifier is reported only once for each function it appears in
s873281681
p02264
C
#include<iostream> #include<queue> using namespace std; int main(){ int n,q; int a,time=0; string s; queue<int> Q; queue<string> name; cin >> n >> q; for(int i=0;i<n;i++){ cin >> s >> a; Q.push(a); name.push(s); } while(Q.empty()==false){ a=Q.front...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s543537338
p02264
C
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; #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; ...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s796531906
p02264
C
#include<stdio.h> #include<string.h> #define LEN 1000000 typedef struct pp{ char name[100]; int t; }P; P Q[LEN+1]; int main(){ int n,i,q,s=0,l,c=0; scanf("%d %d",&n,&q); for (i=1;i<=n;i++){ scanf("%s",Q[i].name); scanf("%d",&Q[i].t); } i=1; l=n; while(1){ if(Q[i].t>q){ s+=q; st...
main.c: In function 'main': main.c:25:7: error: 'sum' undeclared (first use in this function) 25 | sum += Q[i].t; | ^~~ main.c:25:7: note: each undeclared identifier is reported only once for each function it appears in
s475682653
p02264
C
#include<stdio.h> #include<string.h> Define LEN 100005 typedef struct pp{ charname[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;}//min int main(){ int elaps=0,c;...
main.c:3:1: error: unknown type name 'Define' 3 | Define LEN 100005 | ^~~~~~ main.c:3:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before numeric constant 3 | Define LEN 100005 | ^~~~~~ main.c:8:2: warning: data definition has no type or storage class 8 | }P; | ^...
s541485814
p02264
C
#include<stdio.h> #include<string.h> #define LEN 10005 /* プロセスを表す構造体 */ 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:14:14: error: unknown type name 'P' 14 | void enqueue(P x){ | ^ main.c: In function 'dequeue': main.c:20:9: error: unknown type name 'P' 20 | P x=Q[head]; | ^ main.c:20:13: error: incompatible types when initializing type 'int' using type 'p' {aka 'struct pp'} 20...
s890456353
p02264
C
define
main.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input 1 | define | ^~~~~~
s925889316
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;} int main(){ int elaps=0,c; ...
main.c: In function 'enqueue': main.c:14:9: error: 'Q' undeclared (first use in this function) 14 | Q[tail]=x; | ^ main.c:14:9: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'dequeue': main.c:19:13: error: 'Q' undeclared (first use in...
s520304455
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;} int main(...
main.c: In function 'main': main.c:30:26: error: expected expression before '%' token 30 | scanf("%d %d",&n,%q); | ^
s349342407
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;} int main(...
main.c: In function 'main': main.c:30:26: error: expected expression before '%' token 30 | scanf("%d %d",&n,%q); | ^
s000860458
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:14:14: error: unknown type name 'P' 14 | void enqueue(P x){ | ^ main.c: In function 'dequeue': main.c:20:9: error: unknown type name 'P' 20 | P x=Q[head]; | ^ main.c:20:13: error: incompatible types when initializing type 'int' using type 'p' {aka 'struct pp'} 20...
s911523411
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typdef 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 ; } int main(){ in...
main.c:5:7: error: expected ';' before 'struct' 5 | typdef struct pp{ | ^~~~~~~ | ; main.c:10:1: error: unknown type name 'P' 10 | P Q[LEN]; | ^ main.c:13:14: error: unknown type name 'P' 13 | void enqueue(P x){ | ^ main.c:18:1: error: unknown type name 'P' ...
s707622000
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:41:19: error: expected ')' before '!' token 41 | while(head! = tail){ | ~ ^ | )
s591647487
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;} int main(){ int elaps=0,c;...
main.c: In function 'main': main.c:38:19: error: expected ')' before '!' token 38 | while(head! = tail){ | ~ ^ | )
s355479435
p02264
C
#include <iostream> #include <stdio.h> #include <string.h> #define len 100005 typedef struct pp{ char name[100]; int time; }p; p queue[len]; int head,tail; void enqueue(p n){ queue[tail]=n; tail=(tail+1)%len; } p dequeue(){ p v=queue[head]; head=(head+1)%len; return v; } int min(int a...
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s857763957
p02264
C
#include<stdio,h> #include<string.h> struct Data{ char name[11]; int t; }; struct Data Q[1001]; int n, head=1, tail=1; void enqueue(struct Data x){ Q[tail] = x; if(tail == n) tail = 1; else tail++; } struct Data dequeue(){ struct Data x; x = Q[head]; if(head == n) head = 1; else head++...
main.c:1:9: fatal error: stdio,h: No such file or directory 1 | #include<stdio,h> | ^~~~~~~~~ compilation terminated.
s494957106
p02264
C
#include<stdio,h> #include<string.h> struct Data{ char name[11]; int t; }; struct Data Q[1001]; int n, head=1, tail=1; void enqueue(struct Data x){ Q[tail] = x; if(tail == n) tail = 1; else tail++; } struct Data dequeue(){ struct Data x; x = Q[head]; if(head == n) head = 1; else head+...
main.c:1:9: fatal error: stdio,h: No such file or directory 1 | #include<stdio,h> | ^~~~~~~~~ compilation terminated.
s451414574
p02264
C
#include <stdio.h> #include <string.h> #define N 100000 typedef struct { int time; char name[10]; }P; int head,tail,n; int min(int,int); void enqueue(Pro); P dequeue(void); P Q[N]; int main() { int q,i,c,e=0; P z; scanf("%d%d",&n,&q); for(i=1;i<=n;i++) { scanf("%s%d" ,Q[i].name,&Q[...
main.c:14:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 14 | void enqueue(Pro); | ^~~~ main.c:48:14: error: unknown type name 'Pro' 48 | void enqueue(Pro x) | ^~~
s947839846
p02264
C
#include <stdio.h> #include <math.h> #include <stdlib.h> #define true 1 struct Line { char name[15]; int time; }; int N, Q; int stack_number = 0; int count; int main(void) { scanf("%d %d", N, Q); struct Line line[N + 1]; int stack[N+1]; memset(stack, '\0'); for (int i = 0; i < N; i++) { scanf("%s %d", li...
main.c: In function 'main': main.c:21:9: error: implicit declaration of function 'memset' [-Wimplicit-function-declaration] 21 | memset(stack, '\0'); | ^~~~~~ main.c:4:1: note: include '<string.h>' or provide a declaration of 'memset' 3 | #include <stdlib.h> +++ |+#include <string.h> ...
s179761785
p02264
C
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #define true 1 struct Line { char name[15]; int time; }; int N, Q; int stack_number = 0; int count; int main(void) { scanf("%d %d", N, Q); struct Line line[N + 1]; int stack[N+1]; memset(stack, '\0'); for (int i = 0; i < N; i++) {...
main.c: In function 'main': main.c:22:9: error: too few arguments to function 'memset' 22 | memset(stack, '\0'); | ^~~~~~ In file included from main.c:4: /usr/include/string.h:61:14: note: declared here 61 | extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1)); ...
s694012440
p02264
C
#include<stdio.h> #include<fstream> #include<algorithm> #include<cmath> #include<iostream> using namespace std; struct renwu{ char m[1000]; int t; }a[1000000]; int main() { int n;int p; int x=0; scanf("%d%d",&n,&p); int k=0,l=0; for(int i=0;i<n;i++) { scanf("%s%d",a[i].m,&a[i].t); ...
main.c:2:9: fatal error: fstream: No such file or directory 2 | #include<fstream> | ^~~~~~~~~ compilation terminated.
s839745456
p02264
C
#include<stdio.h> #include<fstream> #include<algorithm> using namespace std; struct renwu{ char m[1000]; int t; }a[1000000]; int main() { int n;int p; int x=0; scanf("%d%d",&n,&p); int k=0,l=0; for(int i=0;i<n;i++) { scanf("%s%d",a[i].m,&a[i].t); } int head=0; int tail=n;...
main.c:2:9: fatal error: fstream: No such file or directory 2 | #include<fstream> | ^~~~~~~~~ compilation terminated.
s870339894
p02264
C
#include<stdio.h> //#include<fstream> #include<algorithm> using namespace std; struct renwu{ char m[1000]; int t; }a[1000000]; int main() { int n;int p; int x=0; scanf("%d%d",&n,&p); int k=0,l=0; for(int i=0;i<n;i++) { scanf("%s%d",a[i].m,&a[i].t); } int head=0; int tail=...
main.c:3:9: fatal error: algorithm: No such file or directory 3 | #include<algorithm> | ^~~~~~~~~~~ compilation terminated.
s806087886
p02264
C
dio.h> #define MAX 100000 struct queue { char name[11]; int time; }; int head; int tail; struct queue dequeue(struct queue p[]) { int i; struct queue tmp = p[head]; head = (head + 1) % (MAX + 1); return tmp; } void enqueue(struct queue p[], struct queue tmp, int tail) { p[tail] = tmp; } int main() { int ...
main.c:1:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | dio.h> | ^ main.c:11:35: error: array type has incomplete element type 'struct queue' 11 | struct queue dequeue(struct queue p[]) | ^ main.c:11:14: error: return type is an in...
s157917068
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 == LEN tail=0; else tail++; } P dequeue(){ P x = Q[head]; if head == LEN head=0; else head ++; return x; } int main(){ int elaps = 0, c...
main.c: In function 'enqueue': main.c:15:4: error: expected '(' before 'tail' 15 | if tail == LEN tail=0; | ^~~~ | ( main.c: In function 'dequeue': main.c:21:4: error: expected '(' before 'head' 21 | if head == LEN head=0; | ^~~~ | ( main.c: In function 'main': main.c:40:8: err...
s361435268
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 == LEN{ tail=0; } else tail++; } P dequeue(){ P x = Q[head]; if head == LEN{ head=0; } else head ++; return x; } ...
main.c: In function 'enqueue': main.c:15:6: error: expected '(' before 'tail' 15 | if tail == LEN{ | ^~~~ | ( main.c: In function 'dequeue': main.c:23:6: error: expected '(' before 'head' 23 | if head == LEN{ | ^~~~ | ( main.c: In function 'main': main.c:44:8: error...
s174671376
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 == LEN) tail=0; else tail++; } P dequeue(){ P x = Q[head]; if (head == LEN) head=0; else head ++; return x; } int main(){ ...
main.c: In function 'main': main.c:40:8: error: expected '(' before 'u' 40 | if u.t <= 100{ | ^ | ( main.c:51:1: error: expected declaration or statement at end of input 51 | } | ^
s196042302
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 == LEN) tail=0; else tail++; } P dequeue(){ P x = Q[head]; if (head == LEN) head=0; else head ++; return x; } int main(){ ...
main.c: In function 'main': main.c:51:1: error: expected declaration or statement at end of input 51 | } | ^
s736767385
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 ...
main.c:10:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'P' 10 | P Q[LEN]; | ^ main.c:10:1: error: unknown type name 'P' main.c:13:15: error: unknown type name 'P' 13 | void enqueue( P x ){ | ^ main.c:18:1: error: unknown type name 'P' 18 | P dequeue(){ | ^ m...
s456531187
p02264
C
#include <stdio.h> typedef struct Process{ char name[10]; int time; }process; int main(void){ int i,j,n,q,t; scanf("%d",&n); scanf("%d",&q); process p[n]; for(i=0;i<n;i++){ scanf("%s",p[i].name); scanf("%d",&p[i].time); } i=0; t=0; while(i<n){ for(j=0;j<n;j++){ if(p[j].time>0){ if(p[j]...
main.c: In function 'main': main.c:27:45: error: 'process' {aka 'struct Process'} has no member named 'finish' 27 | p[j].finish=t; | ^
s294555864
p02264
C
include<stdio.h> #include<stdlib.h> #define QUESIZE 1001 typedef struct{ char name[10]; int time; } process; void que_enqueue(process); process que_dequeue(void); int que_size(void); int que_free(void); int que_empty(void); void que_clear(void); process que[QUESIZE]; int head=0, tail=0; void que_enqueue(process ...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/stdlib.h:98:8: error: unknown type name 'size_t' 98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; | ^~~~~~ /usr/inclu...
s315730555
p02264
C
#include <stdio.h> #include <string.h> int main(void) { int pn; /* process num */ int pt; /* process time */ char name_buff[100000][10]; /* Name Buffer */ int time_buff[100000]; /* Time Buffer */ int data_num = 0; int bp = 0; /* Buffer Position */ /* get "process num" & "process time" */ sca...
main.c: In function 'main': main.c:14:28: error: invalid operands to binary & (have 'int *' and 'int') 14 | scanf("%d %d", &pn &pt); | ~~~ ^ | | | int *
s095342316
p02264
C
#include<stdio.h> #include<string.h> ?? //?§??????? typedef struct { ????char name[10]; ????int t; }Process; ?? ?? //????????????????????£?¨? void enqueue(Process); Process dequeue(void); ?? //??°?????????????????° Process Q[100000]; int n,q; int ttime; int i,j; ?? int main(void){ ?? ????int count=0; ????Process stack[...
main.c:3:1: error: expected identifier or '(' before '?' token 3 | ?? | ^ 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 '(' be...
s556777035
p02264
C
#include<stdio.h> #include<string.h> typedef struct p{ char name[100]; int time; }Process; Process Que[10000]; int head, tail, n; void enqueue(Process x){ Que[tail] = x; tail = (tail + 1)%10000; } Process dequeue(){ Process x = Que[head]; head = (head + 1)%10000; return x; } int min(int a, int b...
main.c: In function 'main': main.c:40:16: error: 'Process' {aka 'struct p'} has no member named 't' 40 | c = min(q,u.t); | ^ main.c:43:9: error: 'Process' {aka 'struct p'} has no member named 't' 43 | if(u.t > 0){ | ^
s662320892
p02264
C
#include <stdio.h> #define M 100000 typedef struct { char name[10]; int t; } QUEUE; QUEUE que[MAX]; int front, rear; void Enqueue(QUEUE x) { if (rear == M) rear = 0; que[rear] = x; rear++; } QUEUE Dequeue(void) { if (M == front) front = 0; return que[front++]; } int main(int argc, char const *argv[]) ...
main.c:8:11: error: 'MAX' undeclared here (not in a function) 8 | QUEUE que[MAX]; | ^~~
s877813798
p02264
C
#include <stdio.h> #include <string.h> #define QUEUE_DATA_MAX 100000 typedef struct ST_QueueData { char name_buff[10]; /* Name Buffer */ int time_buff; /* Time Buffer */ int *next; /* Next Point */ }QueueData_t; QueueData_t tQueueDataBuffer[QUEUE_DATA_MAX]; int main(void) { in...
main.c: In function 'main': main.c:32:49: error: incompatible types when assigning to type 'int *' from type 'QueueData_t' {aka 'struct ST_QueueData'} 32 | tQueueDataBuffer[data_num-1].next = tQueueDataBuffer[data_num]; | ^~~~~~~~~~~~~~~~ main.c:41:45...
s648184358
p02264
C
#include <stdio.h> #include <string.h> #define QUEUE_DATA_MAX 100000 typedef struct ST_QueueData { char name_buff[10]; /* Name Buffer */ int time_buff; /* Time Buffer */ QueueData_t *next; /* Next Point */ }QueueData_t; QueueData_t tQueueDataBuffer[QUEUE_DATA_MAX]; int main(void) { in...
main.c:10:9: error: unknown type name 'QueueData_t' 10 | QueueData_t *next; /* Next Point */ | ^~~~~~~~~~~ main.c: In function 'main': main.c:31:45: error: incompatible types when assigning to type 'int *' from type 'QueueData_t' {aka 'struct ST_QueueData'} 31 | tQueueDataBuffer...
s227917752
p02264
C
#include <stdio.h> #include <string.h> #define QUEUE_DATA_MAX 100000 typedef struct ST_QueueData { char name_buff[10]; /* Name Buffer */ int time_buff; /* Time Buffer */ int *next; /* Next Point */ }QueueData_t; QueueData_t tQueueDataBuffer[QUEUE_DATA_MAX]; int main(void) { in...
main.c: In function 'main': main.c:31:9: error: cannot convert to a pointer type 31 | tQueueDataBuffer[data_num-1].next = (int*)tQueueDataBuffer[data_num]; | ^~~~~~~~~~~~~~~~ main.c:34:9: error: cannot convert to a pointer type 34 | tQueueDataBuffer[data_num-1].next = (int*)tQueueDat...
s303683661
p02264
C
#include <stdio.h> #include <string.h> #define QUEUE_DATA_MAX 100000 typedef struct ST_QueueData { char name_buff[10]; /* Name Buffer */ int time_buff; /* Time Buffer */ ST_QueueData QueueData_t *next; /* Next Point */ }QueueData_t; QueueData_t tQueueDataBuffer[QUEUE...
main.c:10:9: error: unknown type name 'ST_QueueData' 10 | ST_QueueData QueueData_t *next; /* Next Point */ | ^~~~~~~~~~~~ main.c:10:34: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token 10 | ST_QueueData QueueData_t *next; /* Next Point */ | ...
s118580645
p02264
C
#include <stdio.h> #include <string.h> #define QUEUE_DATA_MAX 100000 typedef struct ST_QueueData QueueData_t; struct QueueData_t{ char name_buff[10]; /* Name Buffer */ int time_buff; /* Time Buffer */ QueueData_t *next; /* Next Point */ }; QueueData_t tQueueDataBuffer[QUEUE_DATA_MAX]; int m...
main.c:14:13: error: array type has incomplete element type 'QueueData_t' {aka 'struct ST_QueueData'} 14 | QueueData_t tQueueDataBuffer[QUEUE_DATA_MAX]; | ^~~~~~~~~~~~~~~~ main.c: In function 'main': main.c:45:31: error: invalid use of incomplete typedef 'QueueData_t' {aka 'struct ST_QueueData'} ...
s052967312
p02264
C
#include <stdio.h> #include <string.h> #define QUEUE_DATA_MAX 100000 typedef struct ST_QueueData QueueData_t; struct ST_QueueData{ char name_buff[10]; /* Name Buffer */ int time_buff; /* Time Buffer */ QueueData_t *next; /* Next Point */ }QUEUE_DATA; QueueData_t tQueueDataBuffer[QUEUE_DATA_M...
main.c: In function 'main': main.c:32:45: error: incompatible types when assigning to type 'QueueData_t *' {aka 'struct ST_QueueData *'} from type 'QueueData_t' {aka 'struct ST_QueueData'} 32 | tQueueDataBuffer[data_num-1].next = tQueueDataBuffer[data_num]; | ...
s999583154
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 <...
main.c: In function 'main': main.c:45:30: error: expected ';' before 'else' 45 | if (u.t>0) enqueue(u) | ^ | ; 46 | else { | ~~~~
s910619380
p02264
C
#include<iostream> #include<cstring> using namespace std; struct scheduler { int process; int q; string name[100000]; int time[100000]; int total_time; int alltime; int list[100000]; int timenow[100000]; }; int main() { scheduler std; std.t...
main.c:1:9: fatal error: iostream: No such file or directory 1 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s469418727
p02264
C
#include <cstdio> int head, tail; #define len 100010 typedef struct pp { char name[20]; int time; } P; P Q[len]; 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;} int main() { #...
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s412707393
p02264
C
// キュー #include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> #include<limits.h> #include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> //const int MAX_N = 100000; const int STR_LEN = 10; // キュー関連の定義 const int Max_Queue = 100000; // キューの要素の構造体 typedef struct q_e {...
main.c:8:9: fatal error: iostream: No such file or directory 8 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s363536559
p02264
C
// キュー #include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> #include<limits.h> #include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #include<vector> //const int MAX_N = 100000; const int STR_LEN = 10; // キュー関連の定義 //const int Max_Queue = 100000; const int Max_Queue = 10000; cons...
main.c:8:9: fatal error: iostream: No such file or directory 8 | #include<iostream> | ^~~~~~~~~~ compilation terminated.
s825545376
p02264
C
#include <stdio.h> #include <string.h> #define LEN 100005 struct P { char chName[20]; int nT; }; P In[LEN]; int nHead, nTail; int n; void enqueue(P x) { In[nTail] = x; nTail = (nTail + 1) % (n+2); } P dequeue() { P ret = In[nHead]; nHead = (nHead + 1) % (n+2); return ret; } int main() { int q, nTime = 0; ...
main.c:11:1: error: unknown type name 'P'; use 'struct' keyword to refer to the type 11 | P In[LEN]; | ^ | struct main.c:15:14: error: unknown type name 'P' 15 | void enqueue(P x) | ^ main.c:21:1: error: unknown type name 'P'; use 'struct' keyword to refer to the type 21 | P deq...
s194372055
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;} int main(){ int elap...
main.c: In function 'main': main.c:40:15: error: 't' undeclared (first use in this function) 40 | c=min(q,u,t); | ^ main.c:40:15: note: each undeclared identifier is reported only once for each function it appears in main.c:40:13: error: incompatible type for argument 2 of 'min' 40 | c...
s286996590
p02264
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s971450924
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedof 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;} in...
main.c:6:8: error: expected ';' before 'struct' 6 | typedof struct pp{ | ^~~~~~~ | ; main.c:11:1: error: unknown type name 'P' 11 | P Q[LEN]; | ^ main.c:14:14: error: expected declaration specifiers or '...' before 'P' 14 | void enqueue(P x){ | ^ main.c:19:1:...
s781269949
p02264
C
#include<stdio.h> #include<string.h> #define LEN 100005 typedof 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;} in...
main.c:6:8: error: expected ';' before 'struct' 6 | typedof struct pp{ | ^~~~~~~ | ; main.c:11:1: error: unknown type name 'P' 11 | P Q[LEN]; | ^ main.c:14:14: error: expected declaration specifiers or '...' before 'P' 14 | void enqueue(P x){ | ^ main.c:19:1:...
s202264533
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;} in...
main.c: In function 'main': main.c:53:5: error: expected expression before '}' token 53 | } | ^
s578205579
p02264
C
#include<stdio.h> #include<stdlib.h> typedef struct{ char name[10]; int t; }Data; typedef struct{ int tail; Data *data; int n; }Queue; void initqueue(Queue*, int); int enqueue(Queue*, Data); Data dequeue(Queue*); void dprint(Queue); void initqueue(Queue *q, int n){ q->tail = 0; q->n = n; q->data = ...
main.c: In function 'enqueue': main.c:102:1: error: expected declaration or statement at end of input 102 | } | ^
s566712885
p02264
C
include<stdio.h> #include<stdlib.h> #include<string.h> int head; int tail; typedef struct{ char name[11]; int time; }Q; void enqueue(Q *a,Q b); Q dequeue(Q *a); int main() { int n,m,k=0,i,sum=0; head=0; scanf("%d %d",&n,&m); Q *q; Q arr[n]; tail=n-1; for(i=0;i<n;i++){ scanf("%s",q[i].name); sc...
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | include<stdio.h> | ^ In file included from main.c:2: /usr/include/stdlib.h:98:8: error: unknown type name 'size_t' 98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; | ^~~~~~ /usr/inclu...
s653621462
p02264
C
#include<stdio.h> #include<string.h> #define MAX 150000 typedef struct Point{ char data[100]; int t; } Point; Point set[Max]; int heard; int tail; int k; int main(){ int el = 0; int c; int i; int l; Point u; scanf("%d %d",&k,&l); for(i = 0;i <= k;i++){ scanf("%s",set[i].data); scanf("%d"...
main.c:11:11: error: 'Max' undeclared here (not in a function); did you mean 'MAX'? 11 | Point set[Max]; | ^~~ | MAX main.c: In function 'main': main.c:29:3: error: 'head' undeclared (first use in this function); did you mean 'heard'? 29 | head = 1; | ^~~~ | heard...
s313811522
p02264
C
#include<stdio.h> #include<stdbool.h> #include<stdlib.h> #include<string.h> #define M 100000 typedef struct q{ char name[10]; int v; } q; int head,tail,n; q Q[M]; q A; bool isEnpty(){ if(tail == head) true; else false; } void enqueue(q x){ Q[tail] = x; if(tail+1 == M) tail = 0; else tail = tail +1...
main.c: In function 'main': main.c:57:9: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 57 | k = min(value,A.v); | ^~~ | main
s560079829
p02264
C
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start': (.text+0x17): undefined reference to `main' collect2: error: ld returned 1 exit status
s061746924
p02264
C
/* * File: main.c * Author: s1252007 * * Created on June 24, 2018, 9:22 PM */ #include <stdio.h> #include <stdlib.h> int main() { int count,j,n,time,remain,flag=0,time_quantum; int wait_time=0,turnaround_time=0,*bt,*rt; char **arr; scanf("%d %d", &n, &time_quantum); arr = (c...
main.c: In function 'main': main.c:65:12: error: 'E0' undeclared (first use in this function) 65 | return E0 | ^~ main.c:65:12: note: each undeclared identifier is reported only once for each function it appears in main.c:65:14: error: expected ';' before '}' token 65 | return E0 | ...
s446874317
p02264
C
/* * File: main.c * Author: s1252007 * * Created on June 24, 2018, 9:22 PM */ #include <stdio.h> #include <stdlib.h> int main() { int count,j,n,time,remain,flag=0,time_quantum; int wait_time=0,turnaround_time=0,*bt,*rt; char **arr; scanf("%d %d", &n, &time_quantum); arr = (c...
main.c: In function 'main': main.c:65:13: error: expected ';' before '}' token 65 | return 0 | ^ | ; 66 | } | ~
s435038629
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 main(){ int elaps=0, c; int i, q; P u; scanf("...
main.c: In function 'main': main.c:44:7: error: implicit declaration of function 'min'; did you mean 'main'? [-Wimplicit-function-declaration] 44 | c=min(q, u.t); | ^~~ | main