Pagini recente » Borderou de evaluare (job #1969872) | Borderou de evaluare (job #2219508) | Borderou de evaluare (job #1072778) | Borderou de evaluare (job #3144478) | Borderou de evaluare (job #3228420)
Borderou de evaluare (job #3228420)
Raport evaluator
Compilare:
main.cpp:2:344: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | using namespace std;ifstream o("bile.in");ofstream g("bile.out");const int m=63505;int v[m],r[m],a[m],s[m],d,n,x,y,i,k,l;int f(int p){if(r[p]==p)return p;return f(r[p]);}bool h(int w){return w<0||w>=d*d;}int u(int w,int b) {if(h(w)||!r[w])return s[b];if(h(b)||!r[b])return s[w];w=f(w);b=f(b);if(w==b)return s[w];r[b]=w;s[w]+=s[b];return s[w];}main(){o>>n;d=n+2;i=n*n+1;while(--i){o>>x>>y;v[n*n-i]=(x-1)*d+y;}int q[4]={-d,-1,1,d};i=n*n;while(--i){r[v[i]]=v[i];s[v[i]]=1;k=4;while(--k){l=u(v[i],v[i]+q[k]);a[i-1]=max(a[i-1],l);}a[i-1]=max(a[i],a[i-1]);}i=n*n+1;while(--i)g<<a[n*n-i]<<'\n';}
| ^~~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 0ms | 303kb | Incorect | 0 |
2 | 0ms | 303kb | Incorect | 0 |
3 | 1ms | 303kb | Incorect | 0 |
4 | 1ms | 557kb | Incorect | 0 |
5 | 3ms | 819kb | Incorect | 0 |
6 | 9ms | 962kb | Incorect | 0 |
7 | 9ms | 1081kb | Incorect | 0 |
8 | 104ms | 1355kb | Time limit exceeded | 0 |
9 | 29ms | 1671kb | Incorect | 0 |
10 | 9ms | 1343kb | Incorect | 0 |
Punctaj total | 0 |