Submission #891280

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8912802023-12-22 16:18:04fanwenRMQ (NOI17_rmq)C++17
23 / 100
633 ms600 KiB
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define ll long long
#define file(name) \
if(fopen(name".inp", "r")) \
freopen(name".inp", "r", stdin), freopen(name".out", "w", stdout);
const int MAX = 1e5 + 5;
int n, q, ans[MAX];
vector <tuple <int, int, int>> queries;
namespace sub1 {
bool check() {
return max(n, q) <= 10;
}
template<class T, T (*merge) (T, T)>
struct sparse_table {
vector <vector <T>> q;
int n;
sparse_table() {}
sparse_table(const vector <T> &v) : n((int) v.size()) {
q.push_back(v);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

rmq.cpp: In function 'void sub1::solve()':
rmq.cpp:66:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   66 |   for (int i = 0; i < n; ++i) cout << -1 << " "; exit(0);
      |   ^~~
rmq.cpp:66:50: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   66 |   for (int i = 0; i < n; ++i) cout << -1 << " "; exit(0);
      |                                                  ^~~~
rmq.cpp: In function 'int main()':
rmq.cpp:10:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |         freopen(name".inp", "r", stdin), freopen(name".out", "w", stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
rmq.cpp:86:5: note: in expansion of macro 'file'
   86 |     file("rmq");
      |     ^~~~
rmq.cpp:10:49: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   10 |         freopen(name".inp", "r", stdin), freopen(name".out", "w", stdout);
      |                                          ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
rmq.cpp:86:5: note: in expansion of macro 'file'
   86 |     file("rmq");
      |     ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...