답안 #199882

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
199882 2020-02-03T22:35:22 Z milagrosvilla1803 Spiderman (COCI20_spiderman) C++11
14 / 70
2000 ms 1656 KB
#include <bits/stdc++.h>
using namespace std;
int alturas[300005];
int k,n,aux=0;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin>>n>>k;
    for(int i=0;i<n;i++)
        cin>>alturas[i];
    for(int i=0;i<n;i++){
        aux=0;
        for(int j=0;j<n;j++){
            if(i==j) continue;
            if(alturas[i]%alturas[j]==k) aux++;
        }
        cout<<aux<<" ";
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 29 ms 380 KB Output is correct
2 Correct 28 ms 376 KB Output is correct
3 Execution timed out 2088 ms 1016 KB Time limit exceeded
4 Execution timed out 2079 ms 1656 KB Time limit exceeded
5 Execution timed out 2083 ms 756 KB Time limit exceeded
6 Execution timed out 2086 ms 1656 KB Time limit exceeded
7 Execution timed out 2084 ms 888 KB Time limit exceeded
8 Execution timed out 2083 ms 888 KB Time limit exceeded
9 Execution timed out 2089 ms 1656 KB Time limit exceeded
10 Execution timed out 2086 ms 1656 KB Time limit exceeded