Pagini recente » Borderou de evaluare (job #504624) | Borderou de evaluare (job #3224540) | Borderou de evaluare (job #564876) | Borderou de evaluare (job #2414075) | Borderou de evaluare (job #3207863)
Borderou de evaluare (job #3207863)
Raport evaluator
Compilare:
main.cpp:2:266: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | using namespace std;int N=1<<16,t,n,i,o,r;void _(auto&a,int q=0){auto b=a;for(r=n=a.size();r/=2;){for(i=0;i<n/2;i+=r){auto w=pow(M_E,(q?-i:i)*M_PI/n*2.i);for(o=0;o<r;++o){auto u=a[i*2+o],v=w*a[i*2+o+r];b[i+o]=u+v;b[i+n/2+o]=u-v;}}swap(a,b);}if(q)for(auto&x:a)x/=n;}main(){fstream g("bacterii2.in");ofstream l("bacterii2.out");g>>t;while(t--){vector p(N,0i),q=p;g>>n;while(n--)g>>r,p[r]+=1;g>>o;for(;o--;)g>>r,q[r]+=1;_(p);_(q);
| ^~~~
main.cpp: In function 'int main()':
main.cpp:4:1: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
4 | for(i=N;i--;)p[i]*=q[i];_(p,1);for(i=0;i<N;i++){if(o=real(p[i])+.5)l<<i<<" "<<o<<'\n';}
| ^~~
main.cpp:4:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
4 | for(i=N;i--;)p[i]*=q[i];_(p,1);for(i=0;i<N;i++){if(o=real(p[i])+.5)l<<i<<" "<<o<<'\n';}
| ^
main.cpp:4:53: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
4 | for(i=N;i--;)p[i]*=q[i];_(p,1);for(i=0;i<N;i++){if(o=real(p[i])+.5)l<<i<<" "<<o<<'\n';}
| ~^~~~~~~~~~~~~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 59ms | 4800kb | OK | 100 |
Punctaj total | 100 |