fork download
  1. int go(vector <int> v) {
  2. map<int, int> mp;
  3. for (auto i: v) {
  4. mp[i]++;
  5. }
  6.  
  7. for (auto i: mp) {
  8. if(i.second>=2) cnt++;
  9. }
  10.  
  11. if(cnt%2) return mp.size()-1;
  12. return mp.size();
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class, interface, or enum expected
int go(vector <int> v) {
^
Main.java:3: error: class, interface, or enum expected
	for (auto i: v) {
	^
Main.java:5: error: class, interface, or enum expected
	}
	^
Main.java:9: error: class, interface, or enum expected
	}
	^
Main.java:12: error: class, interface, or enum expected
	return mp.size();
	^
Main.java:13: error: class, interface, or enum expected
}
^
6 errors
stdout
Standard output is empty