hiho week 149 register

Ended

Participants:261

Verdict:Time Limit Exceeded
Score:40 / 100
Submitted:2017-05-07 21:09:19

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 <vector>
#include <bitset>
#include <cmath>
#include <algorithm>
#include <string>
using namespace std;
bool isMatch(string str,string paternStr)
{
    if (paternStr.empty())
    {
        return true;
    }
    str = str.substr(0,paternStr.size());
    if (paternStr.compare(str) == 0)
        return true;
    else
        return false;
}
void pushInStr(string &str,unsigned int num)
{
    bitset<8>temp(num);
    string mStr = temp.to_string();
    str.append(mStr);
}
string celIPAddresses(string str)
{
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX