結果
問題 | No.202 1円玉投げ |
ユーザー |
|
提出日時 | 2015-05-07 12:04:04 |
言語 | C++11 (gcc 11.4.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 1,255 bytes |
コンパイル時間 | 1,341 ms |
コンパイル使用メモリ | 160,660 KB |
実行使用メモリ | 394,184 KB |
最終ジャッジ日時 | 2024-06-01 19:54:41 |
合計ジャッジ時間 | 35,460 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | RE | - |
testcase_02 | AC | 98 ms
394,028 KB |
testcase_03 | AC | 97 ms
393,972 KB |
testcase_04 | AC | 94 ms
394,116 KB |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | RE | - |
testcase_14 | RE | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | AC | 158 ms
394,040 KB |
testcase_18 | AC | 160 ms
394,136 KB |
testcase_19 | RE | - |
testcase_20 | RE | - |
testcase_21 | RE | - |
testcase_22 | AC | 96 ms
394,084 KB |
testcase_23 | RE | - |
testcase_24 | AC | 95 ms
394,184 KB |
testcase_25 | RE | - |
testcase_26 | AC | 95 ms
394,032 KB |
testcase_27 | RE | - |
testcase_28 | RE | - |
testcase_29 | RE | - |
testcase_30 | RE | - |
testcase_31 | AC | 94 ms
394,104 KB |
testcase_32 | AC | 95 ms
394,016 KB |
testcase_33 | RE | - |
testcase_34 | AC | 95 ms
394,036 KB |
testcase_35 | AC | 152 ms
394,072 KB |
testcase_36 | RE | - |
testcase_37 | RE | - |
testcase_38 | AC | 159 ms
394,064 KB |
testcase_39 | AC | 95 ms
393,968 KB |
testcase_40 | AC | 96 ms
394,000 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; #define all(c) (c).begin(),(c).end() #define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--) #define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++) #define rep(i,n) REP(i,0,n) #define iter(c) __typeof((c).begin()) #define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++) #define pb(a) push_back(a) #define pr(a) cout<<(a)<<endl #define PR(a,b) cout<<(a)<<" "<<(b)<<endl #define R cin>> #define F first #define S second #define ll long long bool check(int n,int m,int x,int y){return x>=0&&x<n&&y>=0&&y<m;} const ll MAX=1000000007,MAXL=1LL<<60,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1}; typedef pair<double,double> P; bool m[20001][20001]; double D(double x1, double y1, double x2, double y2) { return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)); } int main() { int n; cin >> n; int ans=0; bool v[20001]; memset(v,0,sizeof(v)); memset(m,0,sizeof(m)); rep(i,n) { int x,y; cin >> x >> y; bool ck=true; REP(j,-20,21) { if(x-j<0 || !v[x-j]) continue; REP(k,-20,21) { if(m[x-j][y-k]==1 && D(x-j,y-k,x,y)<20) { ck=false; break; } } } if(ck) { m[x][y]=1; v[x]=1; ans++; } } cout << ans << endl; return 0; }