Runtime Error

foo.cc: In function 'int main()':
foo.cc:16:17: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
  scanf("%lld",&n);
               ~~^
foo.cc:23:19: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=]
  printf("%lld",ans); 
                   ^
foo.cc:16:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld",&n);
  ~~~~~^~~~~~~~~~~
foo.cc:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d",&x[i].a,&x[i].b);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:22:22: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
   if(x[i].a>now)ans++,now=x[i].b;
                 ~~~~~^~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。
# 状态 耗时 内存占用
#1 Runtime Error Aborted 1ms 384.0 KiB
#2 Runtime Error Aborted 2ms 384.0 KiB
#3 Runtime Error Aborted 2ms 384.0 KiB
#4 Runtime Error Aborted 2ms 384.0 KiB
#5 Runtime Error Aborted 2ms 384.0 KiB
#6 Runtime Error Aborted 2ms 384.0 KiB
#7 Runtime Error Aborted 2ms 384.0 KiB
#8 Runtime Error Aborted 2ms 384.0 KiB
#9 Runtime Error Aborted 2ms 384.0 KiB
#10 Runtime Error Aborted 2ms 384.0 KiB

信息

递交者
类型
递交
题目
「一本通 1.1 例 1」活动安排
语言
C++
递交时间
2021-06-29 23:59:24
评测时间
2021-06-29 23:59:24
评测机
分数
0
总耗时
23ms
峰值内存
384.0 KiB