Cod sursa(job #28113)

Utilizator ProstuStefan-Alexandru Filip Prostu Data 7 martie 2007 15:07:34
Problema A+B Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.71 kb
#include <iostream>
#include <fstream>
#include <string>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>

using namespace std;

bool prim(int x) {
	if ((x & 1) == 0)
		if (x == 2) 
			return true;
		else
			return false;
	else {
		int d, stop = (int) sqrt((double) x);
		for (d = 3; d <= stop; d += 2)
			if (x % d == 0)
				return false;
	}

	return true;
}

int question ()
{
int a=1,b=-1;

a= ( (--a) && (b++) );
a++;
b= ( b || (a--) );

cout<<"("<<a<<","<<b<<")";
return 1;
}

const int NMAX = 1000000;

int A[NMAX];

void ceva(int k) {
	int i, j;

	for (i = 1, j = k; i < j; i <<= 1, j >>= 1);

	A[k] = i;

	if (k < NMAX)
		ceva(k + 1);
	
//	printf("%d\n", k);
}

int main() {
	ceva(1);
	return 0;
}