QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#718348 | #415. 最小生成树 | MaMengQi | Compile Error | / | / | C++14 | 1.3kb | 2024-11-06 20:18:23 | 2024-11-06 20:18:25 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code: In function ‘void read(T&)’: answer.code:21:12: error: there are no arguments to ‘getchar’ that depend on a template parameter, so a declaration of ‘getchar’ must be available [-fpermissive] 21 | char c=getchar(); | ^~~~~~~ answer.code:21:12: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) answer.code:22:24: error: there are no arguments to ‘getchar’ that depend on a template parameter, so a declaration of ‘getchar’ must be available [-fpermissive] 22 | for(;!isdigit(c);c=getchar()); | ^~~~~~~ answer.code:23:23: error: there are no arguments to ‘getchar’ that depend on a template parameter, so a declaration of ‘getchar’ must be available [-fpermissive] 23 | for(;isdigit(c);c=getchar())x=x*10+c-48; | ^~~~~~~ answer.code: In function ‘int main()’: answer.code:65:5: error: ‘printf’ was not declared in this scope 65 | printf("%lld",ans); | ^~~~~~ answer.code:3:1: note: ‘printf’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’? 2 | #include <cctype> +++ |+#include <cstdio> 3 | #include <vector> answer.code: In instantiation of ‘void read(T&) [with T = int]’: answer.code:34:9: required from here answer.code:21:19: error: ‘getchar’ was not declared in this scope 21 | char c=getchar(); | ~~~~~~~^~ answer.code:21:19: note: ‘getchar’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?