Runtime Error

/in/foo.cc: In function 'int read()':
/in/foo.cc:9:15: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return y=='-'?-x:x;
         ~~~~~~^~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:9:15: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return y=='-'?-x:x;
         ~~~~~~^~~~~
/in/foo.cc:6:15: note: 'y' was declared here
  int x=0;char y;char o=getchar();
               ^
/in/foo.cc:9:15: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return y=='-'?-x:x;
         ~~~~~~^~~~~
/in/foo.cc:6:15: note: 'y' was declared here
  int x=0;char y;char o=getchar();
               ^
/in/foo.cc:9:15: warning: 'y' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return y=='-'?-x:x;
         ~~~~~~^~~~~
/in/foo.cc:6:15: note: 'y' was declared here
  int x=0;char y;char o=getchar();
               ^
# 状态 耗时 内存占用
#1 Runtime Error 2ms 228.0 KiB
#2 Accepted 2ms 224.0 KiB
#3 Accepted 1ms 356.0 KiB
#4 Accepted 1ms 356.0 KiB
#5 Accepted 2ms 356.0 KiB
#6 Runtime Error 2ms 348.0 KiB
#7 Runtime Error 2ms 232.0 KiB
#8 Runtime Error 2ms 352.0 KiB
#9 Runtime Error 2ms 228.0 KiB
#10 Runtime Error 2ms 348.0 KiB
#11 Runtime Error 2ms 228.0 KiB
#12 Runtime Error 3ms 352.0 KiB
#13 Runtime Error 2ms 228.0 KiB

信息

递交者
类型
递交
题目
「一本通 1.1 例 2」种树
语言
C++
递交时间
2020-05-23 15:07:27
评测时间
2020-05-23 15:07:27
评测机
分数
28
总耗时
31ms
峰值内存
356.0 KiB