Submission #34427


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
import java.util.Iterator;
import java.util.PrimitiveIterator;
import java.util.Scanner;
import java.util.function.Supplier;
import java.util.stream.IntStream;
import java.util.stream.Stream;
public class Main{
static Scanner s=new Scanner(System.in);
void solve(){
int a=gInt(),b=gInt(),c=gInt(),d=gInt();
System.out.println(
a<=d&&b>=c
?"Yes":"No"
);
}
public static void main(String[] $){
new Main().solve();
}
static int gInt(){
return Integer.parseInt(s.next());
}
static long gLong(){
return Long.parseLong(s.next());
}
static double gDouble(){
return Double.parseDouble(s.next());
}
SupplyingIterator<Integer> ints(int n){
return new SupplyingIterator<>(n,Main::gInt);
}
SupplyingIterator<Long> longs(int n){
return new SupplyingIterator<>(n,Main::gLong);
}
SupplyingIterator<Double> doubles(int n){
return new SupplyingIterator<>(n,Main::gDouble);
}
SupplyingIterator<String> strs(int n){
return new SupplyingIterator<>(n,s::next);
}
Range rep(int i){
return Range.rep(i);
}
Range rep(int f,int t,int d){
return Range.rep(f,t,d);
}
Range rep(int f,int t){
return rep(f,t,1);
}
Range rrep(int f,int t){
return rep(t,f,-1);
}
IntStream REP(int v){
return IntStream.range(0,v);
}
IntStream REP(int l,int r){
return IntStream.rangeClosed(l,r);
}
IntStream INTS(int n){
return IntStream.generate(Main::gInt).limit(n);
}
Stream<String> STRS(int n){
return Stream.generate(s::next).limit(n);
}
}
class SupplyingIterator<T> implements Iterable<T>,Iterator<T>{
int t;
Supplier<T> supplier;
SupplyingIterator(int t,Supplier<T> supplier){
this.t=t;
this.supplier=supplier;
}
@Override
public Iterator<T> iterator(){
return this;
}
@Override
public boolean hasNext(){
return t>0;
}
@Override
public T next(){
--t;
return supplier.get();
}
}
class Range implements Iterable<Integer>,PrimitiveIterator.OfInt{
int to,cur,d;
Range(int from,int to,int d){
this.cur=from-d;
this.to=to;
this.d=d;
}
Range(int n){
this(0,n-1,1);
}
@Override
public Iterator<Integer> iterator(){
return this;
}
@Override
public boolean hasNext(){
return cur+d==to||(cur!=to&&(cur<to==cur+d<to));
}
@Override
public int nextInt(){
return cur+=d;
}
static Range rep(int i){
return new Range(i);
}
static Range rep(int f,int t,int d){
return new Range(f,t,d);
}
static Range rep(int f,int t){
return rep(f,t,1);
}
static Range rrep(int f,int t){
return rep(f,t,-1);
}
}

ステータス

項目 データ
問題 0925 - 野菜だいきらいの会
ユーザー名 fal_rnd
投稿日時 2018-05-01 18:21:07
言語 Java
状態 Accepted
得点 1
ソースコード長 3764 Byte
最大実行時間 101 ms
最大メモリ使用量 14736 KB

セット

セット 得点 Cases
1 ALL 1 / 1 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
input-sample01 AC 97 ms 13348 KB
1
input-sample02 AC 94 ms 13660 KB
1
input-sample03 AC 94 ms 13244 KB
1
input-sample04 AC 88 ms 13584 KB
1
input01 AC 101 ms 14736 KB
1
input02 AC 89 ms 14356 KB
1
input03 AC 89 ms 14004 KB
1
input04 AC 92 ms 13376 KB
1
input05 AC 87 ms 13456 KB
1
input06 AC 97 ms 14620 KB
1
input07 AC 87 ms 14512 KB
1
input08 AC 91 ms 14592 KB
1
input09 AC 100 ms 14560 KB
1
input10 AC 90 ms 14464 KB
1
input11 AC 88 ms 14688 KB
1
input12 AC 90 ms 13464 KB
1
input13 AC 90 ms 13336 KB
1
input14 AC 96 ms 14696 KB
1
input15 AC 92 ms 14592 KB
1
input16 AC 91 ms 13596 KB
1