Submission #553480

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5534802022-04-26 02:43:53quocnguyen1012Street Lamps (APIO19_street_lamps)C++14
60 / 100
2640 ms153220 KiB
#include "bits/stdc++.h"
using namespace std;
string to_string(string s) {
return '"' + s + '"';
}
string to_string(const char* s) {
return to_string((string) s);
}
string to_string(bool b) {
return (b ? "true" : "false");
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
bool first = true;
string res = "{";
for (const auto &x : v) {
if (!first) {
res += ", ";
}
first = false;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

street_lamps.cpp: In lambda function:
street_lamps.cpp:137:7: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
  137 |       while (j <= n and s[i] == s[j]) ++j; --j;
      |       ^~~~~
street_lamps.cpp:137:44: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
  137 |       while (j <= n and s[i] == s[j]) ++j; --j;
      |                                            ^~
street_lamps.cpp: In function 'int main()':
street_lamps.cpp:151:13: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  151 |   for (auto [l, r] : intervals) {
      |             ^
street_lamps.cpp:156:16: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  156 |     const auto&[op, a, b] = queries[i];
      |                ^
street_lamps.cpp:193:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  193 |         auto [l, r] = (*it);
      |              ^
street_lamps.cpp:200:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  200 |     for (auto [x, y, ignore] : addSeg[i]) t.fakeupdate(x, y);
      |               ^
street_lamps.cpp:201:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  201 |     for (auto [x, y, ignore] : delSeg[i]) t.fakeupdate(x, y);
      |               ^
street_lamps.cpp:205:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  205 |     for (auto [x, y, id] : addSeg[i]) {
      |               ^
street_lamps.cpp:48:20: warning: statement has no effect [-Wunused-value]
   48 | #define debug(...) 42
      |                    ^~
street_lamps.cpp:206:7: note: in expansion of macro 'debug'
  206 |       debug("add", x, y, id);
      |       ^~~~~
street_lamps.cpp:209:15: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  209 |     for (auto [x, y, id] : delSeg[i]){
      |               ^
street_lamps.cpp:48:20: warning: statement has no effect [-Wunused-value]
   48 | #define debug(...) 42
      |                    ^~
street_lamps.cpp:211:7: note: in expansion of macro 'debug'
  211 |       debug("del", x, y, id);
      |       ^~~~~
street_lamps.cpp:213:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
  213 |     auto [op, a, b] = queries[i];
      |          ^
street_lamps.cpp:48:20: warning: statement has no effect [-Wunused-value]
   48 | #define debug(...) 42
      |                    ^~
street_lamps.cpp:216:7: note: in expansion of macro 'debug'
  216 |       debug(res);
      |       ^~~~~
#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...