fork download
  1. /**
  2.  * author: orzvanh14 ( )
  3.  * created: 23.12.2022 10:08:02
  4.  * too lazy to update time
  5. **/
  6. // i wants to take ioi
  7. //binhtinhtutinkhongcaycunhungmotkhikhongcontutinnualatuyetvong
  8. #include <bits/stdc++.h>
  9.  
  10. using namespace std;
  11.  
  12. #define int long long
  13. #define nn "\n"
  14. #define pi pair<int, int>
  15. #define fi first
  16. #define se second
  17. #define lb lower_bound
  18. #define ub upper_bound
  19. #define eb emplace_back
  20. #define pb push_back
  21. #define TASK " "
  22.  
  23. #define ms(a, x) memset(a, x, sizeof(a))
  24. #define all(a) a.begin(), a.end()
  25. #define All(a, n) a + 1, a + 1 + n
  26.  
  27. #define LOG 19
  28.  
  29.  
  30. const int INF = 1e18;
  31. const int mod = 1e9+7;
  32. const int N = 1e5 + 5;
  33. int MOD = 998244353;
  34. int bit[200000];
  35. struct node{
  36. int kc, u, hk;
  37. bool operator<(const node& other) const {
  38. return kc > other.kc;
  39. }
  40. };
  41. struct edge{
  42. int v, w, h;
  43. };
  44. int n, q;
  45. int a[N];
  46. int st[4 * N];
  47. void nhap(){
  48. cin >> n >> q;
  49. }
  50. void update(int id, int l, int r, int i, int v){
  51. if(l > i || i > r) return;
  52. else if(l == r){
  53. st[id] = v;
  54. }
  55. else{
  56. int m = l + r >> 1;
  57. update(id * 2, l, m, i, v);
  58. update(id * 2 + 1, m + 1, r, i, v);
  59. st[id] = st[2 * id] + st[2 * id + 1];
  60. }
  61. }
  62. int get(int id, int l, int r,int u, int v){
  63. if(l > v || r < u) return 0;
  64. if( l >= u && r <= v ){
  65. // doan [l..r] nam trong doan [u...v]
  66. return st[id];
  67. }
  68. else{
  69. int m = l + r >> 1;
  70. return get(id*2, l, m, u, v) + get(id*2+1, m+1, r, u, v);
  71. }
  72. }
  73. void solve(){
  74.  
  75. }
  76. signed main() {
  77. // freopen("piggyback.in", "r", stdin);
  78. // freopen("piggyback.out", "w", stdout);
  79. ios_base::sync_with_stdio(0);
  80. cin.tie(0);
  81. cout.tie(0);
  82. nhap();
  83. solve();
  84. return 0;
  85.  
  86. }
  87.  
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
Standard output is empty