Category: UVa

02
Mar
2015

To Carry or not to Carry

Dont forget to use format specifier for unsigned int %u #include<iostream> #include<cstdio> int main() { unsigned int a,b,output;…

26
Feb
2015

11559 – Event Planning

By thinking 24 hr++ I have solved this problem.I got guidance from my friend M.H Riyad also..He…

17
Feb
2015

Uva 11498 – Division of Nlogonia

Solution actually simple…You have to think simple here is the cartesian co ordinate link check here then…

16
Feb
2015

uva 11172 – Relational Operator

#include<stdio.h> int main() { int i,t,a,b; scanf(“%d”,&t); for(i=0;i<t;i++){ scanf(“%d %d”,&a,&b); if(a<b) printf(“<\n”); else if(a>b) printf(“>\n”); else printf(“=\n”);…

09
Apr
2014

UVa Solution – 11827 – Maximum GCD

#include<cstdio> #include<algorithm> using namespace std; int num[100], n; int gcd(int a, int b) { return b ?…

05
Apr
2014

UVa Solution – 11417 – GCD

#include<stdio.h> int main() { int N; while(scanf(“%d”,&N)==1) { if(N==0) break; int G=0,i,j; for(i=1;i<N;i++) { for(j=i+1;j<=N;j++) { G+=GCD(i,j);…