結果
問題 | No.202 1円玉投げ |
ユーザー | latte0119 |
提出日時 | 2015-05-04 00:06:06 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 742 bytes |
コンパイル時間 | 1,168 ms |
コンパイル使用メモリ | 149,600 KB |
実行使用メモリ | 9,112 KB |
最終ジャッジ日時 | 2023-08-23 21:46:38 |
合計ジャッジ時間 | 4,309 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 94 ms
9,112 KB |
testcase_02 | AC | 2 ms
4,460 KB |
testcase_03 | AC | 2 ms
4,452 KB |
testcase_04 | WA | - |
testcase_05 | AC | 6 ms
4,732 KB |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
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 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 3 ms
4,556 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | AC | 3 ms
4,432 KB |
testcase_31 | AC | 3 ms
4,464 KB |
testcase_32 | AC | 3 ms
4,508 KB |
testcase_33 | AC | 2 ms
4,388 KB |
testcase_34 | WA | - |
testcase_35 | WA | - |
testcase_36 | WA | - |
testcase_37 | WA | - |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | AC | 2 ms
4,384 KB |
ソースコード
#include<bits/stdc++.h> using namespace std; int N; set<int>S[20001]; const double EPS=1e-8; int main(){ scanf("%d",&N); for(int _=0;_<N;_++){ int x,y; scanf("%d%d",&x,&y); bool flag=true; for(int i=max(x-20,0);i<min(20000,x+21)&&flag;i++){ set<int>::iterator it; it=S[i].lower_bound(y-20); for(;it!=S[i].end();it++){ if(*it>y+20)break; if(hypot(i-x,*it-y)<20+EPS){ flag=false; break; } } } if(flag){ S[x].insert(y); } } int ans=0; for(int i=0;i<=20000;i++)ans+=S[i].size(); printf("%d\n",ans); return 0; }