QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#139146#2670. Arranging shoesQwerty1232#Compile Error//C++20135b2023-08-12 18:22:212024-07-04 01:39:46

Judging History

你现在查看的是最新测评结果

  • [2024-07-04 01:39:46]
  • 评测
  • [2023-08-12 18:22:21]
  • 提交

answer

#include "shoes.h"

long long count_swaps(std::vector<int> s) {
    int n = s.size() / 2;
    return int64_t(n) * (n - 1) / 2;
}

Details

answer.code: In function ‘long long int count_swaps(std::vector<int>)’:
answer.code:5:12: error: ‘int64_t’ was not declared in this scope
    5 |     return int64_t(n) * (n - 1) / 2;
      |            ^~~~~~~
answer.code:2:1: note: ‘int64_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    1 | #include "shoes.h"
  +++ |+#include <cstdint>
    2 |