|
|
back to boardwhy is the code Time limit exceeded? #include <iostream> #include <map> using namespace std; int main() { map<int,int> table; int x,y,sum = 3; while(sum--) { cin >> x; while(x--) { cin >> y; table[y]++; } } int s = 0; for(int i = 0;i < table.size();i++) if(table[i] == 3) s++; cout << s; return 0; } |
|
|