#4199
Grădina Academiei Shuchi’in are forma unui pătrat cu latura de N
metri și este împărțit în N × N
parcele pătrate cu dimensiunea de 1
metru. Harta grădinii arată că parcelele sunt aranjate pe linii și coloane și sunt notate cu perechi (r, c)
, unde r
este linia și c
coloana pe care o ocupă parcela. Unele parcele, marcate cu 0
pe harta grădinii, conțin copaci străvechi care nu au putut fi mutați sau tăiați când grădina a fost restaurată. Alte parcele, marcate cu 1
, conțin flori. Notăm cu F
numărul total de parcele care conțin flori. Kaguya definește gradul de înflorire a unei parcele ca fiind suma distanțelor de la parcela curentă la cele mai apropiate K
parcele care conțin flori. Ea vrea să știe gradul de înflorire al fiecărei parcele.
Problema | flowers | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 256 MB
/
Stivă 64 MB
|
Id soluție | #57810044 | Utilizator | |
Fișier | flowers.cpp | Dimensiune | 5.57 KB |
Data încărcării | 18 Aprilie 2025, 23:26 | Scor / rezultat | Eroare de compilare |
flowers.cpp: In function 'int main()': flowers.cpp:44:33: error: parameter declared 'auto' auto rect = [&](const auto &P,int r1,int c1,int r2,int c2)->int64 { ^ flowers.cpp: In lambda function: flowers.cpp:48:16: error: 'P' was not declared in this scope return P[r2][c2] - P[r1-1][c2] - P[r2][c1-1] + P[r1-1][c1-1]; ^ flowers.cpp: In function 'int main()': flowers.cpp:80:34: error: parameter declared 'auto' auto triBR = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp: In lambda function: flowers.cpp:85:16: error: 'A' was not declared in this scope return A[r][c] - A[r0][c0]; ^ flowers.cpp: In function 'int main()': flowers.cpp:87:34: error: parameter declared 'auto' auto triBL = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp: In lambda function: flowers.cpp:92:16: error: 'A' was not declared in this scope return A[r][c] - A[r0][c0]; ^ flowers.cpp: In function 'int main()': flowers.cpp:140:50: error: no match for call to '(main()::__lambda5) (std::vector<std::vector<int> >&, int&, int&, int)' int cntNW = triBR(BR.cnt, rN, cW, R-1); ^ flowers.cpp:80:20: note: candidate is: auto triBR = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:80:56: note: main()::__lambda5 auto triBR = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:80:56: note: candidate expects 3 arguments, 4 provided flowers.cpp:141:50: error: no match for call to '(main()::__lambda5) (std::vector<std::vector<int> >&, int&, int&, int)' int cntSE = triBR(BR.cnt, rS, cE, R-1); ^ flowers.cpp:80:20: note: candidate is: auto triBR = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:80:56: note: main()::__lambda5 auto triBR = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:80:56: note: candidate expects 3 arguments, 4 provided flowers.cpp:142:50: error: no match for call to '(main()::__lambda6) (std::vector<std::vector<int> >&, int&, int&, int)' int cntNE = triBL(BL.cnt, rN, cW, R-1); ^ flowers.cpp:87:20: note: candidate is: auto triBL = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:87:56: note: main()::__lambda6 auto triBL = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:87:56: note: candidate expects 3 arguments, 4 provided flowers.cpp:143:50: error: no match for call to '(main()::__lambda6) (std::vector<std::vector<int> >&, int&, int&, int)' int cntSW = triBL(BL.cnt, rS, cW, R-1); ^ flowers.cpp:87:20: note: candidate is: auto triBL = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:87:56: note: main()::__lambda6 auto triBL = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:87:56: note: candidate expects 3 arguments, 4 provided flowers.cpp:145:51: error: no match for call to '(main()::__lambda5) (std::vector<std::vector<long long int> >&, int&, int&, int)' int64 ijNW = triBR(BR.ij, rN, cW, R-1); ^ flowers.cpp:80:20: note: candidate is: auto triBR = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:80:56: note: main()::__lambda5 auto triBR = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:80:56: note: candidate expects 3 arguments, 4 provided flowers.cpp:146:51: error: no match for call to '(main()::__lambda5) (std::vector<std::vector<long long int> >&, int&, int&, int)' int64 ijSE = triBR(BR.ij, rS, cE, R-1); ^ flowers.cpp:80:20: note: candidate is: auto triBR = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:80:56: note: main()::__lambda5 auto triBR = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:80:56: note: candidate expects 3 arguments, 4 provided flowers.cpp:147:51: error: no match for call to '(main()::__lambda6) (std::vector<std::vector<long long int> >&, int&, int&, int)' int64 idNE = triBL(BL.id, rN, cW, R-1); ^ flowers.cpp:87:20: note: candidate is: auto triBL = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:87:56: note: main()::__lambda6 auto triBL = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:87:56: note: candidate expects 3 arguments, 4 provided flowers.cpp:148:51: error: no match for call to '(main()::__lambda6) (std::vector<std::vector<long long int> >&, int&, int&, int)' int64 idSW = triBL(BL.id, rS, cW, R-1); ^ flowers.cpp:87:20: note: candidate is: auto triBL = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:87:56: note: main()::__lambda6 auto triBL = [&](const auto &A,int r,int c,int d)->int64 { ^ flowers.cpp:87:56: note: candidate expects 3 arguments, 4 provided
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema flowers 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ă.