結果
問題 |
No.202 1円玉投げ
|
ユーザー |
|
提出日時 | 2017-03-14 21:18:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 788 bytes |
コンパイル時間 | 756 ms |
コンパイル使用メモリ | 62,664 KB |
実行使用メモリ | 13,636 KB |
最終ジャッジ日時 | 2024-12-22 10:54:44 |
合計ジャッジ時間 | 104,846 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 25 TLE * 13 |
ソースコード
#pragma GCC optimize "O3" #pragma GCC target "tune=native" #pragma GCC target "avx" #include <cstdio> #include <algorithm> #include <thread> #define repeat(i,n) for (int i = 0; (i) < int(n); ++(i)) using namespace std; template <class T> inline T sq(T x) { return x*x; } constexpr int max_n = 100000; int x[max_n]; int y[max_n]; bool is_removed[max_n]; int main() { int n; scanf("%d", &n); repeat (i,n) scanf("%d%d", &x[i], &y[i]); thread th[4]; th[0] = thread([&]() { }); repeat (i,n) { int acc = 0; repeat (j,i) { acc += not is_removed[j] and sq(x[j] - x[i]) + sq(y[j] - y[i]) < sq(10 + 10); } is_removed[i] = acc; } int cnt = count(is_removed, is_removed + n, false); printf("%d\n", cnt); return 0; }