Pagini recente » Borderou de evaluare (job #399954) | Borderou de evaluare (job #7384) | Borderou de evaluare (job #3291111) | Borderou de evaluare (job #3262516) | Borderou de evaluare (job #3126888)
Borderou de evaluare (job #3126888)
Raport evaluator
Compilare:
main.cpp:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
1 | #import<bits/stdc++.h>
| ^~~~~~
main.cpp:2:102: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
2 | struct P{int x,y;}c,t,d[]{{-1,0},{0,-1},{1,0},{0,1}};int n,m,h,x,y,a[1000][1000],r,*p;std::queue<P>q;main(){std::ifstream i{"tsunami.in"};for(i>>n>>m>>h;x<n;++x)for(y=-1;++y<m;)if(i>>a[x][y],!a[x][y])q.push({x,y});for(;!q.empty();q.pop())for(c=q.front(),x=0;x<4;)t={c.x+d[x].x,c.y+d[x++].y},p=&a[t.x][t.y],t.x>=0&&t.x<n&&t.y>=0&&t.y<m&&*p&&*p<h&&(*p=0,q.push(t),++r);std::ofstream{"tsunami.out"}<<r;}
| ^~~~
Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
1 | 0ms | 303kb | OK | 10 |
2 | 0ms | 557kb | OK | 10 |
3 | 44ms | 4403kb | OK | 10 |
4 | 2ms | 557kb | OK | 10 |
5 | 7ms | 2392kb | OK | 10 |
6 | 39ms | 6033kb | OK | 10 |
7 | 34ms | 4321kb | OK | 10 |
8 | 9ms | 3440kb | OK | 10 |
9 | 29ms | 4108kb | OK | 10 |
10 | 29ms | 5025kb | OK | 10 |
Punctaj total | 100 |