initial
This commit is contained in:
6
ECOO_2012/.classpath
Normal file
6
ECOO_2012/.classpath
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
1
ECOO_2012/.gitignore
vendored
Normal file
1
ECOO_2012/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/bin/
|
||||
17
ECOO_2012/.project
Normal file
17
ECOO_2012/.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>ECOO_2012</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
11
ECOO_2012/.settings/org.eclipse.jdt.core.prefs
Normal file
11
ECOO_2012/.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,11 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
104
ECOO_2012/src/Q2.java
Normal file
104
ECOO_2012/src/Q2.java
Normal file
@@ -0,0 +1,104 @@
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
public class Q2 {
|
||||
private static Q2 o = new Q2();
|
||||
|
||||
public static class Reader {
|
||||
|
||||
private BufferedReader in;
|
||||
private StringTokenizer st;
|
||||
|
||||
public Reader(InputStream inputStream) {
|
||||
in = new BufferedReader(new InputStreamReader(inputStream));
|
||||
}
|
||||
|
||||
public Reader(String fileName) throws FileNotFoundException {
|
||||
in = new BufferedReader(new FileReader(fileName));
|
||||
}
|
||||
|
||||
public String next() throws IOException {
|
||||
while (st == null || !st.hasMoreTokens()) {
|
||||
st = new StringTokenizer(in.readLine().trim());
|
||||
}
|
||||
return st.nextToken();
|
||||
}
|
||||
|
||||
public String next(String delim) throws IOException {
|
||||
while (st == null || !st.hasMoreTokens()) {
|
||||
st = new StringTokenizer(in.readLine().trim());
|
||||
}
|
||||
return st.nextToken(delim);
|
||||
}
|
||||
|
||||
public String nextLine() throws IOException {
|
||||
st = null;
|
||||
return in.readLine();
|
||||
}
|
||||
|
||||
// public BigInteger nextBigInteger() throws IOException { return new BigInteger(next()); }
|
||||
|
||||
public byte nextByte() throws IOException { return Byte.parseByte(next()); }
|
||||
public byte nextByte(String delim) throws IOException { return Byte.parseByte(next(delim)); }
|
||||
public char nextChar() throws IOException { return next().charAt(0); }
|
||||
public char nextChar(String delim) throws IOException { return next(delim).charAt(0); }
|
||||
public double nextDouble() throws IOException { return Double.parseDouble(next()); }
|
||||
public double nextDouble(String delim) throws IOException { return Double.parseDouble(next(delim)); }
|
||||
public float nextFloat() throws IOException { return Float.parseFloat(next()); }
|
||||
public float nextFloat(String delim) throws IOException { return Float.parseFloat(next(delim)); }
|
||||
public int nextInt() throws IOException { return Integer.parseInt(next()); }
|
||||
public int nextInt(String delim) throws IOException { return Integer.parseInt(next(delim)); }
|
||||
public long nextLong() throws IOException { return Long.parseLong(next()); }
|
||||
public long nextLong(String delim) throws IOException { return Long.parseLong(next(delim)); }
|
||||
public short nextShort() throws IOException { return Short.parseShort(next()); }
|
||||
public short nextShort(String delim) throws IOException { return Short.parseShort(next(delim)); }
|
||||
} // Reader class
|
||||
|
||||
private static Reader in;
|
||||
private static PrintWriter out;
|
||||
|
||||
private static final int NUM_OF_TEST_CASES = 10; // TODO CHANGE NUMBER OF TEST CASES
|
||||
|
||||
// TODO CHANGE FILE NAMES
|
||||
private static final String INPUT_FILE_NAME = "src\\questinput.txt";
|
||||
private static final String OUTPUT_FILE_NAME = "output.txt";
|
||||
|
||||
private static boolean stdIn = true;
|
||||
private static boolean stdOut = true;
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
String packageName = "";
|
||||
if (!stdIn || !stdOut) {
|
||||
try {
|
||||
packageName = o.getClass().getPackage().toString().split(" ")[1] + "/";
|
||||
} catch (NullPointerException e) {}
|
||||
}
|
||||
if (stdIn) in = new Reader(System.in);
|
||||
else in = new Reader(packageName + INPUT_FILE_NAME);
|
||||
if (stdOut) out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
|
||||
else out = new PrintWriter(new BufferedWriter(new FileWriter(packageName + OUTPUT_FILE_NAME)));
|
||||
|
||||
for (int i = 1; i <= NUM_OF_TEST_CASES; i++) {
|
||||
run(i);
|
||||
out.flush();
|
||||
}
|
||||
out.close();
|
||||
}
|
||||
|
||||
public static void run(int testCaseNum) throws IOException {
|
||||
String dna = in.nextLine();
|
||||
System.out.println(dna);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user