結果
| 問題 |
No.202 1円玉投げ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-11-15 12:27:13 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 862 ms / 5,000 ms |
| コード長 | 665 bytes |
| コンパイル時間 | 556 ms |
| コンパイル使用メモリ | 65,224 KB |
| 実行使用メモリ | 320,000 KB |
| 最終ジャッジ日時 | 2024-12-22 11:34:06 |
| 合計ジャッジ時間 | 10,984 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}