結果
問題 |
No.202 1円玉投げ
|
ユーザー |
![]() |
提出日時 | 2019-04-25 18:01:45 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 698 bytes |
コンパイル時間 | 2,340 ms |
コンパイル使用メモリ | 201,880 KB |
最終ジャッジ日時 | 2025-01-07 02:55:38 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 36 TLE * 2 |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} //INSERT ABOVE HERE signed main(){ Int n; cin>>n; using P = pair<Int, Int>; set<P> sp; vector<P> dz; for(Int i=-100;i<=100;i++) for(Int j=-100;j<=100;j++) if(i*i+j*j<400) dz.emplace_back(i,j); Int cnt=0; for(Int i=0;i<n;i++){ Int x,y; cin>>x>>y; Int flg=0; for(auto p:dz) flg|=sp.count(P(x+p.first,y+p.second)); if(flg) continue; cnt++; sp.emplace(x,y); } cout<<cnt<<endl; return 0; }