提出 #7396993


ソースコード 拡げる

/*input
3 3
abc


*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<long long, null_type, less<long long>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
#pragma GCC optimize("unroll-loops,no-stack-protector")
//order_of_key #of elements less than x
// find_by_order kth element
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
typedef long long int ll;
#define ld long double
#define pii pair<ll,ll>
#define f first
#define s second
#define pb push_back
#define REP(i,n) for(int i=0;i<n;i++)
#define sz(_a) (ll)(_a.size())
#define FILL(n,x) memset(n,x,sizeof(n))
#define ALL(_a) _a.begin(),_a.end()
const ll maxn=100005;
const ll maxlg=__lg(maxn)+2;
const ll INF64=8000000000000000000LL;
const int INF=0x3f3f3f3f;
const ll MOD=ll(1e9+7);
const ld PI=acos(-1);
const ld eps=1e-9;

ll mypow(ll a,ll b){
    if(b<=0) return 1;
    ll res=1LL;
    while(b){
        if(b&1) res=res*a%MOD;
        a=a*a%MOD;
        b>>=1;
    }
    return res;
}
vector<int> v;
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin>>n;
	v.resize(1<<n);
	REP(i,(1<<n)){
		cin>>v[i];
	}
	sort(ALL(v));
	vector<int> slm;
	slm.pb(v.back());
	v.pop_back();
	REP(i,n){
		REP(j,(1<<i)){
			if(slm[j]<=v[v.size()-j-1]){
				cout<<"No\n";
				return 0;
			}
		}
		REP(j,(1<<i)){
			slm.pb(v[v.size()-j-1]);
		}
	}
	cout<<"Yes\n";
}

提出情報

提出日時
問題 F - Many Slimes
ユーザ zaneyu
言語 C++14 (GCC 5.4.1)
得点 0
コード長 1527 Byte
結果 WA
実行時間 47 ms
メモリ 2424 KiB

ジャッジ結果

セット名 All Sample
得点 / 配点 0 / 600 0 / 0
結果
AC × 51
WA × 28
AC × 4
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
sample_01 AC 1 ms 256 KiB
sample_02 AC 1 ms 256 KiB
sample_03 AC 1 ms 256 KiB
sample_04 AC 1 ms 256 KiB
testcase_0 AC 1 ms 256 KiB
testcase_1 WA 1 ms 256 KiB
testcase_10 WA 33 ms 1280 KiB
testcase_11 WA 1 ms 256 KiB
testcase_12 AC 1 ms 256 KiB
testcase_13 WA 1 ms 256 KiB
testcase_14 WA 17 ms 768 KiB
testcase_15 WA 1 ms 256 KiB
testcase_16 AC 1 ms 256 KiB
testcase_17 WA 37 ms 1280 KiB
testcase_18 WA 1 ms 256 KiB
testcase_19 AC 1 ms 256 KiB
testcase_2 AC 19 ms 1404 KiB
testcase_20 WA 9 ms 512 KiB
testcase_21 WA 34 ms 1280 KiB
testcase_22 WA 2 ms 256 KiB
testcase_23 WA 34 ms 1280 KiB
testcase_24 WA 9 ms 512 KiB
testcase_25 WA 1 ms 256 KiB
testcase_26 WA 2 ms 256 KiB
testcase_27 WA 1 ms 256 KiB
testcase_28 WA 1 ms 256 KiB
testcase_29 WA 1 ms 256 KiB
testcase_3 WA 20 ms 1404 KiB
testcase_30 WA 1 ms 256 KiB
testcase_31 AC 44 ms 1280 KiB
testcase_32 AC 44 ms 1280 KiB
testcase_33 AC 45 ms 1280 KiB
testcase_34 AC 47 ms 1280 KiB
testcase_35 AC 44 ms 1280 KiB
testcase_36 AC 6 ms 384 KiB
testcase_37 AC 1 ms 256 KiB
testcase_38 AC 1 ms 256 KiB
testcase_39 AC 1 ms 256 KiB
testcase_4 AC 38 ms 2424 KiB
testcase_40 AC 6 ms 384 KiB
testcase_41 AC 12 ms 512 KiB
testcase_42 AC 1 ms 256 KiB
testcase_43 AC 45 ms 1280 KiB
testcase_44 AC 1 ms 256 KiB
testcase_45 AC 4 ms 384 KiB
testcase_46 AC 45 ms 1280 KiB
testcase_47 AC 1 ms 256 KiB
testcase_48 AC 1 ms 256 KiB
testcase_49 AC 1 ms 256 KiB
testcase_5 WA 38 ms 2424 KiB
testcase_50 AC 6 ms 384 KiB
testcase_51 AC 1 ms 256 KiB
testcase_52 AC 1 ms 256 KiB
testcase_53 AC 1 ms 256 KiB
testcase_54 AC 4 ms 512 KiB
testcase_55 AC 1 ms 256 KiB
testcase_56 AC 1 ms 256 KiB
testcase_57 AC 2 ms 384 KiB
testcase_58 AC 1 ms 256 KiB
testcase_59 AC 46 ms 2424 KiB
testcase_6 AC 46 ms 2424 KiB
testcase_60 AC 1 ms 256 KiB
testcase_61 AC 1 ms 256 KiB
testcase_62 AC 1 ms 256 KiB
testcase_63 AC 1 ms 256 KiB
testcase_64 AC 1 ms 256 KiB
testcase_65 AC 1 ms 256 KiB
testcase_66 AC 1 ms 256 KiB
testcase_67 WA 1 ms 256 KiB
testcase_68 WA 1 ms 256 KiB
testcase_69 AC 1 ms 256 KiB
testcase_7 WA 34 ms 1280 KiB
testcase_70 AC 1 ms 256 KiB
testcase_71 AC 1 ms 256 KiB
testcase_72 WA 1 ms 256 KiB
testcase_73 WA 1 ms 256 KiB
testcase_74 AC 1 ms 256 KiB
testcase_8 WA 34 ms 1280 KiB
testcase_9 WA 34 ms 1280 KiB