Skip to content

Instantly share code, notes, and snippets.

@jonathanpaulson
Created May 12, 2014 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathanpaulson/1d5fb7825395185dcd5d to your computer and use it in GitHub Desktop.
Save jonathanpaulson/1d5fb7825395185dcd5d to your computer and use it in GitHub Desktop.
import java.util.*;
import java.io.*;
public class DGen {
public static void main(String[] args) throws Exception {
StringBuilder out = new StringBuilder();
int n = 1+2000+1+1999+1;
out.append(n);
out.append('\n');
out.append(1);
out.append(' ');
for(int i=0; i<2000; i++) {
out.append(10000);
out.append(' ');
}
out.append(-5000);
out.append(' ');
for(int i=0; i<1999; i++) {
out.append(-10*1000);
out.append(' ');
}
out.append(-5000);
out.append('\n');
System.out.println(out);
}
static int r(int lo, int hi) {
return lo + (int)(Math.random()*(hi-lo+1));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment