Search found 3 matches

by a_jain
Fri Jun 11, 2004 2:35 pm
Forum: Volume 5 (500-599)
Topic: 587 - There's treasure everywhere!
Replies: 37
Views: 6929

587 WA

Can somebody tell me why the following code is wrong:

#include<iostream>
#include<vector>
#include<string>
#include<cmath>

using namespace std;

#define PI 3.14159265
#define ANGLE (PI*45/180)

int main()
{

int steps, count = 1;
char d1, d2;
char temp;
cin >> temp;

while(temp != 'E ...
by a_jain
Sun Oct 20, 2002 9:10 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318270

Dont' worry i got my answer.

Don't worry!
by a_jain
Sun Oct 20, 2002 9:01 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 318270

Problem 100! I have no clue why it is wrong.

Hi all,

I have a reply from judge saying:
"Your program has not solved the problem. It ran during 2.120 seconds."

This is my code:


/* @JUDGE_ID: XXXXXXX 100 C++*/

#include<iostream>
using namespace std;

int Cyclelength(int num)
{
int count = 1;

while(num > 1)
{

(num%2 == 1)?num = 3 ...

Go to advanced search