Salut ma puteti ajuta cu problema asta ?
Date de intrare:
Pe prima linie se află două numere,...
Computers and Technology, 04.08.2021 17:10 beccadoyle0809
Salut ma puteti ajuta cu problema asta ?
Date de intrare:
Pe prima linie se află două numere, N și M.
Pe următoarele linii se află N numere naturale, numerele de identificare a foilor aflate inițial pe masă(primul număr este asociat primei foi, al doilea număr este asociat celei de-a doua foi…).
Pe următoarele M linii se află operațiile ce trebuie făcute:
1 dacă trebuie extrasă prima foaie
2, urmat de o valoare X, dacă trebuie introdusă o nouă foaie la sfârșit, aceasta având numărul de identificare X.
Date de ieșire
Pe prima linie se va afișa numărul de foi rămase pe biroul lui Andrei în urma executării celor M operații, iar pe a doua linie, numerele de identificare ale acestora.
Restricții
1 ≤ N ≤ 900 000
1 ≤ M ≤ 400 000
Numerele de identificare sunt cuprinse intre 0 și 10 000
Dacă șirul nu mai conține niciun element și trebuie efectuată o operație de tip 1, operația nu va fi efectuată.
Exemplu
Date de intrare Date de ieșire
4 3 5
30 21 81 26 21 81 26 68 64
2 68
2 64
1
Answers: 3
Computers and Technology, 22.06.2019 18:00, deathfire5866
Determine whether the following careers would require training or college.
Answers: 1
Computers and Technology, 22.06.2019 22:50, youngboymark123
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
Computers and Technology, 24.06.2019 00:00, miguelturner
Which tool could be used to display only rows containing presidents who served two terms
Answers: 3
Social Studies, 09.11.2020 14:00
Biology, 09.11.2020 14:00
Mathematics, 09.11.2020 14:00
Mathematics, 09.11.2020 14:00
English, 09.11.2020 14:00