//Sani buyuk Osman Pasa Plevneden cikmam diyor.
//FatihSultanMehmedHan
//Abdulhamid Han
//Bismillahirrahmanirrahim
//█▀█─█──█──█▀█─█─█
//█▄█─█──█──█▄█─█▄█
//█─█─█▄─█▄─█─█─█─█
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long lo;
typedef pair< lo,lo > PII;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define FOR for(int i=1;i<=n;i++)
#define mid ((start+end)/2)
#define ort ((bas+son)/2)
const lo MAX = -1000000000000000000;
const lo MIN = 1000000000000000000;
const lo inf = 1000000000;
const lo KOK = 100000;
const lo LOG = 30;
const lo li = 500005;
const lo mod = 1000000007;
int n,m,b[li],a[li],k,flag,t;
int cev;
string s[li];
vector<int> v;
int main(void){
fio();
cin>>n;
FOR{
cin>>s[i];
}
FOR{
for(int j=1;j<=n;j++){
if(i==j)continue;
int at=0;
for(int jj=0;jj<(int)s[j].size();jj++){
if(s[j][jj]==s[i][at])at++;
else at=0;
if(at==(int)s[i].size())break;
}
if(at==(int)s[i].size())cev++;
}
}
cout<<cev<<endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
17 ms |
15992 KB |
Output isn't correct |
2 |
Incorrect |
17 ms |
15992 KB |
Output isn't correct |
3 |
Incorrect |
17 ms |
15992 KB |
Output isn't correct |
4 |
Incorrect |
22 ms |
15992 KB |
Output isn't correct |
5 |
Incorrect |
49 ms |
15992 KB |
Output isn't correct |
6 |
Incorrect |
120 ms |
16092 KB |
Output isn't correct |
7 |
Incorrect |
117 ms |
15992 KB |
Output isn't correct |
8 |
Correct |
106 ms |
15988 KB |
Output is correct |
9 |
Execution timed out |
1067 ms |
16120 KB |
Time limit exceeded |
10 |
Execution timed out |
1079 ms |
16120 KB |
Time limit exceeded |
11 |
Execution timed out |
1086 ms |
16120 KB |
Time limit exceeded |
12 |
Execution timed out |
1083 ms |
16120 KB |
Time limit exceeded |
13 |
Execution timed out |
1071 ms |
16120 KB |
Time limit exceeded |
14 |
Execution timed out |
1080 ms |
16120 KB |
Time limit exceeded |
15 |
Execution timed out |
1084 ms |
16120 KB |
Time limit exceeded |
16 |
Execution timed out |
1083 ms |
16248 KB |
Time limit exceeded |
17 |
Execution timed out |
1082 ms |
16248 KB |
Time limit exceeded |
18 |
Execution timed out |
1075 ms |
16120 KB |
Time limit exceeded |
19 |
Execution timed out |
1080 ms |
16120 KB |
Time limit exceeded |
20 |
Execution timed out |
1077 ms |
16120 KB |
Time limit exceeded |