This project is read-only.

内存限制和CPU时间计算怎么处理的?

Feb 20, 2009 at 2:54 PM
我读书的时候在linux平台下开发过OJ系统,内存限制和CPU时间计算是两个难点。你这个如何处理的?
Developer
Feb 25, 2009 at 10:32 AM

.Net(C#)中有函数可用:
UseTime=[YourProcess].TotalProcessorTime.TotalMilliseconds;
UseMemory=[YourProcess].PeakWorkingSet64 >> 10;
单位分别为毫秒和KB.
另外,
CodeLength=[YourCode].Length;

......