Cambialo un poco


Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type
Arrays/Llistes
Category
Aprenentatge
Allowed languages
Bash, C#, Haskell, Java, Kotlin, PHP, Python

A vegades et vols copiar d'algú i et diu la famosa frase "Te dejo copiar pero cambialo un poco para que el profesor no se de cuenta"

Entrada

La primera línia indica els casos de prova a considerar Cada cas conté tres linies. La primera té un nombre \(K\), que diu el nombre de valors que hi ha. La segona, \(K\) nombres separats per espai. La tercera tindrà dos nombres, \(P1\) i \(P2\)

Sortida

Torna la llista de nombres que t'han passat, exactament igual, en una sola línia, canviant tots els nombres \(P1\) que apareguin per \(P2\)

Exemple d'Entrada

3
5
1 2 3 4 5
3 9
6
1 2 3 3 2 1
3 -3
4
1 1 1 1
1 0

Exemple de Sortida

1 2 9 4 5
1 2 -3 -3 2 1
0 0 0 0

Comments


  • 0
    bielp  commented on Nov. 29, 2024, 6:56 p.m.

    ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⡀⠀⠀⠀⣀⣶⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⠤⠤⠤⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣶⣦⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⡇⠀⠀⠾⠏⠁⠀⠀⠀⠀⠀⠀⠀⢀⣠⠖⠋⠀⠀⠀⠀⠀⠉⠳⢄⣀⠀⠀⠀⠀⠀⠀⠘⠿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣯⣁⠀⠀⠀⠀⠀⠀⠀⠀⣀⠤⠒⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠒⠢⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⠇⠀⠀⠀⠀⢀⡴⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠉⠉⠀⠀⠀⠀⢀⣠⠟⠀⠀⠀⠀⠀⠀⠠⣷⣤⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡴⠚⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠋⠀⠀⠀⠀⠀⠀⠐⠄⠀⠀⠀⠀⠙⠂⠀⠀⠀⠀⠉⠑⠦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡄⠀⠀⠀⠀⠀⢠⠀⠀⠀⠀⠀⠀⠉⣻⠀⠀⠀⣤⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣧⠀⠀⠀⠀⠀⢀⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣧⠀⠀⠀⠀⠀⢸⣧⠀⠀⠀⠀⠀⢤⡿⠀⠀⢠⠋⣼⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣴⣧⠀⠘⣿⣦⢀⠀⠀⣀⢠⣿⣦⣄⣀⣄⣰⣾⣶⣦⣤⣄⣄⢀⢠⣦⣿⣿⣴⣦⣄⣤⣴⣿⡟⠀⠀⠀⠀⣀⣿⠇⠀⣠⢏⠎⣰⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣌⢿⡇⠀⠘⠻⣿⣾⣯⣿⣿⠿⡿⣿⣿⢿⣟⣟⣿⣿⣿⣿⣯⣿⣿⣿⣯⣻⣿⣿⣿⣿⡿⣿⣷⣦⣶⠀⣰⡟⠃⢀⡴⡿⢻⣸⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣼⡇⠀⠀⠀⠀⠉⠛⠷⣯⣷⣿⡿⠿⠿⠿⢿⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⢿⣷⣿⣿⡿⠿⠛⢧⣤⣖⠛⢁⣶⠾⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⡆⠀⠀⠰⢶⣞⠳⣀⠀⠈⠀⠀⠀⠀⣠⣾⣿⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣦⣸⠇⠀⠀⠀⠀⠐⣯⣿⣾⣯⣧⣾⣧⣾⣷⣿⣿⣼⣧⣿⠟⠀⢠⡀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣀⣀⡙⢀⣰⣿⣿⣶⣦⡳⣤⣄⣸⣿⠛⢿⣿⣿⣿⣿⠿⣿⣀⣠⣤⡶⢿⡟⠻⣿⣿⣦⣶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣆⢀⣾⠿⣿⡿⠋⠙⣿⡃⠄⠈⠀⠀⠙⠛⡝⢿⣶⣯⣯⠟⢶⡶⠛⠉⠀⠀⠀⠚⢃⠀⠀⠙⢿⡿⠟⠛⣇⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣉⡡⠄⠉⢀⠂⠘⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠛⠀⠉⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠱⡄⠈⠃⠀⡆⠀⢻⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡀⠰⢄⢠⡇⠀⠀⠀⢀⣴⣶⣷⣷⣶⣤⡀⠀⠀⠀⠀⠀⣠⣴⣶⣶⣶⣄⡀⠀⠀⠈⢀⡇⢠⠀⢀⣽⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡇⠀⢸⢸⡇⠀⠰⣶⣿⣿⣿⣿⣿⣿⣿⣿⣀⠀⠆⢆⣾⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⡇⢸⠀⢀⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣇⠀⢸⢸⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⢐⡇⢸⡀⣸⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣆⠘⢸⡀⠈⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⡸⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⢨⡇⣿⢷⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣜⡆⡇⠀⠘⣿⡿⣝⣯⣿⣿⣿⣿⠏⠈⠀⠀⠓⠻⣿⣿⣿⣿⢯⣟⣿⣿⠃⠀⠸⣠⣟⡎⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⣇⣿⠀⠀⠈⠻⣿⣾⣿⣿⠟⠃⠀⠀⣠⣄⠀⠀⠈⠻⣿⣯⣿⣿⠟⠃⠀⠀⣸⢸⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣳⡠⠒⠀⢀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⠾⢶⣶⣆⠀⠀⠀⠀⠐⠋⠁⠈⠉⠁⠀⠀⠀⠀⢀⣶⡶⠶⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣶⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡾⢷⣶⢤⣤⡶⣤⣴⢤⣤⠾⣷⡿⢷⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣷⣄⣇⠀⣙⠀⢘⣂⠀⣻⠀⣸⣄⣼⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠀⠉⠉⠉⠉⠉⠉⠀⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣶⡗⠢⣄⣀⣀⡀⠀⣀⠀⢺⣿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢷⣤⣧⡀⣸⣇⠀⣿⣤⣾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠛⠛⠛⠛⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀


  • 3
    a24llocarfus  commented on Nov. 15, 2024, 9:01 a.m. edit 3

    ‎‎


  • 0
    NilYakoubi  commented on Nov. 15, 2024, 8:58 a.m.

    BATMAN W


  • -3
    Max_Verstappen  commented on Nov. 13, 2023, 5:25 p.m. edited

    En el Gran Premio de Brasil volvimos a ver como España vuelve a conquistar México :)

    enter image description here


    • 2
      Pol  commented on Nov. 13, 2023, 7:34 p.m.

      como 33?


  • 12
    Alexdp  commented on Nov. 19, 2021, 5:03 p.m.

    enter image description here


    • -10
      Salva  commented on Nov. 29, 2021, 10:30 a.m.

      This comment is hidden due to too much negative feedback. Click here to view it.


      • -7
        a23ezeruivig  commented on Nov. 2, 2023, 12:39 p.m. edited

        This comment is hidden due to too much negative feedback. Click here to view it.