UVA 11849 - CD

Problem PDF

Solution:

#include
#include
using namespace std;
int main()
{
    int n,m,a,i,c;
    while(scanf("%d%d",&n,&m)==2)
    {
        if(n==0&&m==0) break;
        c=0;
        mapmp;
        for(i=0;i
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/11849/11849.cpp