# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
643880 | MuntherCarrot | Spiderman (COCI20_spiderman) | C++14 | 799 ms | 8192 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define ll long long
#define endl "\n"
#define all(x) x.begin(),x.end()
const int MOD = 0, SZ = 1e4+5e3, MX = 1e6+1;
void solve(){
int n, k;
cin >> n >> k;
int arr[n];
vector<int> frq(MX, 0);
for(int &i : arr)
cin >> i;
for(int i : arr){
if(i <= k) continue;
for(int j=k;j<MX;j+=i){
frq[j]++;
}
}
for(int i : arr)
cout << frq[i] << ' ';
}
signed main()
{
//ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
// int test;
// cin >> test;
// while(test--)
solve();
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |