data structure
ポインタ難しいけどこの際listぐらいは実装できるようになろうと思ったら簡単だった(小並)こんな感じでいいのかな? #include <cstdio> #include <cstdlib> using namespace std; struct Node{ Node *prev, *next; int val; }; Node *head, *tail; void init(){ head = tail =</cstdlib></cstdio>…
ポインタ難しいけどこの際listぐらいは実装できるようになろうと思ったら簡単だった(小並)こんな感じでいいのかな? #include <cstdio> #include <cstdlib> using namespace std; struct Node{ Node *prev, *next; int val; }; Node *head, *tail; void init(){ head = tail =</cstdlib></cstdio>…