F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39718451_29498.cpp: In function 'int main()':
0_0_39718451_29498.cpp:8:17: error: invalid conversion from 'char' to 'const char*' [-fpermissive]
    8 |   while (scanf (*"%d %d", &n, &m) != EOF) {
      |                 ^~~~~~~~
      |                 |
      |                 char
In file included from gcc-13.1.0/x86_64-w64-mingw32/include/locale.h:12,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/clocale:42,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/x86_64-w64-mingw32/bits/c++locale.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/localefwd.h:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:43,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ostream:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/iostream:41,
                 from 0_0_39718451_29498.cpp:1:
gcc-13.1.0/x86_64-w64-mingw32/include/stdio.h:304:23: note:   initializing argument 1 of 'int scanf(const char*, ...)'
  304 | int scanf(const char *__format, ...)
      |           ~~~~~~~~~~~~^~~~~~~~
0_0_39718451_29498.cpp:9:5: error: 'priority' was not declared in this scope
    9 |     priority queue<int> maxHeap;
      |     ^~~~~~~~
0_0_39718451_29498.cpp:10:5: error: 'vector' was not declared in this scope
   10 |     vector<int> numbers(n);
      |     ^~~~~~
0_0_39718451_29498.cpp:10:5: note: suggested alternatives:
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/vector:66,
                 from 0_0_39718451_29498.cpp:2:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_vector.h:423:11: note:   'std::vector'
  423 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
0_0_39718451_29498.cpp:10:12: error: expected primary-expression before 'int'
   10 |     vector<int> numbers(n);
      |            ^~~
0_0_39718451_29498.cpp:12:22: error: expected ';' before numeric constant
   12 |     for (int i = 0; i 9n; ++i){
      |                      ^~~
      |                      ;
0_0_39718451_29498.cpp:12:23: error: unable to find numeric literal operator 'operator""n'
   12 |     for (int i = 0; i 9n; ++i){
      |                       ^~
0_0_39718451_29498.cpp:12:23: note: use '-fext-numeric-literals' to enable more built-in suffixes
0_0_39718451_29498.cpp:12:25: error: expected ')' before ';' token
   12 |     for (int i = 0; i 9n; ++i){
      |         ~               ^
      |                         )
0_0_39718451_29498.cpp:12:29: error: 'i' was not declared in this scope
   12 |     for (int i = 0; i 9n; ++i){
      |                             ^
0_0_39718451_29498.cpp:15:19: error: 'numbers' was not declared in this scope; did you mean 'std::numbers'?
   15 |     for(int num : numbers){
      |                   ^~~~~~~
      |                   std::numbers
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/max_size_type.h:37,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ranges_base.h:39,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string_view:48,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/basic_string.h:47,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/string:54,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/locale_classes.h:40,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ios_base.h:41,
                 from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/ios:44:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/numbers:48:11: note: 'std::numbers' declared here
   48 | namespace numbers
      |           ^~~~~~~
0_0_39718451_29498.cpp:16:8: error: 'maxHeap' was not declared in this scope
   16 |        maxHeap.push(num);
      |        ^~~~~~~
0_0_39718451_29498.cpp:18:12: error: expected primary-expression before 'int'
   18 |     vector<int> largest(m);
      |            ^~~
0_0_39718451_29498.cpp:20:8: error: 'largest' was not declared in this scope
   20 |        largest[i] = maxHeap. top();
      |        ^~~~~~~
0_0_39718451_29498.cpp:20:21: error: 'maxHeap' was not declared in this scope
   20 |        largest[i] = maxHeap. top();
      |                     ^~~~~~~
0_0_39718451_29498.cpp:25:21: error: 'largest' was not declared in this scope
   25 |        printf("%d", largest[i]);
      |                     ^~~~~~~
0_0_39718451_29498.cpp:27:18: error: expected '}' at end of input
   27 |     printf("\n");
      |                  ^
0_0_39718451_29498.cpp:8:43: note: to match this '{'
    8 |   while (scanf (*"%d %d", &n, &m) != EOF) {
      |                                           ^
0_0_39718451_29498.cpp:27:18: error: expected '}' at end of input
   27 |     printf("\n");
      |                  ^
0_0_39718451_29498.cpp:6:12: note: to match this '{'
    6 | int main() {
      |            ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-17 01:53:04, Gzip enabled