I can't seem to get any program I send by AOL to compile, does anyone else have this problem? It compiles if I send if from my work address though, no problem. Here is my code for the first problem, but for some stupid reason most of the time when I get the confirmation email back it shows up as being blank where the email says Code that I compile:
Here is an example of what I send and what it doesn't seem to like (my ID is hidden, but is sentin the actual email):
/* @JUDGE_ID: ******* 100 C++ "Simple Iteration" */
/* @BEGIN_OF_SOURCE_CODE */
#include<iostream>
using namespace std;
int max(int x, int y) {if (x>y) return x; else return y;}
int min(int x, int y) {if (x<y) return x; else return y;}
int getcycles(int x)
{
int counter=1;
while (x!=1)
{
if (x%2==0)
x/=2;
else
x=x*3+1;
counter++;
}
return counter;
}
int main()
{
int a,b,m;
while (cin>>a>>b)
{
m=-1;
for (int y=min(a,b); y<=max(a,b); y++)
{
m=max(m,getcycles(y));
}
cout<<a<<" "<<b<<" "<<m<<endl;
}
return 0;
}
/* @END_OF_SOURCE_CODE */
Anyone else have problems with AOL?
Moderator: Board moderators
I Faced the Same Problem
I have faced the same problem when I made my first submission to ACM.
You have placed @BEGIN_OF_SOURCE_CODE and @END_OF_SOURCE_CODE inside comments. Remove the comment markers and let them stay as a line.
the first lines will be like
/*@JUDGE_ID: ****** 000 "Whatever"*/
@BEGIN_OF_SOURCE_CODE
#include<stdio.h>
........................
.......................
@END_OF_SOURE_CODE
See if this can help you
You have placed @BEGIN_OF_SOURCE_CODE and @END_OF_SOURCE_CODE inside comments. Remove the comment markers and let them stay as a line.
the first lines will be like
/*@JUDGE_ID: ****** 000 "Whatever"*/
@BEGIN_OF_SOURCE_CODE
#include<stdio.h>
........................
.......................
@END_OF_SOURE_CODE
See if this can help you