Pagini recente » Cod sursa (job #1846897) | Cod sursa (job #1460207) | Cod sursa (job #1000873) | Cod sursa (job #3355469) | Cod sursa (job #3319061)
#include<bits/stdc++.h>
#pragma GCC optimize("Ofast,unroll-loops,inline")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define fast ios_base::sync_with_stdio(0);f.tie(0);g.tie(0);
#define setinf(x) memset(x,0x3f3f3f3f,sizeof(x));
#define set0(x) memset(x,0,sizeof(x));
#define all(x) x.begin(),x.end()
#define pii pair<int,int>
#define INF 0x3f3f3f3f
#define vi vector<int>
#define ll long long
#define vll vector<ll>
#define pb push_back
#define fi first
#define se second
#define DD 100001
#define nl '\n'
using namespace std;
const string file="abc2";
ifstream f(file+".in");
ofstream g(file+".out");
//#define f cin
//#define g cout
char s[10000001];
char t[22];
map<string,int>mp;
int main(){
int r=0;
f.getline(s,1000001);
while (f.getline(t,22)) {
mp[t]++;
if (mp[t]==1) {
char *p=strstr(s,t);
while (p) {
++r;
p=strstr("\0",t);
}
}
}
g<<r;
system("pause");
return 0;
}