foo.cc:1:1: error: 'import' does not name a type
1 | import java.io.File;
| ^~~~~~
foo.cc:2:1: error: 'import' does not name a type
2 | import java.io.FileReader;
| ^~~~~~
foo.cc:3:1: error: 'import' does not name a type
3 | import java.io.IOException;
| ^~~~~~
foo.cc:4:1: error: 'import' does not name a type
4 | import java.util.ArrayList;
| ^~~~~~
foo.cc:5:1: error: 'import' does not name a type
5 | import java.util.HashMap;
| ^~~~~~
foo.cc:6:1: error: 'import' does not name a type
6 | import java.util.Scanner;
| ^~~~~~
foo.cc:8:1: error: expected unqualified-id before 'public'
8 | public class Main {
| ^~~~~~
[Hydro](https://hydro.ac)提供评测服务