Language: C++

#include <iostream>
#include <string>
using namespace std;
void insert(int);
void _delete(int);
void deleteFirst(void);
void deleteLast(void);
int Empty_que(void);
#define N 1000 + 20
int li[N], pl[N], pl2[N],first, last, blast = 0, cou = 0, now = 0;
//li[] ?????????????????\????????????  pl[i] li[i]????¬????????´?????????????????????\??????????????????
//first ???????????????li[]???????????????????????? list ????????¨?????????????????????li[]????????????????????????
//now ?????¨???????????????
int main(void)
{
	first = 0;
	last = 0;
	int n, x, f;
	cin >> n;
	for (int i = 0; i < n; i++) {
		string command;
		cin >> command;
		if (command == "insert") {
			cin >> x;
			insert(x); 
		}
		if (command == "delete") { 
			cin >> x;
			_delete(x); 
		}
		if (command == "deleteFirst") { deleteFirst(); }
		if (command == "deleteLast") { deleteLast(); }
		f = first;
		cout << command << endl;
		for (int i = 0; i < cou; i++) {
			if (f == last) break;
			f = pl[f];
		}
	}
	for (int i = 0, f = first; i < cou; i++) {
		printf("%d\n", li[f]);
		if (f == last) break;
		f = pl[f];
	}
}
void insert(int a)
{//last?????????
	pl[cou] = first; pl2[cou] = NULL;
	pl2[first] = cou;
	first = cou;
	li[cou] = a;
	cou++; now++;
}
void _delete(int a)
{
	int f, fb, fa;
	f = first;
	for (int i = 0;i < cou; i++) {
		if (a == li[f]) {
			fa = pl[f]; fb = pl2[f];
			pl[fb] = pl[f];
			if (f == last) { last = pl2[f]; }
			else { pl2[pl[f]] = pl2[f]; }
			now--;
			break;
		}
		if (f == last) break;
		f = pl[f];

	}
}
void deleteFirst(void)
{
	pl2[first] = NULL;
	first = pl[first];#include <iostream>
#include <string>
using namespace std;
void insert(int);
void _delete(int);
void deleteFirst(void);
void deleteLast(void);
int Empty_que(void);
#define N 1000 + 20
int li[N], pl[N], pl2[N],first, last, blast = 0, cou = 0, now = 0;
//li[] ?????????????????\????????????  pl[i] li[i]????¬????????´?????????????????????\??????????????????
//first ???????????????li[]???????????????????????? list ????????¨?????????????????????li[]????????????????????????
//now ?????¨???????????????
int main(void)
{
	first = 0;
	last = 0;
	int n, x, f;
	cin >> n;
	for (int i = 0; i < n; i++) {
		string command;
		cin >> command;
		if (command == "insert") {
			cin >> x;
			insert(x); 
		}
		if (command == "delete") { 
			cin >> x;
			_delete(x); 
		}
		if (command == "deleteFirst") { deleteFirst(); }
		if (command == "deleteLast") { deleteLast(); }
		f = first;
		cout << command << endl;
		for (int i = 0; i < cou; i++) {
			if (f == last) break;
			f = pl[f];
		}
	}
	for (int i = 0, f = first; i < cou; i++) {
		printf("%d\n", li[f]);
		if (f == last) break;
		f = pl[f];
	}
}
void insert(int a)
{//last?????????
	pl[cou] = first; 
	pl2[first] = cou;
	first = cou;
	li[cou] = a;
	cou++; now++;
}
void _delete(int a)
{
	int f, fb, fa;
	f = first;
	for (int i = 0;i < cou; i++) {
		if (a == li[f]) {
			fa = pl[f]; fb = pl2[f];
			pl[fb] = pl[f];
			if (f == last) { last = pl2[f]; }
			else { pl2[pl[f]] = pl2[f]; }
			now--;
			break;
		}
		if (f == last) break;
		f = pl[f];

	}
}
void deleteFirst(void)
{
	first = pl[first];
}
void deleteLast(void)
{
	last = pl2[last];
}
int Empty_que(void)
{
	if (now == 0) return 1;
	else return 0;
}


}
void deleteLast(void)
{
	pl[pl2[last]] = NULL;
	last = pl2[last];
}
int Empty_que(void)
{
	if (now == 0) return 1;
	else return 0;
}

Compiler output:
a.cc:75:27: error: stray '#' in program
   75 |         first = pl[first];#include <iostream>
      |                           ^
a.cc: In function 'void insert(int)':
a.cc:48:37: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
   48 |         pl[cou] = first; pl2[cou] = NULL;
      |                                     ^~~~
a.cc: In function 'void deleteFirst()':
a.cc:74:22: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
   74 |         pl2[first] = NULL;
      |                      ^~~~
a.cc:75:28: error: 'include' was not declared in this scope
   75 |         first = pl[first];#include <iostream>
      |                            ^~~~~~~
a.cc:75:45: error: expected primary-expression before '>' token
   75 |         first = pl[first];#include <iostream>
      |                                             ^
a.cc:77:1: error: expected primary-expression before 'using'
   77 | using namespace std;
      | ^~~~~
a.cc:89:1: error: a function-definition is not allowed here before '{' token
   89 | {
      | ^
a.cc:121:1: error: a function-definition is not allowed here before '{' token
  121 | {//last?????????
      | ^
a.cc:129:1: error: a function-definition is not allowed here before '{' token
  129 | {
      | ^
a.cc:147:1: error: a function-definition is not allowed here before '{' token
  147 | {
      | ^
a.cc:151:1: error: a function-definition is not allowed here before '{' token
  151 | {
      | ^
a.cc:155:1: error: a function-definition is not allowed here before '{' token
  155 | {
      | ^
a.cc: In function 'void deleteLast()':
a.cc:164:25: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null]
  164 |         pl[pl2[last]] = NULL;
      |                         ^~~~