結果

問題 No.3453 Crape Shop
コンテスト
ユーザー sasa8uyauya
提出日時 2026-02-28 19:28:41
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
RE  
実行時間 -
コード長 240 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 323 ms
コンパイル使用メモリ 78,200 KB
実行使用メモリ 84,380 KB
最終ジャッジ日時 2026-02-28 19:28:45
合計ジャッジ時間 3,880 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 RE * 2
other AC * 11 RE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

n=int(input())
c=list(map(int,input().split()))
p=list(map(int,input().split()))
for i in range(n):
	if all(c[j]>0 for j in range(2) if (p[i]>>j)&1):
		for j in range(2):
			if (p[i]>>j)&1:
				c[j]-=1
	else:
		peinr(i+1)
		exit()
print(-1)
0