You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 29, 2024. It is now read-only.
tc = theline.remove(0); // Let the waiting cow eat
46
-
continue;
47
-
}
48
-
49
-
ctime = tc.x + tc.y - c2.x;
50
-
//System.out.println("Achieved time of "+ctime);
51
-
if(ctime > mtime) {
52
-
if(!nodouble) {
53
-
//System.out.println("New range");
54
-
mtime = ctime;
55
-
}
56
-
}
57
-
i --; // Make sure loop runs again
58
-
time.remove(c2); // Remove cow
59
-
//senority.remove(theline.get(0));
60
-
tc = theline.remove(0); // Let the waiting cow eat
61
-
tc.x = tc.x + ctime;
62
-
}
63
-
64
-
c1 = tc.x + tc.y;
65
-
66
-
for(intj = i + 1; j < time.size(); j ++) {
67
-
if (time.get(i).x > time.get(j).x) {
68
-
//break;
69
-
continue; // On second thought
70
-
//throw new IOException("Something impossible just happeneded.");
71
-
}
72
-
if(time.get(j).x > c1) {
33
+
intcows_eaten = 0;
34
+
intmaxsenority;
35
+
System.out.println(time);
36
+
while(cows_eaten < N) {
37
+
tc = time.get(cows_eaten);
38
+
maxsenority = -1;
39
+
cownextcow = newcow(-1,-1); // Not guarented to have a conflicting time
40
+
intj = 0;
41
+
while(true) {
42
+
j ++;
43
+
if(time.get(cows_eaten + j).x >= tc.x+tc.y || theline.contains(time.get(cows_eaten + j))) { // If after the current cow is finsihed then all cows after it we don't have to worry about
0 commit comments