hiho week 156 register

Ended

Participants:264

Verdict:Accepted
Score:100 / 100
Submitted:2017-07-01 10:44:54

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 <string>
#include <vector>
#include <set>
#include <utility>
#include <algorithm>
using namespace std;
int main() {
    int n,m;
    cin >> n >> m;
    vector<string> s(n);
    for(int i = 0; i < n; i++) {
        cin >> s[i];
    }
    int dx[] = {0,0,1,-1};
    int dy[] = {1,-1,0,0};
    int cnt= 0;
    set<int> sz_cnt;
    set<vector<pair<int,int> > > shapes;
    for(int i = 0; i < n; i++) {
        for(int j = 0; j < m; j++) {
            if(s[i][j]=='#') {
                vector<pair<int,int> > island;
                vector<int> que(n*m*2);
                int qa,qn;
                qa = qn = 0;
                que[qn++] = i;
                que[qn++] = j;
                s[i][j] = '*';
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX