Submission #199108

#TimeUsernameProblemLanguageResultExecution timeMemory
199108godwindDancing Elephants (IOI11_elephants)C++14
0 / 100
5 ms376 KiB
// O O O O O O O O O O O O O O O OO O OO O OO O O O TTCH O TTTCH O TTTCH O O O O #pragma GCC optimize("Ofast") #pragma GCC optimize("no-stack-protector") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("fast-math") #pragma GCC target("sse,sse2,sse3,ssse3,popcnt,abm,mmx") #include <iostream> #include <vector> #include <algorithm> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <stdio.h> #include <cstdio> #include <math.h> #include <cmath> #include <string> #include <cstring> #include <queue> #include <deque> #include <random> #include <iomanip> #include <bitset> #include <cassert> //#include "grader.h" using namespace std; #define y1 y11 #define double long double #define less less228 #define left left228 #define right right228 #define list list228 template<typename T> void uin(T &a, T b) { if (b < a) a = b; } template<typename T> void uax(T &a, T b) { if (b > a) a = b; } const int N = 150 * 1000 + 228; int n, l; int x[N]; int update(int id, int nv) { x[id] = nv; sort(x, x + n); int s = x[0]; int res = 1; for (int i = 0; i < n; ++i) { if (x[i] > s + l) { s = x[i]; ++res; } } return res; } void init(int nnnn, int llll, int xs[]) { n = nnnn; l = llll; for (int i = 0; i < n; ++i) { x[i] = xs[i]; } return; } // signed main() { // cin >> n >> l; // for (int i = 0; i < n; ++i) { // cin >> x[i]; // } // init(n, l, x); // while (1) { // int i, j; // cin >> i >> j; // cout << update(i, j) << '\n'; // } // return 0; // }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...