Submission #874058

#TimeUsernameProblemLanguageResultExecution timeMemory
874058itslqFriend (IOI14_friend)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int findSample(int n, int confidence[], int host[], int protocol[]) { int m = -1; for (int x: confidence) m = max(m, x); return m; }

Compilation message (stderr)

friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:7:16: error: 'begin' was not declared in this scope
    7 |    for (int x: confidence) m = max(m, x);
      |                ^~~~~~~~~~
friend.cpp:7:16: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
                 from friend.cpp:1:
/usr/include/c++/10/valarray:1224:5: note:   'std::begin'
 1224 |     begin(const valarray<_Tp>& __va)
      |     ^~~~~
In file included from /usr/include/c++/10/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
                 from friend.cpp:1:
/usr/include/c++/10/bits/fs_dir.h:549:3: note:   'std::filesystem::__cxx11::begin'
  549 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
friend.cpp:7:16: error: 'end' was not declared in this scope
    7 |    for (int x: confidence) m = max(m, x);
      |                ^~~~~~~~~~
friend.cpp:7:16: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
                 from friend.cpp:1:
/usr/include/c++/10/valarray:1244:5: note:   'std::end'
 1244 |     end(const valarray<_Tp>& __va)
      |     ^~~
In file included from /usr/include/c++/10/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:129,
                 from friend.cpp:1:
/usr/include/c++/10/bits/fs_dir.h:554:3: note:   'std::filesystem::__cxx11::end'
  554 |   end(recursive_directory_iterator) noexcept
      |   ^~~