Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define _ ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
- #define itloop(it,x) for(auto it=x.begin();it!=x.end();it++)
- #define reloop(i,e,b) for(auto i=e;i>=b;i--)
- #define loop(i,b,e) for(auto i=b;i<=e;i++)
- #define ALL(x) x.begin(),x.end()
- #define SZ(x) x.size()
- #define PB push_back
- #define MP make_pair
- #define F first
- #define S second
- typedef long long LL;
- typedef vector<int> VI;
- typedef struct {
- int x,y,z;
- }ship;
- const int N=1e5+10;
- int n,x,y,z;
- char a,b,c,d;
- ship t[N];
- map<double,int> m;
- int main() {_
- cin >> n;
- loop(i,1,n) {
- cin >> a >> x >> b >> y >> c >> d >> z;
- m[(double)(x+y)/(double)z]++;
- t[i].x = x;
- t[i].y = y;
- t[i].z = z;
- }
- loop(i,1,n)
- cout << m[(double)(t[i].x+t[i].y)/(double)t[i].z] << " ";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement