QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#319041#7728. RamenAlbert711WA 1ms3812kbC++20620b2024-02-01 16:50:422024-02-01 16:50:43

Judging History

你现在查看的是最新测评结果

  • [2024-02-01 16:50:43]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3812kb
  • [2024-02-01 16:50:42]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef double db;
const int N = 2005 + 5;
const int mod = 1e9+7;


void solve() {
    int n;
    cin>>n;
    vector<ll> a(n+1);
    for(int i=1;i<=n;i++) cin>>a[i];
    ll cnt=a[1];
    for(int i=2;i<=n;i++){
        if(cnt<=0){
            cout<<"No\n";
            return;
        }
    }
    cout<<"Yes\n";
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
//    cout<<fixed<<setprecision(7);
    int T = 1;
//    cin >> T;
    while (T--) solve();
    return 0;
}


详细

Test #1:

score: 100
Accepted
time: 1ms
memory: 3812kb

input:

3
1 2 -5

output:

Yes

result:

ok YES

Test #2:

score: -100
Wrong Answer
time: 1ms
memory: 3488kb

input:

5
2 -5 2 3 1

output:

Yes

result:

wrong answer expected NO, found YES [1st token]