Search found 4 matches
- Tue May 25, 2010 3:24 pm
- Forum: C
- Topic: Fast I/O Using fread() & fwrite
- Replies: 5
- Views: 7336
Re: Fast I/O Using fread() & fwrite
Printf() and Scanf() functions are used for print the sentence in console and input any sentence or value in console respectively. While fread() and fwrite() are used for the file. So there is no common action or event between them. They are totally different things.
- Tue May 25, 2010 3:21 pm
- Forum: Java
- Topic: Terminating Input in Java
- Replies: 2
- Views: 4793
Re: Terminating Input in Java
You are right. This is the perfect code for terminating input. You declared and throw exception at right time and proper place. There is no error. It will work well.
- Tue May 25, 2010 3:18 pm
- Forum: C++
- Topic: Question on execution speed (CPU seconds)
- Replies: 4
- Views: 4609
Re: Question on execution speed (CPU seconds)
I think you have to manage CPU scheduling. It will help to improve the speed of execution.
- Tue May 25, 2010 3:15 pm
- Forum: Volume 108 (10800-10899)
- Topic: 10891 - Game of Sum
- Replies: 33
- Views: 18763
Re: Runtime Error on Problem 10891 - Game of Sum
I think you should recheck this part of your code. In that, there is some mistakes.
int maxSubseqSum(int seq[], int n);
int main(void)
{
int n, total;
ifstream fin("e.in");
assert(fin);
while (fin >> n) {
if (n == 0) break;
for (int i = 0; i < n; i++)
fin >> bet ;
total = maxSubseqSum ...
int maxSubseqSum(int seq[], int n);
int main(void)
{
int n, total;
ifstream fin("e.in");
assert(fin);
while (fin >> n) {
if (n == 0) break;
for (int i = 0; i < n; i++)
fin >> bet ;
total = maxSubseqSum ...