CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 10:05:04 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=7b8a2c4e68a15fe4d78edae6862f6d2f84bc3eb9fd3a79fe46515c36ccd65402a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22eogfsGAp6N6-FPsgcxk4jscagw4FXFqM%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d5c6d48a13b22e-BLR
P2_15 - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %15.
- % a) Sa se determine cea mai lunga secventa de numere pare consecutive
- % dintr-o lista (daca sunt mai multe secvente de lungime maxima, una
- % dintre ele).
- % secvh(A, R, L=lungimea, C, CL, M, ML).
- secvh([],M,ML,_,CL,M,ML):- ML>CL,!.
- secvh([],C,CL,C,CL,_,ML) :- CL>=ML,!.
- % gasim un numar impar, updatam M si ML daca CL>ML si resetam C
- secvh([I|T],R,L,C,CL,_,ML):- 1 is I mod 2,
- CL>ML, !,
- secvh(T,R,L,[],0,C,CL).
- secvh([I|T],R,L,_,CL,M,ML):- 1 is I mod 2,
- CL=<ML, !,
- secvh(T,R,L,[],0,M,ML).
- % gasim un numar impar, il adaugam in C
- secvh([P|T],R,L,C,CL,M,ML):-
- 0 is P mod 2,
- C1 = [P|C], % se face aici adaugare la sfarsit daca se vrea ordinea din sir
- CL1 is CL+1,
- secvh(T,R,L,C1,CL1,M,ML).
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐⭐⭐Make $1500 in 20 minutes⭐⭐
Java | 4 sec ago | 0.10 KB
-
⭐✅ Swapzone Glitch ✅ Working ⭐⭐ 9
JavaScript | 8 sec ago | 0.25 KB
-
⭐⭐⭐MAKE $9OO INSTANTLY D G⭐⭐
Java | 16 sec ago | 0.10 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ D
JavaScript | 17 sec ago | 0.25 KB
-
⭐⭐⭐MAKE $1000 INSTANTLY⭐⭐
Java | 28 sec ago | 0.10 KB
-
✅⭐ Make huge profits on trading ⭐⭐ C
JavaScript | 29 sec ago | 0.25 KB
-
⭐⭐⭐Exchange Exploit T 3⭐⭐
Java | 31 sec ago | 0.10 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 38 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand