#3752
Cvintete
Se consideră numerele naturale nenule N
și D
urmate de o secvență S
de N
numere naturale nenule ordonate crescător, indexate de la 1
la N
. Să se determine numărul de cvintete de indici (i1, i2, i3, i4, i5)
ce verifică relațiile:
a • b • c = D
a • x
2
+ b • y
2
= c
2
a < b < c
x ≠ y
unde am notat cu a = S[i
1
]
, b = S[i
2
]
, c = S[i
3
]
, x = S[i
4
]
, y = S[i
5
]
. Rezultatul se va afișa modulo 1.000.000.007
.
ONSEPI, 2021, clasa a X-a
Problema | Cvintete | Operații I/O |
![]() cvintete.in /cvintete.out
|
---|---|---|---|
Limita timp | 0.7 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50455213 | Utilizator | |
Fișier | cvintete.cpp | Dimensiune | 1.68 KB |
Data încărcării | 10 Aprilie 2024, 11:02 | Scor / rezultat | Eroare de compilare |
cvintete.cpp: In function 'int main()': cvintete.cpp:15:10: error: 'd' was not declared in this scope cin>>d; ^ cvintete.cpp:19:13: error: 'fr3' was not declared in this scope fr3[a[i]]++; ^ cvintete.cpp:25:9: error: 'b' was not declared in this scope b[1]=i; ^ cvintete.cpp:26:9: error: 'd2' was not declared in this scope d2=d/i; ^ cvintete.cpp:27:13: error: 'j' was not declared in this scope for(j=1;j*j<=d2;j++) ^ cvintete.cpp:34:12: error: 'fr' was not declared in this scope if(fr[b[1]][b[2]][b[3]]==0 && b[1]!=b[2] && b[2]!=b[3] && b[1]!=b[3]) ^ cvintete.cpp:36:13: error: 'nr' was not declared in this scope nr++; ^ cvintete.cpp:37:13: error: 'v' was not declared in this scope v[nr].x1=b[1]; ^ cvintete.cpp:41:9: error: 'fr' was not declared in this scope fr[b[1]][b[2]][b[3]]=1; ^ cvintete.cpp:43:16: error: 'nr' was not declared in this scope for(i=1;i<=nr;i++) ^ cvintete.cpp:46:13: error: 'j' was not declared in this scope for(j=1;j<=20000;j++) ^ cvintete.cpp:47:13: error: 'fr2' was not declared in this scope fr2[j]=fr3[j]; ^ cvintete.cpp:47:20: error: 'fr3' was not declared in this scope fr2[j]=fr3[j]; ^ cvintete.cpp:48:12: error: 'fr2' was not declared in this scope if(fr2[v[i].x1]!=0 && fr2[v[i].x2]!=0 && fr2[v[i].x3]!=0) ^ cvintete.cpp:48:16: error: 'v' was not declared in this scope if(fr2[v[i].x1]!=0 && fr2[v[i].x2]!=0 && fr2[v[i].x3]!=0) ^ cvintete.cpp:50:38: error: 'MOD' was not declared in this scope aux=aux*fr2[v[i].x1]%MOD*fr2[v[i].x2]%MOD*fr2[v[i].x3]%MOD; ^ cvintete.cpp:55:21: error: 'j' was not declared in this scope for(j=1;j<=20000;j++) ^ cvintete.cpp:63:25: error: 'Tb' was not declared in this scope Tb sa aflu y si sa vad dacac fr2[y]!=0 ^ cvintete.cpp:63:28: error: expected ';' before 'sa' Tb sa aflu y si sa vad dacac fr2[y]!=0 ^ cvintete.cpp:67:17: error: 'ans' was not declared in this scope ans+=aux; ^ cvintete.cpp:70:11: error: 'ans' was not declared in this scope cout<<ans; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cvintete face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.