submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s523423126
p02265
C++
#include<cstdio> #include<list> #include<algorithm> #include<iostream> using namespace std; int main(void){ int i, q, x; char com[20]; list<int> v; scanf("%d", &q); for(i=0;i<q;i++){ scanf("%s", com); num = com[7]; if(com[0]=='i'){ scanf("%d", &x); v....
a.cc: In function 'int main()': a.cc:14:9: error: 'num' was not declared in this scope; did you mean 'enum'? 14 | num = com[7]; | ^~~ | enum a.cc:23:13: error: 'l' was not declared in this scope 23 | l.pop_front(); | ^
s981031083
p02265
C++
#include<cstdio> #include<list> #include<algorithm> using namespace std; int main(void){ int i, q, x; char com[20]; list<int> v; scanf("%d", &q); for(i=0;i<q;i++){ scanf("%s", com); if(com[0]=='i'){ scanf("%d", &x); v.push_front(x); } else if(...
a.cc: In function 'int main()': a.cc:34:9: error: redeclaration of 'int i' 34 | int i=0; | ^ a.cc:7:9: note: 'int i' previously declared here 7 | int i, q, x; | ^
s048804977
p02265
C++
#include <iostream> #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("%d", x); v.push_front(...
a.cc: In function 'int main()': a.cc:13:31: error: expected ';' before ')' token 13 | for (int i = 0; i < q, i++){ | ^ | ;
s851368344
p02265
C++
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <cstdlib> #include <cstring> using namespace std; struct node { int key; node *pre, *nex; }; node *nil; void init() { nil = (node *)malloc(sizeof(node)); nil->nex = nil; nil->pre = nil; } void insert(int key) { node *a = (node*)malloc(sizeof(node)); a ->...
a.cc: In function 'int main()': a.cc:101:18: error: expected '}' at end of input 101 | return 0; | ^ a.cc:72:37: note: to match this '{' 72 | for (int i = 0; i < n; i++) { | ^ a.cc:101:18: error: expected '}' at end of input 101 | ...
s476354534
p02265
C++
define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <cstdlib> #include <cstring> using namespace std; struct node { int key; node *pre, *nex; }; node *nil; void init() { nil = (node *)malloc(sizeof(node)); nil->nex = nil; nil->pre = nil; } void insert(int key) { node *a = (node*)malloc(sizeof(node)); a ->k...
a.cc:1:1: error: 'define' does not name a type 1 | define _CRT_SECURE_NO_WARNINGS | ^~~~~~
s932169569
p02265
C++
import sys from collections import deque n = int(input()) q = deque() for i in range(n): c = input() if c[0] == 'i': q.appendleft(c[7:]) elif c[6] == ' ': try: q.remove(c[7:]) except: pass elif c[6] == 'F': q.popleft() else: q.pop() pri...
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s596077866
p02265
C++
from collections import deque n = int(input()) q = deque() for i in range(n): c = input() if c[0] == 'i': q.appendleft(c[7:]) elif c[6] == ' ': try: q.remove(c[7:]) except: pass elif c[6] == 'F': q.popleft() else: q.pop() print(*q)
a.cc:1:1: error: 'from' does not name a type 1 | from collections import deque | ^~~~
s298159841
p02265
C++
#include <iostream> #include <string> #include <cstdio> #include <cstring> using namespace std; struct Node{ int key; struct Node* prev; struct Node* next; }; typedef struct Node Node; Node* nil; // Inirialize the list void initialize() { nil = new Node; nil->key = -999999; nil->next = nil; nil->prev = nil; ...
a.cc: In function 'int main()': a.cc:83:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 83 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s091276637
p02265
C++
#include <iostream> using namespace std; struct Node { int key;//??°?????¬????????´??°key Node *next, *prev;//???????????????????´??????????next?????????????????????????´???????prev }; Node *nil;//??´?????? Node* listSearch(int key) { Node *cur = nil->next;//?????´???????????¢???????´?????§??????? while (cur != nil...
a.cc: In function 'int main()': a.cc:87:29: error: 'strlen' was not declared in this scope 87 | if (strlen(com) > 6) | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <...
s370207455
p02265
C++
#include <iostream> using namespace std; struct Node { int key;//??°?????¬????????´??°key Node *next, *prev;//???????????????????´??????????next?????????????????????????´???????prev }; Node *nil;//??´?????? Node* listSearch(int key) { Node *cur = nil->next;//?????´???????????¢???????´?????§??????? while (cur != nil...
a.cc: In function 'int main()': a.cc:87:29: error: 'strlen' was not declared in this scope 87 | if (strlen(com) > 6) | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <...
s785873480
p02265
C++
#include <iostream> using namespace std; struct Node { int key;//??°?????¬????????´??°key Node *next, *prev;//???????????????????´??????????next?????????????????????????´???????prev }; Node *nil;//??´?????? Node* listSearch(int key) { Node *cur = nil->next;//?????´???????????¢???????´?????§??????? while (cur != nil...
a.cc: In function 'int main()': a.cc:88:29: error: 'strlen' was not declared in this scope 88 | if (strlen(com) > 6) | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <...
s041362904
p02265
C++
#include <iostream> using namespace std; struct Node { int key;//??°?????¬????????´??°key Node *next, *prev;//???????????????????´??????????next?????????????????????????´???????prev }; Node *nil;//??´?????? Node* listSearch(int key) { Node *cur = nil->next;//?????´???????????¢???????´?????§??????? while (cur != nil...
a.cc: In function 'int main()': a.cc:88:29: error: 'strlen' was not declared in this scope 88 | if (strlen(com) > 6) | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <...
s390359561
p02265
C++
#include <iostream> using namespace std; struct Node { int key;//??°?????¬????????´??°key Node *next, *prev;//???????????????????´??????????next?????????????????????????´???????prev }; Node *nil;//??´?????? Node* listSearch(int key) { Node *cur = nil->next;//?????´???????????¢???????´?????§??????? while (cur != nil...
a.cc: In function 'int main()': a.cc:88:29: error: 'strlen' was not declared in this scope 88 | if (strlen(com) > 6) | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <...
s667268963
p02265
C++
#include <iostream> #include <string> #include <deque> #include <algorithm> int main() { int commandCount; std::cin >> commandCount; std::deque deque; while (commandCount--) { std::string command; std::cin >> command; int value; if (command == "insert") { ...
a.cc: In function 'int main()': a.cc:11:16: error: class template argument deduction failed: 11 | std::deque deque; | ^~~~~ a.cc:11:16: error: no matching function for call to 'deque()' In file included from /usr/include/c++/14/deque:66, from a.cc:3: /usr/include/c++/14/bits...
s711828892
p02265
C++
#include <cstdio> #include <string> #include <list> #include <algorithm> int main() { const int BUF_SIZE = 21; int commandCount; std::scanf("%d\n", &commandCount); std::list<int> list; while (commandCount--) { char command[BUF_SIZE]; std::gets(command); std::string comman...
a.cc: In function 'int main()': a.cc:16:14: error: 'gets' is not a member of 'std'; did you mean 'getc'? 16 | std::gets(command); | ^~~~ | getc
s887831254
p02265
C++
def operation(command, arrey): if command[0] == 'insert': arrey.insert(0,command[1]) return arrey elif command[0] == 'delete': if command[1] in arrey: arrey.remove(command[1]) elif command[0] == 'deleteFirst': arrey.pop(0) elif command[0] == 'deleteLast': ...
a.cc:2:22: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes 2 | if command[0] == 'insert': | ^~~~~~~~ a.cc:5:24: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes 5 | elif command[0] == 'delete': | ...
s222036188
p02265
C++
#define _CRT_SECURE_NO_WARNINGS #include <cstdio> #include <iostream> #include <list> #include<string> using namespace std; int main() { list<int> lst; int n,comn; char com[20]; //??????????????°?????? scanf("%d", &n); for (int i = 0; i < n; i++){ scanf("%s", com); scanf("%d", &comn); if (com[0] == 'i')...
a.cc: In function 'int main()': a.cc:25:29: error: 'strlen' was not declared in this scope 25 | if (strlen(com) == 6){ | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include...
s895851162
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; ni...
a.cc: In function 'void printlist()': a.cc:37:28: error: invalid conversion from 'int' to 'Node*' [-fpermissive] 37 | cur = cur->key; | ~~~~~^~~ | | | int
s196972685
p02265
C++
#include "bits/stdc++.h" using namespace std; 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=nil; } void printLis...
a.cc: In function 'int main()': a.cc:72:33: error: expected primary-expression before '>' token 72 | if(strlen(com)==>6){ | ^
s735614328
p02265
C++
#include<iostream> #include<list> #include<string> using namespace std; int main(){ list<int>l; int n; scanf_s("%d", &n); for (int i = 0; i < n; i++){ string s; scanf_s("%s", s); if (s == "deleteFirst")l.pop_front(); else if (s == "deleteLast")l.pop_back(); else if (s == "insert") { int k; scanf_s("%d", &...
a.cc: In function 'int main()': a.cc:7:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | int n; scanf_s("%d", &n); | ^~~~~~~ | scanf
s593376563
p02265
C++
#include<iostream> #include<list> #include<string> using namespace std; int main(){ list<int>l; int n; scanf_s("%d", &n); for (int i = 0; i < n; i++){ string s; scanf_s("%s", s); if (s == "deleteFirst")l.pop_front(); else if (s == "deleteLast")l.pop_back(); else if (s == "insert") { int k; scanf_s("%d", &...
a.cc: In function 'int main()': a.cc:7:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | int n; scanf_s("%d", &n); | ^~~~~~~ | scanf
s139741576
p02265
C++
#include<iostream> #include<list> #include<string> using namespace std; int main(){ list<int>l; int n; scanf_s("%d", &n); for (int i = 0; i < n; i++){ string s; scanf_s("%s", s); if (s == "deleteFirst")l.pop_front(); else if (s == "deleteLast")l.pop_back(); else if (s == "insert") { int k; scanf_s("%d", &...
a.cc: In function 'int main()': a.cc:7:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | int n; scanf_s("%d", &n); | ^~~~~~~ | scanf
s749680042
p02265
C++
#include<iostream> #include<list> #include<string> using namespace std; int main(){ list<int>l; int n; cin >> n; for (int i = 0; i < n; i++){ string s; scanf_s("%s", s); if (s == "deleteFirst")l.pop_front(); else if (s == "deleteLast")l.pop_back(); else if (s == "insert") { int k; scanf_s("%d", &k); l....
a.cc: In function 'int main()': a.cc:9:27: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | string s; scanf_s("%s", s); | ^~~~~~~ | scanf
s502100993
p02265
C++
#include<stdio.h> #include<algorithm> #include<iostream> 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 insert(int key){ Node *x = (Node *)malloc(sizeof(Node)); x->key = key; x->next = nil...
a.cc: In function 'Node* listSearch(int)': a.cc:32:30: error: expected ';' before '}' token 32 | cur=cur->next | ^ | ; 33 | } | ~ a.cc: In function 'int main()': a.cc:63:32: error: 'key...
s829851328
p02265
C++
#include<stdio.h> #include<algorithm> #include<iostream> #include<stdlib.h> 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 insert(int key){ Node *x = (Node *)malloc(sizeof(Node)); x->key = ...
a.cc: In function 'int main()': a.cc:64:32: error: 'key' was not declared in this scope; did you mean 'key_t'? 64 | insert(key); | ^~~ | key_t a.cc:68:29: error: 'strlen' was not declared in this scope 68 | ...
s774106310
p02265
C++
#include<stdio.h> #include<algorithm> #include<iostream> #include<stdlib.h> 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 insert(int key){ Node *x = (Node *)malloc(sizeof(Node)); x->key = ...
a.cc: In function 'int main()': a.cc:68:29: error: 'strlen' was not declared in this scope 68 | if (strlen(com)>6){ | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<st...
s852019414
p02265
C++
#include <iostream> #include <list> using namespace std; int main(){ int n, x; string command; list<int> lst; cin >> n; while (n-- > 0) { cin >> command; if (command == "insert") { cin >> x; lst.push_front(x); } else if (command == "delete") { cin >> x; for (auto itr = lst.begin(); itr != ...
a.cc: In function 'int main()': a.cc:36:9: error: 'for_each' was not declared in this scope 36 | for_each(next(lst.cbegin()), lst.cend(), [](int x){cout << ' ' << x;}); | ^~~~~~~~
s926206278
p02265
C++
#include <iostream> #include <list> using namespace std; int main(){ int n, x; string command; list<int> lst; cin >> n; while (n-- > 0) { cin >> command; if (command == "insert") { cin >> x; lst.push_front(x); } else if (command == "delete") { cin >> x; for (auto itr = lst.begin(); itr != ...
a.cc: In function 'int main()': a.cc:36:9: error: 'for_each' was not declared in this scope 36 | for_each(next(lst.cbegin()), lst.cend(), [](int x){cout << ' ' << x;}); | ^~~~~~~~
s939227355
p02265
C++
#include <iostream> #include <list> using namespace std; int main(){ int n, x; string command; list<int> lst; cin >> n; while (n-- > 0) { cin >> command; if (command == "insert") { cin >> x; lst.push_front(x); } else if (command == "delete") { cin >> x; for (auto itr = lst.begin(); itr != ...
a.cc: In function 'int main()': a.cc:36:9: error: 'for_each' was not declared in this scope 36 | for_each(next(lst.cbegin()), lst.cend(), [](int x){cout << ' ' << x;}); | ^~~~~~~~
s042833102
p02265
C++
#include <iostream> #include <list> using namespace std; int main(){ int n, x; string command; list<int> lst; cin >> n; while (n-- > 0) { cin >> command; if (command == "insert") { cin >> x; lst.push_front(x); } else if (command == "delete") { cin >> x; for (auto itr = lst.begin(); itr != ...
a.cc: In function 'int main()': a.cc:36:14: error: 'for_each' is not a member of 'std' 36 | std::for_each(next(lst.cbegin()), lst.cend(), [](int x){cout << ' ' << x;}); | ^~~~~~~~
s002934986
p02265
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #include<assert.h> #include<ctime> #include<cstdlib> #include<numeric> #include<t...
a.cc: In function 'int main()': a.cc:65:39: error: expected '}' at end of input 65 | cout<<" "<<*l.begin(); | ^ a.cc:64:26: note: to match this '{' 64 | while(!l.empty()){ | ^ a.cc:65:39: error: expected '}' at end ...
s242734949
p02265
C++
#include<iostream> #include<vector> #include<string> #include<algorithm> #include<map> #include<set> #include<utility> #include<cmath> #include<cstring> #include<queue> #include<stack> #include<cstdio> #include<sstream> #include<iomanip> #include<assert.h> #include<ctime> #include<cstdlib> #include<numeric> #include<t...
a.cc: In function 'int main()': a.cc:44:9: error: 'i' was not declared in this scope 44 | REP(i, n) { | ^ a.cc:44:5: error: 'REP' was not declared in this scope 44 | REP(i, n) { | ^~~
s494518892
p02265
C++
#include <stdio.h> #include <stdlib.h> typedef struct node_s node; struct node_s{ int key; node *prev; node *next; }; node *head; void insert(int x){ node *t=malloc(sizeof(node)); t->key=x; t->next=head->next; t->prev=head; if (head->next!=NULL)head->next->prev=t; head->next=t; } void delete(node ...
a.cc: In function 'void insert(int)': a.cc:15:17: error: invalid conversion from 'void*' to 'node*' {aka 'node_s*'} [-fpermissive] 15 | node *t=malloc(sizeof(node)); | ~~~~~~^~~~~~~~~~~~~~ | | | void* a.cc: At global scope: a.cc:22:6: error: expected unqu...
s309190705
p02265
C++
#include<iostream> #include<string> #include<list> using namespace std; list<int> lst; int ins(){ int a; cin >> a; lst.push_front(a); } int del(){ int order; cin >> order; auto itr = lst.begin; int size = lst.size(); int sanshou; for (int i = 0; i < size; i++) { sanshou = *itr; if (sanshou == order){ ...
a.cc: In function 'int ins()': a.cc:10:1: warning: no return statement in function returning non-void [-Wreturn-type] 10 | } | ^ a.cc: In function 'int del()': a.cc:14:24: error: unable to deduce 'auto' from 'lst.std::__cxx11::list<int>::begin' 14 | auto itr = lst.begin; | ~...
s531502004
p02265
C++
#include<iostream> #include<string> #include<list> #include <stdio.h> using namespace std; list<int> lst; int main() { int dataset; scanf_s("%d", &dataset); for (int i = 0; i < dataset; i++) { string order; cin >> order; if (order[0] == 'i') { int a; scanf("%d", &a); lst.push_front(a); } else if (o...
a.cc: In function 'int main()': a.cc:11:22: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 11 | int dataset; scanf_s("%d", &dataset); | ^~~~~~~ | scanf
s177603309
p02265
C++
#include<iostream> #include<string> #include<list> #include <stdio.h> using namespace std; list<int> lst; int main() { int dataset; scanf_s("%d", &dataset); for (int i = 0; i < dataset; i++) { string order; cin >> order; if (order[0] == 'i') { int a; scanf("%d", &a); lst.push_front(a); } else if (o...
a.cc: In function 'int main()': a.cc:11:22: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 11 | int dataset; scanf_s("%d", &dataset); | ^~~~~~~ | scanf
s137617522
p02265
C++
#include <iostream> #include <string> using namespace std; template<typename T> class DoublyLinkedList { private: class Node { public: T val; Node *prev; Node *next; Node(T val, Node *prev, Node *next) : val(val), prev(prev), next(next) {} }; Node *head; Node *tai...
a.cc:19:11: error: bit-field 'tail' has non-integral type 'DoublyLinkedList<T>::Node*' 19 | Node *tail: | ^~~~ a.cc: In member function 'void DoublyLinkedList<T>::insert_node(T)': a.cc:30:13: error: 'tail' was not declared in this scope 30 | tail = head; | ^~~~ a....
s509164848
p02265
C++
#include<stdio.h> #include<iostream> #include<algorithm> #include<stdlib.h> #include<string,h> 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 insert(int key){ Node *x = (Node *)malloc(sizeof(...
a.cc:5:9: fatal error: string,h: No such file or directory 5 | #include<string,h> | ^~~~~~~~~~ compilation terminated.
s868795361
p02265
C++
#include<stdio.h> #include<iostream> #include<algorithm> #include<stdlib.h> #include<string.h> 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 insert(int key){ Node *x = (Node *)malloc(sizeof(...
a.cc: In function 'void deleteKey(int)': a.cc:54:35: error: expected ')' before ';' token 54 | deleteNode(listSearch(key);) | ~ ^ | ) a.cc:54:36: error: expected primary-expression before ')' token 54 | deleteNode(listSe...
s189302737
p02265
C++
#include<stdio.h> #include<iostream> #include<algorithm> #include<stdlib.h> #include<string,h> 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 insert(int key){ Node *x = (Node *)malloc(sizeof(...
a.cc:5:9: fatal error: string,h: No such file or directory 5 | #include<string,h> | ^~~~~~~~~~ compilation terminated.
s119759331
p02265
C++
#include<stdio.h> #include<iostream> #include<algorithm> #include<stdlib.h> #include<string.h> 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 insert(int key){ Node *x = (Node *)malloc(sizeof(...
a.cc: In function 'int main()': a.cc:73:40: error: type 'int' argument given to 'delete', expected pointer 73 | delete(key); | ~^~~~
s192580456
p02265
C++
#include<iostream> #include<string> using namespace std; class LIST { public: LIST(){}; ~LIST() {}; void Insert(int val); LIST* Search(int val); void Delete(LIST* l); void DeleteFirst(); void DeleteLast(); void DeleteValue(int val); void Show()const; long int value; LIST* next = NULL; LIST* previous = NUL...
a.cc: In function 'int main()': a.cc:32:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 32 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s439019739
p02265
C++
#include<iostream> #include<string> #include<stdio.h> using namespace std; class LIST { public: LIST(){}; ~LIST() {}; void Insert(int val); LIST* Search(int val); void Delete(LIST* l); void DeleteFirst(); void DeleteLast(); void DeleteValue(int val); void Show()const; long int value; LIST* next = NULL; LI...
a.cc: In function 'int main()': a.cc:33:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 33 | scanf_s("%d", &n); | ^~~~~~~ | scanf
s439617489
p02265
C++
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <stack> #include <cstdlib> #include <cstdio> #include <string> using namespace std; typedef struct Node { Node *prev, *next; int key; } Node; Node *nil; Node* listSearch(int key) { Node *cur = nil->next; while ( cur ...
a.cc: In function 'int main()': a.cc:85:18: error: 'strlen' was not declared in this scope 85 | if ( strlen(com) > 6 ) { | ^~~~~~ a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include <cstdio> +++ |+#in...
s978499231
p02265
C++
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <stack> #include <cstdlib> #include <cstdio> #include <string> using namespace std; typedef struct Node { Node *prev, *next; int key; } Node; Node *nil; Node* listSearch(int key) { Node *cur = nil->next; while ( cur ...
a.cc: In function 'int main()': a.cc:85:18: error: 'strlen' was not declared in this scope 85 | if ( strlen(com) > 6 ) { | ^~~~~~ a.cc:8:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 7 | #include <cstdio> +++ |+#in...
s679310684
p02265
C++
#include<iostream> #include<string> using namespace std; class Node{ int data; Node* prev; Node* next; public: Node(){ data = 0; } Node(int x, Node* p, Node* n){ data = x; prev = p; next = n; } void SetPrev(Node* p){ prev = p; } void SetNext(Node* n){ next = n; } Node* GetPrev(){ retur...
a.cc:86:10: error: expected '}' at end of input 86 | } | ^ a.cc:40:17: note: to match this '{' 40 | class LinkedList{ | ^ a.cc:86:10: error: expected unqualified-id at end of input 86 | } | ^
s441229692
p02265
C++
#include "bits/stdc++.h" using namespace std; #ifdef _DEBUG #include "dump.hpp" #else #define dump(...) #endif //#define int long long #define rep(i,a,b) for(int i=(a);i<(b);i++) #define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--) #define all(c) begin(c),end(c) const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f...
a.cc:21:18: error: declaration of template parameter 'T' shadows template parameter 21 | template<typename T> | ^~~~~~~~ a.cc:19:10: note: template parameter 'T' declared here 19 | template<typename T> | ^~~~~~~~
s647144012
p02265
C++
#include<iostream> using namespace std; class Node{ public: Node* prev; Node*next; int data; Node(){ prev=0; next=0; data=0; } } class List{ private: Node head; public: List(){ head.prev=&head; head.next=&head; } int insert(int x); int del(int x); int deleteFirst(); int deleteLast(); void prin...
a.cc:14:2: error: expected ';' after class definition 14 | } | ^ | ; a.cc: In member function 'int List::insert(int)': a.cc:38:16: error: 'nead' was not declared in this scope; did you mean 'head'? 38 | Node*r=nead.next; | ^~~~ | head a.cc: At global...
s902531758
p02265
C++
#include<iostream> using namespace std; //NODE????????? class Node{ public: Node* prev; Node* next; int data; Node(){prev=0;next=0;data=0;} }; //List????????? class List{ private: Node head; public: List(){head.prev=&head.next=&head;} int insert(int x); int del(int x); int deleteFirst(); int deleteLast()...
a.cc: In constructor 'List::List()': a.cc:18:19: error: lvalue required as left operand of assignment 18 | List(){head.prev=&head.next=&head;} | ^~~~~~~~~~ a.cc: In member function 'int List::insert(int)': a.cc:28:11: error: 'nwe' was not declared in this scope 28 | Node* p= nwe Node(); ...
s406798661
p02265
C++
#include"stdafx.h" #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 cu...
a.cc:1:9: fatal error: stdafx.h: No such file or directory 1 | #include"stdafx.h" | ^~~~~~~~~~ compilation terminated.
s059905610
p02265
C++
#include"stdafx.h" #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 cu...
a.cc:1:9: fatal error: stdafx.h: No such file or directory 1 | #include"stdafx.h" | ^~~~~~~~~~ compilation terminated.
s829284738
p02265
C++
#include"stdafx.h" #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 cu...
a.cc:1:9: fatal error: stdafx.h: No such file or directory 1 | #include"stdafx.h" | ^~~~~~~~~~ compilation terminated.
s096055103
p02265
C++
#include"stdafx.h" #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 cu...
a.cc:1:9: fatal error: stdafx.h: No such file or directory 1 | #include"stdafx.h" | ^~~~~~~~~~ compilation terminated.
s849999656
p02265
C++
#include"stdafx.h" #include<stdio.h> #include<stdlib.h> #include<string.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; } retur...
a.cc:2:9: fatal error: stdafx.h: No such file or directory 2 | #include"stdafx.h" | ^~~~~~~~~~ compilation terminated.
s675812012
p02265
C++
#include"stdafx.h" #include<cstdio.h> #include<cstdlib.h> #include<cstring.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; } re...
a.cc:2:9: fatal error: stdafx.h: No such file or directory 2 | #include"stdafx.h" | ^~~~~~~~~~ compilation terminated.
s044240983
p02265
C++
#include"stdafx.h" #include<stdio.h> #include<stdlib.h> #include<string.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...
a.cc:1:9: fatal error: stdafx.h: No such file or directory 1 | #include"stdafx.h" | ^~~~~~~~~~ compilation terminated.
s531002216
p02265
C++
/** * ???????????£???????????? ??\?????????????????????????????????????????£???????????????????£?????????????????????? insert x: ??£?????????????????????????????? x ?????????????´?????¶?????¶??????? delete x: ?????? x ??????????????????????´??????£????????????????????????????????????????????????????´?????????¨???????...
a.cc: In function 'void printList(const std::__cxx11::list<unsigned int>&)': a.cc:64:18: error: 'ostream_iterator' is not a member of 'std' 64 | std::ostream_iterator<unsigned int>(oss, " ")); | ^~~~~~~~~~~~~~~~ a.cc:60:1: note: 'std::ostream_iterator' is defined in header '<iterat...
s510835120
p02265
C++
/** * ???????????£???????????? ??\?????????????????????????????????????????£???????????????????£?????????????????????? insert x: ??£?????????????????????????????? x ?????????????´?????¶?????¶??????? delete x: ?????? x ??????????????????????´??????£????????????????????????????????????????????????????´?????????¨???????...
a.cc: In function 'int main(int, const char**)': a.cc:89:27: error: no matching function for call to 'find(std::__cxx11::list<unsigned int>::iterator, std::__cxx11::list<unsigned int>::iterator, unsigned int&)' 89 | auto itr = std::find(List.begin(), List.end(), x); | ~~~~~~~~~^~~~~~~~~~...
s712529103
p02265
C++
#include<iostream> using namespace std; class Node{ public: Node* prev; Node*next; int data; Node(){prev=0;next=0;date=0;} }; class List{ private: Node head; public: List(){head.prev=&head;head.next=&head;} int insert(int x); int del(int x); int deleteFirst(); int deleteLast(); void print(); }; int List::...
a.cc: In constructor 'Node::Node()': a.cc:9:30: error: 'date' was not declared in this scope; did you mean 'data'? 9 | Node(){prev=0;next=0;date=0;} | ^~~~ | data a.cc: In member function 'int List::del(int)': a.cc:63:22: error: qualified...
s102397418
p02265
C++
#include<iostream> using namespace std; class Node{ public: Node* prev; Node* next; int data; Node(){prev=0;next=0;data=0;} }; class List{ private: Node head; public: List(){head.prev=&head;head.next=&head;} int insert(int x); int del(int x); int deleteFirst(); int deleteLast(); void print(); }; int List:...
a.cc: In member function 'int List::del(int)': a.cc:63:22: error: qualified-id in declaration before '(' token 63 | int List::deleteFirst() | ^ a.cc:82:21: error: qualified-id in declaration before '(' token 82 | int List::deleteLast() | ^ a.cc:99:17: error: qu...
s971783569
p02265
C++
#include<iostream> using namespace std; class Node{ public: Node* prev; Node* next; int data; Node(){prev=0;next=0;data=0;} }; class List{ private: Node head; public: List(){head.prev=&head;head.next=&head;} int insert(int x); int del(int x); int deleteFirst(); int deleteLast(); void print(); }; int List:...
a.cc:113:1: error: expected declaration before '}' token 113 | } | ^
s322089382
p02265
C++
#include <iostream> #include <cassert> #include <stdlib.h> #include <stdio.h> // #include <queue> #define INF 922337203685477580 typedef long long ll; using namespace std; struct List_t { ll key; struct List_t* prev; struct List_t* next; }; typedef struct List_t List; List *head; void insert(ll x) { List *l...
a.cc: In function 'int main()': a.cc:68:9: error: 'strcmp' was not declared in this scope 68 | if (strcmp("insert", cmd)) { | ^~~~~~ a.cc:4:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include <stdlib.h> +++ |+#include <cstri...
s801098442
p02265
C++
#include <cstdio> #include <cstdlib> #include <cstring> typedef struct node { int key; Node *prev, *next; } N; N *nil; void init() { nil = (N *)malloc(sizeof(N)); nil->next = nil; nil->prev = nil; } N* listSearch(int key) { N *cur = nil->next; while ( cur != nil && cur->key != key ) { cur = cur->n...
a.cc:7:3: error: 'Node' does not name a type; did you mean 'node'? 7 | Node *prev, *next; | ^~~~ | node a.cc: In function 'void init()': a.cc:14:8: error: 'N' {aka 'struct node'} has no member named 'next' 14 | nil->next = nil; | ^~~~ a.cc:15:8: error: 'N' {aka 'struct node'} has...
s051127966
p02265
C++
42 free(t); #include <cstdio> #include <cstdlib> #include <cstring> typedef struct node { int key; node *prev, *next; } N; N *nil; void init() { nil = (N *)malloc(sizeof(N)); nil->next = nil; nil->prev = nil; } N* listSearch(int key) { N *cur = nil->next; while ( cur != nil && cur->key != key ) { ...
a.cc:1:2: error: expected unqualified-id before numeric constant 1 | 42 free(t); | ^~ a.cc: In function 'int main()': a.cc:82:9: error: 'deleteKey' was not declared in this scope; did you mean 'deletekey'? 82 | deleteKey(key); nd++; | ^~~~~~~~~ | deletekey a.cc:88:3:...
s738910134
p02265
C++
#include <cstdio> #include <cstdlib> #include <cstring> typedef struct node { int key; node *prev, *next; } N; N *nil; void init() { nil = (N *)malloc(sizeof(N)); nil->next = nil; nil->prev = nil; } N* listSearch(int key) { N *cur = nil->next; while ( cur != nil && cur->key != key ) { cur = cur->n...
a.cc: In function 'int main()': a.cc:81:20: error: invalid conversion from 'int' to 'N*' {aka 'node*'} [-fpermissive] 81 | deleteNode(key); nd++; | ^~~ | | | int a.cc:38:20: note: initializing argument 1 of 'void deleteNode(N*)' ...
s443301866
p02265
C++
#include<iostream> using namespace std; class Node{ public: Node* prev; Node* next; int data; Node(){ prev=0; next=0; data=0; } }; class LinkedList{ private: Node head; public: LinkedList(){ head.prev=&head; head.next=&head; } int inseart(int x); int del(int x); int deleteFirst...
a.cc:31:5: error: 'List' has not been declared 31 | int List::insert(int x){ | ^~~~ a.cc: In function 'int insert(int)': a.cc:36:18: error: 'head' was not declared in this scope 36 | Node* q=&head; | ^~~~ a.cc: At global scope: a.cc:46:5: error: 'List' has not been declare...
s687061868
p02265
C++
#include<iostream> using namespace std; class Node{ public: Node* prev; Node* next; int data; Node(){ prev=0; next=0; data=0; } }; class List{ private: Node head; public: LinkedList(){ head.prev=&head; head.next=&head; } int inseart(int x); int del(int x); int deleteFirst(); ...
a.cc:20:17: error: ISO C++ forbids declaration of 'LinkedList' with no type [-fpermissive] 20 | LinkedList(){ | ^~~~~~~~~~ a.cc: In member function 'int List::LinkedList()': a.cc:23:17: warning: no return statement in function returning non-void [-Wreturn-type] 23 | ...
s050807490
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("%d", &x); v.push_front(x); } else if ( com[6] == 'L' ) { ...
a.cc: In function 'int main()': a.cc:33:31: error: expected ';' before '==' token 33 | for ( list<int>::iterator it == v.begin(); it != v.end(); it++ ) { | ^~~ | ; a.cc:33:32: error: expected primary-expression before '==' token 33 | for ...
s753989540
p02265
C++
int main() { int N; int d; char command[20]; scanf("%d",&N); for(int i=0;i<N;i++){ scanf("%s",command); if(command[0]=='i'){ scanf("%d",&d); L.push_front(d); } else if(command[6]=='F'){ L.pop_front(); } else if(command[6]=='L'){ L.pop_back(); } else if(command[...
a.cc: In function 'int main()': a.cc:6:9: error: 'scanf' was not declared in this scope 6 | scanf("%d",&N); | ^~~~~ a.cc:11:20: error: 'L' was not declared in this scope 11 | L.push_front(d); | ^ a.cc:15:20: error: 'L' was not declared in this sco...
s247415320
p02265
C++
#include<iostream> #include<string> #include<cstdlib> using namespace std; struct Node { int key; Node *prev, *next; }; Node* nil; void initialize() { nil = new Node; nil->next = nil; nil->prev = nil; } void insert(int key) { Node* n = new Node; n->key = key; n->next = nil->next; n->prev = nil; n->next->...
a.cc: In function 'int main()': a.cc:91:29: error: 'strlen' was not declared in this scope 91 | if (strlen(command) > 6) { | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #inc...
s372699191
p02265
C++
#include<iostream> #include<string> #include<cstdlib> using namespace std; struct Node { int key; Node *prev, *next; }; Node* nil; void initialize() { nil = new Node; nil->next = nil; nil->prev = nil; } void insert(int key) { Node* n = new Node; n->key = key; n->next = nil->next; n->prev = nil; n->next->...
a.cc: In function 'int main()': a.cc:91:29: error: 'strlen' was not declared in this scope 91 | if (strlen(command) > 6) { | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #inc...
s471471098
p02265
C++
#include <iostream> #include <string> using namespace std; struct node{ int x; node* prev,*next; }; node *head; void init(){ head=new node(); head->next=head; head->prev=head; } void insertnode(int key){ node *n=new node(); n->x=key; n->next=head->next; head->next->prev=n; n...
a.cc: In function 'int main()': a.cc:78:16: error: 'strlen' was not declared in this scope 78 | if(strlen(operate)>6){ | ^~~~~~ a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include <iostream> +++ |+#incl...
s575236326
p02265
C++
int n; cin>>n; int i,j; for(i=0;i<n;i++){ string operate; int key; cin>>operate>>key; if(operate=="insert"){ insertnode(key); }else{ if(operate.length()>6){ if(operate[6]=='F')deleteFirst(); if(operate[6]=='...
a.cc:3:5: error: 'cin' does not name a type 3 | cin>>n; | ^~~ a.cc:5:5: error: expected unqualified-id before 'for' 5 | for(i=0;i<n;i++){ | ^~~ a.cc:5:13: error: 'i' does not name a type 5 | for(i=0;i<n;i++){ | ^ a.cc:5:17: error: 'i' does not name a type ...
s323204540
p02265
C++
#include <iostream> #include <string> #incldue <stdio.h> using namespace std; struct node{ int x; node* prev,*next; }; node *head; void init(){ head=new node(); head->next=head; head->prev=head; } void insertnode(int key){ node *n=new node(); n->x=key; n->next=head->next; head->n...
a.cc:3:2: error: invalid preprocessing directive #incldue; did you mean #include? 3 | #incldue <stdio.h> | ^~~~~~~ | include
s526154355
p02265
C++
#include <iostream> #include <list> #include <algorithm> using namespace std; int main() { int q, x; char com[20]; list<int> v; list<int>::iterator it; 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') ...
a.cc: In function 'int main()': a.cc:30:48: error: no matching function for call to 'std::__cxx11::list<int>::erase(int&)' 30 | v.erase(x); | ~~~~~~~^~~ In file included from /usr/include/c++/14/list:66, from a.cc:...
s836397290
p02265
C++
#define _USE_MATH_DEFINES #include<cmath> #include<iostream> #include<iomanip> #include<algorithm> #include<vector> #include<map> #include<stack> #include<queue> #include<string> #include<utility> #include<list> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; char s[15]...
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:13:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include<list>...
s014465049
p02265
C++
#define _USE_MATH_DEFINES #include<cmath> #include<iostream> #include<iomanip> #include<algorithm> #include<vector> #include<map> #include<stack> #include<queue> #include<string> #include<utility> #include<list> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; char s[15]...
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:13:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 12 | #include<list>...
s354738502
p02265
C++
#define _USE_MATH_DEFINES #include<cmath> #include<cstdio> #include<iostream> #include<iomanip> #include<algorithm> #include<vector> #include<map> #include<stack> #include<queue> #include<string> #include<utility> #include<list> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin ...
a.cc: In function 'int main()': a.cc:30:26: error: 'strlen' was not declared in this scope 30 | else if (strlen(s) == 6) { | ^~~~~~ a.cc:14:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 13 | #include<list>...
s434013005
p02265
C++
#include <iostream> #include <string> #include <list> #include <cassert> struct Proc{ std::string meirei; int value; } typedef std::list<int> IList; void input(IList& ilist); int output(const IList& vec); int main() { std::cin.tie(0);//??\?????????????????? std::ios::sync_with_stdio(false); IList resu...
a.cc:11:24: error: invalid declarator before 'IList' 11 | typedef std::list<int> IList; | ^~~~~ a.cc:13:6: error: variable or field 'input' declared void 13 | void input(IList& ilist); | ^~~~~ a.cc:13:12: error: 'IList' was not declared in this scope 13 | void input(ILis...
s135851261
p02265
C++
#include <stdio.h> int N; char inst[12]; class Node { public: Node(); int key; Node* p; Node* n; }; Node::Node() { p = NULL; n = NULL; } class LinkedList { public: LinkedList(); void insertKey(int key); void deleteKey(int key); void deleteFirst(void); void deleteLast(void...
a.cc:112:12: warning: missing terminating " character 112 | printf("\n); | ^ a.cc:112:12: error: missing terminating " character 112 | printf("\n); | ^~~~~ a.cc: In function 'int main()': a.cc:113:5: error: expected primary-expression before 'return' 113 | return 0; ...
s405706003
p02265
C++
#include <cassert> #include <cstdio> #include <string> class TDllist { int* FList; //[4000000]; int FBegin; int FEnd; public: TDllist() { FList = new int[4000000]; FBegin = 2000000; FEnd = 2000000; } ~TDllist() { delete[] FList; } void Insert(int...
a.cc: In function 'int main()': a.cc:66:14: error: 'gets' is not a member of 'std'; did you mean 'getc'? 66 | std::gets(com); | ^~~~ | getc
s178675112
p02265
C++
#include<iostream> #include<algorithm> #include<cstdio> #include<cstdlib> #include<vector> #include<string> #include<sstream> #include<cmath> #include<numeric> #include<map> #include<stack> #include<queue> #include<list> using namespace std; int inf = 1000000000; int main(void) { int n; cin >> n; list<int> l; ...
a.cc: In function 'int main()': a.cc:47:23: error: continue statement not within a loop 47 | if( l.size() == 0 ) continue; | ^~~~~~~~
s210416808
p02265
C++
/// // File: double_linked_list.cpp // Author: ymiyamoto // // Created on Fri Jun 30 08:25:34 2017 // #include <cstdint> #include "problems.hpp" using namespace std; struct double_linked_list_t { double_linked_list_t *next; double_linked_list_t *prev; }; struct node_t : double_linked_list_t { uint32_t val; ...
a.cc:10:10: fatal error: problems.hpp: No such file or directory 10 | #include "problems.hpp" | ^~~~~~~~~~~~~~ compilation terminated.
s273223510
p02265
C++
#include<iostream> #include<list> #include<string> using namespace std; int main(){ list<long long>l; long long n; scanf_s("%lld", &n); for (long long i = 0; i < n; i++){ string s; cin >> s; if (s[0] == 'i') { long long k; scanf_s("%lld", &k); l.push_front(k); } else{ if(s.size() == 6){ long long k; scan...
a.cc: In function 'int main()': a.cc:6:40: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 6 | list<long long>l; long long n; scanf_s("%lld", &n); | ^~~~~~~ | scanf
s864894260
p02265
C++
#include<iostream> #include<list> #include<string> using namespace std; int main(){ list<long long>l; long long n; scanf_s("%lld", &n); for (long long i = 0; i < n; i++){ string s; cin >> s; if (s[0] == 'i') { long long k; scanf_s("%lld", &k); l.push_front(k); } else{ if(s.size() == 6){ long long k; scan...
a.cc: In function 'int main()': a.cc:6:40: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 6 | list<long long>l; long long n; scanf_s("%lld", &n); | ^~~~~~~ | scanf
s936565992
p02265
C++
#include<iostream> #include<cstdio> #include<list> #include<string> using namespace std; int main(){ list<long long>l; long long n; scanf_s("%lld", &n); for (long long i = 0; i < n; i++){ string s; cin >> s; if (s[0] == 'i') { long long k; scanf_s("%lld", &k); l.push_front(k); } else{ if(s.size() == 6){ ...
a.cc: In function 'int main()': a.cc:7:40: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | list<long long>l; long long n; scanf_s("%lld", &n); | ^~~~~~~ | scanf
s289234992
p02265
C++
import java.util.*; public class Main { public static void main(String[] args) { Scanner s = new Scanner(System.in); int commandNum = Integer.parseInt(s.nextLine()); List<Integer> array = new ArrayList<Integer>(); for(int i = 0; i < commandNum; i++){ //System.out.println(i); String[] line = s.nextLine(...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main { | ^~~~~~
s814645692
p02265
C++
#include<cstdio> #include<list> #include<algorithm> using namespace std; int main(void) { int q, x; char com[20]; scanf_s("%d", &q); list<int> v; for (int i = 0;i <= q - 1;i++) { scanf_s("%s", com); if (com[0] == 'i') { scanf_s("%d", &x); v.push_front(x); } else if (com[6] == 'L'){ v.pop_back()...
a.cc: In function 'int main()': a.cc:9:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 9 | scanf_s("%d", &q); | ^~~~~~~ | scanf
s603028775
p02265
C++
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<stack> #include<vector> #include<cmath> #include<string> #include<queue> #include<map> #include<cstring> #include<sstream> #include<vector> #include<algorithm> #include<functional> #include<set> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstri...
a.cc: In function 'void insert(int)': a.cc:65:44: error: expected primary-expression before ')' token 65 | node *t = (node*)malloc(sizeof node); | ^ a.cc: In function 'node* searchList(int)': a.cc:57:1: warning: control reaches end of non-void function [-Wretu...
s106657959
p02265
C++
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<stack> #include<vector> #include<cmath> #include<string> #include<queue> #include<map> #include<cstring> #include<sstream> #include<vector> #include<algorithm> #include<functional> #include<set> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstri...
a.cc: In function 'void insert(int)': a.cc:65:44: error: expected primary-expression before ')' token 65 | node *t = (node*)malloc(sizeof node); | ^ a.cc: In function 'node* searchList(int)': a.cc:57:1: warning: control reaches end of non-void function [-Wretu...
s389351402
p02265
C++
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<stack> #include<vector> #include<cmath> #include<string> #include<queue> #include<map> #include<cstring> #include<sstream> #include<vector> #include<algorithm> #include<functional> #include<set> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstri...
a.cc: In function 'void insert(int)': a.cc:65:44: error: expected primary-expression before ')' token 65 | node *t = (node*)malloc(sizeof node); | ^ a.cc: In function 'node* searchList(int)': a.cc:57:1: warning: control reaches end of non-void function [-Wretu...
s045319278
p02265
C++
#include<cstdio> #include<cstdlib> #include<string> 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; } //????????? next??¨prev?????????????????? voi...
a.cc: In function 'int main()': a.cc:80:28: error: 'strlen' was not declared in this scope 80 | if(strlen(com)>6){ | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<stri...
s267082283
p02265
C++
#include<cstdio> #include<cstdlib> #include<string> #include<stdlib> 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; } //????????? next??¨prev?????...
a.cc:4:9: fatal error: stdlib: No such file or directory 4 | #include<stdlib> | ^~~~~~~~ compilation terminated.
s084704078
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: In function 'void printList()': a.cc:33:32: error: expected ';' before ')' token 33 | cur = cur->next); | ^ | ; a.cc: In function 'void deleteKey()': a.cc:54:31: error: 'key' was not declared in this scope; did you mean '...
s458902370
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=nil; } void ...
a.cc: In function 'void deleteNode(Node*)': a.cc:40:12: error: 'struct Node' has no member named 'prov'; did you mean 'prev'? 40 | t->prov->next=t->next; | ^~~~ | prev a.cc: In function 'int main()': a.cc:73:9: error: 'scanfr' was not declared in this scope; did you mean 'sc...
s621120809
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: In function 'void printList()': a.cc:33:32: error: expected ';' before ')' token 33 | cur = cur->next); | ^ | ; a.cc: In function 'void deleteKey()': a.cc:54:31: error: 'key' was not declared in this scope; did you mean '...
s514443084
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: In function 'void deleteKey()': a.cc:54:31: error: 'key' was not declared in this scope; did you mean 'key_t'? 54 | deleteNode(listSearch(key)); | ^~~ | key_t a.cc: In function 'void insert(int)': a.cc:59:19: error: invalid convers...
s630435058
p02265
C++
#include <stdio.h> #include <string.h> #define NUM 100000 typedef struct{ int v[NUM]; int prev[NUM]; int next[NUM]; int first; int last; int free_first; int cnt; } deque; void init(deque *d){ d->first = 0; d->last = 0; d->free_first = 0; d->cnt = 0; d->...
a.cc:78:6: error: expected unqualified-id before 'delete' 78 | void delete(deque *d, int n){ | ^~~~~~ a.cc: In function 'int main()': a.cc:210:19: error: type 'int' argument given to 'delete', expected pointer 210 | delete(&de, x); | ~~~~^~~~
s616424000
p02265
C++
#include<cstdio> #include<list> #include<algorithm> using namespace std; void printList(list<int> v){ int i = 0; for (list<int>::iterator it=v.begin(); it != v.end(); it++){ if (i++) printf(" "); printf("%d", *it); } } int main() { int key, n, i; char com[20]; list<int> v; scanf("%d",&n); for...
a.cc: In function 'int main()': a.cc:24:11: error: 'strlen' was not declared in this scope 24 | if (strlen(com) > 6){ | ^~~~~~ a.cc:4:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 3 | #include<algorithm> +++ |+#include <cstring...
s524933878
p02265
C++
#include<iostream> #include<cstdio> #include<list> #include<algorithm> using namespace std; void printList(list<int> v){ int i = 0; for (list<int>::iterator it=v.begin(); it != v.end(); it++){ if (i++) printf(" "); printf("%d", *it); } } int main() { int key, n, i; char com[20]; list<int> v; sc...
a.cc: In function 'int main()': a.cc:25:11: error: 'strlen' was not declared in this scope 25 | if (strlen(com) > 6){ | ^~~~~~ a.cc:5:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<algorithm> +++ |+#include <cstring...