Code Submission Evaluation System Login

Datatähti 2015 loppu

Start:2015-01-29 12:15:00
End:2015-01-29 17:15:00
 

Tasks | Scoreboard | Statistics


CSES - Datatähti 2015 loppu - Results
History
2015-01-29 15:31:5617
2015-01-29 15:30:300
2015-01-29 13:59:100
2015-01-29 13:03:170
Task:Ruudukko
Sender:Dentosal
Submission time:2015-01-29 13:03:17
Language:C++
Status:READY
Score:0

Feedback

groupverdictscore
#1RUNTIME ERROR0
#2RUNTIME ERROR0
#3RUNTIME ERROR0

Test results

testverdicttime (s)group
#1RUNTIME ERROR0.70 / 3.001details
#2RUNTIME ERROR0.52 / 3.001details
#3WRONG ANSWER0.06 / 3.001details
#4WRONG ANSWER0.05 / 3.001details
#5RUNTIME ERROR0.56 / 3.001details
#6RUNTIME ERROR0.54 / 3.002details
#7RUNTIME ERROR0.73 / 3.002details
#8RUNTIME ERROR0.64 / 3.002details
#9WRONG ANSWER0.06 / 3.002details
#10RUNTIME ERROR0.52 / 3.002details
#11RUNTIME ERROR0.57 / 3.003details
#12RUNTIME ERROR0.55 / 3.003details
#13RUNTIME ERROR0.56 / 3.003details
#14RUNTIME ERROR0.55 / 3.003details
#15RUNTIME ERROR0.56 / 3.003details

Code

#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>

using namespace std;

char map[500][500];
int cursor_x = 0;
int cursor_y = 0;


int main() {
	int n;
	string path="";
	string temps;
	cin >> n;


	for (int i=0; i < n; i++) {
		cin >> temps;
		for (int q=0; q < n; ++q) {
			map[i][q] = temps.at(q);
		}
	}

	while (cursor_x < n || cursor_y < n) {
		if (map[cursor_x+1][cursor_y] < map[cursor_x][cursor_y+1]) {
			cursor_x+=1;
		}
		else if (map[cursor_x+1][cursor_y] > map[cursor_x][cursor_y+1]) {
			cursor_y+=1;
		}
		else {
			/* recurse here */
			cursor_x+=1; // fixme
		}
		path += map[cursor_x][cursor_y];
	}

	if (cursor_x == n) {
		while (cursor_y < n) {
			++cursor_y;
			path += map[cursor_x][cursor_y];
		}
	}
	if (cursor_y == n) {
		while (cursor_x < n) {
			++cursor_x;
			path += map[cursor_x][cursor_y];
		}
	}

	cout << path << endl;


	return 0;
}

Test details

Test 1

Group: 1

Verdict: RUNTIME ERROR

input
5
AAAAA
AAAAA
AAAAA
AAAAA
...
view   save

correct output
AAAAAAAAB

view   save

user output
(empty)

Test 2

Group: 1

Verdict: RUNTIME ERROR

input
5
ABABA
BABAB
ABABA
BABAB
...
view   save

correct output
ABABABABA

view   save

user output
(empty)

Test 3

Group: 1

Verdict: WRONG ANSWER

input
5
WRYIU
TWLKH
UJMJC
GRDJW
...
view   save

correct output
WRWJMDJWK

view   save

user output
RWJMDJW

view   save

Test 4

Group: 1

Verdict: WRONG ANSWER

input
5
RUEAE
ZYHHW
KDBPD
DXREW
...
view   save

correct output
RUEAEWDWX

view   save

user output
UEAE

view   save

Test 5

Group: 1

Verdict: RUNTIME ERROR

input
5
SRGYR
MYDOB
GNOVM
SZOZK
...
view   save

correct output
SMGNOOLTU

view   save

user output
(empty)

Test 6

Group: 2

Verdict: RUNTIME ERROR

input
100
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

correct output
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

user output
(empty)

Test 7

Group: 2

Verdict: RUNTIME ERROR

input
100
ABABABABABABABABABABABABABABAB...
view   save

correct output
ABABABABABABABABABABABABABABAB...
view   save

user output
(empty)

Test 8

Group: 2

Verdict: RUNTIME ERROR

input
100
FWOVNYKNMMQCNHJGUYPNEDXGVVGONC...
view   save

correct output
FWDBDECKBHKIACOVUCJGDJOHAYIBHO...
view   save

user output
(empty)

Test 9

Group: 2

Verdict: WRONG ANSWER

input
100
ETGCJABWKMAAEOQXWFFYMDJBMNKMQK...
view   save

correct output
EAARGLBRLHCDHHBPABHDAJBEEBHQBE...
view   save

user output
AARGLBRLHINHHBPABHDAJBEEBHQBEC...
view   save

Test 10

Group: 2

Verdict: RUNTIME ERROR

input
100
GNWMLJNHSBAADUFCSGIZMWHZTVDHNR...
view   save

correct output
GEGOFRDKBNLLEUOPOEQCEFMTKANLNC...
view   save

user output
(empty)

Test 11

Group: 3

Verdict: RUNTIME ERROR

input
500
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

correct output
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
view   save

user output
(empty)

Test 12

Group: 3

Verdict: RUNTIME ERROR

input
500
ABABABABABABABABABABABABABABAB...
view   save

correct output
ABABABABABABABABABABABABABABAB...
view   save

user output
(empty)

Test 13

Group: 3

Verdict: RUNTIME ERROR

input
500
HGADXTSFXYIEMDWMFIVQGHTACFUPYI...
view   save

correct output
HGADEJOGAKPJCRAHTABRSDLAVGBFAG...
view   save

user output
(empty)

Test 14

Group: 3

Verdict: RUNTIME ERROR

input
500
SBLNMAZESQVGWAPZYHQJMQTNGMEZWS...
view   save

correct output
SBLCAMDHILGIDRCIDUNMMAHFYCENOS...
view   save

user output
(empty)

Test 15

Group: 3

Verdict: RUNTIME ERROR

input
500
AOXYXRYFWPYWQDPWXQITLHQQUAYZAJ...
view   save

correct output
AOJLDOAPBGEKSGCNKBUMKAJCCWCOOD...
view   save

user output
(empty)