submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s803652656
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ int key; struct node *next; struct node *prev; }; typedef struct node *NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer i; for(i=nil;i->next!=nil;i=i->next)...
main.c: In function 'main': main.c:93:40: error: expected ';' before '}' token 93 | else {delete(key);nd++}; | ^ | ;
s651213300
p02265
C
#include<stdio.h> #include<strlib.h> struct Node{ Node *prev; Node *next; int key; }; Node *nil; void init(){ nil=malloc(sizeof(Node)); nil->prev=nil; nil->next=nil; } void printlist(){ struct Node *ser=nil->next; ...
main.c:2:9: fatal error: strlib.h: No such file or directory 2 | #include<strlib.h> | ^~~~~~~~~~ compilation terminated.
s473793345
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ Node *prev; Node *next; int key; }; Node *nil; void init(){ nil=malloc(sizeof(Node)); nil->prev=nil; nil->next=nil; } void printlist(){ struct Node *ser=nil->next; ...
main.c:5:12: error: unknown type name 'Node' 5 | Node *prev; | ^~~~ main.c:6:12: error: unknown type name 'Node' 6 | Node *next; | ^~~~ main.c:10:2: error: unknown type name 'Node'; use 'struct' keyword to refer to the type 10 | Node *nil; | ^~~...
s147547847
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ Node *prev; Node *next; int key; }; typedef struct Node *Nodepointer Nodepointer *nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; } void printl...
main.c:5:12: error: unknown type name 'Node' 5 | Node *prev; | ^~~~ main.c:6:12: error: unknown type name 'Node' 6 | Node *next; | ^~~~ main.c:11:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Nodepointer' 11 | Nodepointer *nil; ...
s474604763
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ Node *prev; Node *next; int key; }; typedef struct Node *Nodepointer Nodepointer *nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; } void print...
main.c:5:12: error: unknown type name 'Node' 5 | Node *prev; | ^~~~ main.c:6:12: error: unknown type name 'Node' 6 | Node *next; | ^~~~ main.c:12:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Nodepointer' 12 | Nodepointer *nil; ...
s040295990
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer Nodepointer *nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c:12:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Nodepointer' 12 | Nodepointer *nil; | ^~~~~~~~~~~ main.c:12:2: error: unknown type name 'Nodepointer' main.c: In function 'init': main.c:15:11: error: 'nil' undeclared (first use in this function) 15 | nil=malloc(sizeof...
s667962716
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer Nodepointer *nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c:12:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Nodepointer' 12 | Nodepointer *nil; | ^~~~~~~~~~~ main.c:12:2: error: unknown type name 'Nodepointer' main.c: In function 'init': main.c:15:11: error: 'nil' undeclared (first use in this function) 15 | nil=malloc(sizeof...
s638825218
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer Nodepointer *nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c:12:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Nodepointer' 12 | Nodepointer *nil; | ^~~~~~~~~~~ main.c:12:2: error: unknown type name 'Nodepointer' main.c: In function 'init': main.c:15:11: error: 'nil' undeclared (first use in this function) 15 | nil=malloc(sizeof...
s896470027
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer Nodepointer nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; }...
main.c:12:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Nodepointer' 12 | Nodepointer nil; | ^~~~~~~~~~~ main.c:12:2: error: unknown type name 'Nodepointer' main.c: In function 'init': main.c:15:11: error: 'nil' undeclared (first use in this function) 15 | nil=malloc(sizeof(...
s682743493
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer Nodepointer nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; }...
main.c:12:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Nodepointer' 12 | Nodepointer nil; | ^~~~~~~~~~~ main.c:12:2: error: unknown type name 'Nodepointer' main.c: In function 'init': main.c:15:11: error: 'nil' undeclared (first use in this function) 15 | nil=malloc(sizeof(...
s374631755
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer; Nodepointer nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c: In function 'printlist': main.c:32:11: error: implicit declaration of function 'pritf'; did you mean 'printf'? [-Wimplicit-function-declaration] 32 | pritf("\n"); | ^~~~~ | printf main.c: In function 'serch': main.c:47:28: error: initialization of 'struct Node **' fr...
s288089468
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer; Nodepointer nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c: In function 'printlist': main.c:32:11: error: implicit declaration of function 'pritf'; did you mean 'printf'? [-Wimplicit-function-declaration] 32 | pritf("\n"); | ^~~~~ | printf main.c: In function 'main': main.c:81:21: error: implicit declaration of function 'strl...
s496323293
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer; Nodepointer nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c: In function 'printlist': main.c:32:11: error: implicit declaration of function 'pritf'; did you mean 'printf'? [-Wimplicit-function-declaration] 32 | pritf("\n"); | ^~~~~ | printf main.c: In function 'main': main.c:81:21: error: implicit declaration of function 'strl...
s032747934
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer; Nodepointer nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c: In function 'printlist': main.c:32:11: error: implicit declaration of function 'pritf'; did you mean 'printf'? [-Wimplicit-function-declaration] 32 | pritf("\n"); | ^~~~~ | printf main.c: In function 'main': main.c:81:21: error: implicit declaration of function 'strl...
s266139168
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer; Nodepointer nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c: In function 'main': main.c:84:35: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 84 | if(strlen(com)>6){ | ^~~~~~ main.c:3:1: note: include '<string.h>' or provide a declaration of 'strlen' 2 | #inc...
s655620567
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer; Nodepointer nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c: In function 'deletefirst': main.c:63:11: error: unknown type name 'NodePointer'; did you mean 'Nodepointer'? 63 | NodePointer t = nil->next; | ^~~~~~~~~~~ | Nodepointer main.c:63:27: error: initialization of 'int' from 'struct Node *' makes integer from pointer witho...
s107478336
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer; Nodepointer nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c: In function 'deletefirst': main.c:63:11: error: unknown type name 'NodePointer'; did you mean 'Nodepointer'? 63 | NodePointer t = nil->next; | ^~~~~~~~~~~ | Nodepointer main.c:63:27: error: initialization of 'int' from 'struct Node *' makes integer from pointer witho...
s903154887
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer t; for (t = nil->next; t != nil; t = t->next) { if (t->key == key) { ...
main.c: In function 'delete': main.c:68:14: error: implicit declaration of function 'serch'; did you mean 'strchr'? [-Wimplicit-function-declaration] 68 | deleteNode(serch(key)); | ^~~~~ | strchr main.c:68:14: error: passing argument 1 of 'deleteNode' makes pointer from intege...
s190530636
p02265
C
#include<stdio.h> #include<stdlib.h> struct Node{ struct Node *prev; struct Node *next; int key; }; typedef struct Node *Nodepointer; Nodepointer nil; void init(){ nil=malloc(sizeof(struct Node)); nil->prev=nil; nil->next=nil; ...
main.c: In function 'deletelast': main.c:70:17: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 70 | if (t == nil) return; | ^~~~~~ main.c:68:6: note: declared here 68 | int deletelast(){ | ^~~~~~~~~~ main.c: In function 'deletekey': main.c:75:...
s721882798
p02265
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
s380930391
p02265
C
include <stdio.h> #include <stdlib.h> #include <string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ /* your code */ NodePointer y; y = nil->next; while((y->key != key) && (y != nil)){ ...
main.c:1:9: 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/inc...
s918414396
p02265
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
s652721504
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ /* your code */ Node* cur = nil->next; while( cur != && cur -> key != key){ cur = cur->...
main.c: In function 'listSearch': main.c:17:3: error: unknown type name 'Node' 17 | Node* cur = nil->next; | ^~~~ main.c:17:15: error: initialization of 'int *' from incompatible pointer type 'struct node *' [-Wincompatible-pointer-types] 17 | Node* cur = nil->next; | ^~~ main.c:18...
s604606396
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ /* your code */ NodePointer cur = nil->next; while( cur != && cur -> key != key){ cur =...
main.c: In function 'listSearch': main.c:18:23: error: expected ')' before '->' token 18 | while( cur != && cur -> key != key){ | ~ ^~~ | ) main.c:18:3: error: label 'cur' used but not defined 18 | while( cur != && cur -> key != key){ | ^~~~~
s178515810
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ /* your code */ NodePointer cur = nil->next; while( cur != && cur->key != key){ cur = c...
main.c: In function 'listSearch': main.c:18:23: error: expected ')' before '->' token 18 | while( cur != && cur->key != key){ | ~ ^~ | ) main.c:18:3: error: label 'cur' used but not defined 18 | while( cur != && cur->key != key){ | ^~~~~
s250734450
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key) { NodePointer x; for(x = nil->next;x != nil;x = x->next) { if(key == x->key) { ...
main.c: In function 'delete': main.c:84:6: error: implicit declaration of function 'listserch'; did you mean 'listSearch'? [-Wimplicit-function-declaration] 84 | if(listserch(key) == NULL) | ^~~~~~~~~ | listSearch main.c:84:21: warning: comparison between pointer and integer 84 | if(list...
s426240314
p02265
C
#include<stdio.h> #include<string.h> struct node { int key; node *next,*prev; }; node *head; node *listsearch(int key) { node *cur=head->next; while(cur!=head&&cur->key!=key) cur=cur->next; return cur; } void init()// 初始化双向链表,即生成空结点为表头,让head.next和head.prev都指向head { head=new node; head->next=head=N...
main.c:5:4: error: unknown type name 'node' 5 | node *next,*prev; | ^~~~ main.c:7:1: error: unknown type name 'node'; use 'struct' keyword to refer to the type 7 | node *head; | ^~~~ | struct main.c:8:1: error: unknown type name 'node'; use 'struct' keyword to refer to the type 8 | ...
s440550502
p02265
C
#include<stdio.h> #include<string.h> struct node { int key; node *next,*prev; }; node *head; node *listsearch(int key) { node *cur=head->next; while(cur!=head&&cur->key!=key) cur=cur->next; return cur; } void init()// 初始化双向链表,即生成空结点为表头,让head.next和head.prev都指向head { head=new node; head->next=head; ...
main.c:5:4: error: unknown type name 'node' 5 | node *next,*prev; | ^~~~ main.c:7:1: error: unknown type name 'node'; use 'struct' keyword to refer to the type 7 | node *head; | ^~~~ | struct main.c:8:1: error: unknown type name 'node'; use 'struct' keyword to refer to the type 8 | ...
s400166017
p02265
C
#include<stdio.h> #include<string.h> struct node { int key; node *next,*prev; }; node *head; node *listsearch(int key) { node *cur=head->next; while(cur!=head&&cur->key!=key) cur=cur->next; return cur; } void init()// 初始化双向链表,即生成空结点为表头,让head.next和head.prev都指向head { head=new node; head->next=head; ...
main.c:5:4: error: unknown type name 'node' 5 | node *next,*prev; | ^~~~ main.c:7:1: error: unknown type name 'node'; use 'struct' keyword to refer to the type 7 | node *head; | ^~~~ | struct main.c:8:1: error: unknown type name 'node'; use 'struct' keyword to refer to the type 8 | ...
s611926923
p02265
C
#include<cstdio> #include<cstdlib> #include<cstring> struct Node{ int key; Node *prev, *next; }; Node *nil; Node* listSearch(int key) { Node* cur = nil->next; while(cur != nil && cur->key != key) { cur = cur->next; } return cur; } void init() { nil = (Node*)malloc(sizeof(Node)); nil->next = ni...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s329129817
p02265
C
/* C++ */ // ??£???????????? P97 #include <stdio.h> #include <stdlib.h> #include <string.h> struct node { int key; node* next; node* prev; }; node NIL_TOP; node NIL_END; // ?????????????????¨???????????????????????¨??£??? void initNIL(void){ NIL_TOP.key = 0; NIL_TOP.next = &NIL_TOP; NIL_TOP.prev = &NIL_END; ...
main.c:11:9: error: unknown type name 'node' 11 | node* next; | ^~~~ main.c:12:9: error: unknown type name 'node' 12 | node* prev; | ^~~~ main.c:15:1: error: unknown type name 'node'; use 'struct' keyword to refer to the type 15 | node NIL_TOP; | ^~~~ | s...
s106555910
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> void enqueue(int); void dequeue(void); int Process_time[1000000]; char Process_name[100000][11]; int Process[100000]; int head=0,tail=1; int main(){ int i,j,time; int total_time = 0; int Process_number; scanf("%d %d",&Process_number,&time); for( ...
main.c:56:1: error: expected identifier or '(' before '}' token 56 | } | ^
s681914398
p02265
C
include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer x; x=nil->next; while (x!=nil && x->key!=key){ x=x->next; } 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/stdlib.h:98:8: error: unknown type name 'size_t' 98 | extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; | ^~~~~~ /usr/inclu...
s045560481
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer sol = nil->next; while(sol->key != key && sol != nil) sol = sol->next; return s...
main.c:46:2: error: expected identifier or '(' before '}' token 46 | } | ^
s863456038
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 200000 struct node{ int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil, last; int num = 0; void init(){ nil = malloc(sizeof(struct node)); nil->next = nil; nil->prev = nil; ...
main.c: In function 'delete': main.c:97:1: error: expected declaration or statement at end of input 97 | } | ^
s134228821
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 200000 struct node{ int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; int num = 0; void init(){ nil = malloc(sizeof(struct node)); nil->next = nil; nil->prev = nil; } void i...
main.c: In function 'delete': main.c:38:10: error: 'last' undeclared (first use in this function) 38 | if(last->prev == nil){ | ^~~~ main.c:38:10: note: each undeclared identifier is reported only once for each function it appears in main.c:93:1: error: expected declaration or statement at end o...
s684355598
p02265
C
#include <list> #include <algorithm> #include <iostream> using namespace std; int main(){ int n; list<int> data; string command; int value; list<int>::iterator it; cin.tie(0); ios::sync_with_stdio(false); cin>>n; for(int i=0;i<n;i++){ cin>>command; if(command=="...
main.c:1:10: fatal error: list: No such file or directory 1 | #include <list> | ^~~~~~ compilation terminated.
s043195489
p02265
C
#include<stdio.h> struct node{ int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer insert(int); NodePointer finditem(int); void listprint(void); NodePointer make_1node(int,NodePointer); void deleteFirst(void); void deleteLast(void); void deleteNode(NodePointer); NodePoi...
main.c: In function 'main': main.c:25:3: error: implicit declaration of function 'init' [-Wimplicit-function-declaration] 25 | init(); | ^~~~ main.c:30:11: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration] 30 | if (strlen(com) > 6){ | ^~~~~~ main.c:...
s995750063
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node { unsigned int key; struct node *next; struct node *prev; }; typedef struct node *NodePointer Nodepointer nil; void init() { nil = malloc(sizeof(struct node)); nil->next = nil; nil->prev = nil; } void insert(int key) { NodePointer x;...
main.c:13:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Nodepointer' 13 | Nodepointer nil; | ^~~~~~~~~~~ main.c:13:1: error: unknown type name 'Nodepointer' main.c: In function 'init': main.c:17:3: error: 'nil' undeclared (first use in this function) 17 | nil = malloc(sizeof(struct no...
s433823229
p02265
C
#include<stdio.h> struct{ int key; struct node *next; struct node *prev; } typedef Node pointer; NodePointer finditem(int); void print(void); NodePointer make_1node(int,NodePointer); void deleteFirst(void); void deleteLast(void); void deleteNode(NodePointer); NodePointer head; int main(){ int k...
main.c:7:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pointer' 7 | } typedef Node pointer; | ^~~~~~~ main.c:9:1: error: unknown type name 'NodePointer' 9 | NodePointer finditem(int); | ^~~~~~~~~~~ main.c:11:1: error: unknown type name 'NodePointer' 11...
s387931324
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer finditem(int); void listprint(void); NodePointer make_1node(int,NodePointer); void deleteFirst(void); void deleteLast(void); void delete...
main.c: In function 'listprint': main.c:48:16: warning: comparison between pointer and integer 48 | if ( count == head ) break; | ^~ main.c:53:5: error: 'isf' undeclared (first use in this function) 53 | isf = 0; | ^~~ main.c:53:5: note: each undeclared identifier is reporte...
s919005834
p02265
C
#include <stdio.h> #include <string.h> #include <stdlib.h> struct node{ int key; struct node *next; struct node *prev; }; typedef struct node *NodePointer; NodePointer N; void init(void); //???????????¢??° void insert(int); //insert??¢??° void delete(int); //delete??¢??° void deleteFirst(void); //?????????????...
/usr/bin/ld: /tmp/cc4dPtR1.o: in function `main': main.c:(.text+0x12c): undefined reference to `Print' collect2: error: ld returned 1 exit status
s435490614
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 200000 struct node{ int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; int num = 0; void init(){ nil = malloc(sizeof(struct node)); nil->next = nil; nil->prev = nil; } void i...
main.c: In function 'insert': main.c:28:8: error: 'n' undeclared (first use in this function) 28 | if(n == 0) nil->prev = x; | ^ main.c:28:8: note: each undeclared identifier is reported only once for each function it appears in
s008669689
p02265
C
#include<cstio> #include<list> #include<algorithm> using namespace std; int main(){ int q, x; char com[20]; list<int> v; scanf("%d", &q); for(int i = 0 ; i < q ; i++){ scanf("%s", com); if(com[0] == 'i'){ scanf("%d", &x); v.push_front(x); }else if (com[6] == 'L'){ v.pop_back(); ...
main.c:1:9: fatal error: cstio: No such file or directory 1 | #include<cstio> | ^~~~~~~ compilation terminated.
s814866368
p02265
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 = ...
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...
s032391381
p02265
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-...
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:13: error: expected ';' before '...
s469617951
p02265
C
#include<stdio.h> #include<stdlib.h> struct node{int n;node *np,*pp;}; node *fp=NULL,*ep,*n; int N,t; char cmd[15]; void del(node*dp) { node *nnp=dp->np; node *npp=dp->pp; npp->np=nnp; nnp->pp=npp; free(dp); } int main() { scanf("%d\n",&N); for(;N--;) { scanf("%s",cmd); if(cmd[0]=='i') { scanf("%d\n"...
main.c:3:19: error: unknown type name 'node' 3 | struct node{int n;node *np,*pp;}; | ^~~~ main.c:4:1: error: unknown type name 'node'; use 'struct' keyword to refer to the type 4 | node *fp=NULL,*ep,*n; | ^~~~ | struct main.c:8:10: error: unknown type name 'node' 8 | voi...
s088087598
p02265
C
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> #include <math.h> #define INS ("insert") #define DEL ("delete") #define DEL_FST ("deleteFirst") #define DEL_LST ("deleteLast") #define CMD_TOP (0) #define CMD_END (1) #define CMD_DATA (-1) typedef struct aaa{ int data; struct aaa *n...
main.c: In function 'func_ins': main.c:52:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 52 | return (int)wk_p; | ^ main.c: In function 'func_del': main.c:111:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 111 | ...
s702741918
p02265
C
#include <stdio.h> #include <string.h> #include <ctype.h> #include <stdlib.h> #include <math.h> #define INS ("insert") #define DEL ("delete") #define DEL_FST ("deleteFirst") #define DEL_LST ("deleteLast") #define CMD_TOP (0) #define CMD_END (1) #define CMD_DATA (-1) typedef struct aaa{ int data; struct aaa *n...
main.c: In function 'func_ins': main.c:52:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 52 | return (int)wk_p; | ^ main.c: In function 'func_del': main.c:111:16: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 111 | ...
s319056079
p02265
C
#include <stdio.h> // C++??????????????? #include <string.h> // c++??????????????? #include <math.h> // c++??????????????? #include <iostream> #include <string> #include <list> #include <stack> #include <queue> #include <map> #include <algorithm> using namespace std; typedef long long int lli; list<lli> lis; int mai...
main.c:4:10: fatal error: iostream: No such file or directory 4 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s365438668
p02265
C
#include<stdio.h> int main(void) { int a,n,i,j; int *m; scanf("%d",&n); m = new int[n]; for(i=0;i<n;i++){ m[i] = 0; } char x[15]; for(i=0;i<n;i++){ scanf("%s %d",x,&a); if(x[0] == 'i') m[i] = a; else if(m[6] == 'F'){ m[i] = 0; } else if(m[6] == 'L'){ m[0] = 0; } else{ for(j=n-1;j>=0;...
main.c: In function 'main': main.c:7:13: error: 'new' undeclared (first use in this function) 7 | m = new int[n]; | ^~~ main.c:7:13: note: each undeclared identifier is reported only once for each function it appears in main.c:7:16: error: expected ';' before 'int' 7 | m = new ...
s481219799
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer n; for(n = nil->next; n != nil && n->key != key; n = n->next); return n; } ...
main.c: In function 'main': main.c:84:27: error: implicit declaration of function 'deleteFirst'; did you mean 'deleteLast'? [-Wimplicit-function-declaration] 84 | if(com[6] == 'F') deleteFirst(); | ^~~~~~~~~~~ | deleteLast
s491973372
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer n; for (n = head; n->next != NULL; n = n->next ) { if (n->next->key == key) {...
main.c: In function 'listSearch': main.c:18:12: error: 'head' undeclared (first use in this function) 18 | for (n = head; n->next != NULL; n = n->next ) { | ^~~~ main.c:18:12: note: each undeclared identifier is reported only once for each function it appears in main.c: In function 'insert': main....
s695445241
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer n; n=nil->next; while(n!=nill && x->key!=key){ x=x->next; } return x; }...
main.c: In function 'listSearch': main.c:18:12: error: 'nill' undeclared (first use in this function); did you mean 'nil'? 18 | while(n!=nill && x->key!=key){ | ^~~~ | nil main.c:18:12: note: each undeclared identifier is reported only once for each function it appears in main.c:1...
s605208341
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer n; n=nil->next; while(n!=nill && x->key!=key){ x=x->next; } return x; }...
main.c: In function 'listSearch': main.c:18:12: error: 'nill' undeclared (first use in this function); did you mean 'nil'? 18 | while(n!=nill && x->key!=key){ | ^~~~ | nil main.c:18:12: note: each undeclared identifier is reported only once for each function it appears in main.c:1...
s220971038
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer n; n=nil->next; while(n!=nill && x->key!=key){ x=x->next; } return x; }...
main.c: In function 'listSearch': main.c:18:12: error: 'nill' undeclared (first use in this function); did you mean 'nil'? 18 | while(n!=nill && x->key!=key){ | ^~~~ | nil main.c:18:12: note: each undeclared identifier is reported only once for each function it appears in main.c:1...
s911824008
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer n; n=nil->next; while(n!=nill && n->key!=key){ n = n->next; } return x;...
main.c: In function 'listSearch': main.c:18:12: error: 'nill' undeclared (first use in this function); did you mean 'nil'? 18 | while(n!=nill && n->key!=key){ | ^~~~ | nil main.c:18:12: note: each undeclared identifier is reported only once for each function it appears in main.c:2...
s695859870
p02265
C
void insert(int); void delete(NodePointer); void deleteFirst(void); void deleteLast(void); NodePointer findkey(int); NodePointer nil; int main(){ int i,in,n; char s[20]; NodePointer x; nil=malloc(sizeof(struct node)); nil->next=nil; nil->prev=nil; scanf("%d",&n); i=0; while(i!=n){ memset(s...
main.c:2:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type] 2 | void delete(NodePointer); | ^~~~ main.c:5:1: error: unknown type name 'NodePointer' 5 | NodePointer findkey(int); | ^~~~~~~~~~~ main.c:7:1: error: unknown type name 'NodePointer' ...
s858834861
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; void insert(int); void delete(NodePointer); void deleteFirst(void); void deleteLast(void); NodePointer findkey(int); NodePointer nil; int main(){ int i...
main.c: In function 'deleteFirst': main.c:129:6: error: conflicting types for 'delete'; have 'void(struct node *)' 129 | void delete(NodePointer); | ^~~~~~ main.c:80:6: note: previous definition of 'delete' with type 'void(struct node *)' 80 | void delete(NodePointer delnode){ | ^~~~~~ main.c...
s633354111
p02265
C
#include<stdio.h> #include<string.h> typedef struct{ int val, flag; }P; void insert(int); void delete(int); void deleteFirst(); void deleteLast(); int head, top, j=0; P Q[1000]; int main(){ int i, n, b; char a[2000][20]; scanf("%d",&n); head=0; for(i=0;i<n;i++){ scanf("%s",a[i]); if(strcmp(a...
main.c: In function 'delete': main.c:68:36: error: expected expression before '/' token 68 | if(Q[i].val==b && Q[i].flag!=1*/){ | ^
s120295506
p02265
C
#include<stdio.h> #include<string.h> typedef struct{ int val, flag; }P; void insert(int); void delete(int); void deleteFirst(); void deleteLast(); int head, top, j=0; P Q[1000]; int main(){ int i, n, b; char a[2000][20]; scanf("%d",&n); head=0; for(i=0;i<n;i++){ scanf("%s",a[i]); if(strcmp(a...
main.c: In function 'delete': main.c:68:36: error: expected expression before '/' token 68 | if(Q[i].val==b && Q[i].flag!=1*/){ | ^
s032713423
p02265
C
for(i=0;i<n;i++){ scanf("%s",a[i]); if(strcmp(a[i],"insert")==0){ scanf("%d",&b); insert(b); } else if(strcmp(a[i],"delete")==0){ scanf("%d",&b); // printf("\nb %d\n",b); delete(b); } else if(strcmp(a[i],"deleteLast")==0){ deleteLast(); } else if...
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...
s736775726
p02265
C
for(i=0;i<n;i++){ scanf("%s",a[i]); if(strcmp(a[i],"insert")==0){ scanf("%d",&b); insert(b); } else if(strcmp(a[i],"delete")==0){ scanf("%d",&b); // printf("\nb %d\n",b); delete(b); } else if(strcmp(a[i],"deleteLast")==0){ deleteLast(); } else if...
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...
s180418736
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ unsigned int key; struct node *next; struct node *pre; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer S = nil->next; while( S != nil && S->key != key ){ S = S->next; } return S...
main.c: In function 'deleteLast': main.c:56:24: error: 'struct node' has no member named 'prev'; did you mean 'pre'? 56 | NodePointer t = nil->prev; | ^~~~ | pre
s883321392
p02265
C
#include <stdio.h> #include <ctype.h> #include <string.h> typedef struct node{ int key; struct node *next; struct node *prev; }NODE,*PNODE;???//PNODE???malloc??????????????? PNODE root; void init(void) { root = malloc(sizeof(NODE)); root->next = root; root->prev = root; } void insert(key) { PNO...
main.c:9:15: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 9 | }NODE,*PNODE;???//PNODE???malloc??????????????? main.c:9:14: error: expected identifier or '(' before '?' token 9 | }NODE,*PNODE;???//PNODE???malloc??????????????? | ^ main.c: In function 'init': main.c:14:...
s982477704
p02265
C
#include <stdio.h> #include <ctype.h> #include <string.h> typedef struct node{ int key; struct node *next; struct node *prev; }NODE,*PNODE;???//PNODE???malloc??????????????? PNODE root; void init(void) { root = malloc(sizeof(NODE)); root->next = root; root->prev = root; } void insert(key) { PNO...
main.c:9:15: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 9 | }NODE,*PNODE;???//PNODE???malloc??????????????? main.c:9:14: error: expected identifier or '(' before '?' token 9 | }NODE,*PNODE;???//PNODE???malloc??????????????? | ^ main.c: In function 'init': main.c:14:...
s280294379
p02265
C
#include <stdio.h> #include <ctype.h> #include <string.h> typedef struct _node { int key; struct _node *next; struct _node *prev; } NODE, *PNODE; PNODE root; void init(void) { root = malloc(sizeof(NODE)); root->next = root; root->prev = root; } void insert(key) { PNODE t = malloc(siz...
main.c: In function 'init': main.c:14:12: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] 14 | root = malloc(sizeof(NODE)); | ^~~~~~ main.c:4:1: note: include '<stdlib.h>' or provide a declaration of 'malloc' 3 | #include <string.h> +++ |+#include <stdlib...
s191861363
p02265
C
#include <stdio.h> #include <ctype.h> #include <string.h> typedef struct node{ int key; struct node *next; struct node *prev; }NODE,*PNODE;???//PNODE???malloc??????????????? PNODE root; void init(void) { root = malloc(sizeof(NODE)); root->next = root; root->prev = root; } void insert(key) { PNO...
main.c:9:15: warning: trigraph ??/ ignored, use -trigraphs to enable [-Wtrigraphs] 9 | }NODE,*PNODE;???//PNODE???malloc??????????????? main.c:9:14: error: expected identifier or '(' before '?' token 9 | }NODE,*PNODE;???//PNODE???malloc??????????????? | ^ main.c: In function 'init': main.c:14:...
s597340294
p02265
C
#include<stdio.h> #define MAX 2000000 void Insert(int); void Delete(int); void DeleteFirst(void); void DeleteLast(void); int S[MAX],count; int main() { int i,n,a1,a2; char order[12]; scanf("%d",&n); for(i = 0;i < n;i++){ S[i] = 0; } for(i = 0;i < n;i++){ scanf("%s",order); if(order[0] == 'i...
main.c:68:6: error: redefinition of 'DeleteFirst' 68 | void DeleteFirst() | ^~~~~~~~~~~ main.c:57:6: note: previous definition of 'DeleteFirst' with type 'void(void)' 57 | void DeleteFirst() | ^~~~~~~~~~~
s406333482
p02265
C
#include <stdio.h> #include <string.h> #include <stdlib.h> struct Node{ int key; Node *next,*prev; }; Node nil; Node* listSearch(int key){ Node *cur=nil->next; while(cur!=nil && cur->key!=key){ cur=cur->next; } return cur; } void init(){ nil=(Node *)malloc(sizeof(Node)); nil->next=nil; nil->pre...
main.c:6:3: error: unknown type name 'Node' 6 | Node *next,*prev; | ^~~~ main.c:9:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type 9 | Node nil; | ^~~~ | struct main.c:11:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type 11 | Nod...
s797752850
p02265
C
#include <stdio.h> void insert(int); void delete(int); void deleteFirst(void); void deleteLast(void); int data[2000000]; int m=0; int main(){ int n,i,x; char com[10]; scanf("%d",&n); for(i=0 ; i<n ; i++){ scanf("%s",com); if(com[0]=='i') { scanf("%d",&x); insert(x); } else if(com[6]=='F') deleteFi...
main.c: In function 'main': main.c:34:19: warning: missing terminating " character 34 | if(i<m-1)printf(" ???); | ^ main.c:34:22: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs] 34 | if(i<m-1)printf(" ???); main.c:34:19: error: missing terminating " character 3...
s201318774
p02265
C
void init(); void insert(int ); struct Node* listSearch(int ); void deleteNode(struct Node *); void deleteFirst(); void deleteLast(); void deleteKey(int ); void print(); struct Node{ int key; struct Node *prev; struct Node *next; }; struct Node *NIL =NULL; int main(){ int sc,i,key; char c[10]; ...
main.c:18:19: error: 'NULL' undeclared here (not in a function) 18 | struct Node *NIL =NULL; | ^~~~ main.c:1:1: note: 'NULL' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' +++ |+#include <stddef.h> 1 | void init(); main.c: In function 'main':...
s474238380
p02265
C
void init(); void insert(int ); struct Node* listSearch(int ); void deleteNode(struct Node *); void deleteFirst(); void deleteLast(); void deleteKey(int ); void print(); struct Node{ int key; struct Node *prev; struct Node *next; }; struct Node *NIL =NULL; int main(){ int sc,i,key; char c[10]; ...
main.c:18:19: error: 'NULL' undeclared here (not in a function) 18 | struct Node *NIL =NULL; | ^~~~ main.c:1:1: note: 'NULL' is defined in header '<stddef.h>'; this is probably fixable by adding '#include <stddef.h>' +++ |+#include <stddef.h> 1 | void init(); main.c: In function 'main':...
s041108661
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> struct nd{ int key; struct nd *next; struct nd *prev; }; typedef struct nd * ndPointer; ndPointer nil; ndPointer listSearch(int key){ ndPointer i; for(i=nil;i->next!=nil;i=i->next){ if(i->next->key==key)return i->next; } return NULL; } void in...
main.c: In function 'init': main.c:19:16: error: implicit declaration of function 'siof' [-Wimplicit-function-declaration] 19 | nil = malloc(siof(struct nd)); | ^~~~ main.c:19:21: error: expected expression before 'struct' 19 | nil = malloc(siof(struct nd)); | ^~...
s940090078
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct{ int key; Node *next, *prev; } Node; Node *nil; Node* listSearch(int key){ Node *cur = nil->next; while (cur != nil && cur->key != key){ cur - cur->next; } return cur; } void iii(void) { nil = (Node *)malloc(sizeof(Node)); ...
main.c:7:3: error: unknown type name 'Node' 7 | Node *next, *prev; | ^~~~ main.c: In function 'listSearch': main.c:13:15: error: initialization of 'Node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types] 13 | Node *cur = nil->next; | ^~~ main.c:15:9: error: i...
s848902013
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct{ int key; Node *next; Node *prev; } Node; Node *nil; Node* listSearch(int key){ Node *cur = nil->next; while (cur != nil && cur->key != key){ cur - cur->next; } return cur; } void iii(void) { nil = (Node *)malloc(sizeof(No...
main.c:7:3: error: unknown type name 'Node' 7 | Node *next; | ^~~~ main.c:8:3: error: unknown type name 'Node' 8 | Node *prev; | ^~~~ main.c: In function 'listSearch': main.c:14:15: error: initialization of 'Node *' from incompatible pointer type 'int *' [-Wincompatible-pointer-types] 14 ...
s789928033
p02265
C
#include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct{ int key; } node; typedef struct{ int key; node *next; node *prev; }Node; Node *nil; Node* listSearch(int key){ Node *cur = nil->next; while (cur != nil && cur->key != key){ cur = cur->next; } return cur; } void iii(voi...
main.c: In function 'listSearch': main.c:20:15: error: initialization of 'Node *' from incompatible pointer type 'node *' [-Wincompatible-pointer-types] 20 | Node *cur = nil->next; | ^~~ main.c:22:9: error: assignment to 'Node *' from incompatible pointer type 'node *' [-Wincompatible-pointer-t...
s243129441
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ int key; struct node *next; struct node *prev; }; typedef struct node * Node; Node nil; Node search(int key){ Node x; x = nil->next; while(x != nil && x->key != key){ x = x->next; } return x; } void init()...
main.c: In function 'main': main.c:100:10: error: 'com' undeclared (first use in this function) 100 | if ( com[6] == 'F' ) | ^~~ main.c:100:10: note: each undeclared identifier is reported only once for each function it appears in
s783532175
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ int key; struct node *next; struct node *prev; }; typedef struct node * Node; Node nil; Node search(int key){ Node x; x = nil->next; while(x != nil && x->key != key){ x = x->next; } return x; } void init()...
main.c: In function 'main': main.c:101:10: error: 'com' undeclared (first use in this function) 101 | if ( com[6] == 'F' ) | ^~~ main.c:101:10: note: each undeclared identifier is reported only once for each function it appears in
s370819928
p02265
C
#include <stdio.h> #define N 1000000 typedef struct node{ int nil; int key; }Node; int search(char *, int); void insert(char *, int); void delete(char *, int); int main(){ int n, i, a; char com[N]; scanf("%d", &n); for(i=0; i<n; i++){ scanf("%s", com); a = search(com[i], com[i].k); inser...
main.c: In function 'main': main.c:23:30: error: request for member 'k' in something not a structure or union 23 | a = search(com[i], com[i].k); | ^ main.c:23:19: error: passing argument 1 of 'search' makes pointer from integer without a cast [-Wint-conversion] 23 | a = ...
s953291428
p02265
C
#include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct LIST { struct LIST *prev; // 前 struct LIST *next; // 後ろ int key; } LIST; void insert(int key); // 追加する void delete(LIST *p); // 削除する void show_list(LIST *p); void free_list(LIST *p); LIST *search(int key); LIST head; int main() { ...
main.c: In function 'main': main.c:21:10: error: conflicting types for 'key'; have 'double' 21 | double key; | ^~~ main.c:20:11: note: previous declaration of 'key' with type 'int' 20 | int n,i,key; | ^~~
s488824508
p02265
C
#include<stdio.h> #include<string.h> #include<string.h> void init();//?????????????????? void insert();//?????????????????? struct Node* listSearch(int ); void deleteNode(struct Node *); void deleteFirst(); void deleteLast(); void deleteKey(int ); void print(); struct Node{ int key; struct Node *prev; struct N...
main.c: In function 'init': main.c:53:26: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] 53 | NIL = (struct Node *)malloc(sizeof(struct Node)); | ^~~~~~ main.c:3:1: note: include '<stdlib.h>' or provide a declaration of 'malloc' 2 | #include<...
s452061577
p02265
C
#include<stdio.h> #include<string.h> #include<stdlib.h> ?? void init(); //????????????????????? void insert(int ); //?????????????????? struct Node* listSearch(int ); void deleteNode(struct Node *); void deleteFirst(); void deleteLast(); void deleteKey(int ); void print(); ?? struct Node{ ?? ????int key; ????struct Nod...
main.c:4:1: error: expected identifier or '(' before '?' token 4 | ?? | ^ main.c:13:1: error: expected identifier or '(' before '?' token 13 | ?? | ^ main.c:21:1: error: expected identifier or '(' before '?' token 21 | ?? | ^ main.c:23:1: error: expected identifier or '(' before '?' token ...
s513225939
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct node{ int key; struct node *prev; struct node *next; }; typedef struct node Node; Node *head; void init() { head = (Node*)malloc(sizeof(Node)); head -> prev = head; head -> next = head; } //head -> next?????? ??¢???????????°????????¢??????...
main.c: In function 'main': main.c:96:3: error: expected declaration or statement at end of input 96 | return 0; | ^~~~~~
s412461459
p02265
C
#include<stdio.h> int main() { int a,b,i,j; int d=0,f,g,h; scanf("%d",&a); int x[a]; char c[12]; for(i=0;i<a;i++){ scanf("%s %d",c,&b); if(c[0]=='i'){ x[i]=b; } else if(c[6]=='F'){ i-=2; a-=2; } else if(c[6]=='L'){ ...
main.c: In function 'main': main.c:33:26: error: expected '(' before '{' token 33 | while{ | ^ | ( main.c:34:31: error: expected ';' before 'x' 34 | (g!=h++)x[j+h-1]=x[j+h]; | ...
s882647627
p02265
C
#include<stdio.h> int main() { int a,b,i,j; int d=0,f,g,h; scanf("%d",&a); int x[a]; char c[12]; for(i=0;i<a;i++){ scanf("%s %d",c,&b); if(c[0]=='i'){ x[i]=b; } else if(c[6]=='F'){ i-=2; a-=2; } else if(c[6]=='L'){ ...
main.c: In function 'main': main.c:33:26: error: expected '(' before '{' token 33 | while{ | ^ | ( main.c:34:31: error: expected ';' before 'x' 34 | (g!=h++)x[j+h-1]=x[j+h]; | ...
s436913935
p02265
C
#include<stdio.h> int main() { int a,b,i,j; int d=0,f,g,h; scanf("%d",&a); int x[a]; char c[12]; for(i=0;i<a;i++){ scanf("%s %d",c,&b); if(c[0]=='i'){ x[i]=b; } else if(c[6]=='F'){ i-=2; a-=2; } else if(c[6]=='L'){ ...
main.c: In function 'main': main.c:33:26: error: expected '(' before '{' token 33 | while{ | ^ | ( main.c:34:31: error: expected ';' before 'x' 34 | (g!=h++)x[j+h-1]=x[j+1+h-1]; | ...
s153380584
p02265
C
#include<stdio.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer cur = nil->next; while( cur != nil && cur->key != key ){ cur = cur->next; } return cur; } void init(){...
main.c: In function 'init': main.c:25:9: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] 25 | nil = malloc(sizeof(struct node)); | ^~~~~~ main.c:4:1: note: include '<stdlib.h>' or provide a declaration of 'malloc' 3 | #include<stdio.h> +++ |+#include <stdlib.h...
s766625647
p02265
C
#include<stdio.h> struct node{ unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer cur = nil->next; while( cur != nil && cur->key != key ){ cur = cur->next; } return cur; } void init(){...
main.c: In function 'init': main.c:25:9: error: implicit declaration of function 'malloc' [-Wimplicit-function-declaration] 25 | nil = malloc(sizeof(struct node)); | ^~~~~~ main.c:4:1: note: include '<stdlib.h>' or provide a declaration of 'malloc' 3 | #include<stdio.h> +++ |+#include <stdlib.h...
s380062485
p02265
C
#include <stdio.h> #include <stdlib.h> #define LEN 100005 void initialize(void); int isEmpty(void); int isFull(void); void enqueue(int); void dequeue(void); void insert(int); void delete(int); void deleteFirst(void); void deleteLast(void); int Q[LEN+1]; int head, tail, n; int main() { int n, i, x; char com[20];...
main.c: In function 'main': main.c:44:39: error: expected ';' before '}' token 44 | if(Q[i-1] != head - 1) printf(" ") | ^ | ; 45 | } | ~
s270877264
p02265
C
#include <stdio.h> #include <string.h> #include <stdlib.h> struct Node { int value; Node *prev,*next; }; /*void init()*/ //{ //node = (Node *)malloc(sizeof(Node)); //node->prev = node; //node->prev = node; //return; /*}*/ void insert(Node *head, int val) { Node *node = (Node *)malloc(sizeof...
main.c:7:5: error: unknown type name 'Node' 7 | Node *prev,*next; | ^~~~ main.c:16:13: error: unknown type name 'Node' 16 | void insert(Node *head, int val) | ^~~~ main.c:25:1: error: unknown type name 'Node'; use 'struct' keyword to refer to the type 25 | Node *listSearch(Node...
s208978459
p02265
C
#define MAX 1000000 #include <stdio.h> #include <string.h> //?§???????. typedef struct command { char txt[12]; int x = 0; }com; //????????????????????£?¨?. void ins(int x); void del(int x); void delF(void); void delL(void); //??°?????????????????°. int head = 0; int tail = 0; int num[MAX] = {}; int main(void) {...
main.c:9:15: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token 9 | int x = 0; | ^ main.c: In function 'main': main.c:35:41: error: 'com' {aka 'struct command'} has no member named 'x' 35 | scanf("%d", &buf.x); | ...
s563045538
p02265
C
#define MAX 1000000 #include <stdio.h> #include <string.h> //?§???????. typedef struct command { char txt[12]; int x = 0; }com; //????????????????????£?¨?. void ins(int x); void del(int x); void delF(void); void delL(void); //??°?????????????????°. int head = 0; int tail = 0; int num[MAX]; int main(void) { int...
main.c:9:15: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token 9 | int x = 0; | ^ main.c: In function 'main': main.c:35:41: error: 'com' {aka 'struct command'} has no member named 'x' 35 | scanf("%d", &buf.x); | ...
s768281353
p02265
C
#define _CRT_SECURE_NO_WARNINGS ////#define _USE_MATH_DEFINES #include<stdio.h> #include<stdlib.h> //#include<math.h> //#include<string.h> //#include<time.h> #define P(type,x) fprintf(stdout,"%"#type"\n",x) typedef struct LIST{ struct LIST *next; struct LIST *prev; int value; }*PNODE; PNODE list; void Add(int); voi...
main.c: In function 'main': main.c:25:17: error: 'LIST' undeclared (first use in this function) 25 | list = (LIST*)malloc(sizeof(LIST)); | ^~~~ main.c:25:17: note: each undeclared identifier is reported only once for each function it appears in main.c:25:22: error: expected expression b...
s600781916
p02265
C
import collections from deque dq = deque() num = int(input()) for i in range(num): order = imput().split() if com[0] == 'insert': dq.appendleft(com[1]) elif com[0] == 'deleteFirst': dq.popleft() elif com[0] == 'deleteLast': dq.pop() else: if com[1] in dq: ...
main.c:1:1: error: unknown type name 'import' 1 | import collections from deque | ^~~~~~ main.c:1:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'from' 1 | import collections from deque | ^~~~ main.c:1:20: error: unknown type name 'from' main.c:8:18: warning: m...
s856866248
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct _node { int key; struct _node *next; struct _node *prev; } node; node *head; node *makenode(int); void insert(int); void delete(int); void deleteFirst(); void deleteLast(); int main() { int i, n, a; char op[16]; node *x; ...
main.c: In function 'makenode': main.c:74:23: error: '_node' undeclared (first use in this function) 74 | x = malloc(sizeof(_node)); | ^~~~~ main.c:74:23: note: each undeclared identifier is reported only once for each function it appears in
s534605685
p02265
C
#include <stdio.h> #include <stdlib.h> struct node { int key; struct node *next; }; typedef struct node *NodePointer; NodePointer insert(int); NodePointer delete(int); NodePointer deleteFirst(void); NodePointer deleteLast(void); NodePointer finditem(int); void listPrint(void); NodePointer make_1node(int, N...
main.c: In function 'main': main.c:41:8: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration] 41 | (strcmp("deleteLast", str) == 0) | ^~~~~~ main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcmp' 2 | #include <stdlib.h> +++ |+#include <strin...
s617467209
p02265
C
#include <stdio.h> #include <stdlib.h> struct node { int key; struct node *next; }; typedef struct node *NodePointer; NodePointer insert(int); NodePointer delete(int); NodePointer deleteFirst(void); NodePointer deleteLast(void); NodePointer finditem(int); void listPrint(void); NodePointer make_1node(int, N...
main.c: In function 'main': main.c:41:8: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration] 41 | (strcmp("deleteLast", str) == 0) | ^~~~~~ main.c:3:1: note: include '<string.h>' or provide a declaration of 'strcmp' 2 | #include <stdlib.h> +++ |+#include <strin...
s820617589
p02265
C
#include<stdio.h> #include<string.h> #include<stdlib.h> ?? #define N 2000000 ?? struct node { ????????int key; ????????struct node *next; ????????struct node *prev; }; typedef struct node *NodePointer; ?? typedef struct{ ????????char ask[20]; ????????int key2; }Roll; ?? NodePointer insert(int); NodePointer finditem(int...
main.c:4:1: error: expected identifier or '(' before '?' token 4 | ?? | ^ main.c:13:1: error: expected identifier or '(' before '?' token 13 | ?? | ^ main.c:17:2: warning: data definition has no type or storage class 17 | }Roll; | ^~~~ main.c:17:2: error: type defaults to 'int' in declarati...
s601539643
p02265
C
#include<stdio.h> #include<string.h> #include<stdlib.h> ?? #define N 2000001 ?? struct node { ????????int key; ????????struct node *next; ????????struct node *prev; }; typedef struct node *NodePointer; ?? typedef struct{ ????????char ask[20]; ????????int key2; }Roll; ?? NodePointer insert(int); NodePointer finditem(int...
main.c:4:1: error: expected identifier or '(' before '?' token 4 | ?? | ^ main.c:13:1: error: expected identifier or '(' before '?' token 13 | ?? | ^ main.c:17:2: warning: data definition has no type or storage class 17 | }Roll; | ^~~~ main.c:17:2: error: type defaults to 'int' in declarati...