11 / 11
Jan 2015

I'm currently working on the SUBSEQ4 problem (I'm not actually sure whether it's possible within the time limit in Python, but that's another matter). My solution works for all my test cases, but I keep getting NZEC when I submit it. Any ideas what my problem is?

EDIT: Removed
  • created

    Aug '08
  • last reply

    Jan '15
  • 10

    replies

  • 462

    views

  • 7

    users

  • 1

    link

I think that there's something wrong with the input file. Some experimentation shows that there are fewer than the expected 3T+1 lines.

wrong input description i think
this code produces NZEC

for c in range(input()):
    raw_input()
    raw_input()
    raw_input()

this code produces WA

for c in range(input()):
    raw_input()
    raw_input()
raw_input()

and this code produces NZEC

for c in range(input()):
    raw_input()
    raw_input()
raw_input()
raw_input()

so it seems that input looks like:
2
13
2 7 1 8 2 8 1 8 2 8 4 5 9
7
2 47 10047 47 1047 47 47

Thanks for the insight! Although it looks like it's actually:

2

13
2 7 1 8 2 8 1 8 2 8 4 5 9
7
2 47 10047 47 1047 47 47

At least, using that model I get TLE instead of WA or NZEC. laughing Oh well.

Hi,

I've inserted some missing empty lines, now the input data should follow the format in the example.

4 years later

Mam AC Twoim kodem, ale po kilku zmianach.

Przede wszystkim, konstrukcja if(...) else (...) jest Ci zupełnie zbędna w tym zadaniu.
Korzystając z Twojej tablicy, dostaję TLE. Gdy zamiast tego w pętli dałem zwykłe mnożenie *5, program przeszedł.

2 years later

Musisz mieć jakiś błąd w implementacji. Choć z drugiej strony nie za bardzo jest tu gdzie się pomylić. Może gdzieś nie zerujesz liczników pomiędzy testami. Kończą mi się pomysły.

ciało pętli (zmienne long long)
[bbone=c,2206]AC[/bbone]

Ten fragment kodu dostaje AC. Szukaj w pozostałych wierszach.

Oczywiście, pod warunkiem, że wszystkie zmienne są zadeklarowane jako zmienne odpowiedniego typu, co z tego fragmentu nie jest jednoznaczne.