submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s910313133
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
s361238559
p02265
C
/* * File: main.c * Author: Ivan * * Created on June 25, 2018, 7:45 PM */ #include <stdio.h> #include <stdlib.h> struct Item { int key; Item *next, *prev; }; //typedef struct{ // int key; // Item *next; // Item *prev; //}Item; Item *null; Item *search(int key); void print(); void deleteIt...
main.c:13:5: error: unknown type name 'Item' 13 | Item *next, *prev; | ^~~~ main.c:21:1: error: unknown type name 'Item'; use 'struct' keyword to refer to the type 21 | Item *null; | ^~~~ | struct main.c:23:1: error: unknown type name 'Item'; use 'struct' keyword to refer to the type ...
s933942432
p02265
C
/* * File: main.c * Author: Ivan * * Created on June 25, 2018, 7:45 PM */ #include <stdio.h> #include <stdlib.h> struct Item { int key; Item *next, *prev; }; //typedef struct{ // int key; // Item *next; // Item *prev; //}Item; Item *null; Item *search(int key); void print(); void deleteIt...
main.c:13:5: error: unknown type name 'Item' 13 | Item *next, *prev; | ^~~~ main.c:21:1: error: unknown type name 'Item'; use 'struct' keyword to refer to the type 21 | Item *null; | ^~~~ | struct main.c:23:1: error: unknown type name 'Item'; use 'struct' keyword to refer to the type ...
s584664699
p02265
C
/* * File: main.c * Author: Ivan * * Created on June 25, 2018, 7:45 PM */ #include <cstdio> #include <cstdlib> struct Item { int key; Item *next, *prev; }; //typedef struct{ // int key; // Item *next; // Item *prev; //}Item; Item *null; Item *search(int key); void print(); void deleteItem...
main.c:8:10: fatal error: cstdio: No such file or directory 8 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s970598555
p02265
C
#include<stdio.h> #include<stdlib.h> #include<string.h> struct Node{ int key; struct Node *next,*prev; }Node; struct Node *nil; struct Node* listSearch(int key){ struct Node *cur = nil->next; while (cur != nil && cur->key != key){ cur = cur->next; } return cur; } void init(){ nil = (Node*)malloc(s...
main.c: In function 'init': main.c:21:15: error: expected expression before ')' token 21 | nil = (Node*)malloc(sizeof(Node)); | ^ main.c: In function 'insert': main.c:58:26: error: expected expression before ')' token 58 | struct Node *x = (Node*)malloc(sizeof(Node)); | ...
s437089150
p02265
C
#include<cstdio> #include<cstdlib> #include<cstring> 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...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s306713225
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 = nil->next; while(x->key != key){ if(x == nil) break; x = x->next; } return...
main.c: In function 'main': main.c:77:19: error: stray '\342' in program 77 | if (com[0] == <U+2019>i<U+2019>) { | ^~~~~~~~ main.c:77:21: error: stray '\342' in program 77 | if (com[0] == <U+2019>i<U+2019>) { | ^~~~~~~~ main.c:81:26: error: stray '\...
s651481053
p02265
C
unsigned int key; struct node *next; struct node *prev; }; typedef struct node * NodePointer; NodePointer nil; NodePointer listSearch(int key){ NodePointer x = nil->next; while(x->key != key){ if(x == nil) break; x = x->next; } return x; } void init(){ nil = malloc(sizeof(struct node)); nil->next ...
main.c:4:1: error: expected identifier or '(' before '}' token 4 | }; | ^ main.c: In function 'listSearch': main.c:8:22: error: invalid use of undefined type 'struct node' 8 | NodePointer x = nil->next; | ^~ main.c:9:10: error: invalid use of undefined type 'struct node' 9...
s864918638
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
s931146594
p02265
C
#include<cstdio> #include<cstdlib> #include<cstring> 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; ...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s462755571
p02265
C
#include <stdio.h>#include <malloc.h>#include <string.h>struct node{ struct node *next; struct node *prev; int key;};typedef struct node * NodePointer;struct node nil;int flag=0;NodePointer f; void insert(int);void delete(int);void deleteFirst(void);void deleteLast(void);void init(){ nil.next=NULL; nil.prev=NU...
main.c:1:19: warning: extra tokens at end of #include directive 1 | #include <stdio.h>#include <malloc.h>#include <string.h>struct node{ struct node *next; struct node *prev; int key;};typedef struct node * NodePointer;struct node nil;int flag=0;NodePointer f; void insert(int);void delete(int);void deleteFirst(v...
s090038697
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; struct node nil; int flag=0; NodePointer last; void insert(int key); void delete(int key); void deleteFirst(); void deleteLast(); void init(){ nil...
main.c:92:5: error: conflicting types for 'deleteFirst'; have 'int()' 92 | int deleteFirst(){ | ^~~~~~~~~~~ main.c:20:6: note: previous declaration of 'deleteFirst' with type 'void()' 20 | void deleteFirst(); | ^~~~~~~~~~~ main.c:104:5: error: conflicting types for 'deleteLast'; have 'int()' ...
s564835318
p02265
C
/*s1190073 Rina Sato File name: prog3c.c This is Doubly Linked List program.*/ #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; void init(); void insert(int); void deleteFirst(); vo...
main.c: In function 'main': main.c:54:11: error: assignment to 'int' from 'struct node *' makes integer from pointer without a cast [-Wint-conversion] 54 | for(key = nil->next ; key->next == nil ; key->next){ | ^ main.c:54:28: error: invalid type argument of '->' (have 'int') 54 | for(key = ni...
s156706225
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; void insert(int key); int delete(int key); int deleteFirst(); int deleteLast(); void init(); /* This fanction is initializing n...
main.c:20:1: error: return type defaults to 'int' [-Wimplicit-int] 20 | main(){ | ^~~~ main.c: In function 'init': main.c:100:3: error: expected declaration or statement at end of input 100 | nil->prev=nil; | ^~~
s112916762
p02265
C
#include<string> #include<list> #include<iostream> using namespace std; int main(){ std::ios::sync_with_stdio(false); std::cin.tie(0); string str; list<int> data; list<int>::iterator it,l; int n,x; cin >> n; while(n--){ cin >> str; if(str == "insert"){ cin >> x; data.push_front(x); ...
main.c:1:9: fatal error: string: No such file or directory 1 | #include<string> | ^~~~~~~~ compilation terminated.
s655312625
p02265
C
#include<cstdio> #include<iostream> #include<string> #include<cstring> #include<list> #include<algorithm> #define NMAX 2000000+10 using namespace std; int main(void){ int n; string inp; int x; list<int> data; list<int>::iterator iter,fun; cin>>n; while(n--){ ...
main.c:1:9: fatal error: cstdio: No such file or directory 1 | #include<cstdio> | ^~~~~~~~ compilation terminated.
s625141879
p02265
C
import java.util.Scanner; class Node{ Node prev; Node next; String n; Node(){ prev=this; next=this; } Node(Node prev,Node next,String data){ n=data; this.prev=prev; this.next=next; } } public class Main{ static Node head=new Node(); static Node crnt=head; static void add(String x){ Node tmp=new ...
main.c:1:1: error: unknown type name 'import' 1 | import java.util.Scanner; | ^~~~~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 1 | import java.util.Scanner; | ^ main.c:2:1: error: unknown type name 'class' 2 | class Node{ | ^~~~~ main....
s083704958
p02265
C
#define _CRT_SECURE_NO_WARNINGS #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 cur = nil->next; while (cur != nil){ if (key == cur-...
/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
s089738830
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 cur = nil->next; while (cur != nil){ if (key == cur->key){ return cur; } cur = cur...
/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
s989220771
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->next!=nil;x=x->next){ if(x->key==key)return x; } re...
main.c: In function 'listSearch': main.c:20:3: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch] 20 | return; | ^~~~~~ main.c:15:13: note: declared here 15 | NodePointer listSearch(int key){ | ^~~~~~~~~~ main.c: In function 'delete': main.c:64:18: error:...
s025787934
p02265
C
#include <stdio.h> #include <string.h> #include <stdlib.h> typedef struct Node { struct Node *prev; int key; struct Node *next; } NodePointer; NodePointer head; void insert(int ); void delate(NodePointer *); int main() { int i,num,z; NodePointer *p; char process[15]; int key; head = malloc(sizeof(NodePointer)); head->n...
main.c: In function 'main': main.c:18:8: error: incompatible types when assigning to type 'NodePointer' {aka 'struct Node'} from type 'void *' 18 | head = malloc(sizeof(NodePointer)); | ^~~~~~ main.c:19:5: error: invalid type argument of '->' (have 'NodePointer' {aka 'struct Node'}) 19 | head->next =...
s827758925
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 */ } void init(){ nil = malloc(sizeof(struct node)); nil->next = 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:16: error: expected ';' before '...
s142203446
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 = nil->next; while(x->key != key){ if(x->next == nil) break; x = x->nex...
main.c: In function 'init': main.c:26:21: error: implicit declaration of function 'deleteNode' [-Wimplicit-function-declaration] 26 | nil->next = nil; deleteNode(t); | ^~~~~~~~~~ main.c:26:32: error: 't' undeclared (first use in this function) 26 | nil->next = nil; deleteNode(t); ...
s622723087
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 = nil->next; while(x->key != key){ if(x == nil) break; x = x->next; }...
main.c: In function 'init': main.c:26:21: error: implicit declaration of function 'deleteNode' [-Wimplicit-function-declaration] 26 | nil->next = nil; deleteNode(t); | ^~~~~~~~~~ main.c:26:32: error: 't' undeclared (first use in this function) 26 | nil->next = nil; deleteNode(t); ...
s280868366
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 = nil->next; while(x->key != key){ if(x == nil) break; x = x->next; }...
main.c: In function 'init': main.c:26:21: error: implicit declaration of function 'deleteNode' [-Wimplicit-function-declaration] 26 | nil->next = nil; deleteNode(t); | ^~~~~~~~~~ main.c:26:32: error: 't' undeclared (first use in this function) 26 | nil->next = nil; deleteNode(t); ...
s441250634
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 a; a = nil->next; while(a!= nil && a->key != key) { ...
main.c: In function 'delete': main.c:63:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token 63 | NodePointer a.; | ^ main.c:63:16: error: expected expression before '.' token main.c:65:7: error: 'a' undeclared (first use in this function) 65 | if((a = listSearch(k...
s377212171
p02265
C
#include<st dio.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 a; a = nil->next; while(a!= nil && a->key != key) { ...
main.c:1:9: fatal error: st dio.h: No such file or directory 1 | #include<st dio.h> | ^~~~~~~~~~ compilation terminated.
s814444686
p02265
C++
#include<stdio> #include<cstdlib> #include<cstring> struct Node{ int key; Npde *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->orev =n...
a.cc:1:9: fatal error: stdio: No such file or directory 1 | #include<stdio> | ^~~~~~~ compilation terminated.
s011589452
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> struct Node{ int key; Npde *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->orev =...
a.cc:7:9: error: 'Npde' does not name a type; did you mean 'Node'? 7 | Npde *next,*prev; | ^~~~ | Node a.cc: In function 'Node* listSearch(int)': a.cc:13:26: error: 'struct Node' has no member named 'next' 13 | Node *cur = nil->next; | ^~...
s927588684
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> struct Node{ int key; Npde *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->orev =...
a.cc:7:9: error: 'Npde' does not name a type; did you mean 'Node'? 7 | Npde *next,*prev; | ^~~~ | Node a.cc: In function 'Node* listSearch(int)': a.cc:13:26: error: 'struct Node' has no member named 'next' 13 | Node *cur = nil->next; | ^~...
s663165238
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> 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->orev =...
a.cc: In function 'void init()': a.cc:23:14: error: 'struct Node' has no member named 'orev'; did you mean 'prev'? 23 | nil->orev =nil; | ^~~~ | prev a.cc: At global scope: a.cc:89:12: error: expected constructor, destructor, or type conversion before ';' token 89 | p...
s434948494
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> 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->prev =...
a.cc:89:12: error: expected constructor, destructor, or type conversion before ';' token 89 | printList(); | ^ a.cc:91:1: error: expected unqualified-id before 'return' 91 | return 0; | ^~~~~~ a.cc:92:1: error: expected declaration before '}' token 92 | } | ^
s269330845
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> 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->prev =...
a.cc:89:13: error: expected constructor, destructor, or type conversion before ';' token 89 | printList(); | ^ a.cc:91:2: error: expected unqualified-id before 'return' 91 | return 0; | ^~~~~~ a.cc:92:1: error: expected declaration before '}' token 92 | } | ^
s170107343
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> 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->prev =...
a.cc:89:13: error: expected constructor, destructor, or type conversion before ';' token 89 | printList(); | ^ a.cc:91:2: error: expected unqualified-id before 'return' 91 | return 0; | ^~~~~~ a.cc:92:1: error: expected declaration before '}' token 92 | } | ^
s985033331
p02265
C++
list = [] count = int(input()) for ver in range(count): try: conditions,num = input().split() except ValueError: print(conditions) if(conditions == "insert"): list.append(num) elif(conditions == "delete"): list.remove(num) for ver in range(len(list)): print(list[ver],end=" ") print('/n')
a.cc:16:7: warning: multi-character character constant [-Wmultichar] 16 | print('/n') | ^~~~ a.cc:1:1: error: 'list' does not name a type 1 | list = [] | ^~~~
s048991894
p02265
C++
#include<iostream> #include<vector> using namespace std; #define LEN (2000000) static void insert_num(int k, vector<int> &v) { auto it = v.begin(); it = v.insert(it, k); } static void delete_num(int k, vector<int> &v) { vector<int>::iterator it = find(v.begin(), v.end(), k); if (it != v.end()) { ...
a.cc: In function 'void delete_num(int, std::vector<int>&)': a.cc:13:36: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)' 13 | vector<int>::iterator it = find(v.begin(), v.end(), k); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~ In ...
s848128168
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> using namespace std; struct Node { int key; Node *prev, *next; }; Node *nil; void init() { nil = (Node *)malloc(sizeof(Node)); nil->next = nil; nil->prev = nil; } void printList() { Node *cur = nil->next; int isf = 0; while (1) { if (cur==nil...
a.cc: In function 'int main()': a.cc:83:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 83 | if (com[0]=="i") { | ~~~~~~^~~~~ a.cc:87:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 87 | } else if (com[0]=="d") { | ...
s108015604
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> using namespace std; struct Node { int key; Node *prev, *next; }; Node *nil; void init() { nil = (Node *)malloc(sizeof(Node)); nil->next = nil; nil->prev = nil; } void printList() { Node *cur = nil->next; int isf = 0; while (1) { if (cur==nil...
a.cc: In function 'int main()': a.cc:83:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 83 | if (com[0]=="i") { | ~~~~~~^~~~~ a.cc:87:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 87 | } else if (com[0]=="d") { | ...
s495817797
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> using namespace std; struct Node { int key; Node *prev, *next; }; Node *nil; void init() { nil = (Node *)malloc(sizeof(Node)); nil->next = nil; nil->prev = nil; } void printList() { Node *cur = nil->next; int isf = 0; while (1) { if (cur==nil...
a.cc: In function 'int main()': a.cc:83:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 83 | if (com[0]=="i") { | ~~~~~~^~~~~ a.cc:87:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 87 | } else if (com[0]=="d") { | ...
s932973995
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
s563294633
p02265
C++
aa
a.cc:1:1: error: 'aa' does not name a type 1 | aa | ^~
s624990686
p02265
C++
include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> struct Node{ int key; Node *next, *prev; }; Node *nil; void init() { nil = (Node*)malloc(sizeof(Node)); nil->next = nil; nil->prev = nil; } Node* listSearch(int key) { Node *cur = nil->next; while(cur != nil && cur->key != key) { ...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~
s679124299
p02265
C++
#include<bits/stdc++.h> using namespace std; int osikomi(int hai[],int n){ for(int i = 0;i<n;i++){ if(hai[i] == 0){ hai[i] = hai[i+1]; hai[i+1] = 0; } } } int main(){ int n,b,f = 0; string mozi; cin>>n; int hai[n] ={}; for(int i = 0;i<n;i++){ cin>>mozi; if(mozi == "insert"||mozi == "delete"){ ci...
a.cc: In function 'int osikomi(int*, int)': a.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type] 10 | } | ^ a.cc: In function 'int main()': a.cc:67:2: error: expected '}' at end of input 67 | } | ^ a.cc:11:11: note: to match this '{' 11 | int main(){ | ...
s991065399
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
s737205852
p02265
C++
v#include<bits/stdc++.h> using namespace std; int osikomi(int hai[],int n){ for(int i = 0;i<n;i++){ if(hai[i] == 0){ hai[i] = hai[i+1]; hai[i+1] = 0; } } } int main(){ int n,b,d = 0,f = 0,g = 0,fa = 0,l = 0; string mozi; cin>>n; int hai[n] ={}; for(int i = 0;i<n-d;i++){ cin>>mozi; if(mozi == "inser...
a.cc:1:2: error: stray '#' in program 1 | v#include<bits/stdc++.h> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include<bits/stdc++.h> | ^ a.cc: In function 'int osikomi(int*, int)': a.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type] 10 | } | ^ a....
s446432950
p02265
C++
v#include<bits/stdc++.h> using namespace std; int main(){ int n,b,d = 0,f = 0,g = 0,fa = 0,l = 0; string mozi; cin>>n; int hai[n] ={}; for(int i = 0;i<n-d;i++){ cin>>mozi; if(mozi == "insert"||mozi == "delete"){ cin>>b; } if(mozi == "insert"){ hai[i] = b; f++; g++; } else if(mozi == "delete...
a.cc:1:2: error: stray '#' in program 1 | v#include<bits/stdc++.h> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include<bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:5:9: error: 'string' was not declared in this scope 5 | string mozi; | ^~~~~~ a.cc:6:9: er...
s162720038
p02265
C++
v
a.cc:1:1: error: 'v' does not name a type 1 | v | ^
s154291587
p02265
C++
#include<bits/stdc++.h> using namespace std; int main(){ int n,b,d = 0,f = 0,g = 0,fa = 0,l = 0; cin>>n; int hai[n] ={}; for(int i = 0;i<n-d;i++){ cin>>mozi; if(mozi == "insert"||mozi == "delete"){ cin>>b; } if(mozi == "insert"){ hai[i] = b; f++; g++; } else if(mozi == "delete"){ for(int ...
a.cc: In function 'int main()': a.cc:8:22: error: 'mozi' was not declared in this scope 8 | cin>>mozi; | ^~~~
s179974945
p02265
C++
v#include<bits/stdc++.h> using namespace std; int main(){ int n,b,d = 0,f = 0,g = 0,fa = 0,l = 0; cin>>n; string mozi; int hai[n] ={}; for(int i = 0;i<n-d;i++){ cin>>mozi; if(mozi == "insert"||mozi == "delete"){ cin>>b; } if(mozi == "insert"){ hai[i] = b; f++; g++; } else if(mozi == "delete...
a.cc:1:2: error: stray '#' in program 1 | v#include<bits/stdc++.h> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include<bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin>>n; | ^~~ a.cc:6:9: error: 'strin...
s346324368
p02265
C++
v#include<bits/stdc++.h> using namespace std; int main(){ int n,b,d = 0,f = 0,g = 0,fa = 0,l = 0; cin>>n; string mozi; int hai[n] ={}; for(int i = 0;i<n-d;i++){ cin>>mozi; if(mozi == "insert"||mozi == "delete"){ cin>>b; } if(mozi == "insert"){ hai[i] = b; f++; g++; } else if(mozi == "delete...
a.cc:1:2: error: stray '#' in program 1 | v#include<bits/stdc++.h> | ^ a.cc:1:1: error: 'v' does not name a type 1 | v#include<bits/stdc++.h> | ^ a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | cin>>n; | ^~~ a.cc:6:9: error: 'strin...
s421245889
p02265
C++
#include<iostream> #include<memory> using namespace std; struct list{ string num; list *left, *right; }; list *nill; list *tnew(void); void insert(string); void init(void); void deleteList(string); list *seachList(string); void deleteFirst(void); void deleteLast(void); int main(void){ string c; string n; int s...
/usr/bin/ld: /tmp/ccWicyJs.o: in function `main': a.cc:(.text+0xac): undefined reference to `insert(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)' /usr/bin/ld: a.cc:(.text+0x112): undefined reference to `deleteList(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocato...
s963997511
p02265
C++
#include<iostream> #include<memory> using namespace std; struct list{ int num; list *left, *right; }; list *nill; list *tnew(void); void insert(int); void init(void); void deleteList(list *dl); list *seachList(int); void deleteFirst(void); void deleteLast(void); int main(void){ char c[50]; int n; int s; ci...
a.cc: In function 'int main()': a.cc:24:13: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int*') 24 | cin >> &s; | ~~~ ^~ ~~ | | | | | int* | std::istream {aka std::basic_istream<char>...
s170391573
p02265
C++
#include<iostream> #include<memory> using namespace std; struct list{ int num; list *left, *right; }; list *nill; list *tnew(void); void insert(int); void init(void); void deleteList(list *dl); list *seachList(int); void deleteFirst(void); void deleteLast(void); int main(void){ char c[50]; int n; int s; scanf...
a.cc: In function 'int main()': a.cc:47:21: error: expected ';' before 'return' 47 | printf("\n") | ^ | ; 48 | return 0; | ~~~~~~
s872601431
p02265
C++
#include<iostream> #include<stdio.h> #include<cstdlib.h> using namespace std; struct list{ int num; list *left, *right; }; list *nill; list *tnew(void); void insert(int); void init(void); void deleteList(list *dl); list *seachList(int); void deleteFirst(void); void deleteLast(void); int main(void){ char c[50]; ...
a.cc:3:9: fatal error: cstdlib.h: No such file or directory 3 | #include<cstdlib.h> | ^~~~~~~~~~~ compilation terminated.
s644663042
p02265
C++
#include<iomanip> #include<limits> #include<thread> #include<utility> #include<iostream> #include<string> #include<algorithm> #include<set> #include<map> #include<vector> #include<stack> #include<queue> #include<cmath> #include<numeric> #include<cassert> #include<random> #include<chrono> #include<unordered_map> #includ...
a.cc: In instantiation of 'List<T>::iterator List<T>::push_front(T) [with T = long long int]': a.cc:188:25: required from here 188 | L.push_front(x); | ~~~~~~~~~~~~^~~ a.cc:119:16: error: 'struct List<long long int>::node' has no member named 'fonrt' 119 | (*New).fonrt=root; ...
s388692922
p02265
C++
#include<iomanip> #include<limits> #include<thread> #include<utility> #include<iostream> #include<string> #include<algorithm> #include<set> #include<map> #include<vector> #include<stack> #include<queue> #include<cmath> #include<numeric> #include<cassert> #include<random> #include<chrono> #include<unordered_map> #includ...
a.cc: In instantiation of 'List<T>::iterator List<T>::push_front(T) [with T = long long int]': a.cc:188:25: required from here 188 | L.push_front(x); | ~~~~~~~~~~~~^~~ a.cc:119:16: error: 'struct List<long long int>::node' has no member named 'fonrt' 119 | (*New).fonrt=root; ...
s788598849
p02265
C++
#include<iosteam> #include<cstdio> #include<list> int main(int argc, char const *argv[]) { int q,x; char com[20]; std::list<int> v; scanf("%s",com); if(com[0] == 'i'){ scanf("%d",&x); v.push_front(x); } else if(com[6] == 'L'){ v.pop_back(); } else if(co...
a.cc:1:9: fatal error: iosteam: No such file or directory 1 | #include<iosteam> | ^~~~~~~~~ compilation terminated.
s254058799
p02265
C++
#include <iostream> #include<string> #include<list> #include<cstdio> using namespace std; int main(){ int n; cin>>n; list<int> V; for(int i=0;i<n;i++){ char com[20]; int t; scanf("%s",com); if(com[0]=='i'){ scanf("%d",&t); ...
a.cc: In function 'int main()': a.cc:42:9: error: redeclaration of 'int i' 42 | int i=1; | ^ a.cc:13:13: note: 'int i' previously declared here 13 | for(int i=0;i<n;i++){ | ^ a.cc:58:2: error: expected '}' at end of input 58 | } | ^ a.cc:8:11: note: to match this ...
s494842949
p02265
C++
#include <iostream> #include<string> #include<list> #include<algorithm> #include<cstdio> using namespace std; int main(){ int n; cin>>n; list<int> V; for(int i=0;i<n;i++){ char com[20]; int t; scanf("%s",com); if(com[0]=='i'){ scanf("%...
a.cc: In function 'int main()': a.cc:43:9: error: redeclaration of 'int i' 43 | int i=1; | ^ a.cc:14:13: note: 'int i' previously declared here 14 | for(int i=0;i<n;i++){ | ^ a.cc:59:2: error: expected '}' at end of input 59 | } | ^ a.cc:9:11: note: to match this ...
s981533359
p02265
C++
import sys import time class NodeList: class Node: def __init__(self, left, x, right): self.key = x self.right = right self.left = left def __repr__(self): return str(self.key) def printDetail(self): print(str(se...
a.cc:73:10: error: invalid preprocessing directive #print 73 | #print(point.key) | ^~~~~ a.cc:74:10: error: invalid preprocessing directive #time 74 | #time.sleep(3) | ^~~~ a.cc:81:6: error: invalid preprocessing directive #print 81 | #print(i) | ^~~...
s533195346
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
s742479352
p02265
C++
#include <iostream> #include <string> #include <stdio.h> using namespace std; namespace tom{ class list{ private: struct node{ int key=0; node* next=NULL; node* prev=NULL; }; node* _head=NULL; int _cnt=0; public: list(){ _head = new node; _head->next = _hea...
a.cc: In function 'void order(std::string, tom::list&)': a.cc:118:19: error: expected ';' before 'list' 118 | scanf("%d",&x) | ^ | ; 119 | list.deleteX(x); | ~~~~
s954473760
p02265
C++
#include <iostream> #include<string> #include<cmath> #include<algorithm> #include<cctype> #include<stdio.h> #include<stack> #include<stdlib.h> #include<list> #define LEN 100005 using namespace std; //list実装 int main(){ list<int> l; int n; scanf("%d",&n) for(int i=0;i<n;i++){ string c; c...
a.cc: In function 'int main()': a.cc:17:19: error: expected ';' before 'for' 17 | scanf("%d",&n) | ^ | ; 18 | for(int i=0;i<n;i++){ | ~~~ a.cc:18:17: error: 'i' was not declared in this scope 18 | for(int i=0;i<n;i++){ | ...
s798775418
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> struct Node { int value; Node* pre; Node* next; }; Node* nil;//申请指向首结点的指针 void initialize(void) { nil=(Node*)malloc(sizeof(Node)); nil->next=nil; nil->pre=nil; } void Insert(int key)//在链表开头添加元素x { Node* x=(Node*)malloc(sizeof(Node)); ...
a.cc: In function 'void PRINT()': a.cc:73:10: error: expected '(' before '{' token 73 | while{ | ^ | ( a.cc:73:10: error: expected primary-expression before '{' token a.cc:73:10: error: expected ')' before '{' token 73 | while{ | ^ | )
s882794429
p02265
C++
#include<iostream> #include<algorithm> #include<vector> #include<stack> #include<queue> #include<list> #include<string> #include<cstdlib> #include<cstdio> //#include<cmath> using namespace std; typedef struct { string s; int t; }Unit; int main(void) { int n, m; cin >> n; list<int> L; char s[20]; for (int i = 0...
a.cc: In function 'int main()': a.cc:29:26: error: 'strlen' was not declared in this scope 29 | else if (strlen(s) == 6) { | ^~~~~~ a.cc:10:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 9 | #include<cstdi...
s642666175
p02265
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc: In function 'int main()': a.cc:212:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 212 | if( S == "insert" ) | ~~^~~~~~~~~~~ a.cc:217:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 217 | else if( S == "delete" ) ...
s082217589
p02265
C++
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #includ...
a.cc: In function 'int main()': a.cc:212:13: error: request for member 'compare' in 'S', which is of non-class type 'int' 212 | if( S.compare("insert") == 0 ) | ^~~~~~~ a.cc:217:18: error: request for member 'compare' in 'S', which is of non-class type 'int' 217 | else if( S.compare("d...
s427729219
p02265
C++
#include <cstdio> #include <list> #include <algorithm> using namespace std; typedef long long ll; int main() { int n, i, a; char s[20]; list<int> v; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%s", s); if (s[0] == 'i') { scanf("%d", &a); v.push_front(a); } else if (s[6] == ...
a.cc: In function 'int main()': a.cc:37:9: error: 'pritnf' was not declared in this scope; did you mean 'printf'? 37 | pritnf(" "); | ^~~~~~ | printf
s936092994
p02265
C++
#include<cstdio> #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("%s",&x); v.push_front(x); }else if(com[6]=='L'){ ...
a.cc: In function 'int main()': a.cc:24:23: error: 'class std::__cxx11::list<int>' has no member named 'erasse'; did you mean 'erase'? 24 | v.erasse(it); | ^~~~~~ | erase a.cc:31:9: error: 'liat' was not declared in this scope 31 | fo...
s282553363
p02265
C++
#include<cstdio> #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("%s",&x); v.push_front(x); }else if(com[6]=='L'){ ...
a.cc: In function 'int main()': a.cc:24:23: error: 'class std::__cxx11::list<int>' has no member named 'erasse'; did you mean 'erase'? 24 | v.erasse(it); | ^~~~~~ | erase a.cc:31:9: error: 'liat' was not declared in this scope 31 | fo...
s132954948
p02265
C++
#include<cstdio> #include<cstdlib> #include<cstring> 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 *)mallo...
a.cc: In function 'int main()': a.cc:75:53: error: expected ';' before '}' token 75 | if(com[0] == 'i' ) { insert(key); np++; size++} | ^ | ;
s208536562
p02265
C++
#include<bits/stdc++.h> using namespace std; const int MAX_ARGENT = 1000000; class DoublyLinkedListInteger{ private: int* array; int currFirst; int currLast; public: DoublyLinkedListInteger() : currFirst(0),currLast(0),array(new int[MAX_ARGENT]){} void insert(int); void deleteKey(int); void deleteFirs...
a.cc:104:1: error: 'Press' does not name a type 104 | Press ENTER or type command to continue | ^~~~~ a.cc:108:11: error: redefinition of 'const int MAX_ARGENT' 108 | const int MAX_ARGENT = 1000000; | ^~~~~~~~~~ a.cc:4:11: note: 'const int MAX_ARGENT' previously defined here 4 | const int ...
s149511957
p02265
C++
#include <stdio.h> #include <string.h> void delete(int key[2000000],int j,int k){ int i; for(i=j;i<k;i++){ key[i]=key[i+1]; } } int main(void){ int n,i,j,k,x,key[2000000]; char com[20]; k=0; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%s",com); if(strcmp(com,"insert")==0){ scanf("%d",&x...
a.cc:4:6: error: expected unqualified-id before 'delete' 4 | void delete(int key[2000000],int j,int k){ | ^~~~~~ a.cc: In function 'int main()': a.cc:26:23: error: type 'int' argument given to 'delete', expected pointer 26 | delete(key,j,k); | ~~~~~~^~~ a.cc:37:19: erro...
s732981100
p02265
C++
#include <stdio.h> #include <string.h> int s; void delete(int key[2000000],int j){ key[j]=-1; } int main(void){ int n,i,j,k,x,key[2000000]; char com[20]; k=0; scanf("%d",&n); for(i=1;i<=n;i++){ scanf("%s",com); if(strcmp(com,"insert")==0){ scanf("%d",&x); k++; key[k]=x; } e...
a.cc:4:6: error: expected unqualified-id before 'delete' 4 | void delete(int key[2000000],int j){ | ^~~~~~ a.cc: In function 'int main()': a.cc:23:21: error: type 'int' argument given to 'delete', expected pointer 23 | delete(key,j); | ~~~~^~~ a.cc:31:21: error: type 'i...
s519375598
p02265
C++
class Node: def __init__(self, key, prev, next): self.key = key self.prev = prev self.next = next class MyDLL: def __init__(self): self.linkedlist = [] self.length = 0 def insert(self, x): # 連結リストの先頭にキー x を持つ要素を継ぎ足す。 if self.length==0: ...
a.cc:14:11: error: invalid preprocessing directive #\U00009023\U00007d50\U000030ea\U000030b9\U000030c8\U0000306e\U00005148\U0000982d\U0000306b\U000030ad\U000030fc 14 | # 連結リストの先頭にキー x を持つ要素を継ぎ足す。 | ^~~~~~~~~~~~~~~~~~~~~~ a.cc:14:36: error: extended character 。 is not valid in an identifier ...
s824704124
p02265
C++
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <sstream> using namespace std; static const int none = -1; struct linkItem { int key = none; int nextIdx = -1; int prevIdx = -1; }; struct order { int kind = none; int key = none; }; class dblLinkLst { public: dblLinkLst() ...
a.cc:170:1: error: extended character   is not valid in an identifier 170 |     int n; | ^ a.cc:170:1: error: extended character   is not valid in an identifier a.cc:170:1: error: extended character   is not valid in an identifier a.cc:170:1: error: extended character   is not valid in an identifier a.cc: In fu...
s917091118
p02265
C++
#include <iostream> #include <cstdio> #include <cstdlib> #include <vector> #include <string> #include <algorithm> #include <sstream> using namespace std; static const int none = -1; struct linkItem { int key = none; int nextIdx = -1; int prevIdx = -1; }; struct order { int kind = none; int key = none; }; clas...
a.cc: In function 'int main()': a.cc:174:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 174 | scanf_s("%s%d", com, &key); | ^~~~~~~ | scanf a.cc:184:29: error: 'strlen' was not declared in this scope 184 | ...
s527352587
p02265
C++
#include <iostream> #include <cstdio> #include <vector> #include <string> using namespace std; static const int none = -1; struct linkItem { int key = none; int nextIdx = -1; int prevIdx = -1; }; struct order { int kind = none; int key = none; }; class dblLinkLst { public: dblLinkLst() { } ~dblLinkLst() {...
a.cc: In function 'int main()': a.cc:182:29: error: 'strlen' was not declared in this scope 182 | if (strlen(com) > 6) { | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #includ...
s939923975
p02265
C++
#include <iostream> #include <cstdio> #include <list> #include <string> using namespace std; int main() { list<int> lnk; const int SLEN = 20; char com[SLEN]; int n, key = 0; scanf("%d", &n); for (int i = 0;i < n;i++) { scanf("%s%d", com, &key); if (com[0] == 'i') {  lnk.push_front(key); } ...
a.cc:28:25: error: extended character   is not valid in an identifier 28 |  lnk.push_front(key); | ^ a.cc: In function 'int main()': a.cc:28:25: error: '\U00003000lnk' was not declared in this scope 28 |  lnk.push_front(key); | ...
s015647542
p02265
C++
#include <iostream> #include <cstdio> #include <list> #include <cstring> using namespace std; int main() { list<int> lnk; const int SLEN = 20; char com[SLEN]; int n, key = 0; scanf("%d", &n); for (int i = 0;i < n;i++) { scanf("%s%d", com, &key); if (com[0] == 'i') {  lnk.push_front(key); } ...
a.cc:28:25: error: extended character   is not valid in an identifier 28 |  lnk.push_front(key); | ^ a.cc: In function 'int main()': a.cc:28:25: error: '\U00003000lnk' was not declared in this scope 28 |  lnk.push_front(key); | ...
s217939058
p02265
C++
#include<cstring> #include<cstdlib> #include<cstdio> #include<sstream> #include<list> #include<algorithm> using namespace std; int main(int argc,char* argv[]){ int n,key; list<int> li; cin>>n; while(n-->0){ string str; cin>>str; if(str=="insert"){ cin>>key; li.push_front(key);...
a.cc: In function 'int main(int, char**)': a.cc:13:3: error: 'cin' was not declared in this scope 13 | cin>>n; | ^~~ a.cc:7:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 6 | #include<algorithm> +++ |+#include <iostream> 7 | using n...
s916333458
p02265
C++
#include<iostream> #include<string> #include<stdlib.h> #include<stdio.h> #include<vector> using namespace std; #define _CRT_SECURE_NO_WARNINGS int main() { int n; cin >> n; vector<int> a; vector<int>::iterator aho; for (int i = 0; i < n; i++) { string mission; int x; cin >> mission; if (mission == "insert"...
a.cc: In function 'int main()': a.cc:36:25: error: 'reverse' was not declared in this scope 36 | reverse(a.begin(), a.end()); | ^~~~~~~
s050711230
p02265
C++
// ConsoleApplication2.cpp : コンソール アプリケーションのエントリ ポイントを定義します。 // #include "stdafx.h" #include <iostream> #include <string> #include <sstream> #include <cmath> #include <iomanip> #include <algorithm> #include <list> #include <stack> #include <queue> #include <vector> #include <deque> using namespace std; int main(){ ...
a.cc:4:10: fatal error: stdafx.h: No such file or directory 4 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s411693600
p02265
C++
#include <iostream> #include <cstdio> #include <string> #include <deque> using namespace std; #define rep2(x,from,to) for(int x=(from);(x)<(to);(x)++) #define rep(x,to) rep2(x,0,to) deque<int> lst; int main() { int n, v; string s; cin >> n; rep(i,n) { cin >> s; if(s == "insert") { cin >> v; lst.push_fr...
a.cc: In function 'int main()': a.cc:23:39: error: no matching function for call to 'find(std::deque<int>::iterator, std::deque<int>::iterator, int&)' 23 | auto it = find(lst.begin(), lst.end(), v); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included fro...
s489999603
p02265
C++
#include "stdafx.h" #include "iostream" #include "string" #include <stack> #include <queue> #include <sstream> using namespace std; void A() { stack<int> stack; string str; while (cin >> str) { if (str == "+" || str == "-" || str == "*") { int b = stack.top(); stack.pop(); int a = stack.top(); stac...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s744786234
p02265
C++
#include "stdafx.h" #include "iostream" #include "string" #include <stack> #include <queue> #include <sstream> #include <cstring> using namespace std; void A() { stack<int> stack; string str; while (cin >> str) { if (str == "+" || str == "-" || str == "*") { int b = stack.top(); stack.pop(); int a = s...
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s294867433
p02265
C++
//#include "stdafx.h" #include "iostream" #include "string" #include <stack> #include <queue> #include <sstream> #include <cstring> using namespace std; void A() { stack<int> stack; string str; while (cin >> str) { if (str == "+" || str == "-" || str == "*") { int b = stack.top(); stack.pop(); int a =...
a.cc: In function 'void C()': a.cc:174:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 174 | scanf_s("%d",&N); | ^~~~~~~ | scanf
s450059027
p02265
C++
//#include "stdafx.h" #include "iostream" #include "string" #include <stack> #include <queue> #include <sstream> #include <cstring> using namespace std; void A() { stack<int> stack; string str; while (cin >> str) { if (str == "+" || str == "-" || str == "*") { int b = stack.top(); stack.pop(); int a =...
a.cc: In function 'void C()': a.cc:174:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 174 | scanf_s("%d",&N); | ^~~~~~~ | scanf
s138660665
p02265
C++
#include <iostream> #include <iomanip> #include <math.h> #include <fstream> #include <string> #include <time.h> #include <ctime> #include <stdlib.h> #include <stdio.h> #include <vector> #include <algorithm> #include <map> #include <list> #include <stack> #include <queue> #include <cstdlib> using namespace std; struct ...
a.cc: In function 'int main()': a.cc:87:16: error: expected unqualified-id before '=' token 87 | for(int=0;i<n;i++){ | ^ a.cc:87:16: error: expected ';' before '=' token 87 | for(int=0;i<n;i++){ | ^ | ; a.cc:87:16: error: expected prim...
s791915392
p02265
C++
#include <iostream> #include <iomanip> #include <math.h> #include <fstream> #include <string> #include <time.h> #include <ctime> #include <stdlib.h> #include <stdio.h> #include <vector> #include <algorithm> #include <map> #include <list> #include <stack> #include <queue> #include <cstdlib> using namespace std; struct ...
a.cc: In function 'int main()': a.cc:91:28: error: 'strlen' was not declared in this scope 91 | if(strlen(com)>6){ | ^~~~~~ a.cc:17:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 16 | #include <cs...
s481940292
p02265
C++
#include <iostream> #include <iomanip> #include <math.h> #include <fstream> #include <string> #include <time.h> #include <ctime> #include <stdlib.h> #include <stdio.h> #include <vector> #include <algorithm> #include <map> #include <list> #include <stack> #include <queue> #include <cstdlib> using namespace std; struct ...
a.cc: In function 'int main()': a.cc:91:28: error: 'strlen' was not declared in this scope 91 | if(strlen(com)>6){ | ^~~~~~ a.cc:17:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 16 | #include <cs...
s182431580
p02265
C++
#include <iostream> #include <iomanip> #include <math.h> #include <fstream> #include <string> #include <time.h> #include <ctime> #include <stdlib.h> #include <stdio.h> #include <vector> #include <algorithm> #include <map> #include <list> #include <stack> #include <queue> #include <cstdlib> using namespace std; struct ...
a.cc: In function 'int main()': a.cc:91:28: error: 'strlen' was not declared in this scope 91 | if(strlen(com)>6){ | ^~~~~~ a.cc:17:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 16 | #include <cs...
s685784576
p02265
C++
#include <iostream> #include <iomanip> #include <math.h> #include <fstream> #include <string> #include <time.h> #include <ctime> #include <stdlib.h> #include <stdio.h> #include <vector> #include <algorithm> #include <map> #include <list> #include <stack> #include <queue> #include <cstdlib> #include <cstdio> #include <c...
a.cc: In function 'int main()': a.cc:87:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 87 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s787471610
p02265
C++
#include <iostream> #include <iomanip> #include <math.h> #include <fstream> #include <string> #include <time.h> #include <ctime> #include <stdlib.h> #include <stdio.h> #include <vector> #include <algorithm> #include <map> #include <list> #include <stack> #include <queue> #include <cstdlib> #include <cstdio> #include <c...
a.cc: In function 'int main()': a.cc:87:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 87 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s486614616
p02265
C++
#include <iostream> #include <iomanip> #include <math.h> #include <fstream> #include <string> #include <time.h> #include <ctime> #include <stdlib.h> #include <stdio.h> #include <vector> #include <algorithm> #include <map> #include <list> #include <stack> #include <queue> #include <cstdlib> #include <cstdio> #include <c...
a.cc: In function 'int main()': a.cc:87:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 87 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s101787650
p02265
C++
#include <cstdlib> #include <cstdio> #include <cstring> using namespace std; struct Node{ int key; Node *prev; Node *next; }; Node *nil; void init(){ nil = (Node *)malloc(sizeof(Node)); nil->next=nil; nil->prev=nil; } void insert(int key){ Node* x=(Node *)malloc(sizeof(Node)); x->key=key; x->next=nil->...
a.cc: In function 'int main()': a.cc:73:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 73 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s948670116
p02265
C++
#include <sstream> #include <cstring> #include <string> #include <vector> #include <map> #include <algorithm> #include <iostream> #include <utility> #include <set> #include <cctype> #include <queue> #include <stack> #include <cstdio> #include <cstdlib> #include <cmath> #include <iterator> #include <numeric> #include <f...
a.cc:30:3: error: 'auto_ptr' does not name a type 30 | auto_ptr<node> n; | ^~~~~~~~ a.cc: In constructor 'node::node(node*, node*, int)': a.cc:33:44: error: class 'node' does not have any field named 'n' 33 | node(node* p_, node* n_, int v_): p(p_), n(n_), v(v_), null(false){} | ...
s557322991
p02265
C++
#include <cstdio> #include <list> #include <string> using namespace std; #define ll long long int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin>>n; string com; int key; list<ll> lst; list<ll>::iterator it,i=lst.end(); while(n--){ cin>>com; if(com=="insert"){ cin>>key; lst.push_front(...
a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | cin.tie(0); | ^~~ a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 3 | #include <string> +++ |+#include <iostream> 4 | using...
s577101179
p02265
C++
//scanf??????????????¨??????????????????????°????????????? #include<cstdio> #include<list> #include<string> using namespace std; int main(void) { int num,time; char str[100]; list<int> l; scanf_s("%d", &time); for (int i = 0; i < time; i++) { scanf_s("%s", str); if (str[0] == 'i') { scanf_s("%d", &num); ...
a.cc: In function 'int main()': a.cc:12:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 12 | scanf_s("%d", &time); | ^~~~~~~ | scanf
s484997679
p02265
C++
#include <stdio.h> #include <string.h> int a[1000000]={0}, x, y=0, z=0; void insert() { a[y] = x; y++; return; } void delete() { int i, j; for(i = y-1; i >= 0; i--){ if(a[i] == x){ a[i] = -1; } break; } return; } void deleteLast() { z++; return; } void deleteFirst() { a[y...
a.cc:12:6: error: expected unqualified-id before 'delete' 12 | void delete() | ^~~~~~ a.cc: In function 'int main()': a.cc:52:16: error: expected primary-expression before ')' token 52 | delete(); | ^