package dgcj;

public class TemplateDgcjMain {
	static final Object PROBLEM = new TemplateDgcjProblem(); // PROBLEM NAME goes here

	public String run() {
//		long n = ;
//		long from = 1L * n * ID / NODES;
//		long to = 1L * n * (ID + 1) / NODES;

		return null;
	}

	final static boolean SINGLE = false;
	final int NODES = SINGLE ? 1 : message.NumberOfNodes();
	final int ID = SINGLE ? 0 : message.MyNodeId();

	// EXECUTE with non-empty args
	public static void main(String[] args) {
		if (!SINGLE) {
			PROBLEM.equals(args); // Local testing framework invocation
		}
		String ans = new TemplateDgcjMain().run();
		if (ans != null) {
			System.out.println(ans);
		}
	}

	public void log(String msg) {
		PROBLEM.equals(ID + ": " + msg); // Local testing framework log
	}
}

@@ -266,183 +266,156 @@
 %7D%0A%0A%09
-final 
 static 
-boolean SINGLE = false;%0A%09final int NODES = SINGLE ? 1 : message.NumberOfNodes();%0A%09final int ID = SINGLE ? 0 : message.MyNodeId();%0A%0A%09// EXECUTE with non-empty args
+int NODES;%0A%09static int ID;%0A%0A%09/**%0A%09 * Arguments:%0A%09 * %22%22%09= as for submit%0A%09 * %220%22%09= run multi node infrastructure%0A%09 * %221%22%09= run single node%0A%09 */
 %0A%09pu
@@ -457,26 +457,8 @@
 ) %7B%0A
-%09%09if (!SINGLE) %7B%0A%09
 %09%09PR
@@ -517,17 +517,161 @@
 ation%0A%09%09
-%7D
+boolean single = args.length == 1 && args%5B0%5D.equals(%221%22);%0A%09%09NODES = single ? 1 : message.NumberOfNodes();%0A%09%09ID = single ? 0 : message.MyNodeId();
 %0A%09%09Strin

Update infrastructure for single node run