結果
問題 | No.947 ABC包囲網 |
ユーザー | 37zigen |
提出日時 | 2019-12-10 02:36:04 |
言語 | Java19 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 915 bytes |
コンパイル時間 | 2,665 ms |
コンパイル使用メモリ | 74,176 KB |
実行使用メモリ | 64,800 KB |
最終ジャッジ日時 | 2023-09-05 17:56:13 |
合計ジャッジ時間 | 11,239 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 123 ms
60,176 KB |
testcase_01 | AC | 122 ms
55,520 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | AC | 124 ms
56,116 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 122 ms
56,136 KB |
testcase_09 | AC | 118 ms
55,968 KB |
testcase_10 | AC | 122 ms
56,004 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 176 ms
56,256 KB |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | TLE | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
testcase_44 | -- | - |
testcase_45 | -- | - |
testcase_46 | -- | - |
testcase_47 | -- | - |
testcase_48 | -- | - |
testcase_49 | -- | - |
testcase_50 | -- | - |
testcase_51 | -- | - |
testcase_52 | -- | - |
testcase_53 | -- | - |
testcase_54 | -- | - |
testcase_55 | -- | - |
testcase_56 | -- | - |
testcase_57 | -- | - |
testcase_58 | -- | - |
testcase_59 | -- | - |
ソースコード
//精度不足 //速度不足 //正三角形の条件分け不足 //記録用submit import java.util.*; import java.math.*; import java.io.*; class Main { public static void main(String[] args) { new Main().run(); } void run(){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); long[] px=new long[n]; long[] py=new long[n]; double[] ang=new double[2*n]; for(int i=0;i<n;++i){ px[i]=sc.nextLong(); py[i]=sc.nextLong(); ang[i]=Math.atan2(py[i],px[i]); if(ang[i]<0)ang[i]+=2*Math.PI; ang[i+n]=ang[i]+2*Math.PI; } int ans=0; Arrays.sort(ang); for(int i=0;i<2*n;++i){ for(int j=i+1;j<2*n;++j){ if(ang[j]-ang[i]>Math.PI/3) break; for(int k=j+1;k<2*n;++k){ if(ang[i]+Math.PI<ang[k]&&ang[k]<ang[j]+Math.PI){ ++ans; } } } } System.out.println(ans); } void tr(Object...objects){ System.out.println(Arrays.deepToString(objects)); } }