結果
| 問題 | No.202 1円玉投げ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-11-15 12:27:13 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 496 ms / 5,000 ms |
| + 454µs | |
| コード長 | 665 bytes |
| 記録 | |
| コンパイル時間 | 273 ms |
| コンパイル使用メモリ | 76,872 KB |
| 実行使用メモリ | 320,128 KB |
| 最終ジャッジ日時 | 2026-10-05 23:46:42 |
| 合計ジャッジ時間 | 7,945 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
#include<iostream>
using namespace std;
// MLE?
static bool d[20001][20001] = {};
int main(){
int n;
cin >> n;
int x, y, cnt = 0;
for(int i = 0; i < n; i++){
cin >> x >> y;
bool judge = true;
// 4 x 10^7
for(int j = max(0, x-20); j <= min(20000, x+20); j++){
for(int k = max(0, y-20); k <= min(20000, y+20); k++){
if(d[j][k] && (j-x)*(j-x)+(k-y)*(k-y) < 400){
judge = false;
break;
}
}
}
if(judge){
cnt++;
d[x][y] = true;
}
}
cout << cnt << endl;
return 0;
}