Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #define INDET 2
- using namespace std;
- int main()
- {
- vector<int> v (11, INDET);
- int n;
- cin>>n;
- int c=0, ID, p;
- for(int i=0; i<n; i++)
- {
- cin>>ID>>p;
- if ( v[ID]==INDET )
- v[ID]=p;
- if (v[ID]!=p)
- {
- v[ID]=p;
- c++;
- }
- }
- cout<<c<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement