結果
問題 | No.202 1円玉投げ |
ユーザー | srjywrdnprkt |
提出日時 | 2022-12-23 05:36:17 |
言語 | C++17(clang) (17.0.6 + boost 1.83.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 813 bytes |
コンパイル時間 | 1,701 ms |
コンパイル使用メモリ | 110,604 KB |
実行使用メモリ | 11,272 KB |
最終ジャッジ日時 | 2023-08-11 11:46:05 |
合計ジャッジ時間 | 40,465 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 4,571 ms
9,740 KB |
testcase_01 | AC | 3,325 ms
9,740 KB |
testcase_02 | AC | 2 ms
4,384 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | AC | 127 ms
4,380 KB |
testcase_06 | AC | 3,070 ms
8,152 KB |
testcase_07 | AC | 3,200 ms
8,588 KB |
testcase_08 | AC | 3,244 ms
8,644 KB |
testcase_09 | AC | 1,612 ms
6,592 KB |
testcase_10 | AC | 581 ms
4,864 KB |
testcase_11 | AC | 1,284 ms
6,000 KB |
testcase_12 | AC | 1,337 ms
6,096 KB |
testcase_13 | AC | 658 ms
4,952 KB |
testcase_14 | AC | 155 ms
4,384 KB |
testcase_15 | AC | 1,634 ms
6,460 KB |
testcase_16 | TLE | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
ソースコード
#include <iostream> #include <vector> #include <cmath> #include <map> #include <set> #include <iomanip> #include <queue> #include <algorithm> #include <numeric> #include <deque> #include <complex> using namespace std; int main(){ vector<pair<long long, long long>> d; for (int i=-20; i<=20; i++){ for (int j=-20; j<=20; j++) if (i*i+j*j<400) d.push_back({i, j}); } long long N, X, Y, ans=0; cin >> N; set<pair<long long, long long>> st; for (int i=0; i<N; i++){ cin >> X >> Y; bool f=1; for (auto [dx, dy] : d){ if (st.count({X+dx, Y+dy})){ f = 0; break; } } if (f){ ans++; st.insert({X, Y}); } } cout << ans << endl; return 0; }