Wrong Answer

foo.cc: In function 'int main()':
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("%d",&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 Wrong Answer Read 1819494844, expect 12. 2ms 384.0 KiB
#2 Wrong Answer Read 2632206784, expect 16. 1ms 368.0 KiB
#3 Wrong Answer Read 3021867454, expect 15. 2ms 384.0 KiB
#4 Wrong Answer Read 1548302775, expect 8. 2ms 384.0 KiB
#5 Wrong Answer Read 134470078, expect 14. 2ms 384.0 KiB
#6 Wrong Answer Read 3631446470, expect 22. 2ms 384.0 KiB
#7 Wrong Answer Read 347560381, expect 13. 1ms 384.0 KiB
#8 Wrong Answer Read 1563212226, expect 18. 2ms 384.0 KiB
#9 Wrong Answer Read 2034973127, expect 23. 1ms 384.0 KiB
#10 Wrong Answer Read 831027655, expect 23. 1ms 384.0 KiB

信息

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