Search found 8 matches

by George
Mon Jul 25, 2005 3:10 pm
Forum: Other words
Topic: Time and Memory usage (G++, WINDOWS)
Replies: 0
Views: 776

Time and Memory usage (G++, WINDOWS)

Hello,
How can I check how much time and memory my program is using?
I am using windows and G++ compiler.
For the time I used some windows API and found a solution, but I don't know what to do with memory.
If there is a program that will work pleas tell me.



Thank you
by George
Sun Jul 13, 2003 12:04 pm
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 26218

I have the same problem. Please help me. [cpp]#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> int k; //Number of boxes int n; //Dimensionality int d[30][10]; //Dimension length [box_number][dimension_number] int o[30]; //Original order numbers int ReadInputSuccess;...
by George
Sat Jul 05, 2003 12:45 pm
Forum: Volume 1 (100-199)
Topic: 103 - Stacking Boxes
Replies: 200
Views: 26218

103, Can't understand it, maybe mistake in the example

Hello, I have created an algorithm that reads the input and stores it in a 30x10 table, then short the dimensions and then short the boxes. However it seams that some boxes have to be removed that does not match, but this doesn't seam to work fine. Here is the C++ program: [cpp]#include <sys/types.h...
by George
Sat Mar 15, 2003 7:24 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 212994

You should consider when min>max.

[cpp]len=len++; [/cpp]
this is not a very good line of code. The following is better:
[cpp]len++;[/cpp]
OR
[cpp]len=len+1;[/cpp]
by George
Sat Mar 15, 2003 5:14 pm
Forum: Volume 1 (100-199)
Topic: 101 - The Blocks Problem
Replies: 635
Views: 56247

101 - Why W.A.? - Tested on many excamples

[cpp]#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> int (*bl)[25] = new int[25][25]; int n; // move 9 onto 1 // InpA = 9 // InpB = 1 // InpC = "move" // InpP = "onto" int InpA, InpB; char *InpC = new char; char *InpP = new char; // void Complet...
by George
Thu Mar 13, 2003 5:22 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 212994

OK. I solved the problem. The trouble was with the input-output.
by George
Wed Mar 12, 2003 4:25 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 212994

[cpp]#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> long i, j, c, r, scan_r; bool sw; long CalculateCycleLength(long n); void ReadInput(void); void DoCalculations(void); void WriteResult(void); void main(void) { scan_r = 2; while (scan_r == 2) { ReadInput(); DoCal...
by George
Tue Mar 11, 2003 10:37 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 212994

Can you help me? What's wrong with the following code. It returns wrong answer. [cpp]#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> int i, j, c, r, scan_r; int CalculateCycleLength(int n); void ReadInput(void); void DoCalculations(void); void WriteResult(void); vo...

Go to advanced search