Submission #703278

#TimeUsernameProblemLanguageResultExecution timeMemory
703278finn__Archery (IOI09_archery)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define N 200000 unsigned rank[N << 1]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); size_t n, r; cin >> n >> r; for (size_t i = 0; i < 2 * n; i++) cin >> rank[i]; if (rank[0] == 1) { cout << 1 << '\n'; } }

Compilation message (stderr)

archery.cpp: In function 'int main()':
archery.cpp:17:16: error: reference to 'rank' is ambiguous
   17 |         cin >> rank[i];
      |                ^~~~
In file included from /usr/include/c++/10/bits/move.h:57,
                 from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from archery.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: candidates are: 'template<class> struct std::rank'
 1359 |     struct rank
      |            ^~~~
archery.cpp:6:10: note:                 'unsigned int rank [400000]'
    6 | unsigned rank[N << 1];
      |          ^~~~
archery.cpp:19:9: error: reference to 'rank' is ambiguous
   19 |     if (rank[0] == 1)
      |         ^~~~
In file included from /usr/include/c++/10/bits/move.h:57,
                 from /usr/include/c++/10/bits/stl_pair.h:59,
                 from /usr/include/c++/10/bits/stl_algobase.h:64,
                 from /usr/include/c++/10/bits/specfun.h:45,
                 from /usr/include/c++/10/cmath:1927,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
                 from archery.cpp:1:
/usr/include/c++/10/type_traits:1359:12: note: candidates are: 'template<class> struct std::rank'
 1359 |     struct rank
      |            ^~~~
archery.cpp:6:10: note:                 'unsigned int rank [400000]'
    6 | unsigned rank[N << 1];
      |          ^~~~