#include <bits/stdc++.h>
using namespace std;
int alturas[300005];
int k,n,aux=0;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cin>>n>>k;
for(int i=0;i<n;i++)
cin>>alturas[i];
for(int i=0;i<n;i++){
aux=0;
for(int j=0;j<n;j++){
if(i==j) continue;
if(alturas[i]%alturas[j]==k) aux++;
}
cout<<aux<<" ";
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
29 ms |
380 KB |
Output is correct |
2 |
Correct |
28 ms |
376 KB |
Output is correct |
3 |
Execution timed out |
2088 ms |
1016 KB |
Time limit exceeded |
4 |
Execution timed out |
2079 ms |
1656 KB |
Time limit exceeded |
5 |
Execution timed out |
2083 ms |
756 KB |
Time limit exceeded |
6 |
Execution timed out |
2086 ms |
1656 KB |
Time limit exceeded |
7 |
Execution timed out |
2084 ms |
888 KB |
Time limit exceeded |
8 |
Execution timed out |
2083 ms |
888 KB |
Time limit exceeded |
9 |
Execution timed out |
2089 ms |
1656 KB |
Time limit exceeded |
10 |
Execution timed out |
2086 ms |
1656 KB |
Time limit exceeded |