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_38571176_18341.cpp: In function 'int main()':
0_0_38571176_18341.cpp:34:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   34 |     sort(a,a+k,cmp);
      |     ^~~~
      |     short
0_0_38571176_18341.cpp:55:5: error: 'stack' was not declared in this scope
   55 |     stack<int> st;
      |     ^~~~~
0_0_38571176_18341.cpp:2:1: note: 'std::stack' is defined in header '<stack>'; did you forget to '#include <stack>'?
    1 | #include<iostream>
  +++ |+#include <stack>
    2 | #define inf 0x3f3f3f3f
0_0_38571176_18341.cpp:55:11: error: expected primary-expression before 'int'
   55 |     stack<int> st;
      |           ^~~
0_0_38571176_18341.cpp:56:5: error: 'st' was not declared in this scope; did you mean 'std'?
   56 |     st.push(a[max_i].ind);
      |     ^~
      |     std


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-29 21:38:07, Gzip enabled