Professional Documents
Culture Documents
Balance Sheet Chinedu Jude Profchi Source Code
Balance Sheet Chinedu Jude Profchi Source Code
Balance Sheet Chinedu Jude Profchi Source Code
round2;
import java.util.*;
public class C {
int t = sc.nextInt();
IoHandler.closeIO();
}
map.get(a[0]).add(a);
}
//System.out.println(key + Arrays.toString(a));
//System.out.println(truthTree);
if (truthTree == null) {
next = null;
}else {
tKey = truthTree.floorKey(a[3]+1);
if (tKey == null) {
next = null;
}else {
next = truthTree.get(tKey);
}
}
if (next != null) {
//System.out.println(" " + Arrays.toString(next));
kVals[i] = next[i];
result.add(kVals[i] - a[3]);
test[i] = kVals[i] - a[3];
kVals[i] -= a[3];
if (result.size() > k)
result.poll();
}
}
/*
System.out.println(Arrays.toString(a));
System.out.println(Arrays.toString(test));
System.out.println(Arrays.toString(kVals));
*/
boolean use = true;
for (int i = 0; i < kVals.length; ++i) {
if (kVals[i] == -1) {
if (use) {
use = false;
kVals[i] = a[1];
}
continue;
}
kVals[i] += a[1];
}
if (truth.containsKey(a[0])) {
nTree = truth.get(a[0]);
}else {
nTree = new TreeMap<>((x , y) -> y - x);
}
nTree = truth.get(key);
kVals = null;
long fR = 0;
fR %= 1_000_000_007;
print(t , fR);
}
return res;
}