結果
| 問題 |
No.202 1円玉投げ
|
| コンテスト | |
| ユーザー |
Twizz
|
| 提出日時 | 2017-06-06 20:01:36 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 699 bytes |
| コンパイル時間 | 1,363 ms |
| コンパイル使用メモリ | 159,540 KB |
| 実行使用メモリ | 10,916 KB |
| 最終ジャッジ日時 | 2024-12-22 10:57:55 |
| 合計ジャッジ時間 | 107,362 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 TLE * 13 |
ソースコード
#include"bits/stdc++.h"
//#include<bits/stdc++.h>
using namespace std;
#define print(x) cout<<x<<endl;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define REP(i,a) for(int i=0;i<a;i++)
typedef long long ll;
typedef pair<int, int> PI;
typedef pair<int, PI> V;
typedef vector<int> VE;
const ll mod = 100000000000;
int n, x[100002], y[100002];
bool now[100002];
int main() {
cin >> n;
bool flag = 1;
REP(i, n)cin >> x[i] >> y[i];
REP(i, n) {
flag = 1;
rep(j, 0, i) {
if (now[j] == 0)continue;
ll dist = pow(x[i] - x[j], 2) + pow(y[j] - y[i], 2);
if (dist < 400) {
flag = 0;
}
}
if (flag)now[i] = 1;
}
int count = 0;
REP(i, n)if (now[i])count++;
print(count);
return 0;
}
Twizz