QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#244530#7728. RamenYcfhnndWA 1ms3420kbC++20707b2023-11-09 11:17:582023-11-09 11:17:58

Judging History

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

  • [2023-11-09 11:17:58]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3420kb
  • [2023-11-09 11:17:58]
  • 提交

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];
    }
    if (n == 1){
        cout << "Yes\n";
    }else if (n == 2){
        if (a[0] >= 0){
            cout << "Yes\n";
        }else{
            cout << "No\n";
        }
    }else{
        if (a[0] > 0 && a[1] > 0){
            cout << "Yes\n";
        }else{
            cout << "No\n";
        }
    }
}       

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

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

詳細信息

Test #1:

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

input:

3
1 2 -5

output:

Yes

result:

ok YES

Test #2:

score: 0
Accepted
time: 1ms
memory: 3396kb

input:

5
2 -5 2 3 1

output:

No

result:

ok NO

Test #3:

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

input:

5
3 -2 1 -1 -1

output:

No

result:

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