結果

問題 No.202 1円玉投げ
ユーザー 👑 kmjpkmjp
提出日時 2015-05-03 23:27:05
言語 C++11
(gcc 11.4.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 1,021 bytes
コンパイル時間 1,251 ms
コンパイル使用メモリ 151,476 KB
実行使用メモリ 8,988 KB
最終ジャッジ日時 2023-08-23 21:26:09
合計ジャッジ時間 37,172 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3,645 ms
8,880 KB
testcase_01 AC 3,376 ms
8,988 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 137 ms
4,376 KB
testcase_06 AC 2,865 ms
7,464 KB
testcase_07 AC 3,282 ms
7,944 KB
testcase_08 AC 3,336 ms
7,936 KB
testcase_09 AC 1,683 ms
6,156 KB
testcase_10 AC 612 ms
4,548 KB
testcase_11 AC 1,348 ms
5,584 KB
testcase_12 AC 1,384 ms
5,656 KB
testcase_13 AC 695 ms
4,664 KB
testcase_14 AC 167 ms
4,380 KB
testcase_15 AC 1,619 ms
6,072 KB
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<to;x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N;
int X[101000],Y[101000];

set<pair<int,int> > S;

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>N;
	FOR(i,N) {
		cin>>X[i]>>Y[i];
		int ok=1;
		for(x=X[i]-20;x<=X[i]+20 && ok;x++) 
		for(y=Y[i]-20;y<=Y[i]+20;y++) if((x-X[i])*(x-X[i])+(y-Y[i])*(y-Y[i])<400 && S.count(make_pair(x,y))) ok=0;
		if(ok) S.insert(make_pair(X[i],Y[i]));
	}
	cout<<S.size()<<endl;
	
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false);
	FOR(i,argc-1) s+=argv[i+1],s+='\n';
	FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	solve(); return 0;
}
0