結果
問題 |
No.202 1円玉投げ
|
ユーザー |
|
提出日時 | 2015-05-04 00:32:56 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 667 bytes |
コンパイル時間 | 868 ms |
コンパイル使用メモリ | 66,040 KB |
実行使用メモリ | 18,880 KB |
最終ジャッジ日時 | 2024-12-22 07:34:45 |
合計ジャッジ時間 | 133,756 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 TLE * 20 |
ソースコード
#include <iostream> #include <complex> #include <list> class Ichien { std::complex<double> point; public: Ichien(double x, double y) : point(x, y) { }; bool kasanaru(Ichien *other) { return std::abs(this->point - other->point) < 20; } }; int main() { int n; double x, y; Ichien *ichi; std::list<Ichien *> list; std::cin >> n; for (int i = 0; i < n; ++i) { std::cin >> x >> y; ichi = new Ichien(x, y); bool okeru = true; for (auto other: list) { if (ichi->kasanaru(other)) { okeru = false; break; } } if (okeru) { list.push_back(ichi); } else { delete ichi; } } std::cout << list.size() << std::endl; return 0; }