結果

問題 No.190 Dry Wet Moist
ユーザー yaoshimaxyaoshimax
提出日時 2015-05-11 00:30:33
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 573 bytes
コンパイル時間 66 ms
コンパイル使用メモリ 6,652 KB
実行使用メモリ 23,280 KB
最終ジャッジ日時 2023-09-20 01:51:22
合計ジャッジ時間 5,643 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,996 KB
testcase_01 AC 10 ms
5,892 KB
testcase_02 RE -
testcase_03 WA -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 WA -
testcase_08 RE -
testcase_09 RE -
testcase_10 WA -
testcase_11 RE -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 RE -
testcase_23 AC 273 ms
23,076 KB
testcase_24 RE -
testcase_25 AC 11 ms
6,104 KB
testcase_26 AC 10 ms
5,892 KB
testcase_27 WA -
testcase_28 RE -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(raw_input())
A=map(int,raw_input().split())
A.sort()
Dry=0
Wet=0
Moist=0
left=0
right =2*N-1
while left<right:
    if A[left]+A[right]<0:
        Dry+=1
        left+=1
        right-=1
    else:
        right-=1
left=0
right =2*N-1
while left<right:
    if -A[left]==A[right]:
        Moist+=1
        left+=1
        right-=1
    elif abs(A[left])<abs(A[right]):
        right-=1
    else:
        left-=1
left=0
right =2*N-1
while left<right:
    if A[left]+A[right]>0:
        Wet+=1
        left+=1
        right-=1
    else:
        left+=1
print Dry,Wet,Moist
0