forked from damaohongtu/JavaInterview
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain_4.java
More file actions
39 lines (37 loc) · 1.02 KB
/
Main_4.java
File metadata and controls
39 lines (37 loc) · 1.02 KB
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
package ByteDancePreparation;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
//4 100
// 100 73 60
// 100 89 35
// 30 21 30
// 10 8 10
class Game{
int old;
int latest;
int happy;
public Game(int old, int latest, int happy) {
this.old = old;
this.latest = latest;
this.happy = happy;
}
}
public class Main_4 {
public static void main(String[] args)throws Exception {
Scanner sc =new Scanner(new File("/home/mao/workspace/面试/JavaGuide/JavaInterview/java/src/ByteDancePreparation/main_4"));
//Scanner sc =new Scanner(System.in);
while(sc.hasNext()){
int n=sc.nextInt();
int budget=sc.nextInt();
List<Game> records=new ArrayList<>();
for(int i=0;i<n;i++){
int a=sc.nextInt();
int b=sc.nextInt();
int c=sc.nextInt();
records.add(new Game(a,b,c));
}
}
}
}