| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 132518 | 黄枳润 | 31回文字符串II | C++ | Compile Error | 0 MS | 0 KB | 557 | 2025-10-08 19:15:07 |
#include<stdio.h> #include<string.h> int main() { char s[1001]; int a = {0}, sum = 0; while(gets(s)) { sum = 0; for(int i = 0; i < strlen(s); i++) { if(s[i] >= 97) s[i] = s[i] - 32; // 转换为大写字母 if(!a[s[i] - 65]) { a[s[i] - 65] = 1; sum++; } if(sum == 26) break; // 若已找到26个不同字母则提前结束循环 } if(sum == 26) printf("Yes\n"); else printf("No\n"); } return 0; }
Main.cc: In function 'int main()':
Main.cc:6:11: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
while(gets(s)) {
^
In file included from Main.cc:1:0:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:6:11: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
while(gets(s)) {
^
In file included from Main.cc:1:0:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:6:17: warning: 'char* gets(char*)' is deprecated [-Wdeprecated-declarations]
while(gets(s)) {
^
In file included from Main.cc:1:0:
/usr/include/stdio.h:638:14: note: declared here
extern char *gets (char *__s) __wur __attribute_deprecated__;
^
Main.cc:8:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < strlen(s); i++) {
^
Main.cc:10:28: error: invalid types 'int[int]' for array subscript
if(!a[s[i] - 65]) {
^
Main.cc:11:28: error: invalid types 'int[int]' for array subscript
a[s[i] - 65] = 1;
^