#4177
livada2
Fiind un băiat aventurier, călărețul Jonathan obișnuia să umble prin pădurile magice ale împărăției tatălui său. În interiorul meleagurilor lui, împăratul avea o livadă specială, în cadrul căreia se aflau n
meri magici, numerotați de la 1
la n
, fiecare măr i
conținând o cantitate cunoscută m[i]
de fructe. Fiind speciali, cantitatea de fructe din acești meri putea fi modificată. Ca în orice poveste, împăratul avea un dușman, pe vrăjitorul Afida, care dorea să-i atace livada.
Concursul Interjudeţean de Matematică şi Informatică Sever Aurel Groze, 2022
Problema | livada2 | Operații I/O |
livada2.in /livada2.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #43493303 | Utilizator | |
Fișier | livada2.cpp | Dimensiune | 1.23 KB |
Data încărcării | 29 Aprilie 2023, 01:32 | Scor / rezultat | Eroare de compilare |
livada2.cpp:21:5: error: stray '\342' in program for (int i=1; i‹=n; i++) ^ livada2.cpp:21:5: error: stray '\200' in program livada2.cpp:21:5: error: stray '\271' in program livada2.cpp:31:9: error: stray '\303' in program f >> C >> × >> Y >> P; ^ livada2.cpp:31:9: error: stray '\227' in program livada2.cpp:33:13: error: stray '\343' in program 「 ^ livada2.cpp:33:13: error: stray '\200' in program livada2.cpp:33:13: error: stray '\214' in program livada2.cpp:47:9: error: stray '\342' in program for (int i=1; i‹=n; i++) ^ livada2.cpp:47:9: error: stray '\200' in program livada2.cpp:47:9: error: stray '\271' in program livada2.cpp:5:8: error: expected unqualified-id before numeric constant int n, 9, s[100002], dr [100002], st [100002], v[100001], nr [100001]; ^ livada2.cpp: In function 'int main()': livada2.cpp:10:14: error: 'nr' was not declared in this scope f >> nr[i]; ^ livada2.cpp:12:12: error: 'v' was not declared in this scope f>>v[i]; ^ livada2.cpp:16:13: error: 'v' was not declared in this scope if (v[i]) ^ livada2.cpp:18:9: error: 'dr' was not declared in this scope dr[i] = i1;// copac special in dreapta ^ livada2.cpp:21:24: warning: suggest parentheses around assignment used as truth value [-Wparentheses] for (int i=1; i‹=n; i++) ^ livada2.cpp:23:13: error: 'v' was not declared in this scope if (v[i]) ^ livada2.cpp:25:9: error: 'st' was not declared in this scope st[i] = i1;// copac special in stinga ^ livada2.cpp:27:9: error: 'q' was not declared in this scope f>> q ^ livada2.cpp:28:6: error: expected ';' before 'for' for (int i=1; i<=q; i++) ^ livada2.cpp:28:20: error: 'i' was not declared in this scope for (int i=1; i<=q; i++) ^ livada2.cpp:28:29: error: expected ';' before ')' token for (int i=1; i<=q; i++) ^ livada2.cpp:39:5: error: 'else' without a previous 'if' else ^ livada2.cpp:41:13: error: 'st' was not declared in this scope if (st[x]) // daca exista copas specil in stinga ^ livada2.cpp:41:16: error: 'x' was not declared in this scope if (st[x]) // daca exista copas specil in stinga ^ livada2.cpp:43:9: error: 's' was not declared in this scope s [x] -= p; ^ livada2.cpp:43:12: error: 'x' was not declared in this scope s [x] -= p; ^ livada2.cpp:43:18: error: 'p' was not declared in this scope s [x] -= p; ^ livada2.cpp:44:11: error: 'y' was not declared in this scope s[y+1] += P; ^ livada2.cpp:44:19: error: 'P' was not declared in this scope s[y+1] += P; ^ livada2.cpp:47:28: warning: suggest parentheses around assignment used as truth value [-Wparentheses] for (int i=1; i‹=n; i++) ^ livada2.cpp:48:13: error: 's' was not declared in this scope s[i] += s[i-1]; ^ livada2.cpp:50:13: error: 'nr' was not declared in this scope nr[i]=s[i] + nr[i]; ^ livada2.cpp:50:19: error: 's' was not declared in this scope nr[i]=s[i] + nr[i]; ^ livada2.cpp:52:16: error: 'nr' was not declared in this scope g<<nr[i]<<' '; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema livada2 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ă.