# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
23182 |
2017-05-04T10:17:26 Z |
RockyB |
벽 (IOI14_wall) |
C++14 |
|
3000 ms |
49296 KB |
#include <bits/stdc++.h>
#include "wall.h"
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
*/
//#include "wall.h"
#define f first
#define s second
#define pb push_back
#define pp pop_back
#define mp make_pair
#define sz(x) (int)x.size()
#define sqr(x) ((x) * 1ll * (x))
#define all(x) x.begin(), x.end()
#define rep(i, l, r) for (int i = l; i <= r; i++)
#define per(i, l, r) for (int i = l; i >= r; i--)
#define dbg(x) cerr << (#x) << " --> " << (x) << nl;
#define Kazakhstan ios_base :: sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define nl '\n'
#define ioi exit(0);
#define Toktama ""
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
//typedef tree < pair <int, int>, null_type, less < pair <int, int> >, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
const int N = 2e6 + 7, inf = 1e9 + 7, mod = 1e9 + 7;
const ll linf = (ll)1e18 + 7;
const int dx[] = {-1, 0, 1, 0, 1, -1, -1, 1}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
int n, k;
int type[N], l[N], r[N], x[N], ans[N];
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]) {
rep(i, 0, k - 1) {
rep(j, left[i], right[i]) {
if (op[i] == 1) finalHeight[j] = max(finalHeight[j], height[i]);
else finalHeight[j] = min(finalHeight[j], height[i]);
}
}
}
/*
int main() {
#ifndef Toktama
freopen (Toktama".in", "r", stdin);
freopen (Toktama".out", "w", stdout);
#endif
scanf ("%d%d", &n, &k);
rep(i, 1, k) {
scanf ("%d%d%d%d", &type[i], &l[i], &r[i], &x[i]);
l[i]++, r[i]++;
}
buildWall(n, k, type, l, r, x, ans);
rep(i, 1, n)
printf ("%d\n", ans[i]);
ioi
}*/
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
41080 KB |
Output is correct |
2 |
Correct |
0 ms |
41216 KB |
Output is correct |
3 |
Correct |
0 ms |
41080 KB |
Output is correct |
4 |
Correct |
26 ms |
41216 KB |
Output is correct |
5 |
Correct |
26 ms |
41216 KB |
Output is correct |
6 |
Correct |
29 ms |
41216 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
41080 KB |
Output is correct |
2 |
Correct |
166 ms |
48904 KB |
Output is correct |
3 |
Correct |
2123 ms |
44476 KB |
Output is correct |
4 |
Execution timed out |
3000 ms |
49296 KB |
Execution timed out |
5 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
41080 KB |
Output is correct |
2 |
Correct |
0 ms |
41216 KB |
Output is correct |
3 |
Correct |
0 ms |
41080 KB |
Output is correct |
4 |
Correct |
29 ms |
41216 KB |
Output is correct |
5 |
Correct |
29 ms |
41216 KB |
Output is correct |
6 |
Correct |
29 ms |
41216 KB |
Output is correct |
7 |
Correct |
0 ms |
41080 KB |
Output is correct |
8 |
Correct |
173 ms |
48904 KB |
Output is correct |
9 |
Correct |
2129 ms |
44476 KB |
Output is correct |
10 |
Execution timed out |
3000 ms |
49296 KB |
Execution timed out |
11 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
41080 KB |
Output is correct |
2 |
Correct |
0 ms |
41216 KB |
Output is correct |
3 |
Correct |
0 ms |
41080 KB |
Output is correct |
4 |
Correct |
29 ms |
41216 KB |
Output is correct |
5 |
Correct |
29 ms |
41216 KB |
Output is correct |
6 |
Correct |
29 ms |
41216 KB |
Output is correct |
7 |
Correct |
0 ms |
41080 KB |
Output is correct |
8 |
Correct |
176 ms |
48904 KB |
Output is correct |
9 |
Correct |
2129 ms |
44476 KB |
Output is correct |
10 |
Execution timed out |
3000 ms |
49296 KB |
Execution timed out |
11 |
Halted |
0 ms |
0 KB |
- |