QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#549754#147. Floppy5un_xiaomivita_mboxCompile Error//C++23812b2024-09-06 21:06:282024-09-06 21:06:28

详细

floppy.code: In function ‘std::vector<int> solve_queries(int, int, const string&, const std::vector<int>&, const std::vector<int>&)’:
floppy.code:18:28: error: ‘>>’ should be ‘> >’ within a nested template argument list
   18 |  vector<vector<pair<int,int>>>qry(n);
      |                            ^~
      |                            > >
floppy.code:19:34: error: ‘class std::vector<std::pair<int, int> >’ has no member named ‘emplace_back’
   19 |  for (int i=0;i<q;i++) qry[b[i]].emplace_back(a[i],i);
      |                                  ^~~~~~~~~~~~
floppy.code:23:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
   23 |    for (auto [x,id]:qry[i])
      |              ^
floppy.code:23:14: error: ISO C++ forbids declaration of ‘structured binding’ with no type [-fpermissive]
   23 |    for (auto [x,id]:qry[i])
      |              ^~~~~~
floppy.code:23:14: error: structured binding declaration cannot be C++98 ‘auto’
floppy.code:23:14: error: structured binding declaration cannot have type ‘int’
floppy.code:23:14: note: type must be cv-qualified ‘auto’ or reference to cv-qualified ‘auto’
floppy.code:23:21: warning: range-based ‘for’ loops only available with ‘-std=c++11’ or ‘-std=gnu++11’
   23 |    for (auto [x,id]:qry[i])
      |                     ^~~
floppy.code:23:26: error: forming reference to reference type ‘std::vector<std::pair<int, int> >&’
   23 |    for (auto [x,id]:qry[i])
      |                          ^
grader_floppy.cpp: In function ‘void my_fprintf(FILE*, const char*, ...)’:
grader_floppy.cpp:17:9: error: ‘exit’ was not declared in this scope
   17 |         exit(0);
      |         ^~~~
grader_floppy.cpp: In function ‘void my_fscanf(FILE*, int, const char*, ...)’:
grader_floppy.cpp:26:9: error: ‘exit’ was not declared in this scope
   26 |         exit(0);
      |         ^~~~
grader_floppy.cpp: In function ‘void save_to_floppy(const string&)’:
grader_floppy.cpp:51:5: error: ‘exit’ was not declared in this scope
   51 |     exit(0);
      |     ^~~~
grader_floppy.cpp: In function ‘int main(int, char**)’:
grader_floppy.cpp:91:15: error: ‘atoi’ was not declared in this scope
   91 |     int run = atoi(argv[1]);
      |               ^~~~