QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#871807#9223. Data DeterminationHuangHanShengCompile Error//C++171.6kb2025-01-25 22:13:072025-01-25 22:13:08

詳細信息

answer.code: In function ‘void test()’:
answer.code:60:18: error: 2 names provided for structured binding
   60 |             auto [X, i] = L.begin();
      |                  ^~~~~~
answer.code:60:18: note: while ‘std::_Rb_tree_const_iterator<std::pair<std::multiset<std::pair<int, int> >, int> >’ decomposes into 1 element
answer.code:64:18: error: cannot decompose inaccessible member ‘std::reverse_iterator<std::_Rb_tree_const_iterator<std::pair<std::multiset<std::pair<int, int> >, int> > >::current’ of ‘std::reverse_iterator<std::_Rb_tree_const_iterator<std::pair<std::multiset<std::pair<int, int> >, int> > >’
   64 |             auto [Y, i] = C.rbegin();
      |                  ^~~~~~
In file included from /usr/include/c++/14/bits/stl_algobase.h:67,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from answer.code:1:
/usr/include/c++/14/bits/stl_iterator.h:148:17: note: declared protected here
  148 |       _Iterator current;
      |                 ^~~~~~~