結果
問題 | No.202 1円玉投げ |
ユーザー | srup٩(๑`н´๑)۶ |
提出日時 | 2017-03-14 21:46:05 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,271 bytes |
コンパイル時間 | 1,166 ms |
コンパイル使用メモリ | 150,284 KB |
実行使用メモリ | 10,120 KB |
最終ジャッジ日時 | 2023-08-23 23:30:54 |
合計ジャッジ時間 | 4,214 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 81 ms
10,024 KB |
testcase_01 | AC | 67 ms
9,944 KB |
testcase_02 | AC | 2 ms
4,540 KB |
testcase_03 | AC | 3 ms
4,516 KB |
testcase_04 | AC | 3 ms
4,532 KB |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | AC | 67 ms
10,120 KB |
testcase_17 | AC | 72 ms
10,008 KB |
testcase_18 | AC | 70 ms
10,012 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | AC | 3 ms
4,584 KB |
testcase_23 | AC | 3 ms
4,592 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | AC | 3 ms
4,708 KB |
testcase_27 | AC | 3 ms
4,616 KB |
testcase_28 | WA | - |
testcase_29 | WA | - |
testcase_30 | AC | 3 ms
4,704 KB |
testcase_31 | AC | 3 ms
4,544 KB |
testcase_32 | AC | 3 ms
4,608 KB |
testcase_33 | WA | - |
testcase_34 | AC | 3 ms
4,588 KB |
testcase_35 | AC | 73 ms
10,116 KB |
testcase_36 | AC | 78 ms
10,044 KB |
testcase_37 | WA | - |
testcase_38 | AC | 77 ms
9,992 KB |
testcase_39 | AC | 3 ms
4,668 KB |
testcase_40 | WA | - |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vint; typedef pair<int,int> pint; typedef vector<pint> vpint; #define rep(i,n) for(int i=0;i<(n);i++) #define REP(i,n) for(int i=n-1;i>=(0);i--) #define reps(i,f,n) for(int i=(f);i<(n);i++) #define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++) #define all(v) (v).begin(),(v).end() #define eall(v) unique(all(v), v.end()) #define pb push_back #define mp make_pair #define fi first #define se second #define chmax(a, b) a = (((a)<(b)) ? (b) : (a)) #define chmin(a, b) a = (((a)>(b)) ? (b) : (a)) const int MOD = 1e9 + 7; const int INF = 1e9; const ll INFF = 1e18; int n; int x[100010], y[100010]; set<pair<int, int>> se[150][150]; int dist(int x, int y){ return x * x + y * y; } int main(void){ cin >> n; rep(i, n) cin >> x[i] >> y[i]; int ans = 0; rep(i, n){ // printf("x %d y %d\n", x[i], y[i]); int cx = x[i] / 150, cy = y[i] / 150; bool flag = true; for(auto u : se[cx][cy]){ int nx = u.fi, ny = u.se; auto d = dist(nx - x[i], ny - y[i]); // printf("%d %d %d \n", nx, ny, d); if(d < 400){ flag = false; break; } } if(flag){ ans++; se[cx][cy].insert(mp(x[i], y[i])); } } printf("%d\n", ans); return 0; }