QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#595338#9349. Exchanging GiftsZhangYiDeCompile Error//C++201.1kb2024-09-28 13:28:292024-09-28 13:28:29

Details

answer.code: In function ‘int main()’:
answer.code:46:17: error: ‘unordered_map’ was not declared in this scope
   46 |                 unordered_map<int, ULL> b;
      |                 ^~~~~~~~~~~~~
answer.code:6:1: note: ‘std::unordered_map’ is defined in header ‘<unordered_map>’; did you forget to ‘#include <unordered_map>’?
    5 | #include <algorithm>
  +++ |+#include <unordered_map>
    6 | 
answer.code:46:31: error: expected primary-expression before ‘int’
   46 |                 unordered_map<int, ULL> b;
      |                               ^~~
answer.code:52:41: error: ‘b’ was not declared in this scope
   52 |                                         b[x] += c[i];
      |                                         ^
answer.code:57:36: error: ‘b’ was not declared in this scope
   57 |                 for (auto [x, y] : b) {
      |                                    ^
answer.code:21:19: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   21 |         for (scanf("%d", &task); task--; ) {
      |              ~~~~~^~~~~~~~~~~~~
answer.code:22:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   22 |                 scanf("%d", &n);
      |                 ~~~~~^~~~~~~~~~
answer.code:26:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   26 |                         scanf("%d", &t);
      |                         ~~~~~^~~~~~~~~~
answer.code:29:38: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   29 |                                 scanf("%d", &k);
      |                                 ~~~~~^~~~~~~~~~
answer.code:32:46: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   32 |                                         scanf("%d", &x);
      |                                         ~~~~~^~~~~~~~~~
answer.code:35:38: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   35 |                                 scanf("%d%d", v1 + i, v2 + i);
      |                                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~