실행 실패 (제출 코드 컴파일 에러)
{"stderr": "Main.cpp: In function \u2018int main()\u2019:\nMain.cpp:15:13: warning: format \u2018%d\u2019 expects argument of type \u2018int*\u2019, but argument 2 has type \u2018long long int*\u2019 [-Wformat=]\n 15 | scanf(\"%d %d\",&N,&k);\n | ~^ ~~\n | | |\n | int* long long int*\n | %lld\nMain.cpp:15:16: warning: format \u2018%d\u2019 expects argument of type \u2018int*\u2019, but argument 3 has type \u2018long long int*\u2019 [-Wformat=]\n 15 | scanf(\"%d %d\",&N,&k);\n | ~^ ~~\n | | |\n | int* long long int*\n | %lld\nMain.cpp:16:36: warning: format \u2018%d\u2019 expects argument of type \u2018int*\u2019, but argument 2 has type \u2018long long int*\u2019 [-Wformat=]\n 16 | for (int i=1;i<=N;i++) scanf(\"%d %d\",&d[i],&w[i]);\n | ~^ ~~~~~\n | | |\n | int* long long int*\n | %lld\nMain.cpp:16:39: warning: format \u2018%d\u2019 expects argument of type \u2018int*\u2019, but argument 3 has type \u2018long long int*\u2019 [-Wformat=]\n 16 | for (int i=1;i<=N;i++) scanf(\"%d %d\",&d[i],&w[i]);\n | ~^ ~~~~~\n | | |\n | int* long long int*\n | %lld\nMain.cpp:23:25: warning: narrowing conversion of \u2018(tmp + d[cnt])\u2019 from \u2018long long int\u2019 to \u2018int\u2019 [-Wnarrowing]\n 23 | pq.push({tmp+d[cnt],w[cnt],c});\n | ~~~^~~~~~~\nMain.cpp:23:38: warning: narrowing conversion of \u2018w[cnt]\u2019 from \u2018long long int\u2019 to \u2018int\u2019 [-Wnarrowing]\n 23 | pq.push({tmp+d[cnt],w[cnt],c});\n | ~~~~~^\nMain.cpp:25:13: error: reference to \u2018size\u2019 is ambiguous\n 25 | if (size==N) break;\n | ^~~~\nIn file included from /usr/include/c++/11/string:54,\n from /usr/include/c++/11/bits/locale_classes.h:40,\n from /usr/include/c++/11/bits/ios_base.h:41,\n from /usr/include/c++/11/ios:42,\n from /usr/include/c++/11/istream:38,\n from /usr/include/c++/11/sstream:38,\n from /usr/include/c++/11/complex:45,\n from /usr/include/c++/11/ccomplex:39,\n from /usr/include/aarch64-linux-gnu/c++/11/bits/stdc++.h:54,\n from Main.cpp:1:\n/usr/include/c++/11/bits/range_access.h:254:5: note: candidates are: \u2018template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])\u2019\n 254 | size(const _Tp (&)[_Nm]) noexcept\n | ^~~~\n/usr/include/c++/11/bits/range_access.h:245:5: note: \u2018template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)\u2019\n 245 | size(const _Container& __cont) noexcept(noexcept(__cont.size()))\n | ^~~~\nMain.cpp:13:23: note: \u2018long long int size\u2019\n 13 | long long ans=0,cnt=0,size=0,tmp;\n | ^~~~\nMain.cpp:32:17: error: reference to \u2018size\u2019 is ambiguous\n 32 | size++;\n | ^~~~\nIn file included from /usr/include/c++/11/string:54,\n from /usr/include/c++/11/bits/locale_classes.h:40,\n from /usr/include/c++/11/bits/ios_base.h:41,\n from /usr/include/c++/11/ios:42,\n from /usr/include/c++/11/istream:38,\n from /usr/include/c++/11/sstream:38,\n from /usr/include/c++/11/complex:45,\n from /usr/in(...truncated, total 6711 characters)
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
비공개 코드입니다. 코드 작성자만 볼 수 있습니다.
반례를 발견하지 못했습니다.