結果
問題 | No.29 パワーアップ |
ユーザー |
![]() |
提出日時 | 2015-02-26 16:11:28 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 154 ms / 5,000 ms |
コード長 | 295 bytes |
コンパイル時間 | 2,180 ms |
コンパイル使用メモリ | 74,144 KB |
実行使用メモリ | 54,728 KB |
最終ジャッジ日時 | 2024-06-23 23:48:29 |
合計ジャッジ時間 | 5,876 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
import java.util.Scanner; public class Main { public static void main(String[] a) { Scanner s=new Scanner(System.in); s.nextInt(); int[] I=new int[11]; int U=0,D=0,i; while(s.hasNext()){ if(I[i=s.nextInt()]<0)U++;else D++; I[i]=~I[i]; } System.out.println(U+(D-U)/4); } }