Problem hammeringnails
User Taken
Submission Time 2026-11-04 11:42:37
Score 0
Max Time N/A
Max Memory N/A

Compile Error

hammeringnails.cpp: In function ‘int main()’:
hammeringnails.cpp:13:4: error: ‘i’ was not declared in this scope
13 | (i+1;i<=0;i++)
| ^
hammeringnails.cpp:13:6: error: no matching function for call to ‘std::set<int>::set(<brace-enclosed initializer list>)’
13 | (i+1;i<=0;i++)
| ^
In file included from /usr/include/c++/9/set:61,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:87,
from hammeringnails.cpp:1:
/usr/include/c++/9/bits/stl_set.h:271:2: note: candidate: ‘template<class _InputIterator> std::set<_Key, _Compare, _Alloc>::set(_InputIterator, _InputIterator, const allocator_type&)’
271 | set(_InputIterator __first, _InputIterator __last,
| ^~~
/usr/include/c++/9/bits/stl_set.h:271:2: note: template argument deduction/substitution failed:
/usr/include/c++/9/bits/stl_set.h:265:7: note: candidate: ‘std::set<_Key, _Compare, _Allo