Search found 4 matches

by wes
Mon May 21, 2007 8:41 pm
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 77325

Or some tricky test cases would be very usefull.
by wes
Mon May 21, 2007 8:35 pm
Forum: Volume 102 (10200-10299)
Topic: 10267 - Graphical Editor
Replies: 190
Views: 77325

I have been working on this problem for a long time, but I'm getting WA at programming-challenges.com and RTE(11) at acm.uva. I think I saw almost all threads, but I can't get AC. Here is my code:

#include <stdio.h>

typedef struct point_{
int x;
int y;
int visited;
}point;

char image[256][256 ...
by wes
Sat Feb 04, 2006 3:42 pm
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 24085

This is OK whith g++
Don't tell me you passed any compilation with this line (in main() )
for(int i = 0,; i < L; i++)

i really don't know how but...


:~$ g++ -o 299 299.cpp
:~$ ./299 <299.in
Optimal train swapping takes 1 swaps.
Optimal train swapping takes 6 swaps.
Optimal train swapping ...
by wes
Sat Feb 04, 2006 3:12 pm
Forum: Volume 2 (200-299)
Topic: 299 - Train Swapping
Replies: 81
Views: 24085

299. Compile error. why? This is OK whith g++.

Why I'm getting CE, with this code??


/* @JUDGE_ID: ******* 299 C++ */
#include <iostream>
using namespace std;

int Swaps(int L, int carriages[]){
int count(0);

for(int i=L-1; i>0; i--){
for(int j = i; j>0; j--){
if(carriages[j] < carriages[j-1]){
int temp = carriages[j-1];
carriages[j ...

Go to advanced search