Search found 4 matches

by ron2794
Sun Jun 02, 2013 8:24 pm
Forum: Volume 100 (10000-10099)
Topic: 10055 - Hashmat the Brave Warrior
Replies: 166
Views: 45382

10005 : Hashmat army : WA

i am embarassed to get a WA on such an easy question but i don't know why . please check following :

Code: Select all

#include <iostream>
#include <cmath>
using namespace std;

int main(int argc, char *argv[]){
	long long int a,b;
	while(cin >> a >> b){
		cout << abs(b- a) << endl;
	}
	return 0;
}
by ron2794
Fri May 24, 2013 7:19 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 178926

Re: UVA 100 : 3n +1 : Runtime error.

phew, thanx, accepted at last !
AC !
by ron2794
Fri May 24, 2013 7:09 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 178926

Re: UVA 100 : 3n +1 : Runtime error.

i haven't taken care of that, but that is really a stupid input which i am not expecting at all ....

but if that is the case, what we need to do ?
by ron2794
Thu May 23, 2013 7:19 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 178926

UVA 100 : 3n +1 : Runtime error.

Here is my code, can you help me in figuring out why this is a Runtime error ! #include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> using namespace std; int *ar,*arr; int find(unsigned int a,unsigned int u,unsigned int uu){ int n=1; while(a!=1){ if(a<=uu && a>=u && ar[a-u]!=-1...

Go to advanced search