結果
| 問題 | No.202 1円玉投げ |
| コンテスト | |
| ユーザー |
inaenomaki
|
| 提出日時 | 2015-05-04 00:36:13 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 979 bytes |
| 記録 | |
| コンパイル時間 | 597 ms |
| コンパイル使用メモリ | 60,020 KB |
| 実行使用メモリ | 66,840 KB |
| 最終ジャッジ日時 | 2024-12-22 07:39:06 |
| 合計ジャッジ時間 | 111,731 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 25 TLE * 13 |
ソースコード
#include<iostream>
#include<vector>
bool checkhitcircle(int x1,int y1,int x2,int y2){
if ((( x1 - x2)*(x1 - x2) +(y1 - y2)*(y1 - y2))<400){
return true;
}
else{
return false;
}
}
int main(){
int throw_num;
std::cin >> throw_num;
std::cin.ignore();
bool deleted_coin_vec[100000] = { false };
std::vector<int> x_vec;
std::vector<int> y_vec;
int x_tmp;
int y_tmp;
for (int i = 0; i < throw_num; i++){
std::cin >> x_tmp >> y_tmp;
x_vec.push_back(x_tmp);
y_vec.push_back(y_tmp);
std::cin.ignore();
}
for (int i = 0; i < throw_num; i++){
for (int j = 0; j < throw_num; j++){
if (checkhitcircle(x_vec[i], y_vec[i], x_vec[j], y_vec[j])){
deleted_coin_vec[j] = true;
}
}
}
int leave_coin_num=0;
int deleted_coin_num=0;
for (int i = 0;i<100000;i++){
if (deleted_coin_vec[i]==true){
deleted_coin_num++;
}
}
leave_coin_num = throw_num - deleted_coin_num;
std::cout << leave_coin_num << std::endl;
return 0;
}
inaenomaki