結果

問題 No.412 花火大会
ユーザー Hank
提出日時 2017-07-19 13:04:59
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 732 bytes
コンパイル時間 760 ms
コンパイル使用メモリ 69,736 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-08 14:16:20
合計ジャッジ時間 1,595 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 15 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <math.h>
using namespace std;

#define ll long long

ll B,C,D;
ll N;
vector<ll>E;

ll judge(ll b, ll c, ll d){
  if(((b>=B)&&(c>=C))&&(d>=D)){
    return 1;
  }
  return 0;
}


ll pl(ll i){
  if(i<=0) return 1;
  else return pow(2,i);
}

int main(){

  ll inp;
  ll compare,count;
  ll result =0;
  ll outp;
  
  cin >> B >> C >> D;
  cin >> N;

  for(ll i =0;i<N;i++){
    cin >>inp;
    E.push_back(inp);
  }
  sort(E.begin(),E.end());

  if(N<3){
    cout << "0" << endl;
    return 0;
  }
  for(ll i =0;i<N;i++){
    for(ll j=i+1;j<N;j++){
      for(ll k=j+1;k<N;k++){
	result+=judge(E[i],E[j],E[k])*pl(i);
      }
    }
  }

  
  cout << result << endl;
  
}
0