結果

問題 No.3436 [Cherry 8th Tune B] この夏に何が起こるかな?
コンテスト
ユーザー UT0911
提出日時 2026-01-23 22:45:33
言語 C++17
(gcc 15.2.0 + boost 1.89.0)
結果
WA  
実行時間 -
コード長 1,817 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,726 ms
コンパイル使用メモリ 227,352 KB
実行使用メモリ 814,564 KB
最終ジャッジ日時 2026-01-23 22:46:28
合計ジャッジ時間 16,969 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 10 MLE * 1 -- * 32
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:33:16: 警告: use of ‘auto’ in parameter declaration only available with ‘-std=c++20’ or ‘-fconcepts’ [-Wc++20-extensions]
   33 | bool CheckTime(auto limit,auto eps){
      |                ^~~~
main.cpp:33:27: 警告: use of ‘auto’ in parameter declaration only available with ‘-std=c++20’ or ‘-fconcepts’ [-Wc++20-extensions]
   33 | bool CheckTime(auto limit,auto eps){
      |                           ^~~~

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using vii = vector<vector<int>>;
using vll = vector<vector<ll>>;
#define ALL(x) (x).begin(), (x).end()
#define coutY cout << "Yes" << endl;
#define coutN cout << "No" << endl;
#define arrIn(arr, start, N) for (ll i = (start); i < (N); ++i) cin >> arr[i];
#define arrOut(arr, start, N) for  (ll i = (start); i < (N); ++i) { cout << arr[i] <<" "; } cout << endl;
#define mod9 998244353
#define mod1 1000000007
void yn(bool tf) { cout << (tf ? "Yes\n" : "No\n"); }
void YN(bool tf) { cout << (tf ? "YES\n" : "NO\n"); }
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string abc="abcdefghijklmnopqrstuvwxyz";

//cout << fixed << setprecision(20) <<

bool kaibun(string S){
  string T=S;
  reverse(ALL(S));
  return S==T;
}

auto start = high_resolution_clock::now();

bool CheckTime(auto limit,auto eps){
  auto end = high_resolution_clock::now();
  return  duration_cast<milliseconds>(end - start).count()<limit-eps;
}

int main() {
  std::cin.tie(nullptr);
  std::ios_base::sync_with_stdio(false);
  ll Q;
  cin >> Q;
  for(ll i=0;i<Q;i++){
    ll N,M,K,P;
    cin >> N >> M >> K >> P;
    vl T(N);
    arrIn(T,0,N);
    vl C(N);
    arrIn(C,0,N);
    vl B(M);
    arrIn(B,0,M);
    vl D(M);
    arrIn(D,0,M);
    vl S(K+1);
    arrIn(S,1,K+1);
    vector<tuple<ll,ll,ll>> data;
    for(ll j=0;j<N;j++){
      for(ll k=0;k<M;k++){
        if(C[j]==D[k]){
          data.push_back(make_tuple(j+1,k+1,T[j]+B[k]-S[C[j]]));
        }else{
          data.push_back(make_tuple(j+1,k+1,T[j]+B[k]));
        }
      }
    }
    sort(ALL(data));
    cout << get<0>(data[P-1]) << ' ' << get<1>(data[P-1]) << endl;
  }
 
  return 0;
}
0