結果

問題 No.190 Dry Wet Moist
ユーザー yaoshimaxyaoshimax
提出日時 2015-05-11 00:31:40
言語 Python2
(2.7.18)
結果
AC  
実行時間 366 ms / 2,000 ms
コード長 573 bytes
コンパイル時間 42 ms
コンパイル使用メモリ 6,760 KB
実行使用メモリ 23,208 KB
最終ジャッジ日時 2023-09-20 01:51:29
合計ジャッジ時間 4,859 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,864 KB
testcase_01 AC 12 ms
6,108 KB
testcase_02 AC 12 ms
5,852 KB
testcase_03 AC 12 ms
5,892 KB
testcase_04 AC 11 ms
6,104 KB
testcase_05 AC 11 ms
5,860 KB
testcase_06 AC 11 ms
5,856 KB
testcase_07 AC 14 ms
6,112 KB
testcase_08 AC 12 ms
5,996 KB
testcase_09 AC 12 ms
6,020 KB
testcase_10 AC 12 ms
5,880 KB
testcase_11 AC 12 ms
5,964 KB
testcase_12 AC 165 ms
12,692 KB
testcase_13 AC 209 ms
14,588 KB
testcase_14 AC 159 ms
12,500 KB
testcase_15 AC 224 ms
15,548 KB
testcase_16 AC 288 ms
18,100 KB
testcase_17 AC 42 ms
7,296 KB
testcase_18 AC 129 ms
11,328 KB
testcase_19 AC 280 ms
17,908 KB
testcase_20 AC 193 ms
13,952 KB
testcase_21 AC 32 ms
6,844 KB
testcase_22 AC 361 ms
23,164 KB
testcase_23 AC 315 ms
23,076 KB
testcase_24 AC 366 ms
23,208 KB
testcase_25 AC 11 ms
5,896 KB
testcase_26 AC 11 ms
5,944 KB
testcase_27 AC 215 ms
16,900 KB
testcase_28 AC 93 ms
10,852 KB
testcase_29 AC 119 ms
12,148 KB
権限があれば一括ダウンロードができます

ソースコード

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