Submission #163432

#TimeUsernameProblemLanguageResultExecution timeMemory
163432davitmargWall (IOI14_wall)C++17
8 / 100
3052 ms18280 KiB
/*DavitMarg*/ #include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <string> #include <cstring> #include <map> #include <set> #include <queue> #include <iomanip> #include <bitset> #include <stack> #include <cassert> #include <iterator> #include <fstream> #define mod 1000000007ll #define LL long long #define LD long double #define MP make_pair #define PB push_back #define all(v) v.begin(), v.end() using namespace std; #ifndef death #include "wall.h" #endif const int N = 2000006; void buildWall(int n, int k, int op[], int L[], int R[], int H[], int fin[]) { for (int i = 0; i < n; i++) fin[i] = 0; for (int j = 0; j < k; j++) { for (int i = L[j]; i <= R[j]; i++) if (op[j] == 1) { if (fin[i] < H[j]) fin[i] = H[j]; } else { if (fin[i] > H[j]) fin[i] = H[j]; } } } #ifdef death int main() { int N, K, L[102], R[102], OP[102], H[102], A[102]; cin >> N >> K; for (int i = 0; i < K; i++) cin >> OP[i] >> L[i] >> R[i] >> H[i]; buildWall(N, K, OP, L, R, H, A); for (int i = 0; i < N; i++) cout << A[i] << endl; return 0; } #endif /* 10 3 1 3 4 91220 1 5 9 48623 2 3 5 39412 */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...