| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1316433 | ninstroyer | Spiderman (COCI20_spiderman) | C++20 | 2095 ms | 1616 KiB |
#include<bits/stdc++.h>
using namespace std;
const int nx = 3e5+5, hx = 1e6+5;
int n, k, arr[nx], cnt[nx];
int main()
{
ios::sync_with_stdio(false); cin.tie(0);
cin>>n>>k;
for(int i = 1; i <= n; i++) cin>>arr[i];
for(int i = 1; i <= n; i++)
{
if(arr[i] < k) continue;
for(int j = 1; j <= n; j++)
{
if(i==j) continue;
if(arr[i]%arr[j] == k) cnt[i]++;
}
}
for(int i = 1; i <= n; i++) cout<<cnt[i]<<" ";
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
