-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAtCoder_.cpp
56 lines (42 loc) · 970 Bytes
/
AtCoder_.cpp
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
using ll = long long;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
using vpii = vector<pii>;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("../input.txt", "r", stdin);
freopen("../output.txt", "w", stdout);
#endif
ll n;
cin >> n;
string s, t;
cin >> s >> t;
vi v[30];
vi c(30);
for (int i = 0; i < s.size(); ++i) {
v[s[i] - 'a'].push_back(i);
c[s[i] - 'a']++;
}
for (auto c: t) {
if (v[c - 'a'].empty()) {
cout << "0\n";
return 0;
}
}
auto fun = [&](ll cycle, ll begin, char target, ll count) -> pll {
vi &pos = v[target - 'a'];
};
ll left = 0, right = INF;
while (left < right){
}
return 0;
}