실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In function ‘int main()’: Main.cpp:13:20: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long long int*’ [-Wformat=] 13 | scanf("%d %d", &w[i], &price[i]); | ~^ ~~~~~~~~~ | | | | int* long long int* | %lld Main.cpp: At global scope: Main.cpp:72:27: error: redefinition of ‘std::queue<std::pair<int, int> > q’ 72 | queue <pair <int, int > > q; | ^ Main.cpp:3:27: note: ‘std::queue<std::pair<int, int> > q’ previously declared here 3 | queue <pair <int, int > > q; | ^ Main.cpp:74:5: error: redefinition of ‘int main()’ 74 | int main() | ^~~~ Main.cpp:5:5: note: ‘int main()’ previously defined here 5 | int main() | ^~~~ Main.cpp: In function ‘int main()’: Main.cpp:82:20: warning: format ‘%d’ expects argument of type ‘int*’, but argument 3 has type ‘long long int*’ [-Wformat=] 82 | scanf("%d %d", &w[i], &price[i]); | ~^ ~~~~~~~~~ | | | | int* long long int* | %lld Main.cpp: In function ‘int main()’: Main.cpp:10:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d %d", &a, &heavy); | ~~~~~^~~~~~~~~~~~~~~~~~~~~ Main.cpp:13:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d %d", &w[i], &price[i]); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ Main.cpp: In function ‘int main()’: Main.cpp:79:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 79 | scanf("%d %d", &a, &heavy); | ~~~~~^~~~~~~~~~~~~~~~~~~~~ Main.cpp:82:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 82 | scanf("%d %d", &w[i], &price[i]); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.