結果
| 問題 |
No.202 1円玉投げ
|
| コンテスト | |
| ユーザー |
hogeover30
|
| 提出日時 | 2015-05-16 00:33:45 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 777 ms / 5,000 ms |
| コード長 | 294 bytes |
| コンパイル時間 | 1,558 ms |
| コンパイル使用メモリ | 170,800 KB |
| 実行使用メモリ | 9,856 KB |
| 最終ジャッジ日時 | 2024-12-22 09:11:05 |
| 合計ジャッジ時間 | 9,710 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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:35: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
3 | using namespace std;int n,x,y,f,r;main(){map<int,set<int>> a;for(cin>>n;cin>>x>>y;!f?a[x].insert(y),++r:(f=0))F(i,a,x)F(j,i->second,y)f|=(x-i->first)*(x-i->first)+(y-*j)*(y-*j)<400;cout<<r<<endl;}
| ^~~~
ソースコード
#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 n,x,y,f,r;main(){map<int,set<int>> a;for(cin>>n;cin>>x>>y;!f?a[x].insert(y),++r:(f=0))F(i,a,x)F(j,i->second,y)f|=(x-i->first)*(x-i->first)+(y-*j)*(y-*j)<400;cout<<r<<endl;}
hogeover30