/ Liberty /

记录详情

Accepted

foo.cc: In function ‘int main()’:
foo.cc:27:28: warning: unused variable ‘maxn’ [-Wunused-variable]
   27 |         double l=0,r=0,ans,maxn=0;
      |                            ^~~~
In file included from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/istream:41,
                 from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/sstream:40,
                 from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/complex:45,
                 from /nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/ccomplex:39,
                 from stdc++.h:127:
In member function ‘std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>]’,
    inlined from ‘int main()’ at foo.cc:44:32:
/nix/gcc-14.2.1.20250322/include/c++/14.2.1.20250322/ostream:232:25: warning: ‘ans’ may be used uninitialized [-Wmaybe-uninitialized]
  232 |       { return _M_insert(__f); }
      |                ~~~~~~~~~^~~~~
foo.cc: In function ‘int main()’:
foo.cc:27:24: note: ‘ans’ was declared here
   27 |         double l=0,r=0,ans,maxn=0;
      |                        ^~~
# 状态 耗时 内存占用
#1 Accepted 2ms 504.0 KiB
#2 Accepted 4ms 504.0 KiB
#3 Accepted 8ms 612.0 KiB
#4 Accepted 8ms 504.0 KiB
#5 Accepted 8ms 504.0 KiB
#6 Accepted 4ms 488.0 KiB
#7 Accepted 5ms 504.0 KiB
#8 Accepted 5ms 364.0 KiB
#9 Accepted 5ms 496.0 KiB
#10 Accepted 7ms 532.0 KiB

信息

递交者
类型
递交
题目
P1001 小Q的生日派
语言
C++
递交时间
2025-05-10 17:47:22
评测时间
2025-05-10 17:47:22
评测机
分数
100
总耗时
60ms
峰值内存
612.0 KiB