提出 #60736202


ソースコード 拡げる

#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rrep(i,a,b) for(int i=(int)(a);i<=(int)(b);i++)
#define all(v) v.begin(),v.end()
typedef long long ll;
typedef pair<int,int> pii;
#include <atcoder/convolution>
#include <atcoder/modint>
//using mint = atcoder::modint1000000007;
using mint = atcoder::modint998244353;
//.val()でintとして出力 llに注意
ll INF=3e18;
ll modpow(ll a,ll x,ll M){//a^x modM
              ll r=1;
              for (; x>0; x>>=1,a=a*a%M) if (x&1) r=r*a%M;
             return r;
}

int A[5];

int main(){
  
  cin >> A[0] >> A[1] 
  >> A[2] >> A[3] >> A[4];
  
  vector<pair<int,string>>V;
  
  rrep(i,1,31){
    bitset<5>S(i);
    int score=0;
    string name={};
    rep(j,5){
      if(S.test(j)){score+=A[j];
      name=name+(char)('A'+j);
      }
    }
    V.push_back(make_pair(-score,name));
  }
  sort(all(V));
  
  rep(i,31) cout << V[i].second << endl;

}

提出情報

提出日時
問題 C - Perfect Standings
ユーザ MARTH
言語 C++ 20 (gcc 12.2)
得点 300
コード長 992 Byte
結果 AC
実行時間 1 ms
メモリ 3700 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 3
AC × 34
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt, 01_random_16.txt, 01_random_17.txt, 01_random_18.txt, 01_random_19.txt, 01_random_20.txt, 01_random_21.txt, 01_random_22.txt, 01_random_23.txt, 01_random_24.txt, 01_random_25.txt, 01_random_26.txt, 01_random_27.txt, 01_random_28.txt, 01_random_29.txt, 01_random_30.txt, 01_random_31.txt, 01_random_32.txt, 01_random_33.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3512 KiB
00_sample_01.txt AC 1 ms 3500 KiB
00_sample_02.txt AC 1 ms 3500 KiB
01_random_03.txt AC 1 ms 3556 KiB
01_random_04.txt AC 1 ms 3500 KiB
01_random_05.txt AC 1 ms 3512 KiB
01_random_06.txt AC 1 ms 3512 KiB
01_random_07.txt AC 1 ms 3700 KiB
01_random_08.txt AC 1 ms 3508 KiB
01_random_09.txt AC 1 ms 3464 KiB
01_random_10.txt AC 1 ms 3560 KiB
01_random_11.txt AC 1 ms 3424 KiB
01_random_12.txt AC 1 ms 3556 KiB
01_random_13.txt AC 1 ms 3524 KiB
01_random_14.txt AC 1 ms 3468 KiB
01_random_15.txt AC 1 ms 3700 KiB
01_random_16.txt AC 1 ms 3500 KiB
01_random_17.txt AC 1 ms 3512 KiB
01_random_18.txt AC 1 ms 3540 KiB
01_random_19.txt AC 1 ms 3640 KiB
01_random_20.txt AC 1 ms 3508 KiB
01_random_21.txt AC 1 ms 3428 KiB
01_random_22.txt AC 1 ms 3624 KiB
01_random_23.txt AC 1 ms 3628 KiB
01_random_24.txt AC 1 ms 3560 KiB
01_random_25.txt AC 1 ms 3516 KiB
01_random_26.txt AC 1 ms 3556 KiB
01_random_27.txt AC 1 ms 3432 KiB
01_random_28.txt AC 1 ms 3632 KiB
01_random_29.txt AC 1 ms 3548 KiB
01_random_30.txt AC 1 ms 3556 KiB
01_random_31.txt AC 1 ms 3484 KiB
01_random_32.txt AC 1 ms 3508 KiB
01_random_33.txt AC 1 ms 3468 KiB