kalytheo
kalytheo
  • 1 845
  • 5 517 332
Limbajul C++, Bac 2021 - toamnă, problema de eficiență
În acest videoclip, abordăm Subiectul III, punctul 3 din examenul de Bacalaureat la Informatică, unde lucrăm cu perechi "asemenea". Două numere naturale, x și y, sunt considerate "asemenea" dacă ultimele două cifre ale lor coincid, chiar și în altă ordine. Scopul este să citim două șiruri de numere din fișierul `numere.in` și să aflăm câte perechi (x, y) îndeplinesc această condiție.
Exemplu:
Dacă fișierul conține:
```
9 7
112 20 42 112 5013 824 10012 55 155
402 1024 321 521 57 6542 255
```
Răspunsul este 13, fiindcă sunt 13 perechi care îndeplinesc condiția, cum ar fi: `(112, 321)`, `(20, 402)`, `(42, 1024)`, etc.
*Pasii algoritmului*:
1. Citim numerele din fișier și le stocăm în două liste `A` și `B`.
2. Verificăm pentru fiecare element din `A` dacă formează o pereche "asemenea" cu vreun element din `B`.
3. Numărăm perechile care îndeplinesc condiția și afișăm rezultatul.
Acest algoritm este eficient datorită filtrării rapide a ultimelor două cifre și a verificării perechilor cu complexitate redusă. Vizionați videoclipul pentru explicații detaliate și codul complet în C/C++.
มุมมอง: 24

วีดีโอ

Subiectul II - Competențe digitale 2024 - Ziua 1
มุมมอง 645วันที่ผ่านมา
1. Precizați două caracteristici ale componentei BIOS a unui sistem de calcul, precum și un exemplu de setare care se poate face prin intermediul acesteia. 2. Dați două exemple de două aplicații care folosesc protocolul VoIP (Voice over Internet Protocol) și precizați o facilitate, corelată cu acest protocol, oferită de una dintre aceste aplicații. 3. Precizați rolul unui meniu contextual și mo...
Ziua 3 PowerPoint - Competențe Digitale 2022
มุมมอง 16814 วันที่ผ่านมา
Deschideţi fişierul comp_p: Inserați pe al doilea diapozitiv (slide), utilizând diacritice, o notă pentru prezentator, cu textul: Drumul N șerpuind între munți, unde N este înlocuit cu un câmp reprezentând numărul de ordine al diapozitivului curent, valoare care să se actualizeze automat. (5 puncte) Modificați parametrii de vizualizare a imaginii din al doilea diapozitiv (slide), astfel încât s...
My defense tower made from Copper Grates
มุมมอง 1692 หลายเดือนก่อน
Copper Grates Tower Defense: A Minecraft Survival, Story by A Chapter 1: The Idea In the far reaches of the Minecraft world, where the rolling hills met the dense forests, there was a small, burgeoning settlement known as Copperwood. The village was named for its abundance of copper ore, which was mined and forged by its skilled inhabitants. Among them was Alex, a master builder with a knack fo...
Bad Omen V
มุมมอง 1052 หลายเดือนก่อน
In Minecraft, "Bad Omen V" is a status effect that you can obtain by killing a Raid Captain multiple times, which is identifiable by the banner they carry. The more Raid Captains you kill, the higher the level of Bad Omen you can obtain, with Bad Omen V being the highest possible level. Here's a breakdown of what Bad Omen V does and how it affects the game: Bad Omen Effect - Triggering a Raid :...
Finding a Pillager Outpost
มุมมอง 1152 หลายเดือนก่อน
Pillager Outposts are structures inhabited by Pillagers and can be found in various biomes such as plains, desert, taiga, snowy tundra, and snowy taiga. Here's how you can find them: Exploration: Manually explore these biomes. Pillager Outposts are tall, dark structures made from dark oak wood, cobblestone, and spruce wood. What to Expect in a Pillager Outpost Pillagers: These hostile mobs will...
Minecraft Raid - Ominous Bottle, Bad Omen IV
มุมมอง 3492 หลายเดือนก่อน
Bad Omen "Bad Omen" is a status effect in Minecraft that players can acquire by killing a Pillager captain. These captains can be identified by their banner, often called an "Ominous Banner." When you kill a Pillager captain, you receive the "Bad Omen" status effect. Bad Omen Levels The "Bad Omen" status effect can stack, meaning that killing additional Pillager captains while already having th...
Minecraft Raid - Ominous Bottle, Bad Omen III - Part II
มุมมอง 1332 หลายเดือนก่อน
Bad Omen "Bad Omen" is a status effect in Minecraft that players can acquire by killing a Pillager captain. These captains can be identified by their banner, often called an "Ominous Banner." When you kill a Pillager captain, you receive the "Bad Omen" status effect. Bad Omen Levels The "Bad Omen" status effect can stack, meaning that killing additional Pillager captains while already having th...
Minecraft Raid - Ominous Bottle, Bad Omen III - Part I
มุมมอง 2332 หลายเดือนก่อน
Bad Omen "Bad Omen" is a status effect in Minecraft that players can acquire by killing a Pillager captain. These captains can be identified by their banner, often called an "Ominous Banner." When you kill a Pillager captain, you receive the "Bad Omen" status effect. Bad Omen Levels The "Bad Omen" status effect can stack, meaning that killing additional Pillager captains while already having th...
Minecraft Survival - Ominous Bottle, Bad Omen II, RAID
มุมมอง 5463 หลายเดือนก่อน
Bad Omen "Bad Omen" is a status effect in Minecraft that players can acquire by killing a Pillager captain. These captains can be identified by their banner, often called an "Ominous Banner." When you kill a Pillager captain, you receive the "Bad Omen" status effect. Bad Omen Levels The "Bad Omen" status effect can stack, meaning that killing additional Pillager captains while already having th...
Minecraft Survival - The midnight watch
มุมมอง 9643 หลายเดือนก่อน
In the pixelated world of Minecraft, the night brought an onslaught of hostile creatures. As the moon rose, the landscape was soon swarming with zombies, Endermen, skeletons, and spiders. My character, armed with an enchanted iron sword and clad in iron armor, stood at the center of a small village. The first wave of zombies approached, their groans filling the air. I swung my sword, dispatchin...
Golem hates Piglins
มุมมอง 2073 หลายเดือนก่อน
The Guardian of the Village Story written by AI Deep in the heart of a tranquil village, surrounded by towering mountains and lush forests, stood a mighty Iron Golem named Galen. Galen was the village's guardian, crafted by the villagers to protect them from any harm. His towering frame and unyielding strength made him a formidable protector against zombies, skeletons, and other nightmarish cre...
Bacalaureat 2024, sesiunea iunie-iulie, Limbajul C++
มุมมอง 3143 หลายเดือนก่อน
Examenul național de bacalaureat 2024 Proba E. d) INFORMATICĂ Limbajul C/C Varianta 3 Filieră teoretică, profil real, specializare matematică-informatică / matematică-informatică intensiv informatică Filieră vocațională, profil militar, specializare matematică-informatică · Toate subiectele sunt obligatorii. Se acordă zece puncte din oficiu. · Timpul de lucru efectiv este de trei ore. · Identif...
Minecraft Survival -Jukebox - Music Disc C418 - 13
มุมมอง 283 หลายเดือนก่อน
The music disc "13" is one of the original music discs in Minecraft, composed by C418. To play this disc in your Minecraft survival world, you'll need to craft a jukebox and then use the disc. Here's a step-by-step guide on how to do this: Crafting a Jukebox Gather Materials: 8 Wooden Planks (any type) 1 Diamond Crafting Process: Open your crafting table. Place the diamond in the center slot. S...
Minecraft Survival - My New Village
มุมมอง 1243 หลายเดือนก่อน
A Minecraft village is a naturally generated structure in the game that consists of various buildings, pathways, and inhabitants. Here’s a detailed description: 1. Layout and Structure : - Villages are composed of several small buildings made of materials like wood, cobblestone, and terracotta. - The buildings are randomly scattered and connected by gravel or dirt paths. - Common structures inc...
Regatul animalelor și zânelor
มุมมอง 2544 หลายเดือนก่อน
Regatul animalelor și zânelor
AI - Mambo Italiano 1
มุมมอง 2404 หลายเดือนก่อน
AI - Mambo Italiano 1
Mambo Italiano
มุมมอง 334 หลายเดือนก่อน
Mambo Italiano
AI - Dance in the Rain
มุมมอง 424 หลายเดือนก่อน
AI - Dance in the Rain
AI - Ice and Fire
มุมมอง 224 หลายเดือนก่อน
AI - Ice and Fire
AI - Coffee Dreams
มุมมอง 234 หลายเดือนก่อน
AI - Coffee Dreams
AI - Beauty In The Wild
มุมมอง 104 หลายเดือนก่อน
AI - Beauty In The Wild
AI - Wandering Heart 1
มุมมอง 114 หลายเดือนก่อน
AI - Wandering Heart 1
AI - Wandering Heart
มุมมอง 144 หลายเดือนก่อน
AI - Wandering Heart
AI - Endless Drive 1
มุมมอง 94 หลายเดือนก่อน
AI - Endless Drive 1
AI - Endless Drive
มุมมอง 114 หลายเดือนก่อน
AI - Endless Drive
AI - Inca Heartbeat 1
มุมมอง 354 หลายเดือนก่อน
AI - Inca Heartbeat 1
AI - Inca Heartbeat
มุมมอง 74 หลายเดือนก่อน
AI - Inca Heartbeat
AI - Starry Nights 1
มุมมอง 354 หลายเดือนก่อน
AI - Starry Nights 1
AI - Starry Nights
มุมมอง 164 หลายเดือนก่อน
AI - Starry Nights

ความคิดเห็น

  • @AsianPhucc
    @AsianPhucc วันที่ผ่านมา

    I LVOE YOU SO MUCH <333333333333333 KETME GIVE YOU A SMOOOCH ❤❤❤!!!!

  • @kalytheo
    @kalytheo 2 วันที่ผ่านมา

    S III.3 #include <iostream> #include <fstream> using namespace std; ifstream f("numere.in"); int n,m,x[100],y[100],nr,a,b,i,s; int main() { f>>n>>m; for(i=1;i<=n;i++) { f>>nr; a=nr%100; b=a%10*10+a/10; if(a<b) x[a]++; else x[b]++; } for(i=1;i<=m;i++) { f>>nr; a=nr%100; b=a%10*10+a/10; if(a<b) y[a]++; else y[b]++; } for(i=0;i<=99;i++) if(x[i]!=0&&y[i]!=0) s+=x[i]*y[i]; cout<<"nr. de perechi asemenea: "<<s; return 0; }

  • @ANTONIAMARIAMUREŞAN
    @ANTONIAMARIAMUREŞAN 5 วันที่ผ่านมา

    subiectul 3?

  • @mariapazsalazar1112
    @mariapazsalazar1112 12 วันที่ผ่านมา

    buena hermano

  • @arianaioanaȘtefan
    @arianaioanaȘtefan 14 วันที่ผ่านมา

    foarte tare

  • @10nutzno1111
    @10nutzno1111 17 วันที่ผ่านมา

    Felicitari

  • @distributorofcommonsense8024
    @distributorofcommonsense8024 17 วันที่ผ่านมา

    Good boy doggy good boy

  • @Michael-ue7xp
    @Michael-ue7xp 22 วันที่ผ่านมา

    Well yea that’s why endermen don’t care if dogs look at them 😂

  • @mimidoggo7167
    @mimidoggo7167 หลายเดือนก่อน

    My brain too small for this

  • @Simulezzi
    @Simulezzi หลายเดือนก่อน

    Bună ziua! Videoclipurile pe care le faceți sunt foarte folositoare! V-aș ruga, dacă ați putea să arătați rezolvarea subiectelor din 2024, deoarece anul acesta am competențele și dumneavoastră m-ați putea ajuta foarte mult!!

  • @Simulezzi
    @Simulezzi หลายเดือนก่อน

    Bună ziua! Videoclipurile pe care le faceți sunt foarte folositoare! V-aș ruga, dacă ați putea să arătați rezolvarea subiectelor din 2024, deoarece anul acesta am competențele și dumneavoastră m-ați putea ajuta foarte mult!!

  • @Simulezzi
    @Simulezzi หลายเดือนก่อน

    Bună ziua! Videocliurile dumeavoastră sunt foarte folositoare. Vă implor din tot sufletul să faceți o rezolvare și pentru subiectele din 2024! Am competențele anul acesta, iar dumneavoastră sunteți ultima speranță pecare o am!!!!

  • @JordiMoleraMarimon
    @JordiMoleraMarimon หลายเดือนก่อน

    Blockly games és un joc educatiu que com a docent valoro molt . Amb aquest video t'has carregat la feina dels desenvolupadors, la meva feina coma a docent i l'oportunitat dels meus alumnes d'aprendre. T'agrairé que treguis aquest video de la xarxa.

  • @romanian_thief
    @romanian_thief หลายเดือนก่อน

    A zis profu de info să mă uit 5.4/10

  • @Francois424
    @Francois424 2 หลายเดือนก่อน

    Thanks, but I hate programs that uses windows settings and are TOO LAZY to have their own language built in... MAN that's annoying as heck

  • @ralu29danyela91
    @ralu29danyela91 2 หลายเดือนก่อน

    Si în procente se poate?

  • @N0PROBLEM
    @N0PROBLEM 2 หลายเดือนก่อน

    Thank you very much 👍

  • @user-wv8jt8rd8z
    @user-wv8jt8rd8z 2 หลายเดือนก่อน

    ily

  • @XianchaoWangzhichao
    @XianchaoWangzhichao 2 หลายเดือนก่อน

    😂😂😂

  • @ណេងសុផាន់ណា
    @ណេងសុផាន់ណា 2 หลายเดือนก่อน

    Your videos is great l like it❤

  • @btsgtlp7611
    @btsgtlp7611 2 หลายเดือนก่อน

    De ce nu mai faci videouri cu probleme de info?

    • @kalytheo
      @kalytheo 2 หลายเดือนก่อน

      E vacanță.

  • @SerialBritishnationN
    @SerialBritishnationN 3 หลายเดือนก่อน

    1:53

  • @KhanJee-nk7lc
    @KhanJee-nk7lc 3 หลายเดือนก่อน

    You are not teaching us how to do it

  • @CupCake-t7d
    @CupCake-t7d 3 หลายเดือนก่อน

    I cant find open with google chrome What should I do 😢

  • @kalytheo
    @kalytheo 3 หลายเดือนก่อน

    //Subiectul III.3, cu mici corecturi #include <iostream> #include <fstream> using namespace std; ifstream f("bac.txt"); int lgCrt,lgMax,ultCrt,ultMax,x; int main() { while(f>>x) { if(ultCrt==0||x==ultCrt+1) { lgCrt++; ultCrt=x; } else { if(lgCrt>lgMax) { lgMax=lgCrt; ultMax=ultCrt; } ultCrt=x; lgCrt=1; } } if(lgCrt>lgMax) { lgMax=lgCrt; ultMax=ultCrt; } if(lgMax<2) cout<<"nu exista"; else for(int i=ultMax-lgMax+1;i<=ultMax;i++) cout<<i<<" "; return 0; }

  • @AAA1AAA1AAA6
    @AAA1AAA1AAA6 3 หลายเดือนก่อน

    5:21 are ceva daca inserez hyperlink? Ma depuncteaza?

  • @yurisleeps2794
    @yurisleeps2794 4 หลายเดือนก่อน

    Multumesc frumos!

  • @iustinianbogdan2005
    @iustinianbogdan2005 4 หลายเดือนก่อน

    2x speed e prea putin :(((

  • @dantymedic2057
    @dantymedic2057 4 หลายเดือนก่อน

    Cum pot deschide pagina respectiva în HTML ajutor! Mâine am proba și este singurul lucru pe care nu îl știu

    • @Alex-xm3uv
      @Alex-xm3uv 4 หลายเดือนก่อน

      click dreapta -> open with -> browser/notepad

    • @comment514
      @comment514 4 หลายเดือนก่อน

      arata in video

    • @iuliaruse3514
      @iuliaruse3514 4 หลายเดือนก่อน

      dar dacă am lucrat html în word este corect?

    • @comment514
      @comment514 4 หลายเดือนก่อน

      @@iuliaruse3514 word, notepad, aceeasi chestie. Cat timp ai facut ce iti cere acolo e bine

    • @AAA1AAA1AAA6
      @AAA1AAA1AAA6 3 หลายเดือนก่อน

      cred ca glumesti

  • @andreinitui1271
    @andreinitui1271 4 หลายเดือนก่อน

    Va multumesc!

  • @saulcelscauna14
    @saulcelscauna14 4 หลายเดือนก่อน

    sa va dea dumnezeu santatate

  • @cristinaghiduc398
    @cristinaghiduc398 4 หลายเดือนก่อน

    Bună ziua, am susținut proba acum. Si as avea o întrebare, prima dată am deschis cu Google Chrome să văd cum arată mai întâi. Si după nu îmi mai dădea cu microsoft, știți de ce? ... doar pe Chrome.. si nu am reușit să fac exercițiu.

    • @kalytheo
      @kalytheo 4 หลายเดือนก่อน

      Trebuia să dai click dreapta pe fișier și să alegi să fie deschis cu Notepad.

    • @cristinaghiduc398
      @cristinaghiduc398 4 หลายเดือนก่อน

      @@kalytheo aaa..., mulțumesc!!

  • @gachalindi7308
    @gachalindi7308 4 หลายเดือนก่อน

    Mulțumesc

  • @luca.adrian
    @luca.adrian 4 หลายเดือนก่อน

    Multumesc mult !!!!!

  • @herondaleangst1755
    @herondaleangst1755 4 หลายเดือนก่อน

  • @MShearthstoneplayer
    @MShearthstoneplayer 4 หลายเดือนก่อน

    La punctul b nu trebuia sa selectezi "Find whole words only". Cerinta zice "grupul de litere" care se poate regasi si izolat dar si in alt cuvant precum Dinastia.

  • @constantinilie4498
    @constantinilie4498 4 หลายเดือนก่อน

    Super tare! 👏👏👏

  • @Валерий-ф7ъ
    @Валерий-ф7ъ 4 หลายเดือนก่อน

    SUPEEEEEER THANK YOUUUUU!!!!!!!!!!!!!!!!!

  • @titailinca
    @titailinca 4 หลายเดือนก่อน

    cand faci stream? :))

  • @Untilyouseeme-d9f
    @Untilyouseeme-d9f 4 หลายเดือนก่อน

    Thank you 💓😊

  • @DorelCartarescu
    @DorelCartarescu 4 หลายเดือนก่อน

    Buna ziua! Puteti sa imi trimite o copie a lumii dumneavoastra de Minecraft pe email-ul meu? Sunt un incepator si chiar vreau sa invat mai multe despre joc pentru ca pare foarte distractiv! Va multumesc!

  • @catalinschiopu1755
    @catalinschiopu1755 4 หลายเดือนก่อน

  • @catalinschiopu1755
    @catalinschiopu1755 4 หลายเดือนก่อน

  • @larisa2437
    @larisa2437 4 หลายเดือนก่อน

    M-a ajutat mult! :D îți mulțumesc!! ❤

  • @catalinschiopu1755
    @catalinschiopu1755 4 หลายเดือนก่อน

  • @ClasaaV-aA
    @ClasaaV-aA 4 หลายเดือนก่อน

    `-`

  • @andipredescu
    @andipredescu 4 หลายเดือนก่อน

    Foarte frumos!

  • @catalinschiopu1755
    @catalinschiopu1755 4 หลายเดือนก่อน

    😊

  • @litlsnek4277
    @litlsnek4277 5 หลายเดือนก่อน

    nice

  • @P6057
    @P6057 5 หลายเดือนก่อน

    Do you have the html file?