-
Notifications
You must be signed in to change notification settings - Fork 590
/
Copy pathstrong password.cpp
53 lines (51 loc) · 1.33 KB
/
strong password.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
#include<bits/stdc++.h>
using namespace std;
//Welcome To Hridoy's Code
#define ll long long
#define ull unsigned long long
#define pb push_back
#define em emplace_back
#define ff first
#define ss second
#define endl "\n"
#define N 105
#define all(v) (v.begin(), v.end())
#define rall(v) (v.rbegin(), v.rend())
#define pi acos(-1.0)
#define LCM(LCM_X,LCM_Y) (LCM_X/__gcd(LCM_X,LCM_Y))*LCM_Y
#define FastRead ios_base::sync_with_stdio(0);cin.tie(0); cout.tie(0);
const int MOD = (int)1e9+7;
const int MAX = 1e6;
ll mini(string a,string b)
{
ll dp[N][N];
ll i,j;
for(i=0; i<=a.length(); i++)
{
for(j=0; j<=b.length(); j++)
{
if(i==0 && j==0)
{
dp[i][j]=0;
}
else if(a[i-1]==b[j-1])
{
dp[i][j]=(dp[i-1][j-1])+1;
}
else
{
dp[i][j]=max(dp[i-1][j],dp[i][j-1]);
}
}
}
return a.length()-dp[a.length()][b.length()];
}
int main()
{
FastRead
string s1,s2;
cin>>s1>>s2;
if(s1.size()==s2.size())cout<<"Yes\n";
else cout<<"No\n";
return 0;
}