結果
| 問題 |
No.202 1円玉投げ
|
| コンテスト | |
| ユーザー |
chocorusk
|
| 提出日時 | 2018-12-14 10:25:25 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 654 ms / 5,000 ms |
| コード長 | 740 bytes |
| コンパイル時間 | 941 ms |
| コンパイル使用メモリ | 100,016 KB |
| 実行使用メモリ | 395,616 KB |
| 最終ジャッジ日時 | 2024-12-22 11:34:32 |
| 合計ジャッジ時間 | 12,628 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
bool dame[20041][20041];
int main()
{
vector<P> r;
for(int i=-20; i<=20; i++){
for(int j=-20; j<=20; j++){
if(i*i+j*j<400) r.push_back({i, j});
}
}
int n;
cin>>n;
int ans=0;
for(int i=0; i<n; i++){
int x, y; cin>>x>>y;
x+=20, y+=20;
if(dame[x][y]) continue;
ans++;
for(auto p:r) dame[x+p.first][y+p.second]=1;
}
cout<<ans<<endl;
return 0;
}
chocorusk