UVA 10324 - Zeros and Ones

UVA Sep 1, 2020

Problem PDF

Solution:

#include
#include

int main()
{
    char s[1000015];
    int t=1,n,p1,p2,i,c,tem;
    while(scanf("%s",s)==1)
    {
        if(strcmp(s,"\n")==0)
        break;
        scanf("%d",&n);
        printf("Case %d:\n",t++);
        while(n--)
        {
            scanf("%d%d",&p1,&p2);
            if(p1>p2)
            {
            tem=p1;
            p1=p2;
            p2=tem;
            }
            if(p1==p2)
            {
               printf("Yes\n");
               continue;
            }
            for(i=p1;i
https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10324/10324.cpp

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.