UVA 10066 - The Twin Towers

Problem PDF

Solution:

#include
#include
#include
#include
#include
#include
#include
#include
#include
#include 
#include 
#include
#define ll long long
#define sc scanf
#define pf printf
#define Pi 2*acos(0.0)
using namespace std;
int i,j,n,m,lcs[2000][2000];
int main()
{
    int a[110],b[110],no=0;

    while(sc("%d",&n)==1)
    {
        sc("%d",&m);
        if(n==0&&m==0)
        break;
        for(i=0;i
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10066/10066.cpp