結果

問題 No.1726 [Cherry 3rd Tune B] ジャマイカビアポン
ユーザー cureskolcureskol
提出日時 2021-10-29 22:30:24
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 543 bytes
コンパイル時間 2,403 ms
コンパイル使用メモリ 182,992 KB
実行使用メモリ 43,520 KB
最終ジャッジ日時 2024-04-16 15:21:36
合計ジャッジ時間 25,753 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,816 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 4 ms
6,944 KB
testcase_05 AC 4 ms
6,940 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 3 ms
6,944 KB
testcase_10 AC 3 ms
6,940 KB
testcase_11 AC 5 ms
6,940 KB
testcase_12 AC 9 ms
6,940 KB
testcase_13 AC 2 ms
6,944 KB
testcase_14 AC 388 ms
12,288 KB
testcase_15 AC 1,847 ms
27,008 KB
testcase_16 AC 2,426 ms
35,200 KB
testcase_17 AC 1,584 ms
26,240 KB
testcase_18 AC 1,191 ms
22,144 KB
testcase_19 AC 2,319 ms
31,616 KB
testcase_20 AC 514 ms
13,824 KB
testcase_21 AC 1,951 ms
30,208 KB
testcase_22 AC 921 ms
17,664 KB
testcase_23 AC 906 ms
18,304 KB
testcase_24 TLE -
testcase_25 TLE -
testcase_26 TLE -
testcase_27 TLE -
testcase_28 TLE -
testcase_29 TLE -
testcase_30 TLE -
testcase_31 TLE -
testcase_32 TLE -
testcase_33 TLE -
testcase_34 AC 2 ms
6,948 KB
testcase_35 AC 2 ms
6,944 KB
testcase_36 AC 2 ms
6,944 KB
testcase_37 AC 2 ms
6,944 KB
testcase_38 AC 144 ms
6,944 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:19:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions]
   19 |     for(auto [xy,va]:mp)ans=max(ans,va);
      |              ^

ソースコード

diff #

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;

#define REP(i,n) for(int i=0;i<(n);i++)

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  
  int n,m,ans=0;cin>>n>>m;
  vector<int> v(n),a(n),b(n),c(m),d(m);
  REP(i,n)cin>>v[i];
  REP(i,n)cin>>a[i]>>b[i];
  REP(j,m)cin>>c[j]>>d[j];
  REP(k,4){
    map<tuple<int,int>,int> mp;
    REP(i,n)REP(j,m)mp[{a[i]-c[j],b[i]-d[j]}]+=v[i];
    for(auto [xy,va]:mp)ans=max(ans,va);
    REP(i,n)a[i]*=-1;
    if(k==1)REP(i,n)b[i]*=-1;
  }
  cout<<ans<<endl;
}
  
0