| 6 | |
| 7 | public class spellcheck { |
| 8 | public static void main(String args[]) throws IOException { |
| 9 | int n = Integer.parseInt(args[0]); |
| 10 | HashMap dict = new HashMap(); |
| 11 | String word; |
| 12 | |
| 13 | try { |
| 14 | BufferedReader in = new BufferedReader(new FileReader("Usr.Dict.Words")); |
| 15 | while ((word = in.readLine()) != null) { |
| 16 | dict.put(word, new Integer(1)); |
| 17 | } |
| 18 | in.close(); |
| 19 | } catch (IOException e) { |
| 20 | System.err.println(e); |
| 21 | return; |
| 22 | } |
| 23 | |
| 24 | try { |
| 25 | BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); |
| 26 | while ((word = in.readLine()) != null) { |
| 27 | if (!dict.containsKey(word)) { |
| 28 | System.out.println(word); |
| 29 | } |
| 30 | } |
| 31 | } catch (IOException e) { |
| 32 | System.err.println(e); |
| 33 | return; |
| 34 | } |
| 35 | } |
| 36 | } |