Submission #7405363


Source Code Expand

Copy
#include <bits/stdc++.h>
#define P pair<int,ll>
using namespace std;
typedef long long ll;
const int maxx=1e6+10;
int a[maxx];
struct S{
    int val,dep;
};
queue<S> q;
int main(){
    int n; cin>>n;
    int m=1<<n;
    for(int i=1;i<=m;i++){
        scanf("%d",&a[i]);
    }
    sort(a+1,a+1+m);
    reverse(a+1,a+1+m);
    int l=1;
    q.push(S{a[1],n});
    while(!q.empty()){
        S t=q.front(); q.pop();
        //cout<<t.val<<" "<<l<<endl;
        while(t.dep--){
            q.push(S{a[++l],t.dep});
            if(a[l]>=t.val){
                //cout<<l<<" "<<t.val<<" "<<endl;
                return 0*puts("No");
            }
        }
    }
    puts("Yes");
}

Submission Info

Submission Time
Task F - Many Slimes
User LIULIUii
Language C++14 (GCC 5.4.1)
Score 0
Code Size 708 Byte
Status WA
Exec Time 51 ms
Memory 1664 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:15:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&a[i]);
                          ^

Judge Result

Set Name All Sample
Score / Max Score 0 / 600 0 / 0
Status
AC × 64
WA × 15
AC × 4
Set Name Test Cases
All sample_01, sample_02, sample_03, sample_04, testcase_0, testcase_1, testcase_10, testcase_11, testcase_12, testcase_13, testcase_14, testcase_15, testcase_16, testcase_17, testcase_18, testcase_19, testcase_2, testcase_20, testcase_21, testcase_22, testcase_23, testcase_24, testcase_25, testcase_26, testcase_27, testcase_28, testcase_29, testcase_3, testcase_30, testcase_31, testcase_32, testcase_33, testcase_34, testcase_35, testcase_36, testcase_37, testcase_38, testcase_39, testcase_4, testcase_40, testcase_41, testcase_42, testcase_43, testcase_44, testcase_45, testcase_46, testcase_47, testcase_48, testcase_49, testcase_5, testcase_50, testcase_51, testcase_52, testcase_53, testcase_54, testcase_55, testcase_56, testcase_57, testcase_58, testcase_59, testcase_6, testcase_60, testcase_61, testcase_62, testcase_63, testcase_64, testcase_65, testcase_66, testcase_67, testcase_68, testcase_69, testcase_7, testcase_70, testcase_71, testcase_72, testcase_73, testcase_74, testcase_8, testcase_9
Sample sample_01, sample_02, sample_03, sample_04
Case Name Status Exec Time Memory
sample_01 AC 1 ms 256 KB
sample_02 AC 1 ms 256 KB
sample_03 AC 1 ms 256 KB
sample_04 AC 1 ms 256 KB
testcase_0 WA 1 ms 256 KB
testcase_1 AC 1 ms 256 KB
testcase_10 WA 37 ms 1280 KB
testcase_11 AC 1 ms 256 KB
testcase_12 AC 1 ms 256 KB
testcase_13 AC 1 ms 256 KB
testcase_14 AC 21 ms 1024 KB
testcase_15 AC 1 ms 256 KB
testcase_16 AC 1 ms 256 KB
testcase_17 AC 40 ms 1664 KB
testcase_18 AC 1 ms 256 KB
testcase_19 AC 1 ms 256 KB
testcase_2 WA 21 ms 1024 KB
testcase_20 AC 11 ms 640 KB
testcase_21 WA 37 ms 1408 KB
testcase_22 WA 2 ms 256 KB
testcase_23 WA 37 ms 1280 KB
testcase_24 WA 10 ms 512 KB
testcase_25 AC 1 ms 256 KB
testcase_26 WA 2 ms 256 KB
testcase_27 WA 1 ms 256 KB
testcase_28 WA 1 ms 256 KB
testcase_29 WA 1 ms 256 KB
testcase_3 AC 22 ms 1024 KB
testcase_30 WA 1 ms 256 KB
testcase_31 AC 48 ms 1280 KB
testcase_32 AC 48 ms 1280 KB
testcase_33 AC 49 ms 1280 KB
testcase_34 AC 49 ms 1280 KB
testcase_35 AC 49 ms 1280 KB
testcase_36 AC 7 ms 384 KB
testcase_37 AC 1 ms 256 KB
testcase_38 AC 1 ms 256 KB
testcase_39 AC 1 ms 256 KB
testcase_4 WA 42 ms 1664 KB
testcase_40 AC 7 ms 384 KB
testcase_41 AC 13 ms 512 KB
testcase_42 AC 1 ms 256 KB
testcase_43 AC 49 ms 1280 KB
testcase_44 AC 1 ms 256 KB
testcase_45 AC 4 ms 256 KB
testcase_46 AC 48 ms 1280 KB
testcase_47 AC 1 ms 256 KB
testcase_48 AC 1 ms 256 KB
testcase_49 AC 1 ms 256 KB
testcase_5 AC 42 ms 1664 KB
testcase_50 AC 7 ms 384 KB
testcase_51 AC 1 ms 256 KB
testcase_52 AC 1 ms 256 KB
testcase_53 AC 1 ms 256 KB
testcase_54 AC 4 ms 384 KB
testcase_55 AC 1 ms 256 KB
testcase_56 AC 1 ms 256 KB
testcase_57 AC 3 ms 256 KB
testcase_58 AC 1 ms 256 KB
testcase_59 AC 51 ms 1664 KB
testcase_6 AC 51 ms 1664 KB
testcase_60 AC 1 ms 256 KB
testcase_61 AC 1 ms 256 KB
testcase_62 AC 1 ms 256 KB
testcase_63 AC 1 ms 256 KB
testcase_64 AC 1 ms 256 KB
testcase_65 AC 1 ms 256 KB
testcase_66 AC 1 ms 256 KB
testcase_67 AC 1 ms 256 KB
testcase_68 AC 1 ms 256 KB
testcase_69 AC 1 ms 256 KB
testcase_7 AC 40 ms 1664 KB
testcase_70 AC 1 ms 256 KB
testcase_71 WA 1 ms 256 KB
testcase_72 AC 1 ms 256 KB
testcase_73 AC 1 ms 256 KB
testcase_74 AC 1 ms 256 KB
testcase_8 AC 40 ms 1664 KB
testcase_9 WA 38 ms 1280 KB