记录详情

Wrong Answer


  
# 状态 耗时 内存占用
#1 Wrong Answer 1ms 204.0 KiB
#2 Wrong Answer 1ms 220.0 KiB
#3 Wrong Answer 1ms 220.0 KiB
#4 Wrong Answer 1ms 220.0 KiB
#5 Wrong Answer 1ms 212.0 KiB
#6 Wrong Answer 1ms 220.0 KiB
#7 Wrong Answer 1ms 220.0 KiB
#8 Wrong Answer 1ms 220.0 KiB
#9 Wrong Answer 1ms 204.0 KiB

代码

#include <iostream>
using namespace std;
int main()
{
    int n,m;
    cin >> n >> m;
    int time[n];
    for( int i = 0; i < n; ++i)
    {
        cin >> time[i];
    }
    int sum = 0;
    for(int i=n-1,j = 1; i >= 0; i--,j++)
    {
        sum = sum + time[i] * j;
    }
    if ( sum >= m )
        cout << "YES";
    else
        cout << "NO"; 
    return 0;     
} 

信息

递交者
类型
递交
题目
P1007 hitwh 2019 新生赛 H Songer and his army
语言
C++
递交时间
2020-12-25 16:07:33
评测时间
2020-12-25 23:30:39
评测机
分数
0
总耗时
11ms
峰值内存
220.0 KiB