QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#244523#7728. RamenYcfhnndWA 0ms3468kbC++20539b2023-11-09 11:09:592023-11-09 11:10:00

Judging History

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

  • [2023-11-09 11:10:00]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3468kb
  • [2023-11-09 11:09:59]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;

using i64 = long long;

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int T = 1;
    // cin >> T;
    while (T--) {
        solve();    
    }
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3468kb

input:

3
1 2 -5

output:

Yes

result:

ok YES

Test #2:

score: 0
Accepted
time: 0ms
memory: 3420kb

input:

5
2 -5 2 3 1

output:

No

result:

ok NO

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 3420kb

input:

5
3 -2 1 -1 -1

output:

No

result:

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