QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#414384 | #5645. Walking Boy | Andycipation | AC ✓ | 1ms | 3816kb | C++20 | 855b | 2024-05-18 22:29:06 | 2024-05-18 22:29:06 |
Judging History
answer
/*
* author: ADMathNoob
* created: 05/17/24 20:37:57
* problem: https://qoj.ac/problem/5645
*/
/*
Comments about problem:
*/
#include <bits/stdc++.h>
using namespace std;
#ifdef _DEBUG
#include "debug.h"
#else
#define debug(...) 42
#endif
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
auto SolveTestCase = [&]() -> void {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
a.insert(a.begin(), 0);
a.push_back(1440);
int most = 0;
for (int i = 0; i < n + 1; i++) {
int cnt = (a[i + 1] - a[i]) / 120;
most += cnt;
}
cout << (most >= 2 ? "YES" : "NO") << '\n';
};
{
int tt;
cin >> tt;
for (int qq = 1; qq <= tt; qq++) {
SolveTestCase();
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3544kb
input:
6 14 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 12 100 200 300 400 600 700 800 900 1100 1200 1300 1400 13 100 200 300 400 500 600 700 800 900 1100 1200 1300 1400 13 101 189 272 356 463 563 659 739 979 1071 1170 1274 1358 1 42 5 0 1 2 3 4
output:
NO YES NO YES YES YES
result:
ok 6 lines
Test #2:
score: 0
Accepted
time: 1ms
memory: 3816kb
input:
100 96 9 18 28 43 60 70 85 97 113 122 137 149 163 179 187 200 211 222 234 239 254 269 282 291 305 311 323 339 349 358 375 387 399 412 660 673 682 693 708 720 735 753 767 781 791 808 819 838 850 863 877 886 897 914 920 935 952 961 972 984 994 1011 1018 1029 1042 1060 1076 1093 1102 1112 1124 1133 114...
output:
YES NO NO YES NO NO YES YES NO NO NO NO NO NO NO NO NO YES NO NO NO NO YES YES YES NO NO NO NO NO YES NO NO YES YES NO YES NO YES YES YES NO YES YES YES NO YES YES YES YES YES YES NO NO NO YES NO NO YES YES YES YES NO NO NO NO NO NO YES YES YES NO NO NO YES YES YES NO NO NO NO NO NO YES NO YES NO NO...
result:
ok 100 lines