Festa a sorpresa per Brain-Flak


42

Questa domanda fa parte di una serie di sfide Brain-Flak Birthday progettate per celebrare il primo compleanno di Brain-Flak. Puoi trovare maggiori informazioni sul compleanno di Brain-Flak qui .

Oggi è il primo compleanno di Brain-Flak! Quindi ho pensato che avremmo organizzato una festa di compleanno a sorpresa. Quindi nella tua stampa della lingua preferita

Surprise!
Happy Birthday, Brain-Flak!

(È consentito lo spazio bianco finale)

Come sempre i programmi dovrebbero essere giocati a golf. Tuttavia, poiché i programmi Brain-Flak sono composti da parentesi, non conterà alcuna parentesi nella tua sorgente rispetto a te. (I caratteri ()[]<>{}non contano ai fini del totale dei byte), ma devono essere bilanciati per non alterare Brain-Flak.

Regole

Ecco una ripartizione delle regole

  • Le parentesi nella tua sorgente devono essere bilanciate. Cioè le parentesi del tuo programma devono essere suddivise dalla seguente grammatica:

    S -> SS | (S) | [S] | <S> | {S} | E

    dov'è Ela stringa vuota.

    Ciò significa che una stringa bilanciata è la concatenazione di due stringhe bilanciate, parentesi graffe attorno a una stringa bilanciata o la stringa vuota.

  • Il punteggio di un programma è il numero di byte non parentesi.

  • Il tuo obiettivo dovrebbe essere quello di ridurre al minimo il tuo punteggio in qualsiasi lingua tu scelga.

  • Si applicano le regole standard in modo da poter scrivere un programma completo o una funzione.

  • in caso di pareggio il conteggio dei byte non elaborati funge da pareggio

Ci saranno certamente soluzioni a zero byte in alcune lingue ( Parentesi Hell , Parenthetic , Glypho , Lenguage ). Cerca di trovare il modo di giocare bene nelle lingue in cui questo non è un compito banale.


8
Sorpresa! Buon compleanno Brak-Flak!
Compagno SparklePony,

Deve essere un programma completo o può essere una funzione che restituisce la stringa?
LegionMammal978,

Non ho avuto la "grammatica" (questa è una notazione standard?) Fino a quando non ho detto "tutte le parentesi devono essere bilanciate".
Jonathan Allan,

1
Ci scusiamo per le domande stupide. È ><considerato bilanciato o le parentesi graffe devono essere nell'ordine corretto ( <>)?
Carcigenicato

2
+1 per il CFG. Questo è un ottimo modo per definire "equilibrato".
Brian McCutchon,

Risposte:


22

Python 2 , 39 37 36 34 byte

-1 grazie a dzaima

-2 grazie a Erik the Outgolfer

exec("".join([chr(len(x))for(x)in'()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()())'.split("{}")]))

Provalo online!

Personaggi rilevanti:

exec"".joinchrlenxforxin''.split""

Spiegazione

Questo programma crea la stringa:

print"Surprise!\nHappy Birthday, Brain-Flak!"

Lo fa convertendo una lunga stringa di parentesi in codici carattere. Una volta creata la stringa, la esegue.

Costruisce la corda con lo scheletro:

"".join([chr(len(x))for(x)in'<...>'.split("{}")]))

Questo divide la stringa lungo {}e mappa ogni sezione al codice carattere corrispondente alla sua lunghezza. Possiamo quindi costruire l'intera stringa di parentesi per un costo di zero byte.


1
Invece di spazi, metti in ()giro xper salvare 2.
Erik the Outgolfer

20

Haskell (prima di GHC 8.4), ( 10119 7767 7626 7540 byte), punteggio 15 14 10

(<>)(<><>)(<>)(<<>>)()=(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)(<><>)))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))<<>>((<><>)<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))<<>>(((<>)((<>)((<>)((<>)((<>)(<><>))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))))))))))<<>>((<><>)<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))<<>>(((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)((<>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))<<>>[])))))))))))))))))))))))))))))))))))))
(<>)'y'pred(:)

Provalo online!

L'ultima riga definisce una funzione anonima (<>)'y'pred(:). Chiama con (<>)'y'pred(:)()per produrre la stringa.

Modifica: un enorme grazie a @ Ørjan Johansen per aver suggerito di passare le funzioni di supporto come parametri invece di dichiararle, risparmiando quattro byte di punteggio!

I byte non parentesi sono

=
'Y'pred:

Come funziona?

Una stringa "wxy"in Haskell è zucchero sintattico per una lista di caratteri ['w','x','y'], che è di nuovo zucchero sintattico per la successiva costruzione con l'operatore cons :e l'elenco vuoto: 'w':'x':'y':[]. Definendo (<<>>)=(:)produciamo la stessa stringa scrivendo 'w'<<>>('x'<<>>('y'<<>>[])).

Poiché i caratteri sono ordinati, possiamo calcolare il predecessore di ogni carattere con una funzione chiamata pred. Usando solo il carattere 'y'e pred, la stringa diventa pred(pred 'y')<<>>(pred 'y'<<>>('y'<<>>[])). Definendo (<>)=prede (<><>)='y'possiamo rappresentare la stringa usando solo parentesi bilanciate:
(<>)((<>)(<><>))<<>>((<>)(<><>)<<>>((<><>)<<>>[]))

Tuttavia, alla fine non vogliamo una stringa ma una funzione che restituisca una stringa, quindi definiamo invece il nostro operatore contro (<<>>) x xs ()=x:xs. (Naturalmente con xe xssostituiti da identificatori usando solo parentesi bilanciate:) (<<>>)(<>)(<><>)()=(<>):(<><>). Per di qua,

((<>)((<>)(<><>))<<>>((<>)(<><>)<<>>((<><>)<<>>[])())())

è una funzione di tipo () -> Stringe l'aggiunta di un finale ()produce la stringa originale:

((<>)((<>)(<><>))<<>>((<>)(<><>)<<>>((<><>)<<>>[])())())()

Usando questo metodo otteniamo una soluzione con punteggio 15. Tuttavia, possiamo condensare i tre dichiarazioni in uno dichiarando una funzione che prende quattro argomenti: 'z', pred, (:)e ()per la chiamata.


La seguente funzione encodecodifica una stringa con caratteri più piccoli o uguali 'y'in questo modo: (Perché y? Perché è il carattere più grande "Surprise!\nHappy Birthday, Brain-Flak!"e quindi produce la rappresentazione più breve. Grazie ancora a Ørjan Johansen per averlo sottolineato.)

c x = let l = fromEnum 'y' - fromEnum x  
      in "(" ++ ([1..l]>>"((<>)") ++ "(<><>)" ++ ([1..l]>>")") ++ "<<>>" 
encode s = concatMap c s ++ "[]" ++ ([1..length s-1]>>")()") ++ ")"

Provalo online!


Spiacenti, non ho controllato nuovi post prima di modificare il mio ... e hai ottenuto un altro byte andando nella direzione opposta!
Ørjan Johansen,

Rollback della mia modifica.
Ørjan Johansen,

Poiché in 'z'realtà non si verifica nella stringa dell'obiettivo, penso che sia possibile ridurre l'interruzione del conteggio dei byte utilizzando 'y'invece.
Ørjan Johansen,

1
Ooh, bel trucco, mi chiedevo come renderlo anonimo. Ma questo mi dà un'altra idea: puoi salvare altri 4 byte modificando i parametri delle funzioni di supporto . Vale a dire(<<<>>>)(<><>)(<>)(<<>>)()=...;(<<<>>>)'y'pred(:)
Ørjan Johansen,

1
Uhm, due byte, non quattro. Provalo online!
Ørjan Johansen,

12

Retina , 59-24 = 35 byte


Su{p()se!¶Ha<<>[]i{thd}>,[](a)n-Fl}k!
T`<>()[]{}`\pyri Bra

Provalo online! In confronto, la soluzione noiosa richiede 38 byte.


1
Wow, questo è un metodo di compressione molto intelligente per questa sfida. Avere un +1 :-)
ETHproductions

12

Gelatina , 7 6 byte

“”Lb⁹Ọ

All'interno di “”è necessario inserire l'output di questo programma Jelly:

⁾()Ȯ“cWṪḂÇa'ỴOḞḊʂFGĖƓẋ0Ɗ/⁷ẓƊĖṘḲ"ÇẈW'ⱮḟėıḲ7¿’¡

-1 byte grazie a Jonathan Allan (permesso di trascinare la nuova riga)

Ci sono 53127666317289661939246122975355844970973062889031671423309402549417051416384149‌ 80886139013 (lo chiameremo n) ()tra “”.

Spiegazione :

“” Lb⁹Ọ ḷ “Link principale. Argomenti: 0 "
“” Ḷ “Stringa contenente n coppie di parentesi tonde”
  L ḷ "Prendi la sua lunghezza"
   b⁹ ḷ “Converti in base 256 (ints che rappresentano cifre)”
     Ọ ḷ “Converti codici char in char”


Buona Erik :)
Jonathan Allan,

quindi questo non funziona davvero in pratica, giusto?
Sarge Borsch,

1
@SargeBorsch Practice? Nah, a chi importa della pratica?
Erik the Outgolfer,

11

Lenguage , 0 byte

A soli 10024793746353848520175158940670214213802394805963081469362831141755126591573942436182287015467334956253918417576118983828148929806934751198148656645940502264502520032312455157880058174845907554602116807351044784410936407102892289953027884533102082518964744402664917253792543505897552998982122997648280947470217067174451441654554437678556775097996646071948 byte fatte di parentesi bilanciate.

Programma Python 3 per generare la mia versione preferita, dato abbastanza tempo e memoria:

for i in range(0x4e24a0fa26624a0fa00084984c021249249800000004000c5001f509c4941f5312507d18062800007d4c494000fa10e0112497d4800000021c49283e80831403ea1c4941f44c000000100849249249309261260c4941f400871280003ea124924924c18a01f50938924a0fa30018a003e80800000100004c492500fa10625001f421389283ea124924926000000010601125f46):print(end='()')

1
Eh? Perché i downvotes? Questa risposta è valida La domanda non proibisce esplicitamente le risposte in linguaggi banali, ti incoraggia semplicemente a scriverlo in una lingua in cui non sarebbe banale.
Erik the Outgolfer,

15
È noioso da morire. Dovrebbe essere abbastanza ovvio il motivo per cui è stato sottoposto a downgrade. Solo perché è valido non significa che non sia noioso o un abuso delle regole.
Rɪᴋᴇʀ

@Riker Beh, qualcuno ha dovuto pubblicarlo comunque, solo le varianti di Brain-Flak sono vietate.
Erik the Outgolfer,

1
1814382933791978604180811513276951596891496241887282518341046923729565882935872511161361237442639477201197909462276216213505390716388781699995156144914006643460505208562917269884967739569849775334582997489357826941308223133279896950569038552439752566374191225909282002406578832005197375356729715483875184532677626663572228849651637974329845225525069790860 staffe funziona meglio per meno byte
Christopher

5
Ho giocato a golf a qualche trilione di byte. Niente di più
Christopher,

9

Haskell , ( 12006 13485 byte), punteggio 18 17

MODIFICARE:

  • -1 byte: la toEnumversione funziona senza estensioni spostando la toEnumfunzione principale al costo di a $.
  • -1 byte, quindi di nuovo +1: se guardi nella cronologia delle modifiche, vedrai che sono cambiato in qualcosa di completamente diverso. E solo più tardi ho controllato le altre risposte e ho visto che @Laikoni aveva fatto quasi la stessa idea un'ora prima e l'ho ottenuto un byte meglio! Quindi sono tornato al mio metodo precedente.

Usa come putStrLn$(<<>>)().

(<<>>)<>(<<<>>>)=length(<<<>>>):(<<>>)
(<<>>)()=toEnum<$>...

Provalo online!

dove si ...trova la stringa di risultato della seguente espressione:

convert="[]"++concat["<>([]"++([1..fromEnum c]>>"<>[]")++")"|c<-reverse"Surprise!\nHappy Birthday, Brain-Flak!"]

Gli unici personaggi non bilanciati sono

=length:
=toEnum$

La seguente variante (13484 byte) ha un punteggio di 16 tranne per il fatto che ha bisogno ExtendedDefaultRulesdell'estensione di GHC e quindi funziona solo in GHCi per impostazione predefinita. (A meno che non vi piacciano un sacco di avvertimenti, anche voi volete -fdefer-type-errorse -Wno-deferred-type-errorsper qualche motivo.)

(<<>>)<>(<<<>>>)=toEnum(length(<<<>>>)):(<<>>)
(<<>>)()=...

Provalo online!

Come funziona

  • Haskell consente di definire i tuoi operatori (multi-carattere) e <>sono personaggi dell'operatore legale. Inoltre, se tra parentesi, possono essere utilizzati per qualsiasi valore, non solo per funzioni a due argomenti.
  • (<<>>)sulla seconda riga è la funzione principale, prende un singolo argomento fittizio ()e restituisce la stringa finale.
  • L'operatore <>prende due elenchi e antepone la lunghezza della seconda alla prima (nella seconda versione, convertendo anche la lunghezza in un carattere). Gli operatori sono lasciati associativi per impostazione predefinita, quindi questo si incatena facilmente.
  • Ora è possibile creare un elenco di qualsiasi lunghezza concatenando elenchi vuoti []con <>.
  • La stringa finale può ora essere costruita concatenando elenchi le cui lunghezze codificano i caratteri desiderati - questo utilizza solo ()<>[]caratteri bilanciati - e quindi (nella versione principale) mappando toEnuml'elenco risultante.

Wow! Questo è abbastanza impressionante
Wheat Wizard il

8

Japt , 19 14 13 10 9 8 byte

"(()()...()()<"q>)m(l)m(d)q

dove la stringa all'inizio è:

(()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()<>()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()())<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()())<>()()()()()()()()()()()()()()()(<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())<>()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()())<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()<>()()()()()()()()()()()()()()()()<

Il conteggio totale dei byte è "solo" 6694 3394 3354, quindi puoi provarlo online!

Spiegazione

Il metodo effettivo utilizzato è spiegato in altre risposte: Dividi su <>, mappa ogni chr(len(x))sequenza di parentesi , unisciti di nuovo sulla stringa vuota. Qui, è il golf che è la parte divertente.

Prima di "giocare a golf", potrebbe apparire il codice originale

"..."q"<>" mZ{Zl d} q""

che è una descrizione abbastanza letterale: "...".split("<>").map(Z => Z.length.toChar()).join("")ora dobbiamo minimizzare i caratteri non parentesi. Come? Bene, prima possiamo fare un po 'di golf:

"..."q"<>" ml md q

Questo rappresenta all'incirca "...".split("<>").map(Z => Z.length).map(Z => Z.toChar()).join().

Ora possiamo abusare del modo confuso in cui Japt tratta le parentesi. (rappresenta salire di un livello, come nella maggior parte delle lingue, ma )rappresenta scendere di due livelli (uno spazio scende di un livello), il che significa che possiamo ottimizzare il codice per:

"..."q("<>")m(l)m(d)q

Questo codice si comporta esattamente come sopra, ma utilizza due meno caratteri non parentesi.

Inoltre, se un operatore è il primo input per una funzione, viene trasformato in una stringa in modo che la funzione possa decidere cosa farne. Ciò significa che possiamo evitare le virgolette se riduciamo di 1 byte ogni sequenza di parentesi di 1 byte e ci dividiamo >invece (con una disposizione intelligente per annullare il risultante >)nel codice):

"(...<"q>)m(l)m(d)q

Questo ci consente di risparmiare altri due byte, poiché abbiamo eliminato due delle virgolette.


8

Haskell , ( 1965 3131 18073 byte), punteggio 31 23 19

(<>)=(:)
(<<>>)=['\n'..]
(((<<><>>):(<<<>>>))<<>><>([()]:(<><>)))()=(<<><>>)<>(((<<>>)<<>><>(<><>))())
(((<<><>>):(<<<>>>))<<>><>((<><><>):(<><>)))()=((<<<>>>)<<>><>(<><>))()
f=(<<>>)<<>><>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([]<>([()]<>([])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

Provalo online! Utilizzo: l'ultima riga è una funzione anonima. Legalo ad es. fE chiama con f().

I 19 byte senza parentesi sono

=:
='\n'..
::=
::=

più una nuova riga finale.


Versione punteggio 23 (3131 byte):

(<<>>)=['\n'..]
(('{'{-}-}:(<><>))<>((<<><>>):(<<<>>>)))()=(<<><>>):((<><>)<>(<<>>))()
(((<><><>):(<><>))<>((<<><>>):(<<<>>>)))()=((<><>)<>(<<<>>>))()
"[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][]{{}}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][{}][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][{}]"<>(<<>>)

Provalo online! I 23 byte senza parentesi sono

='\n'..
''--::=:
::=
""

Punteggio 31 versione (1965 byte):

(<<>>)=['\n'..'~']++(<<>>)
putStr[(<>)|('{'{-}-},(<>))<-zip">[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][{}][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][]{}[][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][{}][][][]{}{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}][][][{}][]{}[][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][{}][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][{}[][][][]{}][][][][][][][][][][][][][][][][][][][][]{}"(<<>>)]

Provalo online!

Dopo aver rimosso tutte le parentesi, questi 31 byte rimangono:

='\n'..'~'++
putStr|''--,-zip""

Come funziona?

['\n'..'~']restituisce l'elenco di tutti i caratteri da newline a ~cui include tutti i caratteri ASCII stampabili. (<<>>)è un identificatore scelto per avere zero byte in base alla regola di punteggio specificata. (<<>>)=['\n'..'~']++(<<>>)produce così una ripetizione infinita dell'elenco dei caratteri.

Nella seconda riga zip"> ... "(<<>>)zip una lunga stringa di parentesi con la stringa infinita, producendo un elenco di tuple con un carattere parentesi nel primo componente e alcuni caratteri ASCII nel secondo. Per ogni tupla in questo elenco controlliamo se corrisponde al modello ('{'{-}-},(<>)), ovvero se ha una {parentesi come primo componente. {- ... -}è un commento in linea in Haskell, quindi '{'{-}-}è una versione bilanciata di '{'. Se la corrispondenza ha esito positivo, il secondo componente della tupla viene unito all'identificatore (<>)e aggiunto alla creazione della stringa tramite la comprensione dell'elenco. putStrStampa infine la stringa. putStr[(<>)|('{'{-}-},(<>))<-zip"> ... "(<<>>)]


La stampa diretta della stringa è di 46 byte:

putStr"Surprise!\nHappy Birthday, Brain-Flak!"

Sembra che tu abbia incluso <> come byte non parentesi.
Brian Minton,

@BrianMinton Grazie per averlo notato! Dovrebbe esserci invece stata una nuova riga finale.
Laikoni,

6

HTML, 37 byte

Surprise!<p>Happy Birthday, Brain-Flak!

Surprise!<p>Happy Birthday, Brain-Flak!


1
È possibile utilizzare un <br>tag come questo:Surprise!<br>Happy Birthday, Brain-Flak!
Loovjo

@Loovjo <br>è più lungo di un byte perché l' <p>ho provato prima di pubblicare. Sembra un po 'più bello. Non uso alcun tag di chiusura
Jörg Hülsermann

1
Ok. Non penso che tu abbia bisogno del primo <p>però.
Loovjo,

@Loovjo Sì, è corretto, posso rilasciarlo Grazie
Jörg Hülsermann

3
@Luke Il consenso è che le sfide della complessità di kolmogorov non richiedono un linguaggio di programmazione. (E HTML può comunque fungere da wrapper per JS.)
Arnauld


5

Pyth , 4⃠ 3⃠ 2 byte

Barrato 4 non è normale 4 se usi la magia Unicode di zalgo

Grazie a Roman Gräf e Neil per aver salvato 1 byte.

Il codice è Cl(()()()... ()()())dove la parentesi esterna contiene 41505989310382548390036033574496753883572705382055993299460470741732071419050117038172961copie concatenate di (). (Stack Exchange non mi ha permesso di pubblicare il codice completo.)

Crea una tupla ( (... )) di tuple vuote ( ()), prende la lunghezza ( l) e la converte in una stringa base-256 ( C).


C'è bisogno di haggiungere semplicemente un'altra coppia di parentesi?
Roman Gräf,

2
@ RomanGräf Penso che abbia bisogno che il risultato sia un numero dispari.
Neil,

1
@ RomanGräf Il numero di base 256 richiesto è dispari e la stringa deve essere bilanciata (e quindi di lunghezza pari), quindi questo dovrebbe essere il punteggio ottimale.
PurkkaKoodari,

Sai, si potrebbe spostare le hdue posizioni a destra e sarebbe ancora funzionare perfettamente ;-)
ETHproductions

1
"Stack Exchange non mi ha permesso di pubblicare il codice completo." - si dispone il codice completo ?!
Jonathan Allan,

5

Japt , 6687 byte, punteggio 5

(([[[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]][[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]]]ml)md)q

Provalo online!

Questo è in una vena simile alla mia altra risposta di Japt , ma utilizza array nidificati invece di una stringa. La cosa bella degli array nidificati (oltre al fatto che definirli non richiede alcun byte) è che sono pre-organizzati, quindi non devi fare alcuna fantasia split-on- <>magic o decodificare da un enorme numero di base 256, o qualcosa del genere. La logica attuale è giusta .map(X => X.length).map(X => String.fromCharCode(X)).join("").


4

Chip , 553 + 3 = 556 byte, punteggio 127 + 3 = 130

((<>)ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZt()(((((((((((((((((((((((((((
((()))))))))xx)))))x))))))))xx)))))x))))xg()((((((((((((((((((((((((((((((((({
*})<>))))))))xx)))))x)))))))))x)))))x))))f)*{((((((((((((((((((((((((((([
Z<>])xxxx)x)))))xxx)))xx)))x)))x)))))))))))}e{((((((((((((((((((((((((
((())))))x)))xx)))x))x))x))xx))))xxx)x)x)))}d{((((((((((((((((((((((((((((
((())x)))))x)))))))))))x)x))x)))))xxxx)))))}c{((((((((((((((((((((((((
(((())x)x)x))x))))))x)x)))))))xx))x)x))x)))}b{(((((((((((((((((((
(((()x)))xxxx))x))x))x))))xx))))xx)x))xxx))}a

+3 per arg -w. Provalo online!

I byte non parentesi sono

ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZt
xxxxxxxg
*xxxxxf*
Zxxxxxxxxxxxxe
xxxxxxxxxxxxxd
xxxxxxxxxc
xxxxxxxxxxxb
xxxxxxxxxxxxxxxxa

Ungolfed / sbilanciato:

*}vZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZt
Z'))))))))xx)))))x))))))))xx)))))x))))xg
  x))))))))xx)))))x)))))))))x)))))x))))f
  )))))x)xxxxx)))xxx))xxx)xxx)xxxxxxxxxe
  xxxxx)xxx))xxx)xx)xx)xx))xxxx)))x)x)xd
  x)xxxxx)xxxxxxxxxxx)x)xx)xxxxx))))xxxc
  )x)x)x)xx)xxxxxx)x)xxxxxxx))xx)x)xx)xb
  ))xxx))))xx)xx)xx)xxxx))xxxx))x)xx)))a

Come puoi vedere, il codice originale utilizza solo parentesi sul lato destro, quindi tutte le parentesi sul lato sinistro sono solo per il bilanciamento. Nel corso di questa soluzione, ho trovato una rappresentazione di stringa molto più densa in Chip che avevo avuto per le mie precedenti risposte, ad esempio ciao mondo , e quindi ho aggiornato anche quelle.

Come funziona:

Il bit sospeso a sinistra produce un impulso di 1 ciclo per iniziare le cose. Questo impulso viaggia lungo il Z's con una frequenza di 1 per ciclo, il che fornisce i tempi. Quando ciascuno Zè alimentato, la colonna corrispondente produce il codice ASCII del carattere in corrispondenza di quell'indice, che quindi viene emesso dagli elementi aattraverso g(uno per bit del byte di output, tranne il bit alto hche è sempre 0). Al termine, ttermina l'esecuzione.

La codifica ASCII è semplice: )significa 1 e xsignifica 0. Tuttavia, le 5 righe inferiori sono per lo più x, quindi invertisco quei bit nella soluzione finale, scambiando efficacemente i due simboli.

Questo è il miglior punteggio possibile?

Ne dubito. Al minimo assoluto, penso che dobbiamo la seguente: 1 ciascuno aattraverso g, poiché questi sono i bit di uscita attivi, 1 *o simili per fornire un segnale di partenza, 1 tper terminare l'esecuzione, 36 Zs o zs in volta su ogni lettera, e la comando arg -w. Tutto ciò si somma a un punteggio di 48.

Oltre quel minimo teorico, la mia soluzione ha 7 nuove righe, una seconda *, una extra Ze 73 xsecondi.


4

C, 9265 byte, punteggio 37

i;f(){for(i=0;putchar(i+=strspn("[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[<[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[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]]]]]]]]]]]]]]]]]]]]]]]]]]]>]]]]]]]]]>]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>]>]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]>]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]"+i,"[]")+1););}

Guardalo funzionare online .

C, 8589934626 byte, punteggio 34

i;f(){for(;putchar(i+=strspn("STRING"+i,"[]")+1););}

Dove STRINGè la stessa stringa grande letterale usata nell'esempio sopra, tranne per il fatto che ha due differenze nel mezzo della stringa in cui è presente una sottostringa <>. Poco prima <, sono 4294962688 [caratteri aggiuntivi e subito dopo >sono 4294962688 ]caratteri aggiuntivi .

Il programma funzionerà con le seguenti ipotesi:

  • INT_MAX è 2 ^ 31-1 e INT_MIN è -2 ^ 31.

  • Compilato con comportamento a capo per l'aritmetica firmata. (-Fwrapv)

  • La funzione strspn è in grado di elaborare 4294962689 caratteri alla volta.

  • Il compilatore è in grado di compilare una stringa letterale composta da 8589934592 caratteri.

Tali ipotesi sono possibili su architetture moderne a 64 bit, in cui il tipo int è 4 byte e il tipo size_t è 8 byte. La funzione strspn restituisce type size_t e lo stesso tipo è correlato al limite interno per la dimensione massima dell'oggetto. Digitare size_t con 8 byte soddisferebbe gli ultimi due presupposti.

Questa differenza in questa versione è che la variabile i non deve essere reimpostata su 0, poiché si avvolge intorno a 0 dopo la stampa dell'ultimo carattere.


3

Haskell , 9735 byte, punteggio 9

'y'<<>>pred
(<><>)<<>>(<<>>)=[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)(<><>))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))]<>[(<><>)]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))))))))))]<>[(<><>)]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))))))))))))))))))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>)))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))]<>[(<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)((<<>>)(<><>))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))]

Provalo online!

I 9 byte di punteggio sono

'y'pred
=

Funziona con le versioni correnti di Haskell (GHC 8.4 o successive) in cui si (<>)trova Prelude. Grazie a Ørjan Johansen per aver ricordato che questo spezza il precedente soluzione , ma permette di salvare un altro byte di punteggio.

Spiegazione

Come (<>)in due elenchi è lo stesso di (++), possiamo rappresentare una stringa "abc"come "a"<>"b"<>"c"invece. Le stringhe sono elenchi di caratteri, quindi ['a']<>['b']<>['c']indica la stessa stringa. Ora, come nella risposta precedente, vogliamo solo un singolo letterale carattere, quindi ci atteniamo con lui più alta 'c'e rappresentiamo gli altri come predecessori di esso: [pred(pred 'c')]<>[pred 'c']<>['c']. Infine, sostituendo 'c'con (<><>)la quale è un identificatore valido e predcon (<<>>), otteniamo una codifica della stringa "abc"che solo consiste di parentesi equilibrata: [(<<>>)((<<>>)(<><>))]<>[(<<>>)(<><>)]<>[(<><>)].

La seguente funzione codifica una stringa arbitraria in questo modo:

f s = show max_char ++ "<<>>pred\n(<><>)<<>>(<<>>)=" ++ encode s
    where
        max_char = maximum s
        s `unless` b = if b then "" else s

        encode [] = ""
        encode (x:r) = 
            let repl = ([succ(succ x) .. max_char] >>)
            in ""
               ++ "[" 
               ++ repl "(<<>>)(" 
               ++ "(<<>>)" `unless` (x == max_char)
               ++ "(<><>)" 
               ++ repl ")"
               ++ "]" 
               ++ "<>" `unless` (r == "")
               ++ encode r

Provalo online!


Perché (<<>>)viene usato così tante volte, penso che salverà molti byte se si scambia il suo nome con quello di <>(passando quest'ultimo come parametro extra).
Ørjan Johansen,

2

C # Interactive, 45 byte

"Surprise!\nHappy Birthday, Brain-Flak!"

Lo so, è un po 'noioso, ma se eseguito in C # interattivo, produce l'output desiderato - e in realtà dubito che ci sia un modo più piccolo per risolverlo in C #.

Tuttavia, esiste un modo più elegante:

var a=new BitArray("[][]()()[]()[]()[]()[]()[][][]()()[]()()[][][]()()()()()[][][]()()[]()()[][][]()[]()()[]()[][]()[][]()()[][][]()[]()[]()()[][]()[]()()()()[]()()()[]()[]()()()()()()()[]()()[]()[]()()()()[][]()()()()()[][][]()()()()()[][][]()[]()()[][][][]()()()()()()[]()()()[]()()()()[]()[]()()[]()[][]()()[]()()[][][]()()()[]()[][][]()()()()[]()[][]()()()[]()()[][]()[]()()()()[][]()[]()()[][][][]()()()[][]()[]()()()()()()()[]()()()[]()()()()[]()()[]()()[][][]()[]()()()()[][]()[]()()[]()[][]()()[][][]()[][]()[]()[][]()[]()()()[][]()()()[]()()()[][]()[][]()[]()()()()[][]()[][]()[]()[][]()[]()()()()[]()()".Replace("()","0").Replace("[]","1").Select(/*<*/s=>s=='1').ToArray());var b=new byte[a.Count];a.CopyTo(b,0);Console.Write(Encoding.UTF8.GetString(b));

Ma questo è grande 145 byte.

Con le interruzioni di riga sembra che:

var a = new BitArray(
    "[][]()()[]()[]()[]()[]()[][][]()()[]()()[][][]()()()()()[][][]()()[]()()[][][]()[]()()[]()[][]()[][]()()[][][]()[]()[]()()[][]()[]()()()()[]()()()[]()[]()()()()()()()[]()()[]()[]()()()()[][]()()()()()[][][]()()()()()[][][]()[]()()[][][][]()()()()()()[]()()()[]()()()()[]()[]()()[]()[][]()()[]()()[][][]()()()[]()[][][]()()()()[]()[][]()()()[]()()[][]()[]()()()()[][]()[]()()[][][][]()()()[][]()[]()()()()()()()[]()()()[]()()()()[]()()[]()()[][][]()[]()()()()[][]()[]()()[]()[][]()()[][][]()[][]()[]()[][]()[]()()()[][]()()()[]()()()[][]()[][]()[]()()()()[][]()[][]()[]()[][]()[]()()()()[]()()"
        .Replace("()", "0")
        .Replace("[]", "1")
        .Select(/*<*/s => s == '1')
        .ToArray());
var b = new byte[a.Count];
a.CopyTo(b, 0);
Console.Write(Encoding.UTF8.GetString(b));

Questo interpreta le parentesi come valori booleani e quindi come stringa.

In realtà non sono un golfista di codice avanzato, quindi ogni suggerimento è apprezzato!


Devi chiudere la parentesi .Select(s =>per conformarti S -> <S>, puoi cambiarla in.Select(/*<*/s =>
Khaled.K,

Anche la tua soluzione è un frammento di codice, deve essere un programma completo che può essere compilato così
com'è

@ Khaled.K In realtà può essere compilato, usando il C # interattivo
MetaColon

1
Dovresti quindi distinguerlo da un normale programma C #, forse cambiare il titolo in C# Interactive, anche penso che sia interpretato in C # interattivo, non compilato, ma è ancora considerato un programma \ script
Khaled.K

2

CJam , 6683 byte, punteggio 3

[(a lot of square brackets omitted)]{,c}%

Ho abbreviato il codice qui per non ingombrare troppo la pagina. Puoi vedere il codice completo nel link TIO. Gli unici caratteri non tra parentesi sono ,c%.

Provalo online!

Spiegazione

Il programma inizia spingendo una serie di matrici di matrici vuote. Ogni array secondario contiene un numero di array vuoti corrispondenti a un valore ASCII di un carattere nella stringa desiderata. Quindi, per ogni subarray ( {...}%), ottiene la lunghezza dell'array ( ,) e lancia quella lunghezza su un carattere ( c).

La stringa risultante viene stampata implicitamente.


2

C, 69 64 byte

Prova online

f(s,t)char*t;{if(*t)*t-123||putchar(s),f(s+(*t==60)-(*t==91),t+2);}
main(){f(83,"{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}[][][]{}[][]{}<><>{}[][][][][][][][][]{}<><><><><><><><><><>{}[][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][]{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><>{}{}<><><><><><><><><>{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><>{}<><>{}[][][][][][][][][][][][]{}[][][][]{}[][][]{}<><><><><><><><><><><><><><><><><><><><><><><><>{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][]{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}[][][][][][][][][][][][][][][][][]{}<><><><><><><><>{}<><><><><>{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}<><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}[][][][][][][][][][][]{}<><><><><><><><><><>{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}");}

Come l'ho fatto

p(int x){putchar(x);}
j;f(char*t){ p(t[0]); for(int i=1; t[i]; i++){ j=t[i]-t[i-1]; while(j>0)p('<'),p('>'),j--; while(j<0)p('['),p(']'),j++; p('{'),p('}'); }}
  • Successivamente ho sostituito *con {}, >con <>e <con in []modo che non contino, quindi ora questo conteggio del codice è 1 a causa del carattere iniziale S.
S<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}[][][]{}[][]{}<><>{}[][][][][][][][][]{}<><><><><><><><><><>{}[][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][][][][][][][][][][][][]{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><>{}{}<><><><><><><><><>{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><>{}<><>{}[][][][][][][][][][][][]{}[][][][]{}[][][]{}<><><><><><><><><><><><><><><><><><><><><><><><>{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}[][][][][][][][][][][][]{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}[][][][][][][][][][][][][][][][][]{}<><><><><><><><>{}<><><><><>{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}<><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}[][][][][][][][][][][]{}<><><><><><><><><><>{}[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]{}
  • Alla fine ho scritto un parser, che si limita a sommare <>, sottrarre [], stampare la somma corrente {}e termina alla fine della stringa \0.

C, 49 byte Prova online

main(){puts("Surprise!\nHappy Birthday, Brain-Flak!");}

1
Non sei in linea pper salvare alcuni byte?
Laikoni,

2

Lua 5.3, 108097107033101 byte, punteggio 28 27

load(([[REPLACE]]):gsub([[[<>]-{()}]],[[%1]]):gsub([[...]],([[]]).char))()

Qui, REPLACEviene sostituito da una lunghezza di 108097107033034 stringa di caratteri gratuiti. La stringa codifica i dati posizionandoli {}in determinate posizioni chiave. Il primo gsubsostituirà la stringa con gli indici della {}s (tramite il gruppo di acquisizione vuoto ()). Il secondo gsubrompe questa stringa risultante in blocchi di 3 cifre e sostituisce ogni blocco con la sua rappresentazione ASCII.

Nota che la sintassi per le stringhe non elaborate in Lua è (in pratica) [[string contents]], il che è abbastanza utile per ridurre il punteggio.

La stringa (senza escape) che sto generando è print"Surprise!\nHappy Birthday, Brain-Flak!". Sostituendo ogni carattere con il suo codice ASCII decimale a 3 cifre si ottiene 112114105110116034083117114112114105115101033092110072097112112121032066105114116104100097121044032066114097105110045070108097107033034. Il codice che uso può generare solo sequenze di numeri naturali in aumento (almeno 2 a parte) che non iniziano con zero iniziali. Quindi, questo numero viene suddiviso in 11, 2114, 105110, 1160340, 83117114, 112114105, 1151010330, 9211007209, 71121121210, 320661051141, 1610410009712, 10440320661140, 97105110045070, 108097107033034. (Quest'ultimo numero è esattamente la lunghezza del REPLACEvalore, poiché l'ultima corrispondenza del modello fornirà l'indice del finale }, notando che gli indici Lua iniziano da 1. Se l'ultimo numero fosse dispari, allora il modello e la stringa avrebbero da modificare leggermente, anche se non è difficile.)

In realtà non ho generato ed eseguito questo programma perché è troppo grande (anche se teoricamente potrebbe funzionare su una macchina a 64 bit, non si adatterebbe al mio disco rigido).

Come prova del concetto, ecco un piccolo programma che stampa 3usando lo stesso principio:

p=print
load(([[<<><><><>{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>{}]]):gsub([[[<>]-{()}]],[[%1]]):gsub([[...]],([[]]).char))()

Questo genera la stringa di codice p"3"tramite il numero 112034051034tramite la divisione 11, 203, 405, 1034.


2

Pip , 6681 byte, punteggio 3

C#*[[()()...()]...[()()...()]]

(con molte parentesi e alcune parentesi quadre ridotte). Provalo online!

Costruiamo un elenco di liste, ognuna delle quali contiene ()(zero) un numero di volte. #*mappa l'operatore lunghezza, risultante in un elenco di numeri. Cprende ogni numero come codice ASCII e lo converte in un carattere. L'elenco di caratteri risultante viene quindi automaticamente concatenato insieme e stampato.

Buon compleanno in ritardo, Brain-Flak!


1

Mathematica, 40 byte

"Surprise!
Happy Birthday, Brain-Flak!"&

Funzione anonima. Non accetta input e restituisce una stringa come output.


1

Gelatina , 19 21 byte

“µḍ'Ṭẋs:|`¿wwƈг×U7¿»

Niente di intelligente qui, solo un dizionario + compressione stringa del testo più una nuova riga finale per rimuovere un impareggiabile <.

Per un approccio veramente goloso, vedi questa risposta di Erik the Outgolfer.

Provalo online!


1

PHP, 42 byte

<?="Surprise!
Happy Birthday, Brain-Flak!"?>

Provalo online!

-5 byte la soluzione noiosa

Surprise!
Happy Birthday, Brain-Flak!

PHP, 60 byte

<?=join(array_map(function($v){return chr(strlen($v)/2);},explode("[]","<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>[]<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>")))?>

Provalo online!


Puoi salvare 5 rimuovendo<?=""?>
Robert Fraser il

@RobertFraser Lo so. È solo un file di testo in questo momento.
Jörg Hülsermann,

@ JörgHülsermann No, PHP è un linguaggio di programmazione secondo la nostra definizione, usarlo in un modo che ricorda un file di testo è totalmente valido.
Erik the Outgolfer,

@EriktheOutgolfer Okay l'ho aggiunto ma è noioso e non la soluzione che preferisco
Jörg Hülsermann

@ JörgHülsermann Il tuo obiettivo finale è il golf, non soluzioni interessanti. Forse puoi creare una versione in base alla lunghezza di una stringa con parentesi abbinate in modo da poter giocare a golf ancora di più.
Erik the Outgolfer,

1

In pila , punteggio 23

'....' '(<>)+'match[#'2/]map#:out

Dov'è ...la stringa omessa. (Questo può essere generato con questo .)

Provalo online!

Sì, non così creativo. Ottiene il numero di tutti <>i se li converte in codici carattere.


1

Perl 5 , 3304 byte, 16 punti

say(map{chr(y{()}{})}q[()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()({}()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()({}()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()){}()()()()()()()()()()()()()()()()({})()()()()]=~m{[()]+}g)

Provalo online!

Utilizza la codifica della lunghezza di esecuzione della soluzione Python di @ HeebyJeebyMan del testo.


0

Java, 140 byte

Prova online

class H{public static void main(String[]args){
String t="()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()[]";
for(int i=0,s=0;i<t.length()/*>*/;i+=2){if(t.charAt(i)=='('/*)*/)s++;else{System.out.printf("%c",s);s=0;}}}}


Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.