結果

問題 No.1792 科学の甲子園
ユーザー maple_1016maple_1016
提出日時 2021-11-25 16:40:06
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,363 bytes
コンパイル時間 1,972 ms
コンパイル使用メモリ 170,416 KB
実行使用メモリ 4,368 KB
最終ジャッジ日時 2023-10-13 19:36:52
合計ジャッジ時間 4,186 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 2 ms
4,352 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 2 ms
4,368 KB
testcase_06 AC 1 ms
4,352 KB
testcase_07 AC 2 ms
4,352 KB
testcase_08 AC 2 ms
4,352 KB
testcase_09 WA -
testcase_10 AC 1 ms
4,352 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 1 ms
4,352 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 1 ms
4,352 KB
testcase_19 AC 2 ms
4,352 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 2 ms
4,352 KB
testcase_23 WA -
testcase_24 AC 2 ms
4,352 KB
testcase_25 AC 1 ms
4,348 KB
testcase_26 AC 2 ms
4,348 KB
testcase_27 AC 3 ms
4,348 KB
testcase_28 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,n) for(int i=1;i<=(n);++i)
#define repr(i,n) for(int i=2;i*i<=(n);++i)
#define ll long long
#define all(x) (x).begin(),(x).end()
#define sz(x) ((string)(x).size())
#define pb push_back
#define pob pop_back()
#define MMod (ll)1000000007
#define mmod (ll)998244353
#define setp(x) setprecision((ll)(x))
#define INF (ll)(1000000000000000000)
using namespace std;
using vi=vector<int>;
using vc=vector<char>;
using vb=vector<bool>;
using vl=vector<long long>;
using vvi=vector<vi>;
using vvl=vector<vl>;
using vvc=vector<vc>;
using vvb=vector<vb>;
using vpi=vector<pair<int,int>>;
using vpl=vector<pair<ll,ll>>;
using vs=vector<string>;
using pii=pair<int, int>;
using pll=pair<ll,ll>;
using pqi=priority_queue<int>;

int main(){
  int n; cin>>n;
  vvl p(n,vl(6));
  ll res=0;
  rep(i,n)rep(j,6) cin>>p[i][j];
  rep(i,6){
    for(int j=i+1;j<6;++j){
      vi x;
      ll point=1;
      rep(k,6){
        int a=0,b=0;
        if(k!=i&&k!=j){
          rep(l,n){
            if(p[l][k]>=a) {
              a=p[l][k];
              b=l;
            }
          }
          point*=a;
          x.pb(b);
        }
      }
      ll s=0,t=0;
      for(ll l:x){
        s=max(s,p[l][i]);
        t=max(t,p[l][j]);
      }
      point*=s*t;
      res=max(res,point);
    }
  }
  cout<<res<<endl;
}
0