結果

問題 No.2037 NAND Pyramid
ユーザー okkuukenkenokkuukenken
提出日時 2022-08-12 21:32:17
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 366 bytes
コンパイル時間 4,963 ms
コンパイル使用メモリ 265,944 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-24 08:27:27
合計ジャッジ時間 40,218 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 3 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 777 ms
4,348 KB
testcase_08 TLE -
testcase_09 AC 574 ms
4,348 KB
testcase_10 AC 1,517 ms
4,348 KB
testcase_11 AC 250 ms
4,348 KB
testcase_12 AC 91 ms
4,348 KB
testcase_13 AC 747 ms
4,348 KB
testcase_14 AC 848 ms
4,348 KB
testcase_15 AC 1,289 ms
4,348 KB
testcase_16 AC 1,015 ms
4,348 KB
testcase_17 TLE -
testcase_18 TLE -
testcase_19 AC 1,444 ms
4,348 KB
testcase_20 AC 1,456 ms
4,348 KB
testcase_21 AC 36 ms
4,348 KB
testcase_22 AC 36 ms
4,348 KB
testcase_23 AC 36 ms
4,348 KB
testcase_24 AC 36 ms
4,348 KB
testcase_25 TLE -
testcase_26 TLE -
testcase_27 AC 1,452 ms
4,348 KB
testcase_28 TLE -
testcase_29 TLE -
testcase_30 AC 35 ms
4,348 KB
testcase_31 AC 1,437 ms
4,348 KB
testcase_32 AC 1,441 ms
4,348 KB
testcase_33 AC 6 ms
4,348 KB
testcase_34 AC 18 ms
4,348 KB
testcase_35 AC 16 ms
4,348 KB
testcase_36 AC 6 ms
4,348 KB
testcase_37 AC 6 ms
4,348 KB
testcase_38 AC 6 ms
4,348 KB
testcase_39 AC 7 ms
4,348 KB
testcase_40 AC 11 ms
4,348 KB
testcase_41 AC 22 ms
4,348 KB
testcase_42 AC 23 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,k;
	string s;
	cin>>n>>k>>s;
	bitset<400000>bit;
	for(int i=0;i<n;i++)
		if(s[i]=='1')
			bit.set(i);
	for(int i=0;i<n-k;i++){
		bit&=bit>>1;
		bit.flip();
	}
	for(int i=0;i<k;i++)
		cout<<bit[i];
	cout<<endl;
}
0