# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1136796 | Roumak77 | Solar Storm (NOI20_solarstorm) | Pypy 3 | 0 ms | 0 KiB |
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC optimize("-Ofast")
#include <bits/stdc++.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <limits>
#include <cmath>
#include <stack>
#include <queue>
#include <map>
#include <math.h>
using namespace std;
/*
* Subtask Marks Additional Constraints
1) S = 1, N ≤ 10^4, K ≤ 10^9, di ≤ 10^5 for all 1 ≤ i ≤ N − 1, vi ≤ 10^5, for all 1 ≤ i ≤ N -> 10 points
2) S = 1, di = 1 for all 1 ≤ i ≤ N − 1 -> 7 points
3) S = 1 -> 11 points
4) K = 1, di = 2 for all 1 ≤ i ≤ N − 1 -> 8 points
5) N ≤ 104 -> 18 points
6) S ≤ 50 -> 16 points
7) No constraints -> 30 points
Total = 0
*/
using ll = long long;
void solve(){
ll n, s, k;
cin >> n >> s >> k;
vector<ll> list_n(n - 1, 0);
for(ll i = 0; i < n - 1; i++){
cin >> list_n[i];
}
vector<pair<ll, ll>> list_k(n, {0, 0});
for(ll i = 0; i < n; i++){
cin >> list_k[i].first;
list_k[i].second = i + 1;
}
sort(list_k.rbegin(), list_k.rend());
cout << s << endl;
for(ll i = 0; i < s; i++){
cout << list_k[i].second << " ";
}
}
bool single = true;
signed main(){
ios_base::sync_with_stdio(false);
cout.tie(0);
cin.tie(0);
ll t = 1;
if(!single) cin >> t;
while(t--){
solve();
}
}