Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for(int i=0;i<N;i++){
- StringTokenizer st1 = new StringTokenizer(r.readLine());
- StringTokenizer st2 = new StringTokenizer(r.readLine());
- int cost = Integer.parseInt(st1.nextToken());
- steps = Integer.parseInt(st1.nextToken());
- //System.out.println(st2.countTokens());
- int[] cities = new int[steps];
- boolean check = false;
- int stops = 0;
- for(int g=0; g < 3 ; i++){
- //cities[g] = Integer.parseInt(st2.nextToken());
- System.out.println(steps);
- if(check == true){
- stops++;
- }
- if(cities[g] == A){
- check = true;
- stops++;
- }
- if(check == true && cities[g] == B){
- check = false;
- }
- }
- if(stops < checkpoints && cost < totalcost){
- totalcost = cost;
- checkpoints = stops;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement