Search found 1 match

by chien_chien
Sun Nov 01, 2009 1:16 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 319909

Re: If you get WA in problem 100, read me before post!

#include <iostream>

using namespace std;

#define MAX 1000000 // max int for input

// cycle_length_array[i] store the value of int i, init value is 0
int cycle_length_array[MAX];
int generate_cycle_length(int n);
int get_max_cycle_length(int start, int end);

int main()
{
int start = 0;
int ...

Go to advanced search