Submission #1073698

#TimeUsernameProblemLanguageResultExecution timeMemory
1073698shezittWall (IOI14_wall)C++14
8 / 100
3067 ms18260 KiB
#include "wall.h" #include <bits/stdc++.h> using namespace std; using ll = long long; #define fore(a, b, c) for(int a=b; a<c; ++a) #define vi vector<int> #define pb push_back #define ii pair<int,int> #define F first #define S second #define all(x) x.begin(), x.end() #define sz(x) (int)x.size() #define dbg(x) cerr << #x << ": " << x << endl #define raya cerr << "===============" << endl void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){ fore(i, 0, k){ if(op[i] == 1){ // adding fore(j, left[i], right[i]+1){ finalHeight[j] = max(height[i], finalHeight[j]); } } else { // removing fore(j, left[i], right[i]+1){ finalHeight[j] = min(height[i], finalHeight[j]); } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...