[Offer收割]编程练习赛46 register

Ended

Participants:142

Verdict:Time Limit Exceeded
Score:40 / 100
Submitted:2018-01-28 12:57:39

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 <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <stack>
#include <queue>
#include <algorithm>
#include <limits.h>
#include <functional>
#include <string>
using namespace std;
const int N = 100000;
long long n, a, b;
int x[N], y[N];
int res = 0;
unordered_map<int, int> mp;
string s, sa, sb;;
bool flag = false;
void dfs(string& cur, string sb, int step) {
    //if (flag)return;
    if (cur == sb) {
        flag = true;
        res = min(res, step);
        return;
    }
    for (int i = 0; i < n; i++) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX