Search found 13 matches

by cfalcon
Sun Apr 18, 2004 1:22 pm
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 23520

actually never mind...sorry.
by cfalcon
Sun Apr 18, 2004 1:16 pm
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 23520

p147 - have they changed the question?

hi, i had some range problems with this so i checked some earlier posts and it turned out that all answers fit within longint and that the denominations are different from some sample codes posted. but i noticed the output for some inputs are same for both denominations. so has the question changed?...
by cfalcon
Sat Jan 24, 2004 7:07 am
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14493

hi
thanx a lot now it doesn't say compile error anymore but i still can't find where i went wrong accessing elements in the array that are out of bounds. thanx.
by cfalcon
Fri Jan 23, 2004 6:06 am
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14493

[cpp] #include <iostream> #include <sstream> using namespace std; short di[31]; int flip(short n, short s) { n=s+1-n; short i,j; for (i=n,j=1; i>j;j++,i--) { swap(di[j], di ); } return 0; } int main() { short a=0, c=0, j, count=0; char temp[500]; istringstream instream; short i, max=0,n; short cdi[3...
by cfalcon
Thu Jan 22, 2004 7:39 am
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14493

how do i check what error message i got. the judge only says compiler error and memory used and ID number and stuff like that. thanx
by cfalcon
Thu Jan 22, 2004 1:57 am
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14493

hi,
thanx a lot. now it works perfectly on my computer, but it still says compile error. do you think i have to take input from a file? if so...how would i use gets for that...i can only use file inputs when the command 'cin' is involved. thanx a lot.
by cfalcon
Thu Jan 22, 2004 1:57 am
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14493

hi,
thanx a lot. now it works perfectly on my computer, but it still says compile error. do you think i have to take input from a file? if so...how would i use gets for that...i can only use file inputs when the command 'cin' is involved. thanx a lot.
by cfalcon
Wed Jan 21, 2004 8:23 am
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14493

thanx but i'm still having a slight problem. i want to try to make it work by not taking input as string so i did the following: [cpp] while (cin.peek()!='\n') { a++; cin>>di[a]; cdi[a]=di[a]; } cin.getline(temp, 1, '\n'); [/cpp] i hoped to take off the '\n' by reading it in. however, when i run thi...
by cfalcon
Tue Jan 20, 2004 2:57 am
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14493

hi, i get compile error on OJ and on my computer the program compiles fine and runs too but it just keeps on repeating the output...so teh output just keeps on getting printed infinitely and never stops. here is my code: [cpp] #include <iostream> using namespace std; short di[31]; int flip(short n, ...
by cfalcon
Sat Jan 17, 2004 10:47 pm
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14493

thanx.
also about the same problem. it says input is terminated by end of file. so should i loop it like this?

while (!cin.eof())
{
....
....
}

if i do it says compile error.
by cfalcon
Sat Jan 17, 2004 9:13 pm
Forum: Volume 1 (100-199)
Topic: 120 - Stacks of Flapjacks
Replies: 118
Views: 14493

#120

hi,
i have one small question. can the input have more than one pancake with the same diameter? thanx a lot.
by cfalcon
Sat Dec 20, 2003 7:29 pm
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 55619

10070

this program seems to be working fine on my computer but gives me runtime error when i submit. this is my code: [code]#include <iostream> #include <fstream> #include <string> using namespace std; void main() { ifstream fin; ofstream fout; fin.open("myprog.in"); fout.open("myprog.out"); while (!fin.e...
by cfalcon
Fri Dec 19, 2003 12:39 pm
Forum: Volume 100 (10000-10099)
Topic: 10070 - Leap Year or Not Leap Year and ...
Replies: 233
Views: 55619

runtime error

hi, i've just recently registered to this website and i tried to send in a program...#10070...the leap year, huluculu year and the bulukulu year one. however, when i sent it, it said 'Runtime Error (SIGXFSZ)'. what does this mean? and how do i fix it? everything seems to be working on my computer......

Go to advanced search