結果
問題 |
No.202 1円玉投げ
|
ユーザー |
|
提出日時 | 2020-03-01 17:33:30 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 553 bytes |
コンパイル時間 | 828 ms |
コンパイル使用メモリ | 73,420 KB |
実行使用メモリ | 30,148 KB |
最終ジャッジ日時 | 2024-12-22 11:50:49 |
合計ジャッジ時間 | 6,646 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 RE * 22 |
コンパイルメッセージ
main.cpp:7:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 7 | main() | ^~~~
ソースコード
#include<iostream> #include<vector> #include<algorithm> using namespace std; int N; vector<pair<int,int> >A[1001][1001]; main() { cin>>N; int ans=0; for(;N--;) { int x,y;cin>>x>>y; bool ok=true; for(int lx=max(0,x/20-1),rx=min(2000,x/20+1);lx<=rx;lx++) { for(int ly=max(0,y/20-1),ry=min(2000,y/20+1);ly<=ry;ly++) { for(pair<int,int>p:A[lx][ly]) { int dx=p.first-x,dy=p.second-y; if(dx*dx+dy*dy<400)ok=false; } } } if(ok) { ans++; A[x/20][y/20].push_back(make_pair(x,y)); } } cout<<ans<<endl; }