Created
April 7, 2016 10:11
-
-
Save ale64bit/6863de5203a57d557027fe52f39e0b60 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.PrintWriter; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.StringTokenizer; | |
public class Main implements Runnable { | |
public void sort(int[] a) { | |
} | |
public void solve() { | |
int n = nextInt(); | |
int[] a = new int[n]; | |
for (int i=0;i<n;++i) { | |
a[i] = nextInt(); | |
} | |
sort(a); | |
} | |
/************************************************************************/ | |
@Override | |
public void run() { | |
solve(); | |
out.close(); | |
try { | |
br.close(); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
} | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
StringTokenizer st = new StringTokenizer(""); | |
PrintWriter out = new PrintWriter(System.out); | |
String nextLine() { | |
try { | |
return br.readLine(); | |
} catch (Exception e) { | |
return null; | |
} | |
} | |
String next() { | |
while (!st.hasMoreTokens()) { | |
try { | |
String line = br.readLine(); | |
if (line == null) { | |
return null; | |
} | |
st = new StringTokenizer(line); | |
} catch (Exception e) { | |
return null; | |
} | |
} | |
return st.nextToken(); | |
} | |
int nextInt() { | |
return Integer.parseInt(next()); | |
} | |
long nextLong() { | |
return Long.parseLong(next()); | |
} | |
double nextDouble() { | |
return Double.parseDouble(next()); | |
} | |
public static void main(String[] args) throws IOException { | |
new Thread(null, new Main(), "Main", 1 << 28).start(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment