結果

問題 No.202 1円玉投げ
コンテスト
ユーザー willowoooo
提出日時 2015-05-04 06:33:24
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
MLE  
実行時間 -
コード長 709 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 716 ms
コンパイル使用メモリ 80,696 KB
実行使用メモリ 1,308,544 KB
最終ジャッジ日時 2026-05-28 16:16:39
合計ジャッジ時間 3,297 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 3
other MLE * 2 -- * 36
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<iostream>
#include<algorithm>
#include<string>
#include<vector>

using namespace std;

void solve202(){
	int N;
	cin >> N;
	int x, y;
	int ans = 0;
	vector<vector<int> > map(20000, vector<int>(20000));
/*	for (int i = 0; i < 20000; i++)
	{
		for (int j = 0; j < 20000; j++)
		{
			map[i][j] = 0;
		}
	}*/
	for (int count = 0; count < N; count++)
	{


		cin >> x >> y;
		
		if (map[x][y] == -1)
			continue;
		for (int i = -20; i <= 20; i++)
		{
			for (int j = -20; j <= 20; j++)
			{
				if ((abs(x + i)*abs(x + i) + abs(y + j)*abs(y + j)) <= 400){
					if (x+i >= 0 && y+j >= 0)
						map[x + i][y + j] = -1;
				}
			}
		}
		ans++;

	}
	cout << ans << endl;
}
int main(){
	solve202();
	return 0;
}
0