# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
844525 | vjudge1 | Spiderman (COCI20_spiderman) | C++17 | 2093 ms | 2644 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define ll long long
#define pri pair<int,int>
#define prl pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define vp vector<pair<int,int>>
#define vpl vector<pair<ll,ll>>
#define re return 0
#define sqrt sqrtl
int32_t main() {
int n,k;cin>>n>>k;
vector<int> h(n); for (int i = 0;i<n;i++) {
cin>>h[i];
}
vector<int> res(n);
for (int i = 0;i<n;i++) {
for (int j = 0;j<n;j++) {
if (i==j) continue;
if (h[i]%h[j]==k) res[i]++;
}
}
for (int i = 0;i<res.size();i++) {
cout<<res[i]<<" ";
}cout<<endl;
return 0;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |