# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
101529 | 2019-03-19T03:45:44 Z | errorgorn | Adriatic (CEOI13_adriatic) | C++14 | 11 ms | 9216 KB |
#include <cstdio> #include <utility> #include <cstring> #include <algorithm> using namespace std; typedef pair<int,int> ii; int n; ii arr[1505]; int asps[1505][1505]; void print(){ for (int x=0;x<n;x++){ for (int y=0;y<n;y++) printf("%d ",asps[x][y]); printf("\n"); } } int main(){ freopen("input.txt","r",stdin); memset(asps,63,sizeof(asps)); int a,b; scanf("%d",&n); for (int x=0;x<n;x++){ scanf("%d%d",&a,&b); arr[x]=ii(a,b); } for (int x=0;x<n;x++) for (int y=0;y<n;y++) if ((arr[x].first<arr[y].first && arr[x].second<arr[y].second)||(arr[x].first>arr[y].first && arr[x].second>arr[y].second)) asps[x][y]=1; for (int k=0;k<n;k++) for (int x=0;x<n;x++) for (int y=0;y<n;y++) asps[x][y]=min(asps[x][y],asps[x][k]+asps[k][y]); int _max; for (int x=0;x<n;x++){ _max=0; for (int y=0;y<n;y++){ if (x!=y) _max+=asps[x][y]; } printf("%d\n",_max); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 9216 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 9 ms | 9216 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 10 ms | 9088 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 11 ms | 9216 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 10 ms | 9216 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |