# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
844262 | 2023-09-05T11:55:36 Z | vjudge1 | Spiderman (COCI20_spiderman) | C++17 | 280 ms | 54212 KB |
#pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #include <bits/stdc++.h> using namespace std; #define int long long const int MAXN = 1e6 + 5; #ifndef ONLINE_JUDGE #define OPEN freopen(".in", "r", stdin); \ freopen(".out", "w", stdout); #else #define OPEN void(23); #endif int sieve[MAXN]; int cnts[MAXN]; void solve() { int n, k; cin >> n >> k; vector <int> vec(n); for(int &i : vec) cin >> i, cnts[i]++; for(int i = k +1; i < MAXN; i++) { for(int j = 0; j + k < MAXN; j += i) sieve[j + k] += cnts[i]; } for(int &i : vec) cout << sieve[i] << " "; return; } int32_t main() { OPEN; ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t = 1; //cin >> t; while(t--) { solve(); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 265 ms | 54096 KB | Output isn't correct |
2 | Incorrect | 274 ms | 54092 KB | Output isn't correct |
3 | Incorrect | 267 ms | 54096 KB | Output isn't correct |
4 | Incorrect | 264 ms | 54096 KB | Output isn't correct |
5 | Incorrect | 259 ms | 54212 KB | Output isn't correct |
6 | Incorrect | 280 ms | 54044 KB | Output isn't correct |
7 | Incorrect | 265 ms | 54096 KB | Output isn't correct |
8 | Incorrect | 276 ms | 54184 KB | Output isn't correct |
9 | Incorrect | 270 ms | 54108 KB | Output isn't correct |
10 | Incorrect | 273 ms | 54184 KB | Output isn't correct |