# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
844242 | vjudge1 | Spiderman (COCI20_spiderman) | C++17 | 643 ms | 6288 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define all(aa) aa.begin(), aa.end()
int main(){
int n, k;
cin>>n>>k;
vector<int> v(n), sieve(1000001);
for(int &e:v){
cin>>e;
if(e>k) for(int j=0; j<=1000000; j+=e) sieve[j]++;
}
for(auto e:v) {
if(e<k) cout<<0<<' ';
else cout<<sieve[e-k]-(e!=k && k%e==0)<<' ';
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |