Category: ACM

12
Mar
2016

UVA 12541-Birthdates Solutions

Took hints from here: http://www.outsbook.com/uva/?page=latest_post&category=-1&id=12541 and https://github.com/morris821028/UVa/blob/master/volume125/12541%20-%20Birthdates.cpp Code: #include<bits/stdc++.h> using namespace std; int main() { //freopen(“in.txt”,”r”,stdin); int n,i;…

06
Mar
2016

UVA Solution 11547 – Automatic Answer

Editorial: Actually I was facing the problem how can make the second digit from the left that…

06
Mar
2016

UVA solution 11455 – Behold my quadrangle

Editorial: we need to read those : https://en.wikipedia.org/wiki/Quadrilateral https://www.mathsisfun.com/quadrilaterals.html And one thing to be remebered that to…

19
Feb
2016

UVA Solutions 10055 – Hashmat the Brave Warrior

#include<bits/stdc++.h> using namespace std; int main() { long long int a,b,diff; while((scanf(“%lld%lld”,&a,&b)!=EOF)) { diff=abs(a-b); printf(“%lld\n”,diff); } return…

19
Feb
2016

SPOJ Solution – TEST – Life, the Universe, and Everything

#include<bits/stdc++.h> using namespace std; int main() { int a,t; while(1){ scanf(“%d”,&a); if(a==42){ break; } else{ printf(“%d\n”,a); }…

07
Feb
2016

UVA 11479 – Is this the easiest problem?

Accepted code: #include<bits/stdc++.h> using namespace std; int main() { int testcases,cases; long a,b,c; scanf(“%d”,&testcases); if(testcases>0 && testcases<20)…