# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
701715 | 2023-02-22T02:23:14 Z | chenyan | Kocka (COCI18_kocka) | C++17 | 1000 ms | 3708 KB |
#include<bits/stdc++.h> using namespace std; #define int long long #define pii pair<int,int> #define ff first #define ss second #define all(x) x.begin(),x.end() #define pb emplace_back #define N 200010 vector<pii>v; int a[4][N]; signed main(){ ios::sync_with_stdio(0); cin.tie(0); int n,m,i,j,k; cin>>n; for(j=0;j<4;j++)for(i=0;i<n;i++)cin>>a[j][i]; for(i=0;i<n;i++){ for(j=0;j<3;j+=2){ if((a[j][i]==-1||a[j+1][i]==-1)&&a[j][i]!=a[j+1][i]){ cout<<"NE\n"; return 0; } if(a[j][i]>n-1-a[j+1][i]){ cout<<"NE\n"; return 0; } } for(k=0;k<a[0][i];k++){ if(a[2][k]==i||a[3][k]==n-1-i){ cout<<"NE\n"; return 0; } } for(k=0;k<a[1][i];k++){ if(a[2][n-1-k]==i||a[3][n-1-k]==n-1-i){ cout<<"NE\n"; return 0; } } } cout<<"DA\n"; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 340 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 340 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 340 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 340 KB | Output is correct |
2 | Correct | 1 ms | 340 KB | Output is correct |
3 | Correct | 1 ms | 340 KB | Output is correct |
4 | Correct | 1 ms | 340 KB | Output is correct |
5 | Correct | 1 ms | 340 KB | Output is correct |
6 | Correct | 1 ms | 340 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1052 ms | 3696 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1022 ms | 3708 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1024 ms | 3684 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |