QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#83928#5645. Walking Boyprimrose255AC ✓2ms3696kbC++14351b2023-03-04 13:19:582023-03-04 13:20:01

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-04 13:20:01]
  • 评测
  • 测评结果:AC
  • 用时:2ms
  • 内存:3696kb
  • [2023-03-04 13:19:58]
  • 提交

answer

#include<bits/stdc++.h>
#define N 105 
using namespace std;

int T,n,a[N];

int main(){
	scanf("%d",&T);
	while(T--){
		scanf("%d",&n);
		int t=0;
		for(int i=1;i<=n;i++){
			scanf("%d",&a[i]);
			if(a[i]-a[i-1]>=120)t+=(a[i]-a[i-1])/120;
		}
		t+=(1440-a[n])/120;
		if(t>=2)printf("YES\n");
		else printf("NO\n");
	}
	return 0;
} 

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3696kb

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: 2ms
memory: 3624kb

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