hiho week 101 register

Ended

Participants:397

Verdict:Accepted
Score:100 / 100
Submitted:2016-06-05 00:00:31

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <queue>
using namespace std;
struct Node {
    int x, y;
    Node *up, *down, *left, *right;
} node[10010];
void removeCol(int col) {
    Node *p = &node[col];
    p->right->left = p->left;
    p->left->right = p->right;
    Node *p2 = p->down;
    while (p != p2) {
        Node *p3 = p2->right;
        while (p2 != p3) {
            p3->down->up = p3->up;
            p3->up->down = p3->down;
            p3 = p3->right;
        }
        p2 = p2->down;
    }
}
void recoverCol(int col) {
    Node *p = &node[col];
    p->right->left = p;
    p->left->right = p;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX