/ Vijos /

记录详情

Wrong Answer

foo.cc: In function 'void readdata()':
foo.cc:42:11: warning: operation on 'l' may be undefined [-Wsequence-point]
         d[++l].p=d[l-1].p+1,d[l].s=d[l-1].s+k;
           ^~~
foo.cc:47:21: warning: operation on 'l' may be undefined [-Wsequence-point]
   while(d[l].s>=k)d[++l].p=d[l-1].p+1,d[l].s=d[l-1].s-k;  
                     ^~~
foo.cc: In function 'void work()':
foo.cc:54:9: warning: unused variable 'j' [-Wunused-variable]
   int i,j,k,x;
         ^
foo.cc: In function 'void redirect()':
foo.cc:10:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   freopen("1.in","r",stdin);
   ~~~~~~~^~~~~~~~~~~~~~~~~~
foo.cc:11:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
   freopen("1.out","w",stdout);
   ~~~~~~~^~~~~~~~~~~~~~~~~~~~
foo.cc: In function 'void readdata()':
foo.cc:26:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d%d%d",&p1,&d[sum].p,&d[sum].s);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:31:12: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
       scanf("%d%d",&d[sum].p,&d[sum].s);
       ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
foo.cc:45:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d",&k);
   ~~~~~^~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Wrong Answer User output longer than standard answer. 1ms 256.0 KiB
#2 Wrong Answer Read 89, expect -32. 0ms 284.0 KiB
#3 Wrong Answer User output longer than standard answer. 0ms 288.0 KiB
#4 Wrong Answer User output longer than standard answer. 2ms 256.0 KiB

信息

递交者
类型
递交
题目
P1346 税收与补贴问题
语言
C++
递交时间
2021-08-15 15:14:27
评测时间
2021-08-15 15:14:27
评测机
分数
0
总耗时
5ms
峰值内存
288.0 KiB