提交记录 12936
| 提交时间 |
评测时间 |
| 2020-07-05 21:02:53 |
2020-08-01 03:01:47 |
#include<cstdio>
#include<cstring>
#include<sys/mman.h>
int hash_max=240000,hash_step;
struct _hash
{
int v[240000];
void clear(){memset(v,0,sizeof v);}
int insert(int x)
{
int y=x%hash_max;
for(;v[y]&&v[y]!=x;y+=hash_step,y>=hash_max?y-=hash_max:0);
if(v[y]==x)return -1;v[y]=x;return y;
}
int find(int x)
{
int y=x%hash_max;
for(;v[y]!=x;y+=hash_step,y>=hash_max?y-=hash_max:0);
return y;
}
}pp;
int fa[240000];
inline int find(int x)
{
while(fa[x]>=0&&fa[fa[x]]>=0)x=fa[x]=fa[fa[x]];return fa[x]<0?x:fa[x];
}
inline void merge(int x,int y)
{
x=find(x),y=find(y);
if(x!=y){if(fa[x]<fa[y])fa[y]=x;else{if(fa[x]==fa[y])fa[y]--;fa[x]=y;}}
}
int q[100000][2],qm;
char *I;int _x;
int _(){_x=0;while(*I<48)*I++;while(*I>=48)_x=_x*10+*I++-'0';return _x;}
inline bool isp(int n)
{
for(int i=2;i*i<=n;i++)if(n%i==0)return 0;
return 1;
}
int main()
{
I=(char*)mmap(NULL,30000000,PROT_READ,MAP_PRIVATE,fileno(stdin),0);
int t,n,a,b,e,tmp;t=_();
printf("%d",t);
}
| Compilation | N/A | N/A | Compile OK | Score: N/A | 显示更多 |
| Testcase #1 | 4.85 us | 12 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #2 | 6.19 us | 12 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #3 | 6.26 us | 12 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #4 | 5.67 us | 12 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #5 | 5.78 us | 12 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #6 | 5.41 us | 12 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #7 | 5 us | 12 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #8 | 5.24 us | 12 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #9 | 4.76 us | 12 KB | Runtime Error | Score: 0 | 显示更多 |
| Testcase #10 | 5.02 us | 12 KB | Runtime Error | Score: 0 | 显示更多 |
Judge Duck Online | 评测鸭在线
Server Time: 2026-03-25 05:07:18 | Loaded in 1 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠