记录详情

Accepted

foo.cc: In function ‘int main()’:
foo.cc:14:22: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   14 |         for(int j=0;j<prime.size() && i*prime[j]<=n;j++)
      |                     ~^~~~~~~~~~~~~
foo.cc:20:18: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   20 |     for(int i=0;i<prime.size();i++) cout<<prime[i]<<" ";
      |                 ~^~~~~~~~~~~~~
foo.cc:10:9: warning: unused variable ‘p’ [-Wunused-variable]
   10 |     int p=0;
      |         ^
# 状态 耗时 内存占用
#1 Accepted 2ms 536.0 KiB
#2 Accepted 2ms 320.0 KiB
#3 Accepted 2ms 328.0 KiB
#4 Accepted 3ms 536.0 KiB
#5 Accepted 5ms 540.0 KiB

信息

递交者
类型
递交
题目
P1040 OO10-1 基于vector的素数筛选法
比赛
2024春 面向对象的程序设计方法(第3场作业赛)
语言
C++
递交时间
2024-05-03 21:16:35
评测时间
2024-05-03 21:16:35
评测机
分数
100
总耗时
16ms
峰值内存
540.0 KiB