Borderou de evaluare (job #3126884)

Utilizator arckerDolteanu Gabriel arcker Data 7 mai 2023 01:23:32
Problema Tsunami Status done
Runda Arhiva de probleme Compilator cpp-64 | Vezi sursa
Scor 30

Raport evaluator

Compilare: main.cpp:3:338: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | I n,m,h,v[1005][1005],S,dy[]={0,0,-1,1},dx[]={-1,1,0,0},i,j,u,r,d;bool a[1005][1005];void f(I s,I t){std::queue<std::pair<I,I>>q;q.push({s,t});a[s][t]=1;while(!q.empty()){i=q.front().first;j=q.front().second;q.pop();for(d=0;d++<4;){u=i+dy[d];r=j+dx[d];if(u&&r&&u<=n&&r<=m&&!a[u][r]&&v[u][r]<h){q.push({u,r});a[u][r]=1;if(v[u][r])++S;}}}}main(){std::ifstream c("tsunami.in");c>>n>>m>>h;for(;++i<=n;)for(j=0;++j<=m;c>>v[i][j]);for(i=0;++i<=n;)for(j=0;++j<=m;)if(!v[i][j]&&!a[i][j])f(i,j);std::ofstream("tsunami.out")<<S;} | ^~~~
Test Timp executie Memorie folosita Mesaj Punctaj/test
10ms303kbIncorect0
20ms557kbIncorect0
329ms4214kbIncorect0
42ms819kbIncorect0
57ms2392kbIncorect0
639ms4939kbIncorect0
734ms5193kbOK10
89ms2916kbOK10
929ms4558kbIncorect0
1033ms5218kbOK10
Punctaj total30

Ceva nu functioneaza?