QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#759968#3507. Broken Device 2Wansur#Compile Error//C++23466b2024-11-18 13:41:252024-11-18 13:41:25

Judging History

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

  • [2024-11-18 13:41:25]
  • 评测
  • [2024-11-18 13:41:25]
  • 提交

Anna

#include "Anna.h"
#include <bits/stdc++.h>

using namespace std;

int Declare() {
    return 2000;
}

pair<vector<int>, vector<int>> Anna(long long A) {
    vector<int> a, b;
    while(A--) {
        a.push_back(1);
        b.push_back(1);
    }
    return {a, b};
}

Bruno

#include "Bruno.h"
#include <bits/stdc++.h>

typedef long long ll;
using namespace std;

long long Bruno(std::vector<int> u) {
    ll ans = (ll)u.size();
    return ans / 2;
}

詳細信息

Anna.code:10:29: error: ‘>>’ should be ‘> >’ within a nested template argument list
   10 | pair<vector<int>, vector<int>> Anna(long long A) {
      |                             ^~
      |                             > >
Anna.code: In function ‘std::pair<std::vector<int>, std::vector<int> > Anna(long long int)’:
Anna.code:16:12: warning: extended initializer lists only available with ‘-std=c++11’ or ‘-std=gnu++11’
   16 |     return {a, b};
      |            ^
In file included from grader_Anna.cpp:3:
testlib.h: In member function ‘std::vector<_Tp> random_t::distinct(int, T, T)’:
testlib.h:997:9: error: ‘uint64_t’ was not declared in this scope; did you mean ‘u_int64_t’?
  997 |         uint64_t n = to - from + 1;
      |         ^~~~~~~~
      |         u_int64_t
testlib.h:998:30: error: ‘n’ was not declared in this scope
  998 |         if (uint64_t(size) > n)
      |                              ^
testlib.h:1007:32: error: ‘n’ was not declared in this scope
 1007 |             expected += double(n) / double(n - i + 1);
      |                                ^
testlib.h:1009:31: error: ‘n’ was not declared in this scope
 1009 |         if (expected < double(n)) {
      |                               ^
grader_Anna.cpp: In function ‘int main(int, char**)’:
grader_Anna.cpp:53:13: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
   53 |   argv[2] = "/dev/null";
      |             ^~~~~~~~~~~
grader_Anna.cpp:55:24: error: ‘std::chrono’ has not been declared
   55 |   unsigned seed = std::chrono::steady_clock::now().time_since_epoch().count();
      |                        ^~~~~~
grader_Anna.cpp:80:18: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wformat=]
   80 |         printf("%d\n", u.size());
      |                 ~^     ~~~~~~~~
      |                  |           |
      |                  int         std::vector<int>::size_type {aka long unsigned int}
      |                 %ld
grader_Anna.cpp:81:22: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’
   81 |         for (int x : u)
      |                      ^
grader_Anna.cpp:81:22: error: forming reference to reference type ‘std::vector<int>&’