Submission #60734599


Source Code Expand

#include<bits/stdc++.h>
#define il inline
#define all(x)    (x).begin(),(x).end()
#define mem(x,y)  memset((x),(y),sizeof((x)))
#define input(x)  freopen(x,"r",stdin)
#define output(x) freopen(x,"w",stdout)
using namespace std;
using db=double;
using ll=long long;
using ull=unsigned long long;
using pr=pair<int,string>;
#define p1 first
#define p2 second
vector<pr>ve;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);cout.tie(nullptr);
    int a,b,c,d,e;
    cin>>a>>b>>c>>d>>e;
    for(int i=1;i<32;++i)
    {
        string s="";int t=0;
        if(i&1) s+='A',t+=a;
        if(i&2) s+='B',t+=b;
        if(i&4) s+='C',t+=c;
        if(i&8) s+='D',t+=d;
        if(i&16)s+='E',t+=e;
        ve.push_back({-t,s});
    }
    sort(all(ve));
    for(int i=0;i<=30;++i) cout<<ve[i].p2<<'\n';
    return 0;
}

Submission Info

Submission Time
Task C - Perfect Standings
User ilibilib
Language C++ 17 (gcc 12.2)
Score 300
Code Size 858 Byte
Status AC
Exec Time 1 ms
Memory 3616 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 34
Set Name Test Cases
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
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3404 KiB
00_sample_01.txt AC 1 ms 3480 KiB
00_sample_02.txt AC 1 ms 3400 KiB
01_random_03.txt AC 1 ms 3464 KiB
01_random_04.txt AC 1 ms 3480 KiB
01_random_05.txt AC 1 ms 3540 KiB
01_random_06.txt AC 1 ms 3336 KiB
01_random_07.txt AC 1 ms 3476 KiB
01_random_08.txt AC 1 ms 3404 KiB
01_random_09.txt AC 1 ms 3484 KiB
01_random_10.txt AC 1 ms 3336 KiB
01_random_11.txt AC 1 ms 3424 KiB
01_random_12.txt AC 1 ms 3616 KiB
01_random_13.txt AC 1 ms 3336 KiB
01_random_14.txt AC 1 ms 3480 KiB
01_random_15.txt AC 1 ms 3472 KiB
01_random_16.txt AC 1 ms 3500 KiB
01_random_17.txt AC 1 ms 3480 KiB
01_random_18.txt AC 1 ms 3500 KiB
01_random_19.txt AC 1 ms 3484 KiB
01_random_20.txt AC 1 ms 3528 KiB
01_random_21.txt AC 1 ms 3480 KiB
01_random_22.txt AC 1 ms 3432 KiB
01_random_23.txt AC 1 ms 3476 KiB
01_random_24.txt AC 1 ms 3480 KiB
01_random_25.txt AC 1 ms 3468 KiB
01_random_26.txt AC 1 ms 3480 KiB
01_random_27.txt AC 1 ms 3496 KiB
01_random_28.txt AC 1 ms 3452 KiB
01_random_29.txt AC 1 ms 3464 KiB
01_random_30.txt AC 1 ms 3464 KiB
01_random_31.txt AC 1 ms 3332 KiB
01_random_32.txt AC 1 ms 3484 KiB
01_random_33.txt AC 1 ms 3536 KiB