提交记录 12264
| 提交时间 |
评测时间 |
| 2020-03-18 01:36:04 |
2020-08-01 02:53:16 |
#include<cstdio>
#include<iostream>
#include<cmath>
#include <setjmp.h>
using namespace std;
int x[1005],y[1005],z[1005],n,h,r;
bool beg[1005],End[1005],color[1005];
inline long long check(int i,int j) {
long long t1=x[i]-x[j];
long long t2=y[i]-y[j];
long long t3=z[i]-z[j];
return (t1*t1+t2*t2+t3*t3);
}
jmp_buf jp ;
void dfs(int x) {
color[x]=true;
if (End[x])
longjmp(jp,1);
for (int i=1; i<=n; i++) {
if (!color[i] && check(x,i)<=4LL*r*r)
dfs(i);
}
}
int main() {
int cas;
goto a;
b:
scanf("%d",&cas);
while (cas--) {
if(1) {
scanf("%ld%ld%ld",&n,&h,&r);
for (int i=1; i<=n; i++) {
scanf("%d%d%d",&x[i],&y[i],&z[i]);
beg[i]=(z[i]-r<=0);
End[i]=(z[i]+r>=h);
}
for (int i=1; i<=n; i++)
if (!color[i] && beg[i])
dfs(i);
printf("No\n");
} else {
a:
if(!setjmp(jp))
goto b;
printf("Yes\n");
}
}
return 0;
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 33.98 us | 44 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #2 | 43.72 us | 44 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #3 | 39.3 us | 44 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #4 | 40.04 us | 44 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #5 | 34.95 us | 44 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #6 | 34.35 us | 44 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #7 | 38.02 us | 44 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #8 | 37.87 us | 44 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #9 | 37.96 us | 44 KB | Wrong Answer | Score: 0 | 显示更多 |
| Testcase #10 | 38.47 us | 44 KB | Wrong Answer | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-03-26 08:52:35 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠