QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#244523 | #7728. Ramen | Ycfhnnd | WA | 0ms | 3468kb | C++20 | 539b | 2023-11-09 11:09:59 | 2023-11-09 11:10:00 |
Judging History
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;
}
详细
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]