답안 #1099629

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1099629 2024-10-11T20:37:09 Z Petrix Spiderman (COCI20_spiderman) C++17
28 / 70
130 ms 28244 KB
#include <iostream>
using namespace std;

#define int long long

int v[2000001];
int ciur[2000001];
int frv[2000001];

signed main()
{
    int n,i,j,k;
    cin>>n>>k;
    for(i=1;i<=n;i++){
        cin>>v[i];
        frv[v[i]]++;
    }
    for(i=k+1;i<=2e6;i++){
        if(frv[i]){
            for(j=0;j<=2e6;j+=i){
                ciur[j+k]+=frv[i];
            }
        }
    }
    for(i=1;i<=n;i++){
        if(k==0)
            cout<<ciur[v[i]]-1<<" ";
        else
            cout<<ciur[v[i]]<<" ";
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 19 ms 19036 KB Output isn't correct
2 Incorrect 21 ms 17812 KB Output isn't correct
3 Correct 46 ms 20816 KB Output is correct
4 Incorrect 93 ms 23632 KB Output isn't correct
5 Correct 83 ms 25428 KB Output is correct
6 Correct 128 ms 28240 KB Output is correct
7 Incorrect 65 ms 25424 KB Output isn't correct
8 Incorrect 69 ms 25344 KB Output isn't correct
9 Correct 130 ms 28240 KB Output is correct
10 Incorrect 123 ms 28244 KB Output isn't correct