Submission #924319

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9243192024-02-08 20:42:14AlphaMale06Two Currencies (JOI23_currencies)C++17
100 / 100
1998 ms167552 KiB
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define F first
#define S second
#define int long long
const int N = 1e5+5;
struct node{
int val, cnt, lc, rc;
};
node pers[50*N];
int tin[N], tout[N], h[N];
vector<pair<int, int>> cst;
vector<int> adj[N];
int timer=0;
int n, m, q;
vector<pair<int, int>> edges;
int p[N][18];
vector<int> roots;
int nodenum=0;
void dfs(int v, int par){
p[v][0]=par;
for(int i=1; i<18; i++){
p[v][i]=p[p[v][i-1]][i-1];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

currencies.cpp: In function 'void Build(long long int, long long int, long long int)':
currencies.cpp:47:14: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   47 |     int mid=l+r>>1;
      |             ~^~
currencies.cpp: In function 'void Update(long long int, long long int, long long int, long long int, long long int, long long int)':
currencies.cpp:64:14: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   64 |     int mid=l+r>>1;
      |             ~^~
currencies.cpp: In function 'std::pair<long long int, long long int> Get(long long int, long long int, long long int, long long int, long long int)':
currencies.cpp:82:14: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
   82 |     int mid=l+r>>1;
      |             ~^~
currencies.cpp: In function 'int main()':
currencies.cpp:142:22: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
  142 |             int s = l+r>>1;
      |                     ~^~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...