# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
775576 | 2023-07-06T14:21:12 Z | vjudge1 | T-Covering (eJOI19_covering) | C++17 | 1 ms | 596 KB |
#include <bits/stdc++.h> using namespace std; #define int long long #define mid (start+end)/2 #define faster ios_base::sync_with_stdio(false);cin.tie(NULL); //bana beş puan ver bool stop=true; int zi[4]; int32_t main(){ faster int n,m;cin>>n>>m; int dizi[n+1][m+1]; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>dizi[i][j]; } } int k;cin>>k; int ans=0; for(int i=0;i<k;i++){ int a,b;cin>>a>>b; a++;b++; if(a<=0 || b<=0 || a>n || b>m){ stop=false; } int maxi=0,cev1=0,cev2=0; int ort=dizi[a][b]; if(a+1<=n)zi[0]=dizi[a+1][b]; if(a-1>0)zi[1]=dizi[a-1][b]; if(b+1<=m)zi[2]=dizi[a][b+1]; if(b-1>0)zi[3]=dizi[a][b-1]; sort(zi,zi+n); for(int i=1;i<4;i++){ maxi+=zi[i]; } maxi+=ort; ans+=maxi; } if(stop)cout<<ans<<'\n'; else cout<<"No"<<'\n'; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 596 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 596 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 596 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 596 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 596 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |