This code works on my box, but keeps giving me RTEs.
Any ideas?
#include <iostream>
#define MAX 2000000
using namespace std;
struct Disk {
int totalTime;
int capacity;
};
class DiskCollection {
private:
Disk currentDisk;
int totalTracks;
int diskToWrite;
int qtdDisks;
public ...
Search found 5 matches
- Fri Mar 11, 2011 4:40 pm
- Forum: Volume 4 (400-499)
- Topic: 473 - Raucous Rockers
- Replies: 16
- Views: 9685
- Thu Mar 03, 2011 5:07 am
- Forum: Volume 2 (200-299)
- Topic: 272 - TEX Quotes
- Replies: 136
- Views: 56430
Re: 272 Runtime Error?!
I've just compiled and runned your code and turns out that it works fine in my box.
I even compared your output against my AC'd code's output and they are identical.
Have you searched for any additional input/output to test your code with?
I even compared your output against my AC'd code's output and they are identical.
Have you searched for any additional input/output to test your code with?
- Thu Mar 03, 2011 4:19 am
- Forum: Volume 101 (10100-10199)
- Topic: 10194 - Football (aka Soccer)
- Replies: 121
- Views: 64081
Re: 10194 - Football (aka Soccer)
The code below gives me WA.
I've already did case insensitive string comparisons, but got no joy.
Every given input seems to give me correct answer.
#include <iostream>
#include <algorithm>
#define TEAMNAME 31
#define MAXLINE 70
using namespace std;
struct Team {
int points;
int wins;
int ...
I've already did case insensitive string comparisons, but got no joy.
Every given input seems to give me correct answer.
#include <iostream>
#include <algorithm>
#define TEAMNAME 31
#define MAXLINE 70
using namespace std;
struct Team {
int points;
int wins;
int ...
- Sun Aug 15, 2010 4:35 pm
- Forum: Volume 1 (100-199)
- Topic: 101 - The Blocks Problem
- Replies: 635
- Views: 108633
Re: 101 - Help me understand why i always got Runtime Error
I tested your code and it turns out that the line below contains a blunder.
char cmd[4], param[4];
Since the command can have up to 4 characters, an array of 4 chars is not enough to handle the whole string and the \0 string terminator . It must have 5 chars (or more) in order to do that.
Try ...
char cmd[4], param[4];
Since the command can have up to 4 characters, an array of 4 chars is not enough to handle the whole string and the \0 string terminator . It must have 5 chars (or more) in order to do that.
Try ...
- Sat Aug 14, 2010 10:35 pm
- Forum: Volume 3 (300-399)
- Topic: 341 - Non-Stop Travel
- Replies: 39
- Views: 30239
Got a WA
I tried to do this using FloydWarshall but got no hope. Always WA.
Tried all sample inputs from this board and my code seems to get it right in every attempt.
Can you guys help me?
package volume_iii;
import java.util.Scanner;
public class P341_3747 {
public static void main(String[] args ...
Tried all sample inputs from this board and my code seems to get it right in every attempt.
Can you guys help me?
package volume_iii;
import java.util.Scanner;
public class P341_3747 {
public static void main(String[] args ...