Submission #471458

#TimeUsernameProblemLanguageResultExecution timeMemory
471458MohamedFaresNebili벽 (IOI14_wall)C++14
8 / 100
3077 ms10996 KiB
#include <bits/stdc++.h> #include "wall.h" using namespace std; using ll = long long; using ld = long double; using vl = vector<long long>; #define mp make_pair #define pb push_back #define pp pop_back #define ff first #define ss second #define lb lower_bound #define ub upper_bound #define all(x) (x).begin() , (x).end() const int N = 2*100005; const long long MOD = 1e9+7; const long double EPS = 0.000000001; const double PI = 3.14159265358979323846; const int nx[4]={1, -1, 0, 0}, ny[4]={0, 0, 1, -1}; long long gcd(int a, int b) { return (b==0?a:gcd(b, a%b)); } long long lcm(int a, int b) { return a*(b/gcd(a, b)); } long long fact(int a) { return (a==1?1:a*fact(a-1)); } void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){ for(int l=0;l<k;l++) { int t=op[l], a=left[l], b=right[l], w=height[l]; if(t==1) for(int i=a;i<=b;i++) finalHeight[i]=max(finalHeight[i], w); else if(t==2) for(int i=a;i<=b;i++) finalHeight[i]=min(finalHeight[i], w); } return; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...