| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 202370 | EmmanuelAC | Spiderman (COCI20_spiderman) | C++14 | 703 ms | 8260 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(i, n) for(long long i=0; i<n; i++)
#define REPR(i, n) for(long long i=n; i>=0; i--)
#define FOREACH(i, v) for(__typeof((v).begin()) i = (v).begin(); i != (v).end(); i++)
#define st first
#define fi first
#define nd second
#define se second
#define vi vector<int>
#define vii vector< vi >
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define mp make_pair
#define endl "\n"
int N, K;
int Arr[300000];
int Ocur[1000100];
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> N >> K;
REP(i, N){
cin >> Arr[i];
if(Arr[i] > K){
for(int s = K; s <= 1000100; s+=Arr[i])
Ocur[s]++;
}
}
REP(i, N){
cout << Ocur[Arr[i]] - (K == 0 ? 1 : 0) << " ";
}
cout << "\n";
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
