실행 실패 (제출 코드 컴파일 에러)
Main.cpp:14:9: error: ‘unordered_map’ does not name a type 14 | unordered_map<int, bool> history; | ^~~~~~~~~~~~~ Main.cpp: In member function ‘void Data::Insert(int)’: Main.cpp:20:17: error: ‘history’ was not declared in this scope 20 | history[Num] = true; | ^~~~~~~ Main.cpp: In member function ‘void Data::Empty()’: Main.cpp:25:42: error: ‘history’ was not declared in this scope 25 | while(!Maxpq.empty() && !history[Maxpq.top()]) | ^~~~~~~ Main.cpp:29:42: error: ‘history’ was not declared in this scope 29 | while(!Minpq.empty() && !history[Minpq.top()]) | ^~~~~~~ Main.cpp: In member function ‘void Data::Remove(int)’: Main.cpp:39:25: error: ‘history’ was not declared in this scope 39 | history[Maxpq.top()] = false; | ^~~~~~~ Main.cpp:44:25: error: ‘history’ was not declared in this scope 44 | history[Minpq.top()] = false; | ^~~~~~~ Main.cpp: In function ‘int main()’: Main.cpp:72:32: warning: comparison with string literal results in unspecified behavior [-Waddress] 72 | if(cmd == "I") data.Insert(num); | ~~~~^~~~~~ Main.cpp:72:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] Main.cpp:73:37: warning: comparison with string literal results in unspecified behavior [-Waddress] 73 | else if(cmd == "D") data.Remove(num); | ~~~~^~~~~~ Main.cpp:73:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.