Submission #3555892
Source Code Expand
import sys from collections import Counter f = open('pokemon', 'r') names = [] for line in f: names.append(line) max_length = 0 pokemon = '' for i in range(len(names)): p = [names[i]] start = names[i][-2] shiritori = True count = 1 while shiritori == True: shiritori = False for j in range(len(names)): if i != j and names[j][0] == start and not names[j] in p: count += 1 start = names[j][-2] shiritori = True p.append(names[j]) if count > max_length: max_length = count pokemon = names[i] break print (p) print (pokemon + str(max_length))
Submission Info
Submission Time | |
---|---|
Task | B - Shiritori |
User | vjudge5 |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 732 Byte |
Status | RE |
Exec Time | 21 ms |
Memory | 3444 KB |
Judge Result
Set Name | All | Sample | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 200 | 0 / 0 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
All | max_1, max_2, max_3, max_4, min_1, no1_1, no1_2, no2_1, no2_2, random_1, random_2, sample_01, sample_02, sample_03, sample_04, yes_1, yes_2 |
Sample | sample_01, sample_02, sample_03, sample_04 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
max_1 | RE | 21 ms | 3444 KB |
max_2 | RE | 20 ms | 3316 KB |
max_3 | RE | 20 ms | 3316 KB |
max_4 | RE | 20 ms | 3316 KB |
min_1 | RE | 20 ms | 3316 KB |
no1_1 | RE | 20 ms | 3316 KB |
no1_2 | RE | 20 ms | 3316 KB |
no2_1 | RE | 20 ms | 3316 KB |
no2_2 | RE | 20 ms | 3316 KB |
random_1 | RE | 20 ms | 3316 KB |
random_2 | RE | 20 ms | 3316 KB |
sample_01 | RE | 20 ms | 3316 KB |
sample_02 | RE | 20 ms | 3316 KB |
sample_03 | RE | 20 ms | 3316 KB |
sample_04 | RE | 20 ms | 3316 KB |
yes_1 | RE | 20 ms | 3316 KB |
yes_2 | RE | 20 ms | 3316 KB |