# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
198033 | alrad | Spiderman (COCI20_spiderman) | C++17 | 2074 ms | 1576 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;
int main() {
ios_base :: sync_with_stdio(0);
cin.tie(0) , cout.tie(0);
int n , k;
cin >> n >> k;
vector<int> h(n);
for (int i = 0; i < n; i++) {
cin >> h[i];
}
for (int i = 0; i < n; i++) {
int tot = 0;
for (int j = 0; j < n; j++) {
if (i == j) {
continue;
}
if (h[i] % h[j] == k) {
tot++;
}
}
cout << tot << " ";
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |