Submission #729861

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
7298612023-04-24 18:20:55kthng수족관 1 (KOI13_aqua1)C++17
0 / 100
2 ms544 KiB
#include<iostream>
#include<algorithm>
#include<map>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
static const int inf = 1e8;
int n, k;
pii a[300000];
int b[300000];
map<pii, int> mp;
pii tree[600004];
void update(int idx, int s, int e, int x, int val) {
if (x < s || x > e) return;
if (s == e) {
tree[idx] = pii(val, x);
return;
}
int m = s + e >> 1;
update(idx << 1, s, m, x, val);
update(idx << 1 | 1, m + 1, e, x, val);
tree[idx] = min(tree[idx << 1], tree[idx << 1 | 1]);
}
pii get(int idx, int s, int e, int l, int r) {
if (r < s || e < l) return pii(inf, -1);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

aqua1.cpp: In function 'void update(int, int, int, int, int)':
aqua1.cpp:23:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   23 |  int m = s + e >> 1;
      |          ~~^~~
aqua1.cpp: In function 'pii get(int, int, int, int, int)':
aqua1.cpp:32:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   32 |  int m = s + e >> 1;
      |          ~~^~~
aqua1.cpp: In function 'int main()':
aqua1.cpp:71:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   71 |  scanf("%d", &n);
      |  ~~~~~^~~~~~~~~~
aqua1.cpp:74:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   74 |   scanf("%d%d", &t0, &t1);
      |   ~~~~~^~~~~~~~~~~~~~~~~~
aqua1.cpp:79:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   79 |  scanf("%d", &k);
      |  ~~~~~^~~~~~~~~~
aqua1.cpp:85:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   85 |   scanf("%d%d%d%d", &t0, &t1, &t2, &t3);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...