| Problema | Constelatii | Operații I/O |
constelatii.in/constelatii.out
|
|---|---|---|---|
| Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64360742 | Utilizator | |
| Fișier | constelatii.cpp | Dimensiune | 4.74 KB |
| Data încărcării | 03 Mai 2026, 00:23 | Scor/rezultat | Eroare de compilare |
constelatii.cpp: In function ‘int main()’: constelatii.cpp:18:18: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ 18 | auto dfs = [&](auto self, int i, int j, int id) -> void { | ^~~~ constelatii.cpp: In lambda function: constelatii.cpp:23:11: error: ‘self’ cannot be used as a function 23 | self(self, i + dr[d], j + dc[d], id); | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ constelatii.cpp: In function ‘int main()’: constelatii.cpp:30:12: error: no match for call to ‘(main()::<lambda(int, int, int, int)>) (main()::<lambda(int, int, int, int)>&, int&, int&, int)’ 30 | dfs(dfs, i, j, (int)comps.size() - 1); | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ constelatii.cpp:18:14: note: candidate: ‘main()::<lambda(int, int, int, int)>’ 18 | auto dfs = [&](auto self, int i, int j, int id) -> void { | ^ constelatii.cpp:18:14: note: no known conversion for argument 1 from ‘main()::<lambda(int, int, int, int)>’ to ‘int’ constelatii.cpp: In lambda function: constelatii.cpp:41:15: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 41 | for (auto [r, c] : pts) { | ^ constelatii.cpp:54:15: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 54 | for (auto [r, c] : tps) { | ^ constelatii.cpp:59:15: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 59 | for (auto [r, c] : tps) { | ^ constelatii.cpp: In function ‘int main()’: constelatii.cpp:99:17: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 99 | for (auto [r1, c1] : comps[ca]) { | ^ constelatii.cpp:100:19: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 100 | for (auto [r2, c2] : comps[cb]) { | ^ constelatii.cpp:148:17: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 148 | for (auto [r1, c1] : comps[i]) { | ^ constelatii.cpp:149:19: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 149 | for (auto [r2, c2] : comps[j]) { | ^ constelatii.cpp:162:19: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’ 162 | auto find = [&](auto self, int x) -> int { | ^~~~ constelatii.cpp: In lambda function: constelatii.cpp:163:43: error: ‘self’ cannot be used as a function 163 | return par[x] == x ? x : par[x] = self(self, par[x]); | ~~~~^~~~~~~~~~~~~~ constelatii.cpp: In function ‘int main()’: constelatii.cpp:166:13: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 166 | for (auto [w, u, v] : edgs) { | ^ constelatii.cpp:167:18: error: no match for call to ‘(main()::<lambda(int, int)>) (main()::<lambda(int, int)>&, std::tuple_element<1, std::tuple<long long int, int, int> >::type&)’ 167 | int pu = find(find, u); | ~~~~^~~~~~~~~ constelatii.cpp:162:15: note: candidate: ‘main()::<lambda(int, int)>’ 162 | auto find = [&](auto self, int x) -> int { | ^ constelatii.cpp:162:15: note: no known conversion for argument 1 from ‘main()::<lambda(int, int)>’ to ‘int’ constelatii.cpp:168:18: error: no match for call to ‘(main()::<lambda(int, int)>) (main()::<lambda(int, int)>&, std::tuple_element<2, std::tuple<long long int, int, int> >::type&)’ 168 | int pv = find(find, v); | ~~~~^~~~~~~~~ constelatii.cpp:162:15: note: candidate: ‘main()::<lambda(int, int)>’ 162 | auto find = [&](auto self, int x) -> int { | ^ constelatii.cpp:162:15: note: no known conversion for argument 1 from ‘main()::<lambda(int, int)>’ to ‘int’
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Constelatii 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ă.