amitgoswami7's blog

By amitgoswami7, 11 years ago, In English

Hi

The code which we submit are being tested on 64bit or 32bit machines ? Does it make any difference in a computationally intensive code if 32 bit or 64 bit is used.

CODE :

#include <ctime>
#include <iostream>
using namespace std;
void test(int end) {
	clock_t startInt = clock();
	int a = 0;
	for (int i = 0; i < end; i++) {
		a++;
	}
	clock_t endInt = clock();
	cout << "int       " << a << " sizeof " << sizeof(int) << " " << (double) (endInt - startInt) / CLOCKS_PER_SEC << endl;

	clock_t startLong = clock();
	long b = 0;
	for (long i = 0; i < end; i++) {
		b++;
	}
	clock_t endLong = clock();
	cout << "long      " << b << " sizeof " << sizeof(long) << " " << (double) (endLong - startLong) / CLOCKS_PER_SEC << endl;

	clock_t startLongLong = clock();
	long long c = 0;
	for (long long i = 0; i < end; i++) {
		c++;
	}
	clock_t endLongLong = clock();
	cout << "long long " << c << " sizeof " << sizeof(long long) << " " << (double) (endLongLong - startLongLong) / CLOCKS_PER_SEC << endl;
}

int main() {
	test(2147483647);
	test(1000000);
}


int 2147483647 sizeof 4 11.965 long 2147483647 sizeof 4 11.716 long long 2147483647 sizeof 8 27.238 int 1000000 sizeof 4 0.015 long 1000000 sizeof 4 0 long long 1000000 sizeof 8 0.016

USING 32 BIT VISTA C++ ECLIPSE CDT WITH CYGWIN

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it

By amitgoswami7, 11 years ago, In English
Hi Guys !

I am very new to programming contests. I have recently started off with codeforces and topcoder . I prefer JAVA or C++.

Can you guys guide me on which IDE you use , if any. 
{I just cannot do coding on VIM and pure text editors.}
I would prefer guidance on Free Tools like **eclipse**. 

I tried :-

**Topcoder** 
-----------------------------------------------
KawigiEdit + C++ + Eclipse CDT + cygwin
Eclipse Coder ( Didn't work out :( )

**Codeforces**
-----------------------------------------------
IDEA IntelliJ CHelper 

As I am not a good programmer I have to debug quite a lot. Hence I prefer a IDE which provides the best interface. I have a tough time in checking **2 dimensional array elements**. 

Oh forgot most important thing ! I am on Windows Vista 32 bit Laptop :(

Which ones do you use ?

I saw a few screencasts on youtube of Chelper being used

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it