# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
755612 | 2023-06-10T12:12:50 Z | KemalK | Cyberland (APIO23_cyberland) | C++17 | 22 ms | 2124 KB |
#include "cyberland.h" #include <bits/stdc++.h> #include <vector> using namespace std; double solve(int N, int M, int K, int H, std::vector<int> x, std::vector<int> y, std::vector<int> c, std::vector<int> arr) { int ans[4]; if (N==2) { ans[0]=c[0]; } if (N==3) { for (int i=0; i<M; i++) { if (x[i]==0 && y[i]==H) { ans[0]=c[i]; } else if (x[i]==0) { ans[1]==c[0]+c[1]; if (arr[1]==0) { ans[1]=c[1]; } else if (arr[1]==2) { ans[1]==c[0]/2+c[1]; } } if (y[i]==0 && x[i]==H) { ans[2]=c[i]; } else if (y[i]==0) { ans[3]==c[0]+c[1]; if (arr[1]==0) { ans[3]=c[1]; } else if (arr[1]==2) { ans[3]==c[0]/2+c[1]; } } } } for (int i=0; i<3; i++) { for(int j=1; j<=3; j++) { if (ans[i]>ans[j]) { swap(ans[i],ans[j]); } } } cout<<ans[3]; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 340 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 15 ms | 340 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 18 ms | 332 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 22 ms | 2124 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 15 ms | 388 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 18 ms | 408 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 18 ms | 380 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 18 ms | 356 KB | Wrong Answer. |
2 | Halted | 0 ms | 0 KB | - |