結果
問題 |
No.202 1円玉投げ
|
ユーザー |
![]() |
提出日時 | 2015-05-16 02:15:14 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 663 ms / 5,000 ms |
コード長 | 266 bytes |
コンパイル時間 | 1,552 ms |
コンパイル使用メモリ | 171,168 KB |
実行使用メモリ | 9,856 KB |
最終ジャッジ日時 | 2024-12-22 09:11:47 |
合計ジャッジ時間 | 9,067 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 38 |
コンパイルメッセージ
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated] 1 | #import<bits/stdc++.h> | ^~~~~~ main.cpp:3:33: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 3 | using namespace std;int x,y,f,r;main(){map<int,set<int>>a;for(cin>>x;cin>>x>>y;f=!f?a[x].insert(y),!++r:0)F(i,a,x)F(j,i->second,y)f|=hypot(x-i->first,y-*j)<20;cout<<r;} | ^~~~
ソースコード
#import<bits/stdc++.h> #define F(i,a,x)for(auto i=a.lower_bound(x-20);i!=a.upper_bound(x+40);++i) using namespace std;int x,y,f,r;main(){map<int,set<int>>a;for(cin>>x;cin>>x>>y;f=!f?a[x].insert(y),!++r:0)F(i,a,x)F(j,i->second,y)f|=hypot(x-i->first,y-*j)<20;cout<<r;}