#71

by asd

Submitted 4 years 9 months 1 day ago
Tue Feb 04 20:12:55 CST 2020
Judger: ZJS
Dataset Version: v0

124 ms / 6920 KB
Final 100
Problem: lss2.glove
Language: GNU C++ 11


#1

15ms / 6920KB / Accepted
Input
17
20343 9803 26434 6519 4926 26019 7286 26212 5144 9329 13112 25313 11673 14158 14278 3075 17166 
9372 17935 16590 24315 5669 17605 24828 26312 3584 22194 18682 14007 25269 30287 20276 14873 18080 
9874 28563
Output
NO
Answer
NO
Checker Information
"NO"

#2

15ms / 6916KB / Accepted
Input
4
9072 12764 9024 27148 
12779 32244 1432 26467 
9033 25616
Output
NO
Answer
NO
Checker Information
"NO"

#3

0ms / 6916KB / Accepted
Input
7
19820 30628 320 4695 16706 2589 31272 
10211 19468 8885 13244 26193 28544 15198 
17993 757
Output
NO
Answer
NO
Checker Information
"NO"

#4

0ms / 6920KB / Accepted
Input
10
30569 15724 24383 15009 20633 5701 28345 26722 13320 8737 
13288 15564 12322 4623 18095 12043 25331 16695 13730 29484 
193 20703
Output
NO
Answer
NO
Checker Information
"NO"

#5

15ms / 6920KB / Accepted
Input
17
19298 18684 6973 2871 28486 11926 22490 26978 1024 8441 13377 27074 12646 16239 20003 142 29413 
20357 28011 19547 18897 30222 26924 14142 27128 363 22744 13104 5245 10506 26036 5558 5348 26157 
22209 20616
Output
NO
Answer
NO
Checker Information
"NO"

#6

15ms / 6916KB / Accepted
Input
20
15275 17207 3678 821 28342 10071 16508 20131 28509 25551 6666 13905 30596 14594 20401 31452 27046 21140 9557 15395 
25461 8060 13792 12795 25537 28762 26690 23845 1947 20490 13750 17533 8890 19065 9542 4723 14110 5559 8337 9919 
20814 4082
Output
NO
Answer
NO
Checker Information
"NO"

#7

15ms / 6916KB / Accepted
Input
20
15278 27955 21543 24885 5888 13998 19620 17204 12252 19403 6518 13949 19967 31141 9825 16022 21096 6797 11388 6152 
4109 23541 28807 19810 7372 7053 15230 7552 11940 8107 16750 5901 22821 12016 27272 3399 16165 19241 12916 18946 
4979 3253
Output
NO
Answer
NO
Checker Information
"NO"

#8

0ms / 6916KB / Accepted
Input
20
15285 16684 24503 7475 26517 21851 25845 11349 12507 7107 6223 14037 31477 31465 21441 17930 9196 10880 15049 20433 
26940 21735 26069 1071 3810 29170 25079 7736 31926 16109 22752 15407 17915 30686 29964 750 20277 13835 22074 4232 
6076 1594
Output
NO
Answer
NO
Checker Information
"NO"

#9

15ms / 6920KB / Accepted
Input
20
15291 5413 27463 22834 14378 29705 32070 5495 12763 27579 5927 14125 10219 31790 290 19839 30064 14962 18711 1946 
17003 19929 23330 15100 248 18520 2161 7919 19144 24111 28754 24912 13009 16588 32656 30869 24388 8429 31232 22287 
7174 32704
Output
NO
Answer
NO
Checker Information
"NO"

#10

0ms / 6916KB / Accepted
Input
20
15304 15638 616 20783 22869 12644 11752 26554 13273 2987 5335 14302 470 32439 23522 23655 6264 23127 26034 30509 
29897 16316 17854 10391 25892 29987 21859 8286 26348 7348 7990 11155 3197 21161 5273 25572 32611 30386 16780 25627 
9368 29387
Output
NO
Answer
NO
Checker Information
"NO"

#11

15ms / 6916KB / Accepted
Input
20
15314 15115 21441 27437 21044 24424 21089 17772 30040 17310 4891 14434 1351 16542 24563 10133 21182 12867 31526 2779 
31375 29991 30130 31435 4165 30395 20248 24945 23559 2967 16993 9030 12223 14 25695 21598 6011 5894 30517 19940 
27398 26899
Output
NO
Answer
NO
Checker Information
"NO"

#12

15ms / 6916KB / Accepted
Input
20
15 4 19 4 17 4 19 1 15 2 19 16 10 18 8 3 15 5 5 6 
16 4 3 14 13 6 19 8 11 0 19 5 6 11 15 9 18 18 6 19 
20 19
Output
NO
Answer
NO
Checker Information
"NO"

#13

15ms / 6920KB / Accepted
Input
20
2 13 11 15 6 17 16 15 10 14 4 4 0 3 4 11 3 19 6 19 
19 18 12 15 11 15 8 11 17 2 1 11 0 1 7 1 10 0 16 13 
37 0
Output
NO
Answer
NO
Checker Information
"NO"

#14

15ms / 6920KB / Accepted
Input
20
12 10 16 9 1 18 13 13 9 9 0 16 0 6 5 9 13 7 18 17 
17 5 1 19 11 4 18 3 8 1 3 5 5 14 2 7 17 8 13 6 
19 32
Output
NO
Answer
NO
Checker Information
"NO"

#15

15ms / 6920KB / Accepted
Input
20
15 18 12 12 8 4 6 6 0 1 12 0 11 12 9 7 3 4 9 14 
13 6 16 13 6 3 18 18 1 19 4 14 16 13 12 3 13 9 12 13 
32 3
Output
NO
Answer
NO
Checker Information
"NO"

#16

0ms / 6916KB / Accepted
Input
20
1 7 12 3 17 10 11 11 16 13 16 8 1 17 5 16 11 6 10 15 
16 0 17 14 4 12 7 2 19 1 18 19 10 15 4 14 4 3 2 19 
9 24
Output
NO
Answer
NO
Checker Information
"NO"

#17

124ms / 6920KB / Accepted
Input
20
12 1 11 13 5 2 18 6 13 2 6 19 2 4 14 1 18 16 12 9 
2 3 0 0 12 16 13 1 0 2 8 19 4 1 2 0 6 13 0 12 
176 247
Output
YES
Answer
YES
Checker Information
"YES"

#18

78ms / 6920KB / Accepted
Input
20
19 9 12 12 14 15 3 11 9 5 10 7 4 9 11 9 6 18 13 10 
5 17 1 9 10 5 3 4 18 4 9 4 18 11 14 11 18 8 18 18 
74 188
Output
YES
Answer
YES
Checker Information
"YES"

#19

0ms / 6916KB / Accepted
Input
20
9 7 8 18 10 7 1 10 7 9 6 19 5 12 11 7 16 18 6 0 
3 12 18 5 11 14 12 3 9 3 12 18 3 13 9 18 5 3 15 12 
136 100
Output
NO
Answer
NO
Checker Information
"NO"

#20

93ms / 6920KB / Accepted
Input
20
2 12 9 15 0 14 3 8 18 5 15 15 16 1 16 3 4 3 8 15 
17 0 1 15 7 1 2 10 13 19 16 9 11 17 13 0 8 12 3 12 
331 383
Output
YES
Answer
YES
Checker Information
"YES"

#21

62ms / 6916KB / Accepted
Input
20
8 1 9 6 2 0 7 14 13 9 19 3 6 6 12 12 4 5 2 16 
0 14 3 4 5 10 12 13 19 1 10 7 5 7 5 11 19 7 1 6 
228 324
Output
YES
Answer
YES
Checker Information
"YES"

#22

108ms / 6916KB / Accepted
Input
20
15 10 10 4 3 13 12 19 8 13 3 11 16 10 1 0 12 0 3 18 
3 7 4 5 3 0 1 17 17 4 12 12 7 10 17 2 3 9 11 12 
125 265
Output
YES
Answer
YES
Checker Information
"YES"

#23

93ms / 6916KB / Accepted
Input
20
18 18 6 0 17 0 5 12 0 5 15 15 7 17 13 18 2 5 14 14 
19 8 19 0 6 19 1 5 10 1 13 1 10 1 7 18 19 2 10 19 
258 236
Output
YES
Answer
YES
Checker Information
"YES"

#24

62ms / 6916KB / Accepted
Input
20
5 7 6 10 18 13 2 18 15 16 19 4 16 1 1 6 2 7 15 8 
2 2 1 9 4 8 10 8 8 3 15 7 4 11 11 9 10 17 8 5 
156 177
Output
YES
Answer
YES
Checker Information
"YES"

#25

62ms / 6916KB / Accepted
Input
20
7 19 5 1 7 5 10 15 15 7 9 0 11 1 8 2 4 19 11 13 
0 8 11 7 8 17 9 14 6 3 17 9 10 14 3 13 1 16 5 18 
393 392
Output
YES
Answer
YES
Checker Information
"YES"

#26

62ms / 6916KB / Accepted
Input
20
10 7 2 4 2 4 3 8 7 7 1 4 2 0 0 0 14 4 2 9 
16 1 5 1 11 16 17 2 19 8 18 17 1 5 13 9 17 17 4 6 
399 391
Output
YES
Answer
YES
Checker Information
"YES"

#27

109ms / 6920KB / Accepted
Input
20
17 16 2 15 3 17 0 14 2 11 5 13 12 4 9 8 14 18 3 11 
19 15 7 10 9 5 6 5 17 2 19 3 15 15 5 0 9 11 2 12 
391 400
Output
YES
Answer
YES
Checker Information
"YES"
#include <bits/stdc++.h>
using namespace std;
int n;
int a[25],b[25],l,r;
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
	}
	for(int i=0;i<n;i++){
		cin>>b[i];
	}
	cin>>l>>r;
	for(int i=0;i<(1<<n);i++){
		int x=0,y=0;
		for(int j=0;j<n;j++){
			if(i&(1<<j)){
				x+=a[j];
			}else{
				y+=b[j];
			}
		}
		
		if(!(l>x || r>y)){
			cout<<"NO"<<endl;
			return 0;
		}
	}
	cout<<"YES"<<endl;
	
}